Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: minor bug involving [WEAPON_RANGED] and weapon shop inventory  (Read 374 times)

snuflufagus

  • Bay Watcher
    • View Profile

for v0.28.181.40d

I solved my own problem, however it might still be worth a look because of the odd way it turned out.

The problem was that after a number of mods, namely expanding steel making reactions and rebalancing the reactions, minerals, and metals (some with the [DEEP] tag, to prevent embark), and then getting them to work, I noticed in adventure mode that one civilization with [MINOR_METAL] in their entity file (the lizardmen, from the Primitive Civ mod) suddenly began offering weapons of every metal, even adamantium, in their weapon stores.  While this led to great fun with a stolen adamantium hand ax, it was odd.  The only items crafted of copper in the entire town were ranged weapons, ammo, and armor.  All other aspects of the worlds genned with this raw seemed normal and copper was available for fortress mode melee weapons.

As it turned out, I had removed [WEAPON_RANGED] from copper in the matgloss and somehow that disabled copper from being selected for melee weapons in town shops.  Similarly, I tried attaching [WEAPON_RANGED] to silver and suddenly silver melee weapons were available in the minor metal stores along with copper.  I've toyed further with these tags and it seems only the bottom two metals (strength-wise) can be used for melee weapons either separately or together for a minor metal civ.  Similarly, I tested removing this tag from iron, and while individual human warriers still carried iron melee weapons, their weapon stores no longer stocked iron melee weapons.  Furthermore, removal of [WEAPON] from a metal that still had [WEAPON_RANGED] resulted in warriors not carrying melee weapons of that metal, but the shop stocking melee weapons in that metal and ranged weapons in other metals.  [ARMOR] and [AMMO] tags act normally (they pick metals based on entity and turn random when no metal is available for their entity).  I have also tried this with an unmodded raw (except for the metal tags) just to make sure nothing else might be interfering.

Perhaps somewhere in the hard code there's a flip flop of [WEAPON] and [WEAPON_RANGED] with regards to metals available to shop weapons?
Logged