Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Help With Hacking the Raw Files of an Established Fort  (Read 732 times)

The_Gman

  • Escaped Lunatic
    • View Profile
Help With Hacking the Raw Files of an Established Fort
« on: April 29, 2013, 06:12:32 am »

OK so I was trying to hack a fort I recently started, to make all dwarfs legendary in all skills, and implement this hack:http://dwarffortresswiki.org/index.php/Shaostoul%27s_Guide. More specifically the hack that allows you to obtain all ores, and gems and I was wondering just how exactly do you do this, I have played Dorf Fortress for years now but never messed around with the raw files. Also the reason for doing said hack is to build up a army for some serious fun down below, and to set up a based for when I make my decent into epic fun on adventure mode.
Logged

Greiger

  • Bay Watcher
  • Reptilian Illuminati member. Keep it secret.
    • View Profile
Re: Help With Hacking the Raw Files of an Established Fort
« Reply #1 on: April 29, 2013, 11:25:36 am »

Alrighty, you'll need to access your save raws, which are separate from your main ones.

They are located at ../Dwarf Fortress/Data/Save/[name of region(probably "Region #")]/raw/objects
(note that "current" is not your saved region, DF stores data for the current/last played world there.  Changing stuff there will do nothing.)

=================================
To get all materials you will need to modify a reaction in there.  Look for "reaction_smelter.txt" and open it.

Normally when editing raws you would create a new entry at the bottom of a file (or make a new file entirely), but that doesn't work when editing a world that already exists.  We have to edit a reaction the world already knows about, changing what it needs for input and what it outputs.

Look for the line "[REACTION:BLACK_BRONZE_MAKING]"  We're going to turn this into your cheat reaction.  Hardly anyone ever makes this stuff anyway.

Change [NAME:make black bronze bars] to [NAME:Cheat reaction] (or something along those lines).

Leave [BUILDING:SMELTER:NONE] alone, we need that. (If you know what yer doing you can change SMELTER to some other workshop)

Delete the three lines starting with "[REAGENT: " That defines what you need to input to make it work.  Deleting them all makes us need nothing.

[PRODUCT:100:4:BAR:NO_SUBTYPE:METAL:BLACK_BRONZE][PRODUCT_DIMENSION:150] is the line that gives us what we output.  At this point we just add more.

See the other raw entries?  Ones for adamantine, or gold, or steel?  See their [PRODUCT: lines?  Copy and paste them under the product line for black bronze.  Every one of those lines you add will make it also output bars of the metal you stole it from.  If you want extra bars per time running the reaction change the second number to how many bars you want.  For example [PRODUCT:100:4:BAR:NO_SUBTYPE:METAL:BLACK_BRONZE] to [PRODUCT:100:50:BAR:NO_SUBTYPE:METAL:BLACK_BRONZE]

Got all the metals you want?  Good.  See the [FUEL] line?  Delete that.  That's just an intelligent tag that tells the reaction that if it isn't in a magma smelter it needs to add one bar of coal.  You don't want to need coal do you?

As for the [SKILL:SMELT] line that can stay there or go.  If it's there you'll need a dwarf with furnace operator on to run the reaction, but it will also train furnace operator.  If you remove it, anybody with free time will produce yer bars, but no skill will be gained.

Here's an example of what the reaction may look like at the end.
Code: [Select]
[REACTION:BLACK_BRONZE_MAKING] <--Do not change this, this makes the game think it's the same reaction
[NAME:cheat reaction]
[BUILDING:SMELTER:NONE]
[PRODUCT:100:50:BAR:NO_SUBTYPE:METAL:BLACK_BRONZE][PRODUCT_DIMENSION:150]
[PRODUCT:100:50:BAR:NO_SUBTYPE:METAL:ADAMANTINE][PRODUCT_DIMENSION:150]
[PRODUCT:100:50:BAR:NO_SUBTYPE:METAL:STEEL][PRODUCT_DIMENSION:150]
[PRODUCT:100:50:BAR:NO_SUBTYPE:METAL:BRONZE][PRODUCT_DIMENSION:150]
[PRODUCT:100:50:BAR:NO_SUBTYPE:METAL:BRASS][PRODUCT_DIMENSION:150]
[PRODUCT:100:50:BAR:NO_SUBTYPE:COAL:COKE][PRODUCT_DIMENSION:150]
[SKILL:SMELT]

EDIT: I forgot about the gem request, but I don't have the gem product lines memorized, and can't find an obvious reference.  If you do find them just add their product lines just like you did with the metals.
================================
As for the all dwarves lengendary bit you need to give the dwarves natural skill.

open creature_standard.txt

Dwarves are conveniently at the top.  But creature raws are FAR bigger and more complicated than reactions are. 

Tags can go just about anywhere, but we don't want them inside a tag with modifiers, so lets go to [DURINAL] (It's right above [PROFESSION_NAME: spam if yer having trouble)

Make a new line and paste these tags in.
Code: [Select]
[NATURAL_SKILL:WRESTLING:15]
[NATURAL_SKILL:BITE:15]
[NATURAL_SKILL:GRASP_STRIKE:15]
[NATURAL_SKILL:STANCE_STRIKE:15]
[NATURAL_SKILL:MELEE_COMBAT:15]
[NATURAL_SKILL:DODGING:15]
[NATURAL_SKILL:AXE:15]
[NATURAL_SKILL:SWORD:15]
[NATURAL_SKILL:DAGGER:15]
[NATURAL_SKILL:PIKE:15]
[NATURAL_SKILL:MACE:15]
[NATURAL_SKILL:HAMMER:15]
[NATURAL_SKILL:WHIP:15]
[NATURAL_SKILL:SPEAR:15]
[NATURAL_SKILL:SITUATIONAL_AWARENESS:15]

Those are mostly lifted from the Minotaur.  The number at the end is the desired skill level.  I think 15 is a tad above legendary.  These are also combat skills only, because I'm running out of time.

To add other skills you just add another [NATURAL_SKILL: tag look up the skill's raw name on the wiki, enter the skill name in caps, and the desired level, and an end bracket.

And of course, remember to save the files when done.
« Last Edit: April 29, 2013, 11:50:08 am by Greiger »
Logged
Disclaimer: Not responsible for dwarven deaths from the use or misuse of this post.
Quote
I don't need friends!! I've got knives!!!

The_Gman

  • Escaped Lunatic
    • View Profile
Re: Help With Hacking the Raw Files of an Established Fort
« Reply #2 on: April 29, 2013, 11:06:21 pm »

Thanks I was reading the wiki but it was not very clear on where to put the modifications, in the raw files them selves.
Logged