[W|0.6.532] Weapon tag "canTargetBuildings" is ignored by some pawns.

Started by ZestyLemons, August 17, 2014, 05:32:50 AM

Previous topic - Next topic

ZestyLemons

Summary:
I was modding and testing some things out, when I noticed that a raider was firing at a improved turret, despite the weapon specifically having the property "<canTargetBuildings>false</canTargetBuildings>" marked down in the XML

None of the vanilla guns use this tag so I guess it's a low priority, but for long-range weapon balance in some mods this is a pretty unfair bug.

Steps to Reproduce:
Step 1) Make a new weapon or change an existing weapon to have the <canTargetBuildings>true</canTargetBuilds> tag set to false.
Step 2) Spawn a pirate/merc/etc and an improvised turret gun (within firing range of each other) with the weapon you made in step 1

Expected Results:
The weapon cannot target buildings, so the pawn shouldn't be able to shoot the turret (because it's a building).

Actual Results:
The raider will now target and fire at the turret gun. The game won't let your colonist target the building with a gun using the canTargetBuildings tag, even though the AI clearly can.

Help out with the wiki!

Steam: http://steamcommunity.com/id/Divaya/
Wiki: http://rimworldwiki.com/wiki/User:Zesty

Feel free to contact me about wiki questions or wiki admin stuff.

ZestyLemons

Bumped for visibility, changed the format up a little to clear up the issue.
Help out with the wiki!

Steam: http://steamcommunity.com/id/Divaya/
Wiki: http://rimworldwiki.com/wiki/User:Zesty

Feel free to contact me about wiki questions or wiki admin stuff.