Ludeon Forums

Ludeon Forums

  • June 18, 2019, 03:20:00 AM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: WeaponTags dont work for weapons without costlist/workToMake  (Read 131 times)

Syrchalis

  • Colonist
  • ***
  • Posts: 427
  • Refugee
    • View Profile
WeaponTags dont work for weapons without costlist/workToMake
« on: October 02, 2018, 07:12:46 AM »

If a weapon is created by a RecipeDef instead of using a CostList and WorkToMake in it's ThingDef it will not work with weapontags. Meaning Pawnkinds cannot get the weapon through the weapontag. Fixing this either requires setting a manual market value or adding WorkToMake and a CostList.

The confusing thing about this bug is that the weapons seem to have a proper MarketValue based on the RecipeDef if they are seen in-game as item - even if no CostList, WorkToMake or MarketValue is set. This market value is however not correctly calculated during PawnKind WeaponGeneration.

There is apparently also an issue in general with this system, as no matter the budget the pawns have, they rarely spawn without any weapon (no config error). Some of my custom pawnkinds with custom weapontags (and essentially infinite budget) spawn without weapons about 10-20% of the time. This does not seem to affect vanilla pawnkinds or weapontags.
Logged
Ever wondered what's inside that box? An arm? A leg? A heart? Wonder no more! Prosthetic icons

Kenneth

  • Developer
  • Colonist
  • *****
  • Posts: 261
  • Refugee
    • View Profile
Re: WeaponTags dont work for weapons without costlist/workToMake
« Reply #1 on: December 11, 2018, 02:34:51 PM »

Fixed the incorrect price calculation in pawnkind weapon generation, thanks for reporting! ;)

For the pawns spawning without weapon, if you think there's a bug in the vanilla code please open another thread about it and give us exact reproduction steps and test data we can use to repro this issue on our end.
Logged