Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Trying to make a wooden (non-training) weapon.  (Read 961 times)

callisto8413

  • Bay Watcher
    • View Profile
Trying to make a wooden (non-training) weapon.
« on: November 11, 2019, 12:30:57 pm »

Hello,

Trying to create a wooden staff as a weapon for my metal/stone poor Town of CraftRiddle.   Now, I KNOW this is a modding question and I asked over in the modding section and the most unhelpful person in the world decided to answer my questions with unhelpful answers.  Mostly in the form of other questions.  Oh please, please, please, don't send this over to the modding section.

So I went to the save file and put this into entity_default file:

[PERMITTED_REACTION:MAKE_WOODEN_STAFF]

I also added this as an afterthought:

[WOOD_WEAPONS]


Put this in the reaction_other file:


[REACTION:MAKE_WOODEN_STAFF]
      [NAME:make wooden staff]
      [BUILDING:CARPENTER:NONE]
      [REAGENT:log:1:Wood:NONE:NONE]
      [ANY_PLANT_MATERIAL]
      [PRODUCT:100:1:WEAPON:ITEM_WEAPON_STAFF:GET_MATERIAL_FROM_REAGENT:log:NONE]
      [SKILL:CARPENTRY]


And put this in the item_weapon files:




[ITEM_WEAPON:ITEM_WEAPON_STAFF]
[NAME:staff:staves]
[SIZE:400]
[SKILL:SPEAR]
[TWO_HANDED:57500]
[MINIMUM_SIZE:52500]
[MATERIAL_SIZE:3]
[ATTACK:BLUNT:200:10000:jab:jabs:tip:1000]
   [ATTACK_PREPARE_AND_RECOVER:3:3]
[ATTACK:BLUNT:10000:6000:strike:strikes:NO_SUB:1250]
   [ATTACK_PREPARE_AND_RECOVER:3:3]

I sense I am close to getting it right...but it still does not show up in my game.  What am I doing wrong?  Also I was told wooden weapons are training weapons and therefore need "training token".   Is that right?  But could I still use them as weapons? 
« Last Edit: November 11, 2019, 01:03:45 pm by callisto8413 »
Logged
The most EVIL creature in Dwarf Fortress!

PatrikLundell

  • Bay Watcher
    • View Profile
Re: Trying to make a wooden (non-training) weapon.
« Reply #1 on: November 11, 2019, 12:53:52 pm »

You might want to look at this thread: http://www.bay12forums.com/smf/index.php?topic=174998.0 (in this sub forum).

Now, I don't know much about modding, but I believe you'd need to add the weapon to those known by your civ (in entity_defaults.txt, and presumably the copy in your save game, not the original it was copied from if you're trying to hack an existing save).

If it still doesn't work, I'd try the other building creating wooden weapons, i.e. the bowyer.

Elves use wooden melee weapons for war (although they're not very good, if I understand it correctly), while the ones dorfs use are for training only. Thus, I don't think it would be a good idea to add a training token (and it can be noted that dorfs are quite fond of using  [wooden] X-bows as crude clubs, and I wouldn't expect those to have a training token).

You could also address your situation from a different angle: make the one non metal melee weapon available to dorfs, i.e. the obsidian sword.

Finally, I would have thought a staff was closer to a club than to a spear.
Logged

callisto8413

  • Bay Watcher
    • View Profile
Re: Trying to make a wooden (non-training) weapon.
« Reply #2 on: November 11, 2019, 01:32:05 pm »

Thank you.  That was very helpful!
Logged
The most EVIL creature in Dwarf Fortress!

anewaname

  • Bay Watcher
  • The mattock... My choice for problem solving.
    • View Profile
Re: Trying to make a wooden (non-training) weapon.
« Reply #3 on: November 11, 2019, 01:33:00 pm »

I think he was being helpful and exact. I also think you should have attempted to try what he suggested before denouncing it.

Part of the problem is that you haven't assigned training weapons to dwarfs before. They are available on the military screen's weapon lists and work fine for bludgeoning wildlife into unconsciousness (about as effective as markdwarfs using crossbows in melee, see the raws for the exact difference).

The TRAINING tag may seem to be the incorrect choice because of the name, but when training weapons were being added to the game and it was decided they could only be made at the carpentry workshop, it must have seemed like the right thing to have the code use the tag when creating the lists of possible jobs that the carpentry workshop will show to the player. So, unless the tag is added, it will not be available at the carpentry workshop (I haven't verified this, but really... try it).
Logged
How did I manage to successfully apply the lessons of The Screwtape Letters to my perceptions of big grocery stores?

callisto8413

  • Bay Watcher
    • View Profile
Re: Trying to make a wooden (non-training) weapon.
« Reply #4 on: November 11, 2019, 03:39:42 pm »

I think he was being helpful and exact. I also think you should have attempted to try what he suggested before denouncing it.

Part of the problem is that you haven't assigned training weapons to dwarfs before. They are available on the military screen's weapon lists and work fine for bludgeoning wildlife into unconsciousness (about as effective as markdwarfs using crossbows in melee, see the raws for the exact difference).

The TRAINING tag may seem to be the incorrect choice because of the name, but when training weapons were being added to the game and it was decided they could only be made at the carpentry workshop, it must have seemed like the right thing to have the code use the tag when creating the lists of possible jobs that the carpentry workshop will show to the player. So, unless the tag is added, it will not be available at the carpentry workshop (I haven't verified this, but really... try it).

I did try BEFORE denouncing it and it failed.

Edit- Also, just to let you know, it does show up in the carpentry workshop without the tag.  It just disappears after it is created.
« Last Edit: November 11, 2019, 04:17:39 pm by callisto8413 »
Logged
The most EVIL creature in Dwarf Fortress!

Ulfarr

  • Bay Watcher
  • Going on a pilgrimage to Mars
    • View Profile
Re: Trying to make a wooden (non-training) weapon.
« Reply #5 on: November 12, 2019, 02:20:26 am »

1) I'm not sure if you can add reactions in an already gen'ed world.
2) I think  [REAGENT:log:1:Wood:NONE:NONE] should be [REAGENT:log:1:WOOD:NONE:NONE:NONE]. [ANY_PLANT_MATERIAL] is also unnecessary.
3) You might want to increase the weapons size. With such a small size and the low weight of the material it's just going to glance. A LOT.
4) If [WOOD_WEAPONS] works for controllable civs, then just adding [WEAPON:ITEM_WEAPON_STAFF] on the entity list should be enough.
Logged
Bring Kobold Kamp to LNP! graphics compatibility fix.

So the conclusion I'm getting here is that we use QSPs because dwarves can't pilot submarines.

callisto8413

  • Bay Watcher
    • View Profile
Re: Trying to make a wooden (non-training) weapon.
« Reply #6 on: November 12, 2019, 05:43:15 pm »

1) I'm not sure if you can add reactions in an already gen'ed world.
2) I think  [REAGENT:log:1:Wood:NONE:NONE] should be [REAGENT:log:1:WOOD:NONE:NONE:NONE]. [ANY_PLANT_MATERIAL] is also unnecessary.
3) You might want to increase the weapons size. With such a small size and the low weight of the material it's just going to glance. A LOT.
4) If [WOOD_WEAPONS] works for controllable civs, then just adding [WEAPON:ITEM_WEAPON_STAFF] on the entity list should be enough.

Thank you!
Logged
The most EVIL creature in Dwarf Fortress!