Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Modding Dwarf Weaponsmith?? *SOLVED*  (Read 1838 times)

PlayingGood

  • Bay Watcher
  • Armok's laugh
    • View Profile
Modding Dwarf Weaponsmith?? *SOLVED*
« on: March 01, 2014, 07:52:48 am »

Can i edit the raws so that my dwarf civ weaponsmith can make the other weapons? halberd, whip, scourge ect ect?
« Last Edit: March 02, 2014, 04:41:17 pm by PlayingGood »
Logged
*Create potion of immortality*
*Potion Created! Drink potion*
*Immortality gained!*
*You have lost your soul!*

Zammer990

  • Bay Watcher
    • View Profile
Re: Modding Dwarf Weaponsmith??
« Reply #1 on: March 01, 2014, 07:57:22 am »

Go into entity_default.txt and add [WEAPON:ITEM_WEAPON_(weapon name)] next to the other ones, and you will be able to craft them
Logged
If your animals aren't expendable, you could always station a dwarf or two out there?

PlayingGood

  • Bay Watcher
  • Armok's laugh
    • View Profile
Re: Modding Dwarf Weaponsmith??
« Reply #2 on: March 01, 2014, 08:14:41 am »

Go into entity_default.txt and add [WEAPON:ITEM_WEAPON_(weapon name)] next to the other ones, and you will be able to craft them

badass, thank you zammer!


EDIT+
Do i need to gen a new world for this to work?

I edited the raws, saved the file and opened up DF, and it seems i can still make the same old weapons, nothing new.

Is there anyway to make my current fortress able to make foreign weapons?
« Last Edit: March 01, 2014, 02:06:35 pm by PlayingGood »
Logged
*Create potion of immortality*
*Potion Created! Drink potion*
*Immortality gained!*
*You have lost your soul!*

Zammer990

  • Bay Watcher
    • View Profile
Re: Modding Dwarf Weaponsmith??
« Reply #3 on: March 01, 2014, 03:02:45 pm »

Go into entity_default.txt and add [WEAPON:ITEM_WEAPON_(weapon name)] next to the other ones, and you will be able to craft them

badass, thank you zammer!


EDIT+
Do i need to gen a new world for this to work?

I edited the raws, saved the file and opened up DF, and it seems i can still make the same old weapons, nothing new.

Is there anyway to make my current fortress able to make foreign weapons?

Entity changes always require new world gens unfortunately
Logged
If your animals aren't expendable, you could always station a dwarf or two out there?

PlayingGood

  • Bay Watcher
  • Armok's laugh
    • View Profile
Re: Modding Dwarf Weaponsmith??
« Reply #4 on: March 01, 2014, 03:26:40 pm »

Go into entity_default.txt and add [WEAPON:ITEM_WEAPON_(weapon name)] next to the other ones, and you will be able to craft them

badass, thank you zammer!


EDIT+
Do i need to gen a new world for this to work?

I edited the raws, saved the file and opened up DF, and it seems i can still make the same old weapons, nothing new.

Is there anyway to make my current fortress able to make foreign weapons?

Entity changes always require new world gens unfortunately

aww... okay, thanks for the info :)
Logged
*Create potion of immortality*
*Potion Created! Drink potion*
*Immortality gained!*
*You have lost your soul!*

Hugo_The_Dwarf

  • Bay Watcher
  • Modding Mentor
    • View Profile
    • Regeneration: Forced Evolution
Re: Modding Dwarf Weaponsmith?? *NEW QUESTION*
« Reply #5 on: March 02, 2014, 12:35:21 pm »

I'm surprised no one thought of suggesting that in the mean time to overwrite some unused reactions to produce the weapons he needs, of course now he knows how to do it for the next time.
Logged

PlayingGood

  • Bay Watcher
  • Armok's laugh
    • View Profile
Re: Modding Dwarf Weaponsmith?? *NEW QUESTION*
« Reply #6 on: March 02, 2014, 02:08:16 pm »

I'm surprised no one thought of suggesting that in the mean time to overwrite some unused reactions to produce the weapons he needs, of course now he knows how to do it for the next time.


Oh this sounds promising, so i can overwrite spear or mace to make something different?
Logged
*Create potion of immortality*
*Potion Created! Drink potion*
*Immortality gained!*
*You have lost your soul!*

Hugo_The_Dwarf

  • Bay Watcher
  • Modding Mentor
    • View Profile
    • Regeneration: Forced Evolution
Re: Modding Dwarf Weaponsmith?? *NEW QUESTION*
« Reply #7 on: March 02, 2014, 02:39:18 pm »

well that would overwrite just spear and mace, I meant something like:


and changing it too:

Code: [Select]
[REACTION:MAKE_SOAP_FROM_OIL]
[NAME:make steel <weapon>]
[BUILDING:KILN:CUSTOM_O]
[REAGENT:bar:150:BAR:NONE:INORGANIC:STEEL]
[PRODUCT:100:1:WEAPON:ITEM_WEAPON_<weapon>:GET_MATERIAL_FROM_REAGENT:bar:NONE]
        [FUEL]
[SKILL:FORGE_WEAPON]

where <weapon> will be whatever weapon you choose from "item_weapon.txt" so like ITEM_WEAPON_SCOURGE
the reaction (since you didn't change the ID "MAKE_SOAP_FROM_OIL" was unchanged it will still be in your save) you overwrote the internals:
NAME
BUILDING
etc

you will now see "make steel scourge" in the kiln and you need a weaponsmith to make it using 1 steel bar. Now you can make a uniform or personally assign your new foreign weapon to your army (I choose scourge at random) and if you wish to make different weapons and don't know what other reactions to change just keep changing that reaction to make what you want. so:
1.Change reaction in save's raws
2.load game
3.make weapon
4.save and exit

repeat those steps until you made all the different weapons you wanted
Logged

PlayingGood

  • Bay Watcher
  • Armok's laugh
    • View Profile
Re: Modding Dwarf Weaponsmith?? *NEW QUESTION*
« Reply #8 on: March 02, 2014, 03:04:12 pm »

well that would overwrite just spear and mace, I meant something like:


and changing it too:

Code: [Select]
[REACTION:MAKE_SOAP_FROM_OIL]
[NAME:make steel <weapon>]
[BUILDING:KILN:CUSTOM_O]
[REAGENT:bar:150:BAR:NONE:INORGANIC:STEEL]
[PRODUCT:100:1:WEAPON:ITEM_WEAPON_<weapon>:GET_MATERIAL_FROM_REAGENT:bar:NONE]
        [FUEL]
[SKILL:FORGE_WEAPON]

where <weapon> will be whatever weapon you choose from "item_weapon.txt" so like ITEM_WEAPON_SCOURGE
the reaction (since you didn't change the ID "MAKE_SOAP_FROM_OIL" was unchanged it will still be in your save) you overwrote the internals:
NAME
BUILDING
etc

you will now see "make steel scourge" in the kiln and you need a weaponsmith to make it using 1 steel bar. Now you can make a uniform or personally assign your new foreign weapon to your army (I choose scourge at random) and if you wish to make different weapons and don't know what other reactions to change just keep changing that reaction to make what you want. so:
1.Change reaction in save's raws
2.load game
3.make weapon
4.save and exit

repeat those steps until you made all the different weapons you wanted

that is awesome!!

Thank you hugo, i'm assuming i can change

Spoiler (click to show/hide)

and it will make iron?
Logged
*Create potion of immortality*
*Potion Created! Drink potion*
*Immortality gained!*
*You have lost your soul!*

Hugo_The_Dwarf

  • Bay Watcher
  • Modding Mentor
    • View Profile
    • Regeneration: Forced Evolution
Re: Modding Dwarf Weaponsmith?? *NEW QUESTION*
« Reply #9 on: March 02, 2014, 03:14:32 pm »

yes anything in "inorganic_metal.txt" cant be supplemented into the STEEL location. Heck any inorganic like Gems, or rock can go in there.

remember to replace <weapon> with the one you find in item_weapon.txt
Logged

PlayingGood

  • Bay Watcher
  • Armok's laugh
    • View Profile
Re: Modding Dwarf Weaponsmith?? *NEW QUESTION*
« Reply #10 on: March 02, 2014, 03:18:36 pm »

yes anything in "inorganic_metal.txt" cant be supplemented into the STEEL location. Heck any inorganic like Gems, or rock can go in there.

remember to replace <weapon> with the one you find in item_weapon.txt

man that is fantastic! hugo you are freaking badass!

Spent last 3 days building this iron factory fort, realllllly wanted some different weapons :))

My adventurers shall engrave your name on the shrines of dead titans :PP



EDIT+

First set of Scourges are being pumped out nicely!

Thanks again Hugo
« Last Edit: March 02, 2014, 04:38:30 pm by PlayingGood »
Logged
*Create potion of immortality*
*Potion Created! Drink potion*
*Immortality gained!*
*You have lost your soul!*

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: Modding Dwarf Weaponsmith?? *SOLVED*
« Reply #11 on: March 04, 2014, 09:16:48 pm »

If you don't mind using DFHack, you can edit your civilization in memory and teach them how to produce whatever weapon types you want. For example, to make whips, type the following command:

Code: [Select]
:lua df.historical_entity.find(df.global.ui.civ_id).resources.weapon_type:insert('#',0)Replace the "0" at the end with the numeric index of the weapon you want to add, based on the order in which they're defined in item_weapon.txt (e.g. 17 = scourge, 18 = flail, 19 = morning star, 20 = scimitar); if your weapon raws are split between multiple files, you'll need to know the order in which they're loaded.
Logged
P.S. If you don't get this note, let me know and I'll write you another.
It's amazing how dwarves can make a stack of bones completely waterproof and magmaproof.
It's amazing how they can make an entire floodgate out of the bones of 2 cats.

PlayingGood

  • Bay Watcher
  • Armok's laugh
    • View Profile
Re: Modding Dwarf Weaponsmith?? *SOLVED*
« Reply #12 on: March 05, 2014, 01:06:37 pm »

If you don't mind using DFHack, you can edit your civilization in memory and teach them how to produce whatever weapon types you want. For example, to make whips, type the following command:

Code: [Select]
:lua df.historical_entity.find(df.global.ui.civ_id).resources.weapon_type:insert('#',0)Replace the "0" at the end with the numeric index of the weapon you want to add, based on the order in which they're defined in item_weapon.txt (e.g. 17 = scourge, 18 = flail, 19 = morning star, 20 = scimitar); if your weapon raws are split between multiple files, you'll need to know the order in which they're loaded.


HOLY BLOOD OF ARMOK! That freaking worked!!

Thank you so much man

Is there a command like that to add high boots? I just scored my first ever candy batch, and it would be a shame to make low's.

That command line makes my life so much easier now.
Logged
*Create potion of immortality*
*Potion Created! Drink potion*
*Immortality gained!*
*You have lost your soul!*