Atla55 / Android-Tiers-Core

20 stars 16 forks source link

Drafted pawns not using medicine from their inventory when tending on site #17

Open Grzechu789 opened 3 years ago

Grzechu789 commented 3 years ago

There's a bug that prevents drafted pawns to use meds from their inventory while tending on-the-field that came with 1.3 update. It's easy to reproduce, so I'll explain it in some detail, so you can reproduce that bug yourself and probably fix it.

Bug:

When you draft a pawn, and order him to tend the downed friend on-the-field they won’t use meds in their inventory. Instead, they’ll try to tend a friend with medicine they can find lying around. If they can’t, they’ll try to tend without medicine.

That forces pawns to run back to base to pick up a medicine and then back on frontlines to tend their downed friends when I order them to while drafted (if they won’t die in the meantime lol)

Few more words:

You need to have at least one med in the drafted pawn’s inventory. Otherwise, he’ll just tend without medicine at all*. But if he has at least one, he nevertheless won’t use it and instead look for meds in stockpiles or lying around.

*That’s because of game mechanics. Have meds in inventory = use them. Don’t have = tend without (only applicable to drafted tending).

Disclaimer:

  1. I’ve tested it on the latest version of the mod + Core + Royalty + Ideology
  2. I've tried to reproduce this bug in lots of different situations and variety combinations of mods, as I'm running more than 50 of them simultaneously, to be sure that it’s strictly connected to your mod. Sadly it is.. (I’ve checked that for sure).
  3. It’s easy replicable with Vanilla + essentials for your mod (Humanoid Alien Races & Enable Oversized Weapons) + Android Tiers. With Vanilla + essentials and WITHOUT Android Tiers the bug DOES NOT occur. No other mods are needed to create this bug, so I guess it’s not a compatibility bug.
  4. The bug was present in v3.0.0RC rev3 (I was using it when I saw the bug for the first time) but updating to v3.0.0RC rev6 didn’t help.

Replicating the bug (quick and easy, done by me several times with great success):

  1. Start crashlanded scenario (make sure to have at least one pawn able to do medical. Good option to land them is a desert to have a lot of open space and no trees etc.)
  2. Create stockpile zone and let the colonist put all the starting items inside (to be honest, we need a stockpile for meds and pawns to get them there)
  3. After the meds are in stockpile zone, let one of your colonists, which you’ll then use to tend-while-drafted have few with them via assign game menu (where you choose the type and quantity of meds they’ll be running around with). Quantity doesn’t matter, I’ve tested that.
  4. Forbid the rest of the meds in the stockpile zone, so pawns are forced to use the ones on their inventory (make sure there’re no other free allowed meds lying around)
  5. Enable developer mode, and use explosion to bring another colonist down (if he dies, resurrect him and try again. Usually 2-3 explosions are enough, but sometimes are too much.)
  6. When the pawn is downed and no free meds lies around (the ones in stockpile are forbidden), draft the first pawn that you picked up the meds with and order him to tend the injured one.
  7. Pawn will start to look for meds lying around instead of using the one in his inventory, or if he can’t find any, then he’ll tend without medicine.

Hope that's enough info.

SeanDoh commented 2 years ago

Exact same issue here. Reproduced via

  1. load game with required mods.
  2. enable dev mode
  3. search for 'down', click the option that damages a colonist until downed.
  4. draft a colonist with medicine in their inventory and try to tend, and they will go look for medicine instead of using the medicine in their inventory.

If I remove the mod, the issue no longer persists. Tried the version on steam workshop and version here, same issue.

SeanDoh commented 2 years ago

Some more details:

Rimworld Core 1.3.3087 (released August 10) added drafted tending - 'Player can now do drafted tending (with and without medicine) on downed hostile or neutral pawns.'

Latest release of this mod is August 7.

I think the origin of the issue is related to that core patch.

kristian-skistad commented 2 years ago

Indeed, same problem on my end. Most likely a result of the August 10th patch.

FGRemastered commented 2 years ago

The bug does not appear when run with CE.