Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2

Author Topic: Trouble making wooden weapons.  (Read 1316 times)

Digganob

  • Bay Watcher
    • View Profile
Trouble making wooden weapons.
« on: July 07, 2023, 08:13:01 pm »

I'm making a civilization of cave-dwelling goblins, and I wish for them to appropriately be armed with wooden clubs, wooden spears, and daggers and picks which, for the purposes of suspension of disbelief, I deem to be stolen from other races.

So far, pretty much everything is in place. I've made the clubs and spears, sprited them, and they are indeed produced by my new civ.

However, the issue is that they are not made of wood, only of metal. Indeed, often enough, of steel, as were the daggers and picks, strangely (though it fits with the thievery theme).

I tried designating them as [TRAINING] weapons, but this seems to prevent them from being used as actual weapons, as is evidenced by the civ failing to embark with any of them. Though I have not done a test seeing if invaders from the civ use these weapons, I am fairly confident that they wouldn't, and that the [TRAINING] token would be the cause.

Then, I have tried applying the [WOOD_WEAPONS] token to the civ, and while this allowed them to be made of wood, they were still quite often made of metal.

The third method I tried was to use black dwarven magic, and create an entirely new bar, which is made using wood, and has the same exact material properties as generic wood, but, as it is a bar, I theorized, and as I specifically changed the weapon reactions to utilize this new material, the civilization should now utilize it to make their weapons out of the material specifically.

However, this third method, while it did result in them making them out of the new wood bars, they still yet made many of them out of metal as before.

Any ideas on how to have their weapons be made of wood? I would even be fine with all of their weapons being made of wood, and simply cutting out their daggers and maybe picks too, as long as clubs and wooden spears are properly made of wood. It seems to me that weapons which are known by a civ are doomed to be made out of metal. Though I find it strange that they often make these weapons out of steel as well, despite them lacking the permitted reaction.

The code:

For the weapons reaction:

Spoiler (click to show/hide)

For the weapons themselves:

Spoiler (click to show/hide)

For the wood bars reaction:

Spoiler (click to show/hide)

For the wood bars material:

Spoiler (click to show/hide)

Did I use the material tags well when making the weapon reactions? I also used [PRODUCT:100:1:WEAPON:ITEM_WEAPON_SHARPSTICK:BAR:NO_SUBTYPE:INORGANIC:WOODBAR] instead and I was able to complete the reaction with no apparent changes. I am very confused, I admit, as to how the material tags work. It seems the number of individual "arguments" (as I supposed they're called; each of the colon-separated strings) for the item token and material token is variable, depending on what the first token is for each. I honestly have little idea how or why this works, and why nothing changes when I use either of the shown lines for the reaction product interchangeably.

Couple of small things: The improvements I added to the clubs do not seem to take place at all. Have I implemented them correctly? Additionally, every time I order the reaction, over a hundred clubs are made. I have not a clue as to how this occurs.

I would be grateful for any observations and/or advice, thank you.
« Last Edit: July 07, 2023, 08:43:38 pm by Digganob »
Logged

Ulfarr

  • Bay Watcher
  • Going on a pilgrimage to Mars
    • View Profile
Re: Trouble making wooden weapons.
« Reply #1 on: July 08, 2023, 05:14:56 am »

daggers and picks which, for the purposes of suspension of disbelief, I deem to be stolen from other races.

For what is worth, there's been archeological evidence for bone daggers (there was even a tribe that made them from human femur bones) and antler pickaxes (found in some mine in central Europe iirc).

On to the modding stuff:

Civ wide access (non player armies, caravans, emabrk) is mostly determined from entity tokens not reactions by themselves. Giving the civ the [WEAPON:ITEM_WEAPON_SHARPSTICK] token will allow the civ to make them from any material they have available (it also creates the "hardcoded" reactions for the metal versions made at the forge). Access to the metal versions, are also determined by the [PERMITTED_JOB:FURNACE_OPERATOR] which gives civ wide access to metal bars.

Reactions by themselves are mostly for the player fortress, and unless you want to modify the wood's properties, you shouldn't need to make the whole woodbar thing. Using the [REAGENT:A:1:WOOD:NONE:NONE:NONE] token should be enough to make them from the actual logs themselves.
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.

chipathingy

  • Bay Watcher
    • View Profile
Re: Trouble making wooden weapons.
« Reply #2 on: July 08, 2023, 06:30:50 am »

So you basically want the cave tribes from before the steam release? I'm not sure if it can be done. The subterranean animal people entity didn't change with the new version and even though they raws only have access to wooden weapons they all have metal ones. It must be some sort of bug with the cavern invasion

As for which metal they have, it seems to be a mix of any available weapons grade metal. My mod has both dwarf and elf exclusive metals and I've seen them equipped by cave people.  You won't be able to foce them to use any metal in particular
Logged
Author of Fantastic Fantasy Fortress (http://www.bay12forums.com/smf/index.php?topic=180748.0)

Digganob

  • Bay Watcher
    • View Profile
Re: Trouble making wooden weapons.
« Reply #3 on: July 09, 2023, 12:54:14 am »

To Ulfarr:

Yes it does seem to be that way, doesn't it? After all I don't even allow furnace operators or metalsmiths of any kind, and yet they are still able to make steel daggers. Though, as to why specifically they are able to make steel daggers, I am still at a loss.

As to why I made them out of wood bars, it was so that I would find them being made of wood by the world generation, without the use of additional entity tokens. And, indeed, it worked, though they were still being made of metal as well. For fortress mode, the method you recommend is certainly adequate.

To chipathingy:

Yes, I suppose I do want something along the same lines as the cave tribes. I was not aware they were going through such a bug, though it certainly explains the difficulty I have had with entities naturally generating wooden weaponry, despite the same methods being used as for them. I suppose I'll have to wait until that bug is fixed before I can fix this issue definitively.

I'm not too bummed about them using any material, at least. As I said before, I take it as them having stolen those weapons from neighboring civs, so them having the occasional steel dagger is more flavorful than anything. Though certainly, if I could force them to use my modded wood bars for their spears and clubs, that would be ideal.


Oh, yes, does anyone have any idea what the deal is with over a hundred clubs being made in one reaction?
« Last Edit: July 09, 2023, 12:57:21 am by Digganob »
Logged

DPh Kraken

  • Bay Watcher
  • [PRONOUN:she:her:herself][PRONOUN:it:its:itself]
    • View Profile
Re: Trouble making wooden weapons.
« Reply #4 on: July 09, 2023, 12:14:32 pm »

There's a semi-bug where an entity demanded to produce something out of materials it doesn't have access to causes items to be made of random suitable materials. The bug where elves made strings out of divine cloth (due to a lack of animal products) is a more unusual result, but this behavior is also used to equip bandits with "stolen" weapons made of non-special [ITEMS_WEAPON] materials even if they aren't available for embark. Are you sure they still don't have [METAL_PREF] despite being unable to smelt metals?

As for the reactions, WEAPON:ITEM_WEAPON_SHARPSTICK is fine but BAR:INORGANIC:WOODBAR is incorrect - either just use INORGANIC:WOODBAR (for a fixed material) or GET_MATERIAL_FROM_REAGENT:A:NONE (for varying materials when using logs). Reactions that produce unsuitable weapons are ignored by worldgen, but you don't have to assign them to a workshop for worldgen to check if a civ can produce that item so fortmode could just skip using wooden bars.
Logged
[CHEESE_PLANT] and [CHEESE_GRAPHICS] biggest fan
My mods:
Language & symbolsMiscellanyGraphics resourcesPseudo-ASCII

Digganob

  • Bay Watcher
    • View Profile
Re: Trouble making wooden weapons.
« Reply #5 on: July 10, 2023, 12:09:59 am »

Yeah, I thought such a feature was in place, to deal with an entity without any specific allowed materials. I had hoped that my introduction of the wood bars would change that. They do not have [METAL_PREF], though I did try giving it to them once, and I didn't notice a difference with what they had. The wiki indicates it's only used for crafts and that sort of thing, though I wouldn't be surprised that if I looked closer I might find they only have access to specific metals after I added it now. You can see all the tokens they have in the spoilered code I made in the OP.

For the reaction advice, do you mean to say that for clubs for instance, instead of:

[PRODUCT:100:1:WEAPON:ITEM_WEAPON_CLUB:BAR:NO_SUBTYPE:INORGANIC:WOODBAR]

it should be:

[PRODUCT:100:1:WEAPON:ITEM_WEAPON_CLUB:INORGANIC:WOODBAR]

?

Again, I am easily confused by reactions, specifically in regards to their materials tokens.
Logged

brewer bob

  • Bay Watcher
  • euphoric due to inebriation
    • View Profile
Re: Trouble making wooden weapons.
« Reply #6 on: July 10, 2023, 03:45:15 am »

For the reaction advice, do you mean to say that for clubs for instance, instead of:

[PRODUCT:100:1:WEAPON:ITEM_WEAPON_CLUB:BAR:NO_SUBTYPE:INORGANIC:WOODBAR]

it should be:

[PRODUCT:100:1:WEAPON:ITEM_WEAPON_CLUB:INORGANIC:WOODBAR]

The latter should be correct.

Digganob

  • Bay Watcher
    • View Profile
Re: Trouble making wooden weapons.
« Reply #7 on: July 11, 2023, 12:18:50 pm »

Huh, interestingly, the latter does appear to result in "wooden clubs," whereas the former results in "clubs."

Otherwise, though, it doesn't appear to have any effects on anything, strangely.
Logged

chipathingy

  • Bay Watcher
    • View Profile
Re: Trouble making wooden weapons.
« Reply #8 on: July 23, 2023, 07:53:47 pm »

Are you getting 150 clubs per reaction? I know exactly what is happening
One bar is size 150, and when you're putting the quantity on the reagent line you've put in quantity 1. What is happening is that each club uses 1/150th of a bar, but the reaction uses a whole bar and multiplies the output accordingly

Change the quantity of the bar reagent to 150, and it will use one bar per club. Multiples of 150 for multiple bars

FYI it's easier for others to find errors if you post the whole raw

Also you dont usually need to make reactions for weapon or armor production if they're made of metal. Give the entity the weapon/armor tokens, a reaction to make the metal and the furnace operator and weapon/armorsmith professions and they game will generate the right reactions for you
Check out the Wood Elves in my main mod, they do exactly this. I've given them a "metal" called enchanted wood and it is the only metal they will use. https://dffd.bay12games.com/file.php?id=16721
Logged
Author of Fantastic Fantasy Fortress (http://www.bay12forums.com/smf/index.php?topic=180748.0)

Digganob

  • Bay Watcher
    • View Profile
Re: Trouble making wooden weapons.
« Reply #9 on: July 24, 2023, 12:42:25 am »

Are you getting 150 clubs per reaction? I know exactly what is happening
One bar is size 150, and when you're putting the quantity on the reagent line you've put in quantity 1. What is happening is that each club uses 1/150th of a bar, but the reaction uses a whole bar and multiplies the output accordingly

Change the quantity of the bar reagent to 150, and it will use one bar per club. Multiples of 150 for multiple bars

FYI it's easier for others to find errors if you post the whole raw

Also you dont usually need to make reactions for weapon or armor production if they're made of metal. Give the entity the weapon/armor tokens, a reaction to make the metal and the furnace operator and weapon/armorsmith professions and they game will generate the right reactions for you
Check out the Wood Elves in my main mod, they do exactly this. I've given them a "metal" called enchanted wood and it is the only metal they will use. https://dffd.bay12games.com/file.php?id=16721

Ah, that is very helpful. I will go ahead and make the change, and test it once I have the chance.

As for the raws, did you find the raws I spoilered to be incomplete? I only posted anything related to the weapons, the material, and the reactions, but that should be enough to determine any issues with them, right?

Anyways, I have indeed added the reaction to make the "wood" bars to my civ, and allowed the necessary weapons, and while they will sometimes make them out of the custom metal, they will still make them of other things as well. I will look through the raws of your mod when I get some time to get back into this problem, but is there any particular reason or method you can point to as to how it has worked in your mod?

Thank you very much for the help, and any more you may give me. I'm quite grateful to receive the advice of someone so experienced in this subject.
Logged

chipathingy

  • Bay Watcher
    • View Profile
Re: Trouble making wooden weapons.
« Reply #10 on: July 24, 2023, 05:06:13 am »

Whoops, didn't see the raws, my bad. Yeah, that's enough.

Elves don't mine ( no miner profession token), and thus don't have access to metal ores and can't smelt them even if they have the furnace operator labour added to their civ. However metals added to the civ that are created from custom reactions rather than smelted from raw ores and the civ will always have access to it - steel is a great example, dwarves will always have access to steel even if they don't have access to iron.

Come to think of it, they might not even need furnace operating if a different profession makes the bars. I'll have to check. They do need weapon/armorsmithing to make the equipment though
Logged
Author of Fantastic Fantasy Fortress (http://www.bay12forums.com/smf/index.php?topic=180748.0)

Digganob

  • Bay Watcher
    • View Profile
Re: Trouble making wooden weapons.
« Reply #11 on: July 24, 2023, 11:39:12 pm »

Whoops, didn't see the raws, my bad. Yeah, that's enough.

Elves don't mine ( no miner profession token), and thus don't have access to metal ores and can't smelt them even if they have the furnace operator labour added to their civ. However metals added to the civ that are created from custom reactions rather than smelted from raw ores and the civ will always have access to it - steel is a great example, dwarves will always have access to steel even if they don't have access to iron.

Come to think of it, they might not even need furnace operating if a different profession makes the bars. I'll have to check. They do need weapon/armorsmithing to make the equipment though

Yeah I double checked with your mod to make sure that your wood elves and their "wooden" weapons were still working with the steam version and they are, and so I tried to replicate what you have done with your mod in my own, and changed the entity raws as follows:

Spoiler (click to show/hide)

I also tried changing the reactions for my wood bars and weapons to be made in smelters and smithies respectively. I even tried removing wood as a necessary reagent.

However, my civ still makes their weapons out of random materials during worldgen.

I'll see about a more thorough investigation and replacement test later, but do you have any observations or ideas?
Logged

chipathingy

  • Bay Watcher
    • View Profile
Re: Trouble making wooden weapons.
« Reply #12 on: July 25, 2023, 03:27:41 am »

You have club listed twice at the top FYI

It could be the pick? Try removing that and see if it works. If this is still the cavern dwelling race it could just be that bug  where they get metal gear though
Logged
Author of Fantastic Fantasy Fortress (http://www.bay12forums.com/smf/index.php?topic=180748.0)

Digganob

  • Bay Watcher
    • View Profile
Re: Trouble making wooden weapons.
« Reply #13 on: July 25, 2023, 10:59:05 pm »

You have club listed twice at the top FYI

It could be the pick? Try removing that and see if it works. If this is still the cavern dwelling race it could just be that bug  where they get metal gear though

Oh yeah I know I've it listed twice, I wanted to make it more common for them to use it, and supposedly listing weapons twice does that. Does it cause any issues you figure?

Just tried removing the pick, and also tried making them tree_city-dwelling to see if them living in detailed caves changed anything (they don't live in the cavern layers if that's what you were saying), but they still made weapons out of anything. I'll see about a granular testing gauntlet to see what precisely is causing the difference between my mod and yours, once I get a chance. Doesn't seem like there's anything much left, besides perhaps small changes with reactions.
Logged

brewer bob

  • Bay Watcher
  • euphoric due to inebriation
    • View Profile
Re: Trouble making wooden weapons.
« Reply #14 on: July 26, 2023, 03:46:20 pm »

I believe it's the FURNACE_OPERATOR token which gives them access to available metal ores. For instance, kobolds don't have picks, but they get access to metals because of that token.
Pages: [1] 2