Barotrauma

Barotrauma

Revive Bots - Endless Crew Respawns
 This topic has been pinned, so it's probably important
DieSchwarzeSpinne  [developer] 25 May, 2024 @ 6:12am
Bug reports
If you find any bugs/glitches, feel free to report them there
< >
Showing 1-15 of 17 comments
Ozone 25 May, 2024 @ 9:26am 
The objects the bot drops at its death are duplicated when it respawns.
It's minor.
One solution, which would also solve the save issue, would be to respawn the bot right before a transition, and destroy its body while doing so.
I don't know if there's an event which you can catch right before the transition to do this.
DieSchwarzeSpinne  [developer] 25 May, 2024 @ 2:04pm 
Originally posted by Ozone:
The objects the bot drops at its death are duplicated when it respawns.
It's minor.
One solution, which would also solve the save issue, would be to respawn the bot right before a transition, and destroy its body while doing so.
I don't know if there's an event which you can catch right before the transition to do this.

Thanks for reporting this bug. I can confrm that items were duplicated after them dying. I have found a fix for this problem and will release an uptade after testing some more.


The idea or reviving the bots right before a level transition sounds interesting. I will test this method in the upcoming days.
Ozone 25 May, 2024 @ 10:59pm 
I tested the new version and everything seems to work perfectly fine. Nice!
Doge 30 May, 2024 @ 10:00pm 
If bot gets turned into a husk, they don't get revived
Dunno if this is a bug or the way game is working, but fixing it (if possible) would be nice
DieSchwarzeSpinne  [developer] 31 May, 2024 @ 6:21am 
Originally posted by Doge:
If bot gets turned into a husk, they don't get revived
Dunno if this is a bug or the way game is working, but fixing it (if possible) would be nice
This probably happens because the bot doesn't really 'die'. He just changes teams. I hope healing him and changing his team again works. I'll see what I can do.
DieSchwarzeSpinne  [developer] 31 May, 2024 @ 8:23am 
Originally posted by DieRauteEnte:
Originally posted by Doge:
If bot gets turned into a husk, they don't get revived
Dunno if this is a bug or the way game is working, but fixing it (if possible) would be nice
This probably happens because the bot doesn't really 'die'. He just changes teams. I hope healing him and changing his team again works. I'll see what I can do.

I just uploaded a fix for this issue. Now bots won't transform into husks and should revive after dying.

Better behaviour would be that bots can still transform but revive regardless. Unfortunately because the husk transformation is strongly embedded into the code it is really hard to change the behaviour. When a bot dies he is deleted and a new husk character is created. When trying to revive the bot at the end of the round, the revive fails because he doesn't exists anymore.
Last edited by DieSchwarzeSpinne; 31 May, 2024 @ 8:23am
Doge 31 May, 2024 @ 4:46pm 
I see, but there is another problem my bot died from a mudraptor and i think it started eating him
I saved the corpse after about 20 seconds of eating and when i docked he did not respawn
I still had the corpse when i docked but after docking he turned into a duffel bag
Is mudraptor eating his corpse for a bit also counts as him not existing anymore?
DieSchwarzeSpinne  [developer] 31 May, 2024 @ 5:26pm 
Originally posted by Doge:
I see, but there is another problem my bot died from a mudraptor and i think it started eating him
I saved the corpse after about 20 seconds of eating and when i docked he did not respawn
I still had the corpse when i docked but after docking he turned into a duffel bag
Is mudraptor eating his corpse for a bit also counts as him not existing anymore?

I expected this to not work and tested it. But it seemed like even if limbs are torn of characters they will still revive. Though I only tested it by blowing them up and scattering their bodyparts.
After now testing it with monsters it seems like your whole character is deleted when monsters eat you so reviving is impossible.

I fear that this problem will not be as easy to fix as the others. Maybe I can install a failsafe that uses my old method of reviving them. That method works by not letting them get removed in the crewmanager. But this brought a lot of bugs with it. Maybe this way bots can still revive in such situations although not as "smoothly" as in the current version but still better than not reviving them at all.

For now this bug will persist until I find a good solution for this. I have some ideas in mind but this needs further testing.
Last edited by DieSchwarzeSpinne; 31 May, 2024 @ 6:32pm
Doge 31 May, 2024 @ 6:38pm 
Okay thanks for help
Good luck fixing this
DieSchwarzeSpinne  [developer] 1 Jun, 2024 @ 5:44pm 
Originally posted by Doge:
Okay thanks for help
Good luck fixing this
I'm happy to inform you that this issue should be fixed in the newest update.

Bots will still revive as usual but in the rare cases when their body is destroyed and the normal way of reviving them is impossible, they will now revive by using a new body.

To see a more detailed explanation of how/what exactly changed you can view the changelogs and read the updated description.

If you find any more bugs in this new version, please report them again, I really appreciate it.

Again thank you for reporting this bug and improving my mod!
Last edited by DieSchwarzeSpinne; 1 Jun, 2024 @ 5:46pm
Doge 1 Jun, 2024 @ 5:56pm 
Great news!
Thanks for improving the mod!
JustNU 25 Jun, 2024 @ 11:00am 
seems like something is broken (?) after the last barotrauma update? or at very least, its broken for me
bots dont respawn, and the console throws an error of
[CL LUA ERROR] USERNAME C:/Users/USERNAME/AppData/Local/Daedlic Entertaiment GmbH/Barotrauma/WorkshopMods/Installed/3253027507/Lua/Autorun/Revive Bots.lua:(157,16-45): attempt to index a nil value
JustNU 25 Jun, 2024 @ 11:05am 
update: following code deals with taking away genes on respawns (all my bots have gene splicers, but have NO genes in them), if i turn that config option off, bots respawn just fine
i think you should check if gene splicer inventory is empty first?
DieSchwarzeSpinne  [developer] 26 Jun, 2024 @ 5:56am 
Originally posted by JustNU:
seems like something is broken (?) after the last barotrauma update? or at very least, its broken for me
bots dont respawn, and the console throws an error of
[CL LUA ERROR] USERNAME C:/Users/USERNAME/AppData/Local/Daedlic Entertaiment GmbH/Barotrauma/WorkshopMods/Installed/3253027507/Lua/Autorun/Revive Bots.lua:(157,16-45): attempt to index a nil value


Originally posted by JustNU:
update: following code deals with taking away genes on respawns (all my bots have gene splicers, but have NO genes in them), if i turn that config option off, bots respawn just fine
i think you should check if gene splicer inventory is empty first?

Thanks for reporting this bug so precisely. This helped me in fixing the bug rather quickly. The mod should now work correctly.
One4ae4ek 24 Nov, 2024 @ 2:22pm 
C:/Users/USERNAME/AppData/Local/Daedlic Entertaiment GmbH/Barotrauma/WorkshopMods/Installed/3253027507/Lua/Autorun/Revive Bots.lua:(220,37-39: function call doesn't match any overload

two bots were lost during the mission, one remained dead on the ship, and the other crawled out through the hull. As a result, not a single bot was revived.

I assume that this is because of the bot that has disappeared and it is trying to be reborn first, which is why the second one cannot even be reborn. I don't understand how to resurrect a bot without using console commands.
< >
Showing 1-15 of 17 comments
Per page: 1530 50