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
NPC's cant use modded welding tools because of tag restrictions #5527
Comments
I would totally love to see this issue solved. Helpful for "bots vs a handful of mods". |
@Regalis11, yeah, it is right, my bad (incen.tanks actually got this tag and i just didnt saw 'em) I recommend trying EK utilities tools as testing platform or just remove Whole main problem that Vanilla edit testing version:
EK Utilities testing version:
UPDATE 3: you can use this build to see my crutch fix for this problem |
Ahh I see, thank you for the clarification. So essentially the problem was that the "weldingfuel" tag can't be added without making the custom fuel compatible with the welding tool as well? Fixed in https://github.com/Regalis11/Barotrauma-development/commit/4bcce420b4ad4309e130391b2f8429f7f44e178d by changing the "weldingfuel" tag to "weldingtoolfuel" in the welding tool. In other words, only things that have the tag "weldingtoolfuel" are compatible with the welding tool, and the bots use the "weldingfuel" tag to find suitable fuel for their current tool. Replacing the tag with "weldingequipment" would've also been an option, but the tag is used to find a suitable tool, so it could lead to bots trying to use the fuel tanks for fixing leaks. |
Thank you very much for fixing this bug! Issue was exactly like you said ( So essentially the problem was that the "weldingfuel" tag can't be added without making the custom fuel compatible with the welding tool as well? ) |
Thanks for taking the time to close this, but I'll reopen the ticket until we've tested and verified that the fix is working as intended. :) |
So the intention was to not make the custom welding fuel compatible with the vanilla welding tool, but still allow bots to use that custom welding tool and the custom fuel properly? Didn't test it, but I assume the commit fixes it. I'm sure there would be similar issues with other items too, because I've not thought that someone would want to make an item that would be used like some vanilla item using special expendables with it, but which should not work with the vanilla item. Like diving suits, masks, battery-powered items etc... To allow that, I think we'd have to do the same tag changes for them too. |
Yep, that was the idea. Took me a while to understand this correctly as well. :D |
I applied the proper tags in my EK Utilities balance patch but it's not fixed in vanilla EK Utilities because.... I can't contact EK in any way, shape, or form. |
I have searched the issue tracker to check if the issue has already been reported.
Description
Bots can only refuel welding tanks with the basic weldingfuel item, not any item with a weldingfuel tag.
(also they cant use modded welding tools like foam sprayer from EK utilities since canister it not containing
weldingfuel
tag and bots will try to fill sprayer with default welding fuel instead of proper one)Steps To Reproduce
Remove all weldingfuel item from the sub (I recommend using a shuttle)
Spawn a bunch of incendium fuel tanks.
Create a leak.
Version
v0.12.0.3+
Additional information
I'm pretty sure I've tracked it down to this line here:
Barotrauma/Barotrauma/BarotraumaShared/SharedSource/Characters/AI/Objectives/AIObjectiveFixLeak.cs
Line 93 in 245b48c
TryAddSubObjective(ref refuelObjective, () => new AIObjectiveContainItem(character, "weldingfuel", weldingTool.GetComponent(), objectiveManager, spawnItemIfNotFound: character.TeamID == CharacterTeamType.FriendlyNPC),
On line 91, the bot checks if it doesn't have any weldingfuel by tag. When it creates this objective, it is looking for weldingfuel by identifier.
Possible fix: replace every "weldingfuel" with "weldingequipment" in
AIObjectiveFixLeak.cs
and add "weldingequipment" to both weldings tanks.(description was taken from Jlobblet thread)
The text was updated successfully, but these errors were encountered: