Dwarf Fortress > DF Modding

Stone warhammers

(1/3) > >>

Doro:
hello!
is there a possibility to mod hammers and maces so that you could make them out of stone blocks. i dont want it to be Obsidian but some other like Diorite warhammer. I dont see why warhammers and maces should be restricted to be only iron or steel or adamantine because they are blunt and need only something heavy that can break Elve's bones

3:
Easy mode: download this zip. Take either the wood-haft version (which needs a log as well as a smooth block) or the non-wood version. Put file in ~\raw\objects. Generate new world. Build a smelter (you don't need fuel). Select "make stone hammer" (or mace). Done.

Ignore the below if you are not interested in exactly how this is done and don't feel like reading reams of text.

Spoiler (click to show/hide)The only means of doing this right now, unless you want swords made out of other stone types, is via smelter reactions.

There are two means of going about this. One involves you making a different reaction for each stone type you want to use. This is naturally a little impractical. The advantage to doing things this way is that you get hammers that are actually made out of the material you used to make them.

The other method involves using a single stone type that the warhammer will turn out made of regardless of the original stone you make it out of. This involves less reaction-making, but you'll want to create a dummy stone type for the hammer to be made out of, and the hammers will only ever be made out of that material when they're spat out of the smelter.

In the first case, you need to go to ~\raw\objects and find reaction_standard.txt. Paste the following into the bottom of the file:


--- Code: ---[REACTION:MAKE_STONE_HAMMER_1]
[NAME:make diorite stone hammer]
[SMELTER]
[REAGENT:1:WOOD:NO_SUBTYPE:WOOD:NO_MATGLOSS]
[REAGENT:1:BLOCKS:NO_SUBTYPE:STONE:DIORITE]
[PRODUCT:100:1:WEAPON:ITEM_CONSTRUCT_PARTS:STONE:DIORITE]
--- End code ---

(remove the wood line if you won't want a log to be used as the haft)

For each new stone type you want the hammer to be made from, you'll need to copy that reaction, change the ID (after REACTION:) and change the stone type in the two cases that it appears. As I say, impractical, no? It also leaves you with a ridiculous amount of reactions.

The other, easier method is as follows: First, do the same as above, but you'll want to change a couple of things.


--- Code: ---[REACTION:MAKE_STONE_HAMMER]
[NAME:make stone hammer]
[SMELTER]
[REAGENT:1:WOOD:NO_SUBTYPE:WOOD:NO_MATGLOSS]
[REAGENT:1:BLOCKS:NO_SUBTYPE:STONE:NO_MATGLOSS]
[PRODUCT:100:1:WEAPON:ITEM_CONSTRUCT_PARTS:STONE:DUMMY_GENERIC]
--- End code ---

Now, open up one of the matgloss_stone files. Doesn't matter which. We'll use matgloss_stone_layer.txt for now as it's the smallest. Paste this at the bottom:


--- Code: ---[MATGLOSS_STONE:DUMMY_GENERIC]
[VALUE:1][COLOR:7:0:0][TILE:178]
[GEM:stone:stones]

--- End code ---

This is the dummy we'll use for the hammer spat out by the reaction. We're using a gem, and there's a reason for this - you'll start getting generic stone items in trade if you make it a regular stone. By standard means, nothing can be made out of gems, so we circumnavigate that issue by making the stone type a gem.

Akigagak:
Or, add [CAN_STONE] to the warhammer entry in the raws.

Haspen:

--- Quote from: Akigagak on December 17, 2009, 03:23:56 am ---Or, add [CAN_STONE] to the warhammer entry in the raws.

--- End quote ---

And then [SHARP] to Diorite/Granite/Whatever in matgloss_later raws.

But I'm not sure it will work, I think that 'make rock swords' is hardcoded thing in Craftsdwarf' shop... but try anyway.

Akigagak:
It works, and the weapons are built in the craftsdwarfs shop, just like the swords.

Navigation

[0] Message Index

[#] Next page

Go to full version