Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2

Author Topic: Modding questions!  (Read 1613 times)

Davichococat

  • Bay Watcher
    • View Profile
Modding questions!
« on: March 14, 2011, 08:29:43 pm »

Okay, I have some questions about modding. I'm new to modding in DF. But it seems such a awesome thing! So I want to make a mod. I have some questions, before I start making the mod.

  • Can you make a prepared food item not be done by a kitchen, or a workaround for making it? I want to make a custom reaction to make a prepared food item.
  • Can you mod skills? I mean, something like creating a new skill...

Thats all for now, but soon questions will be exploding my brain and I will post them here. Thanks for helping.
Logged

Girlinhat

  • Bay Watcher
  • [PREFSTRING:large ears]
    • View Profile
Re: Modding questions!
« Reply #1 on: March 14, 2011, 08:45:51 pm »

1) You can make food items that don't appear anywhere, and make a custom reaction that produces this unique food.  Not sure about prepared meals...

2) Not really, the jobs are hard-coded.

Davichococat

  • Bay Watcher
    • View Profile
Re: Modding questions!
« Reply #2 on: March 14, 2011, 08:58:03 pm »

1) You can make food items that don't appear anywhere, and make a custom reaction that produces this unique food.  Not sure about prepared meals...

2) Not really, the jobs are hard-coded.

Thanks for the help. About 2), how?
Logged

Girlinhat

  • Bay Watcher
  • [PREFSTRING:large ears]
    • View Profile
Re: Modding questions!
« Reply #3 on: March 14, 2011, 08:59:36 pm »

They're... hard coded.  Like, you cannot mod them.  What do you mean how?

Davichococat

  • Bay Watcher
    • View Profile
Re: Modding questions!
« Reply #4 on: March 14, 2011, 09:03:41 pm »

Oh wait, I mean 1).
Logged

Girlinhat

  • Bay Watcher
  • [PREFSTRING:large ears]
    • View Profile
Re: Modding questions!
« Reply #5 on: March 14, 2011, 09:08:11 pm »

Easiest way is to make a plant, that doesn't grow anywhere and produces no seed.  A "cheeseburger" plant could be made with 1 flour, 1 meat, and 1 cheese.

Davichococat

  • Bay Watcher
    • View Profile
Re: Modding questions!
« Reply #6 on: March 14, 2011, 09:12:56 pm »

Easiest way is to make a plant, that doesn't grow anywhere and produces no seed.  A "cheeseburger" plant could be made with 1 flour, 1 meat, and 1 cheese.

Hmm... Cheeseburger.  :D

Can I add a 'edible_raw' to a toy item?
Logged

Jay

  • Bay Watcher
  • ☼Not Dead Yet☼
    • View Profile
Re: Modding questions!
« Reply #7 on: March 14, 2011, 09:15:57 pm »

Can I add a 'edible_raw' to a toy item?
Not part of the item definition tokenset, so no.
Logged
Mishimanriz: Histories of Pegasi and Dictionaries

Sutremaine

  • Bay Watcher
  • [ETHIC:ATROCITY: PERSONAL_MATTER]
    • View Profile
Re: Modding questions!
« Reply #8 on: March 14, 2011, 10:05:27 pm »

Can you mod skills? I mean, something like creating a new skill...
There are skills that aren't used normally, but they can only be renamed if they form a profession name. So, you can rename the Alchemy skill to whatever you like because 'Urist McDwarf, Alchemist' is a valid title for a dwarf, but you can't rename the Striker skill because 'Urist McDwarf, Striker' isn't a valid title. Note that this doesn't change the attributes raised by the skill.

I think Alchemy might be the only skill that can be repurposed this way (nothing else seems to have a profession attached). In theory you could take a profession not associated with any hard-coded buildings and remove all traces of it from the game so that you can have it for yourself. The only one I know of is Soap Maker, but perhaps some of the new .19 skills are candidates as well.

So, the short answer is 'no'. The long answer is 'no, but you can fake it'.
Logged
I am trying to make chickens lay bees as eggs. So far it only produces a single "Tame Small Creature" when a hen lays bees.
Honestly at the time, I didn't see what could go wrong with crowding 80 military Dwarves into a small room with a necromancer for the purpose of making bacon.

Jeoshua

  • Bay Watcher
  • God help me, I think I may be addicted to modding.
    • View Profile
Re: Modding questions!
« Reply #9 on: March 14, 2011, 11:06:48 pm »

That just rubs me the wrong way.

Cheeseburgers are not vegetables >.<
Logged
I like fortresses because they are still underground.

Davichococat

  • Bay Watcher
    • View Profile
Re: Modding questions!
« Reply #10 on: March 19, 2011, 08:28:17 am »

Here, I said I would come with more questions, here I am. Would that work then?

Spoiler (click to show/hide)
Logged

Girlinhat

  • Bay Watcher
  • [PREFSTRING:large ears]
    • View Profile
Re: Modding questions!
« Reply #11 on: March 19, 2011, 08:34:14 am »

Those look stable, but I would like to point out that the game already has flour, coming from longland grass and cave wheat.  You can add a [REACTION_CLASS:FLOUR] to the milled product of these plants, and then in the baking reactions you add [REACTION_CLASS:FLOUR] under Reagent:plant:any.  You may need to check my spelling on that, I don't remember exact tokens, but the basic idea should work.

Davichococat

  • Bay Watcher
    • View Profile
Re: Modding questions!
« Reply #12 on: March 19, 2011, 10:46:49 am »

Those look stable, but I would like to point out that the game already has flour, coming from longland grass and cave wheat.  You can add a [REACTION_CLASS:FLOUR] to the milled product of these plants, and then in the baking reactions you add [REACTION_CLASS:FLOUR] under Reagent:plant:any.  You may need to check my spelling on that, I don't remember exact tokens, but the basic idea should work.

I know longland grass and cave wheat has flour. But my mod ins't just making a bakery workshop. I'm gonna add new plants too and other things.

Anyways, it will work without me needing to add [REACTION_CLASS:FLOUR], huh?

Also, with [REACTION_CLASS:FLOUR], it will allow any type of flour, right?
« Last Edit: March 19, 2011, 10:48:52 am by Davichococat »
Logged

Girlinhat

  • Bay Watcher
  • [PREFSTRING:large ears]
    • View Profile
Re: Modding questions!
« Reply #13 on: March 19, 2011, 10:54:55 am »

It will allow anything you add that token to.  Look up the glaze reaction class, found under tin and ash, and the flux class under the various flux stones.  It's a way to make the raws say "anything with this token, because I don't want to make a reaction for every instance of flour".  For all that matters, you could add the reaction class to plump helmet seeds and it would be used in the specified reaction.

Davichococat

  • Bay Watcher
    • View Profile
Re: Modding questions!
« Reply #14 on: March 19, 2011, 10:59:47 am »

It will allow anything you add that token to.  Look up the glaze reaction class, found under tin and ash, and the flux class under the various flux stones.  It's a way to make the raws say "anything with this token, because I don't want to make a reaction for every instance of flour".  For all that matters, you could add the reaction class to plump helmet seeds and it would be used in the specified reaction.
Hmm, like this:
[REACTION:BAKE_CAKE]
   [NAME:bake cake]
   [BUILDING:BAKERY:CUSTOM_SHIFT_C]
   [SKILL:COOK]
   [REAGENT:A:2:NONE:NONE:NONE:NONE]
   [REACTION_CLASS:FLOUR]
   [REAGENT:A:2:PLANT:NONE:PLANT_MAT:NONE]
   [PRODUCT:100:6:PLANT:NONE:PLANT_MAT:CAKE]

or this:

[REACTION:BAKE_CAKE]
   [NAME:bake cake]
   [BUILDING:BAKERY:CUSTOM_SHIFT_C]
   [SKILL:COOK]
   [REAGENT:A:2:PLANT:NONE:PLANT_MAT:NONE]
   [REACTION_CLASS:FLOUR]
   [REAGENT:A:2:PLANT:NONE:PLANT_MAT:NONE]
Logged
Pages: [1] 2