Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Modding my own copy of the vanilla  (Read 1178 times)

Rogue Yun

  • Bay Watcher
  • Beware of the Carp
    • View Profile
Modding my own copy of the vanilla
« on: February 03, 2014, 11:51:19 am »

I ask your patience. I'm still very new to dwarf fortress. And even newer to modding.

I made some modifications to my weapons and armor in my vanilla copy of dwarf fortress.

Please pick my code for flaws... I have little to no idea what I'm doing. This just seems to work, or at least work somewhat :P

My goal is to try and make some minor realism changes. I think dwarves should be able to make basic clubs and chest armor out of stone which are much better than just training weapons and leather (Though not as good as metal maces and breastplates) and while I was at it... why were there no training maces or hammers??

I added these to the item_weapon.txt in the raw/objects file

Training Mace:
Code: [Select]
[ITEM_WEAPON:ITEM_WEAPON_MACE_TRAINING]
[NAME:training mace:training maces]
[SIZE:800]
[SKILL:MACE]
[TWO_HANDED:37500]
[MINIMUM_SIZE:32500]
[MATERIAL_SIZE:3]
[ATTACK:BLUNT:20:200:bash:bashes:NO_SUB:2000]
[TRAINING][WOOD]

Training Hammer:
Code: [Select]
[ITEM_WEAPON:ITEM_WEAPON_HAMMER_TRAINING]
[NAME:training hammer:training hammers]
[SIZE:400]
[SKILL:HAMMER]
[TWO_HANDED:37500]
[MINIMUM_SIZE:32500]
[MATERIAL_SIZE:3]
[ATTACK:BLUNT:10:200:bash:bashes:NO_SUB:2000]
[TRAINING][WOOD]

Notes: The training weapons didn't work until I added the [WOOD] token. Then it worked just fine! I didn't even have to add a reaction! Sweetness.

Club:
Code: [Select]
[ITEM_WEAPON:ITEM_WEAPON_CLUB]
[NAME:club:clubs]
[SIZE:800]
[SKILL:MACE]
[TWO_HANDED:37500]
[MINIMUM_SIZE:32500]
[MATERIAL_SIZE:3]
[ATTACK:BLUNT:40:200:bash:bashes:NO_SUB:2000]

Notes: Though clubs appear in the arena they are metal and wood... No stone ones :P Any way to fix that? I'd like to test them out against maces and such just to make sure that I am not making a super weapon or a weapon that hits like a feather. Also.. I made the first number 40 (which I think means the impact area?) being double that of the mace. Made sense as maces that I know have a diamond like head with knobs on each point while a club is like one big knob beveled to a handle.. but I'm not sure if I know what I'm talking about O.o

I added this to the item_armor.txt

Chest Piece:
Code: [Select]
[ITEM_ARMOR:ITEM_ARMOR_PIECE_CHEST]
[NAME:chest piece:chest pieces]
[ARMORLEVEL:3]
[UBSTEP:0]
[LBSTEP:0]
[SHAPED]
[LAYER:ARMOR]
[COVERAGE:80]
[LAYER_SIZE:20]
[LAYER_PERMIT:50]
[MATERIAL_SIZE:10]
[HARD]

Notes: This seems to work okay in fortress mode, but these don't show up in the arena at all! I lowered the coverage to 80 because I wanted it similar to the breastplate but not be able to cover as much because of how clunky stone is. (More gaps/space around the plate) I also removed the [METAL] token. It didn't seem to make sense with stone armor. But I also noted that only the vest and cape had less than 100 coverage... and it was 50... I have no clue what to think about coverage.

I added these to the reaction_other.txt (Make the club and chest piece)
Code: [Select]
[REACTION:CLUB_STONE]
[NAME:craft stone club]
[BUILDING:CRAFTSMAN:NONE]
[REAGENT:A:1:BOULDER:NONE:NONE:NONE][WORTHLESS_STONE_ONLY]
[PRODUCT:100:1:WEAPON:ITEM_WEAPON_CLUB:GET_MATERIAL_FROM_REAGENT:A:NONE]
[SKILL:STONECRAFT]

[REACTION:PIECE_CHEST]
[NAME:craft stone chest piece]
[BUILDING:CRAFTSMAN:NONE]
[REAGENT:A:2:BOULDER:NONE:NONE:NONE][WORTHLESS_STONE_ONLY]
[PRODUCT:100:1:ARMOR:ITEM_ARMOR_PIECE_CHEST:GET_MATERIAL_FROM_REAGENT:A:NONE]
[SKILL:STONECRAFT]

Notes: I didn't want to add any more stone armor because I was having trouble believing that Urist McCheesmaker would be able to make a set of stone gauntlets no matter how poor quality they were. But a stone club and chest plate made sense to me. Seems to work okay. A dwarf will make go to the craftsdwarf workshop and make them now (Sweetness!) and I can even equip them on my military (They even bashed an ekidna to death, poor thing). Though I am confused as to how the club will show up in the battle arena (albeit not stone) and the chest piece will not... Any ideas? I'd like to get them to appear in the arena as stone just so I can test it out.

I got most of my reaction code ideas from here http://pastebin.com/7gqCNLgh

They had a code for a rock bed but to get it to work right I had to add the ":NONE" at the end of the product... weird. But it worked!

Code: [Select]
[REACTION:BED_STONE]
[NAME:make stone bed]
[BUILDING:CRAFTSMAN:NONE]
[REAGENT:A:1:BOULDER:NONE:INORGANIC:STONE][WORTHLESS_STONE_ONLY]
[PRODUCT:100:1:TOOL:ITEM_TOOL_BED:GET_MATERIAL_FROM_REAGENT:A:NONE]
[SKILL:STONECRAFT]

Then I made the appropriate changes to the entity_default.txt
Whelp... No telling when I'll be able to respond to your comments. But any guidance you might be able to send my way would be appreciative. Thanks in advance!
Logged

.:Simple Mood 16x16 ASCII:.
Keep it Simple. Keep it Safe.

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Modding my own copy of the vanilla
« Reply #1 on: February 03, 2014, 12:15:23 pm »

BOULDER:NONE:INORGANIC:STONE in that last one should be BOULDER:NONE:NONE:NONE, just like you use above.

The items dont show in the arena, because rock is not a normal material for armor. You will note that metals have ITEM_ARMOR and ITEM_WEAPON in their entry. Normal stone is missing this. Your dwarves will use these items in fort mode, but the rock armor will never be stockpiled, because no stockpile option exists. Rock weapons are fine, because the original game has rock swords (obsidian mostly)

If you add [CAN_STONE] to the weapons you want made of rock, you can make them in the craftsman from sharp rock, like obsidian. No reaction needed.

Overall, very good effort. No bugs, and you got the basics right. :)

PS: I use a fake rock-metal template to make rock armors that are stockpiled. But it has a generic name "Rock armor", not "Granite/Marble/Rock-Name Armor"...
« Last Edit: February 03, 2014, 12:17:31 pm by Meph »
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::