Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Parenting / Linking Entities to Other Entities (Similar to Soldier of Fortune II) #1147

Open
stoofphen opened this issue May 1, 2023 · 2 comments

Comments

@stoofphen
Copy link

stoofphen commented May 1, 2023

Applicable mainly to Singleplayer, although would be useful for Multiplayer nonetheless. Not sure if this will be seen / considered, however it is something I'd appreciate like many other mappers to create a bit more dynamic events, things like ships with multiple parts and effects that all move in unison.

Basically significantly expanding modding capability to be able to parent entities such as FX_Runner, func_doors (virtually any dynamic entity) to 'stick' to another entity; such as a func_train or a moveable func_static. This capability is present in Raven's Soldier of Fortune II, using somewhat a similar engine as Jedi Knight II / Academy.

The set-up is quite simple (in terms of parenting entities in editor) however not sure how easy this would be to implement in the code. Essentially, you assign one entity (the desired parent entity, like a func_train) with the key 'parent' and value '1' and a targetname of course. Then create an additional entity named "func_brushmodel_child" - this entity is then set a key 'brushParent' and value is the targetname of the parent entity. From thereon, you add the key 'brushParent' with value (parent's targetname) to any entity that you want to link to the parent, as well as 'brushChild' with the targetname of the associated "func_brushmodel_child" entity. My understanding is that this "func_brushmodel_child" acts a sort of intermediary, not sure exactly of its true function however.

To complement this feature, being able to enable / disable parenting via an ICARUS script would make sense.

Thanks for reading!

@MoritzJT
Copy link

MoritzJT commented May 1, 2023

@stoofphen Can you list a few implemenations from SoFII?

What kind of entities have been supported in this manner - only func_ movers or is there a more comprehensive overview of the specific use cases?

I believe a lot of those can already be achieved with ICARUS and bmodel & glm model stuff - at least visually.

Does this parenting also include quaternion rotations for staying on a tilting / dynamically roffed platform?

How sophisticated is the approach in SoFII with regards to clientside prediction (which is lacking for the MP part for JKA - ICARUS moved geometry)?

@stoofphen
Copy link
Author

@MoritzJT Thank you for your response. I cannot say for certain the details around how it was implemented, and I am not sure if the SoFII source code is available for review. There is an 'unofficial source code' for SoFIIMP (https://github.com/ensiform/SOF2MPSDK) - this may be of potential use, as I can find a few references to entity 'parent' when doing a search through the repository.

I am aware that at least the func_static entity (mostly used for moving objects in SoFII, either with usual move command or the ROFF animation) can act as a parent, potentially func_door as well. Various point entities (target_speaker, NPCs, useable turrets) and other brush model entities (func_door, func_button, trigger_once/multiple) can be parented to the func_static, which maintains its relative origin and angles (possibly quaternion) to make it all move as one unit. Playing through SoFII you'll see that this feature was used extensively throughout the missions, particularly the ones involving vehicles and lifts / elevators.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants