Ismoh / NoitaMP

WIP! Not working, atm! NoitaMP, Noita Multiplayer: First synchronous multiplayer mod for Noita!
GNU General Public License v3.0
115 stars 12 forks source link

Developer want to improve minäs death #87

Open Ismoh opened 1 year ago

Ismoh commented 1 year ago

Is your feature request related to a problem? Please describe. After Minä died, client has to reconnect and server has to restart server. Game is more or less over, although remote Minä is still alive.

Describe the solution you'd like There has to be a revive or respawn function: Remote Minä coule revive dead ones, but you have to wait until a alive Minä stands still next to you. After revive Minä has x HP.

Describe alternatives you've considered Second and additional approach could be, that all dead Minäs will be respawn with 1hp in the next holy mountain, when one of the still alive Minäs jumped into HM.

Additional context Check if Minä is in holy mountain: https://discord.com/channels/453998283174576133/632303734877192192/1031232571050315816 Change Minäs death: https://discord.com/channels/453998283174576133/632303734877192192/972256748205391903

Ismoh commented 1 year ago

Branch based on #48 @SiriMoel is interested in doing this

Ismoh commented 1 year ago

When Minä dies of local client or server, remove camera component or however this thingy is called. It's a component to let the camera know who and which to follow. But make sure that there are other minäs, otherwise the run will never end.

Ismoh commented 1 year ago

@Conga0 is working on this. Thanks a ton!

Ismoh commented 1 year ago

Based on this

yes, you can set DamageModelComponent:wait_for_kill_flag_on_death="1" so the entity doesn't die player.xml and player_base.xml has to be changed. Need to double check namings. The other coding unfortunatelly needs to be added in NoitaComponents: https://github.com/Ismoh/NoitaMP/tree/87-developer-want-to-improve-min%C3%A4s-death/mods/noita-mp/files/scripts/noita-components This new component has to be added to minäs entities. Then globals has to be set, like 'isDead'. Then init.lua has to check for this global and send networkMessages

Ismoh commented 1 year ago

Might be worth it to investigate time for being able to sync components data. Not quite sure atm, how to implement this on a performance good way, but needs to be implemented, otherwise components like VSCs aren't updated on each peer.