Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Original Shops and Reactions RAWs?  (Read 224 times)

DrTank09

  • Bay Watcher
    • View Profile
Original Shops and Reactions RAWs?
« on: January 12, 2017, 03:16:44 am »

Hey guys, I just started looking into modding RAWs and trying to figure out all the information regarding limiting reactions based on historical material uses.  I was looking for how the reactions for the forge and carpenter's workshop worked and realized that I cant find any of those reactions or the workshops themselves in the raw folder.  Can anyone point me in the right direction for finding this information?

I'm more than willing to learn more complex things, but I'm stumped as to where to begin.
Logged

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: Original Shops and Reactions RAWs?
« Reply #1 on: January 12, 2017, 07:32:32 am »

I was looking for how the reactions for the forge and carpenter's workshop worked and realized that I cant find any of those reactions or the workshops themselves in the raw folder.
That's because they do not exist - most workshop jobs in the game are hardcoded and thus cannot be modified in any way.
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.

DrTank09

  • Bay Watcher
    • View Profile
Re: Original Shops and Reactions RAWs?
« Reply #2 on: January 13, 2017, 02:42:19 am »

Thanks Quietust, you seem to always be the one answering my questions :D

I noticed on another thread after doing some digging into Hardcode that DFHack has a way of modifying hardcode for some objects.  Is there any way to learn more on this topic or was I misinterpreting the information you gave here http://www.bay12forums.com/smf/index.php?topic=143012.msg5612229#msg5612229
« Last Edit: January 13, 2017, 04:07:57 am by DrTank09 »
Logged

DrTank09

  • Bay Watcher
    • View Profile
Re: Original Shops and Reactions RAWs?
« Reply #3 on: January 13, 2017, 04:45:33 am »

On second thought, don't answer that.  The more I've read into this, the more I realized that it isn't my place to ask for or edit the hard code.  That is TodayOne's prerogative.  I will stick with the raws he has given us and work from there to figure out what I am and am not capable of.
Logged

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: Original Shops and Reactions RAWs?
« Reply #4 on: January 13, 2017, 07:34:33 am »

There is no such thing as "hard code" - when I say something is "hardcoded", it simply means that its functionality is implemented entirely in C++ and cannot be modified using raws.

There are some "hardcoded" parts of DF which can be modified using DFHack, but only a limited number of things can be overridden that way. Interestingly, the list of jobs available from certain workshops (including the Metalsmith's Forge and the Carpenter's Workshop) can be modified using DFHack (whether to remove old jobs, change existing ones, or add new ones), but with certain other workshops this is not possible.
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.

milo christiansen

  • Bay Watcher
  • Only online tuesdays and fridays
    • View Profile
Re: Original Shops and Reactions RAWs?
« Reply #5 on: January 13, 2017, 12:24:21 pm »

You can however, remove a workshop from the game and add your own replacement. The latest DFHack comes with a script for this (modtools/edit-build-menu).

Note that some jobs are not possible to replace with a reaction (for example milking or slaughtering), and many others won't work properly without even more DFHack code (cooking, dyeing, etc).

If you really want to see what is possible look at my Underhive Settlement reboot, that mod replaces all but one hardcoded workshop.
Logged
Rubble 8 - The most powerful modding suite in existence!
After all, coke is for furnaces, not for snorting.
You're not true dwarven royalty unless you own the complete 'Signature Collection' baby-bone bedroom set from NOKEAS

DrTank09

  • Bay Watcher
    • View Profile
Re: Original Shops and Reactions RAWs?
« Reply #6 on: January 13, 2017, 06:48:29 pm »

thanks guys, this is a big help.  I figured the hard code was referring to the source code which only TodayOne knows and doesn't seem to happy about dfhack trying to reverse engineer.
« Last Edit: January 13, 2017, 07:39:46 pm by DrTank09 »
Logged

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: Original Shops and Reactions RAWs?
« Reply #7 on: January 14, 2017, 10:35:32 am »

As I had mentioned, the term is not "hard code", but "hard-coding", and it just means that the behavior is determined at compile-time and cannot be changed based on input from the user. In older versions of Dwarf Fortress, far more of the game's behavior was hardcoded - it wasn't until version 0.27 that custom reactions were added, and it wasn't until 0.31 that it became possible to add custom reactions to buildings other than Smelters.

There are actually a lot of hardcoded things in Dwarf Fortress that can be modified using DFHack, but some are more difficult than others - for example, DFHack can easily change the number of dwarves you get during embark (by modifying the relevant machine code that normally loads a value of 7), but it cannot easily add new item types (because there are dozens, if not hundreds, of places that would need to be patched in order to handle it).
« Last Edit: January 14, 2017, 10:41:25 am by Quietust »
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.