Ludeon Forums

RimWorld => Bugs => Topic started by: ZestyLemons on August 17, 2014, 05:32:50 AM

Title: [W|0.6.532] Weapon tag "canTargetBuildings" is ignored by some pawns.
Post by: ZestyLemons on August 17, 2014, 05:32:50 AM
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.

Title: Re: [W|0.6.532] Weapon tag "canTargetBuildings" is ignored by some pawns.
Post by: ZestyLemons on August 23, 2014, 02:59:27 PM
Bumped for visibility, changed the format up a little to clear up the issue.