Skip to content

Port Vector effect system from KratosAI to PhobosAI#2265

Open
KenosisM wants to merge 1 commit into
Phobos-developers:developfrom
KenosisM:feature/vector-port
Open

Port Vector effect system from KratosAI to PhobosAI#2265
KenosisM wants to merge 1 commit into
Phobos-developers:developfrom
KenosisM:feature/vector-port

Conversation

@KenosisM

Copy link
Copy Markdown

Ported from Kratos code base, the phobos ver of the all mighty vector attach effect. All by vibe coding (including this PR) so human review is very much needed.
preview gifs (kratos based):
https://www.bilibili.com/opus/1214163469064994817
https://www.bilibili.com/opus/1214494881641136144
https://www.bilibili.com/opus/1215222921544335378

tags:
https://wiki.ra2diy.com/w/Kratos:%E8%AF%B4%E6%98%8E%E4%B9%A6/%E7%A7%BB%E5%8A%A8%E5%99%A8

for phobos support use you need to stick the AE to the firer and add flag:
Vector.AffectTechno=no
Vector.AffectBullets=yes

so that the bullets from the certain unit will draw the required patterns.
Or maybe the AI is misunderstanding, the AE should be sticked directly to the bullet?

Anyway. HUMAN REVIEW REQUIRED.

INI sample:

Image=DRED
Primary=XSYetbSnHGrS
AttachEffect.AttachTypes=124125sa
[XSYetbSnHGrS]
Damage=40
ROF=40
Range=60
Burst=1
Projectile=Mi3ttPJBHSSX
Speed=30
Warhead=XG1PsFpzbCDZ
AttachFire.CheckVersus=no
ProjectileRange=114514
[Mi3ttPJBHSSX]
Arm=no
Shadow=no
Proximity=no
Ranged=yes
AA=yes
AG=yes
Image=DRAGON
ROT=100
SubjectToCliffs=no
SubjectToElevation=no
SubjectToWalls=no
AttachEffect.AttachTypes=124125sa
[124125sa]
Duration=40
Vector.CircleAnglePerStep=10
Vector.Origin=Launcher
Vector.Force=yes
Vector.CircleRadius=2000
Vector.SyncFacing=no
Vector.OriginNoUpdate=yes
Vector.CircleOrigin=0,0,2000
AttachOnceInTechnoType=yes
Vector.AllowOriginTilt=yes
Vector.AffectTechno=no
Vector.AffectBullets=yes

Comment thread src/Ext/Bullet/Body.cpp Outdated
@phoboscn-bot

Copy link
Copy Markdown

To Chinese users:
This pull request has been mentioned on Phobos CN. There might be relevant details there:

致中文用户:
此拉取请求已在 Phobos CN 上被提及。那里可能有相关详细信息:

https://www.phoboscn.top/t/topic/595/1

@NetsuNegi NetsuNegi added the ⚙️T2 T2 maintainer review is sufficient label Jun 22, 2026
Comment on lines +544 to +552
else
{
pObject->SetLocation({ currentPos.X + moveDisp.X, currentPos.Y + moveDisp.Y, currentPos.Z + moveDisp.Z });
if (pType->Vector_Freeze)
{
if (auto const pFoot = abstract_cast<FootClass*>(pObject))
pFoot->StopMoving();
}
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty sure these are not enough. Simply SetLocation may be good for BulletClass, but not for FootClass.
I suggest creating a Locomotor to handle this. From my understanding, many parts of the game access the Locomotor of FootClass. Moving characters without going through the Locomotor may cause inconsistencies at these access points.
See #2179. Due to the complexity of this section, I cannot guarantee that it is completely correct.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ofc. BTW I don't think vector on techno is good - maybe just keep the bullet part, or only support jumpjet&aircraft

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, @TaranDahl is completely correct. if you want to manipulate FootClass movement - you must do it through locomotors. Otherwise you're opening a can of worms and fighting the game design.

I did Techno Attachment this way first, it went completely bonkers on many locomotors and had inexplicable bugs, freezes and crashes. When I remade it to be a locomotor - everything got fine.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually I dunno what the heck Deepusheek has written. It needs ofc serious redo - or at least give it stable examples of how things should work.

@github-actions

Copy link
Copy Markdown

Nightly build for this pull request:

This comment is automatic and is meant to allow guests to get latest nightly builds for this pull request without registering. It is updated on every successful build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs testing ⚙️T2 T2 maintainer review is sufficient

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants