Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Golem transformation mod  (Read 1908 times)

Dark Archon

  • Bay Watcher
  • Novice Mathematician
    • View Profile
Golem transformation mod
« on: January 02, 2016, 10:47:06 am »

I am trying to repeat on my own transformation of dwarfs into golems on Golemforge. I have successfully added golems as creatures and pets, here is the example of copper golem:
Spoiler (click to show/hide)
and I have taken raws of Golemforge from Masterwork (not going to paste them here). So, I am trying to add transformation reaction to Golemforge, which should create boing stone with syndrome, which will transform the dwarf. Here the raws:
Reaction:
Spoiler (click to show/hide)
Syndrome stone:
Spoiler (click to show/hide)
, STONE_VAPOR_TEMPLATE template and stone by large copied from Masterwork.
Yet reaction doesn't appear in Golemforge. I can build it, but just gives me "no tasks available" message. I moved it to Smelter, and it does not appear at Smelter at all.
All thing seem to be in place, yet reaction does not work. What am I missing?

Logged
Maybe you are dreaming right now.

"Meh, what's scientific progress without a few dead planets?"

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Golem transformation mod
« Reply #1 on: January 02, 2016, 11:44:43 am »

First of all you need to add PERMITTED_REACTION:reaction-name to the entity file, then gen a new world.

Second point is that you need dfhack for it to work, because the transformation is triggered with a plugin called reaction-trigger. At least in the 34.11 version of MDF.
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 :::

Dark Archon

  • Bay Watcher
  • Novice Mathematician
    • View Profile
Re: Golem transformation mod
« Reply #2 on: January 02, 2016, 02:16:42 pm »

First of all you need to add PERMITTED_REACTION:reaction-name to the entity file, then gen a new world.
Did that.

Second point is that you need dfhack for it to work, because the transformation is triggered with a plugin called reaction-trigger. At least in the 34.11 version of MDF.
That's my problem, I think. I had no idea that you require plugin for transformation, and there is no DFHack for 42.xx yet. Where is no way around that?
Logged
Maybe you are dreaming right now.

"Meh, what's scientific progress without a few dead planets?"

Tiler

  • Bay Watcher
  • [ODOR_LEVEL:999]
    • View Profile
Re: Golem transformation mod
« Reply #3 on: January 02, 2016, 04:01:03 pm »

you need the DFhack plugin for the thing to trigger reliably, but you do not need it for the "produce boiling syndrome boulder" trick. I've done it in vanilla DF, it's just kludgy.

Do you actually have the copper bar on hand? I don't think custom reactions will appear as available unless you can actually perform them. Try changing the reagent to nothing, or something you have on hand.

And check your errorlog.txt if you haven't.
Logged

Dark Archon

  • Bay Watcher
  • Novice Mathematician
    • View Profile
Re: Golem transformation mod
« Reply #4 on: January 03, 2016, 06:25:26 am »

Okay, I found the mistake. Apparently, game does not recognize custom reaction files without name of those files being added in the first line of the file, like file reaction_golem starting with "reaction_golem" line. The reaction still not working correctly, of course, but at least game see it now.
Logged
Maybe you are dreaming right now.

"Meh, what's scientific progress without a few dead planets?"

Dark Archon

  • Bay Watcher
  • Novice Mathematician
    • View Profile
Re: Golem transformation mod
« Reply #5 on: January 03, 2016, 06:28:47 am »

Okay, here is new question: how does one make animal, which appears only as pet, reducing wild populations of it to zero? At first embark wild true silver golem killed my entire party  :o
I added [POPULATION_NUMBER:0:0] tag, will it suffice?

Oh, and by the way - stone golems are worthless.
Logged
Maybe you are dreaming right now.

"Meh, what's scientific progress without a few dead planets?"

Tiler

  • Bay Watcher
  • [ODOR_LEVEL:999]
    • View Profile
Re: Golem transformation mod
« Reply #6 on: January 03, 2016, 06:53:01 am »

I think that requires using the COMMON_DOMESTIC tag. Of course, that has its own brand of potential strangeness, but you won't see them in the wild and they'll be available to take on embark, at least.
Logged

Dark Archon

  • Bay Watcher
  • Novice Mathematician
    • View Profile
Re: Golem transformation mod
« Reply #7 on: January 03, 2016, 07:04:12 am »

I think that requires using the COMMON_DOMESTIC tag. Of course, that has its own brand of potential strangeness, but you won't see them in the wild and they'll be available to take on embark, at least.
Mmm... my golems have this tag (without it they wouldn't appear at embark screen), and yet wild golems appear.
Logged
Maybe you are dreaming right now.

"Meh, what's scientific progress without a few dead planets?"

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Golem transformation mod
« Reply #8 on: January 03, 2016, 07:12:35 am »

Okay, here is new question: how does one make animal, which appears only as pet, reducing wild populations of it to zero? At first embark wild true silver golem killed my entire party  :o
I added [POPULATION_NUMBER:0:0] tag, will it suffice?

Oh, and by the way - stone golems are worthless.
Pop numer doesnt work, but if you dont add BIOMES than it has no locations to spawn.
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 :::

Dark Archon

  • Bay Watcher
  • Novice Mathematician
    • View Profile
Re: Golem transformation mod
« Reply #9 on: January 03, 2016, 07:19:35 am »

Okay, thanks a lot. I managed to do boiling stone trick, and now my golem forge successfully turns dwarfs into golem pets. But I would like to know how to use DFHack to make those transformations automatically successful.
Logged
Maybe you are dreaming right now.

"Meh, what's scientific progress without a few dead planets?"

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Golem transformation mod
« Reply #10 on: January 03, 2016, 07:43:52 am »

modtools/reactiontrigger. You need to add a line in the init.lua in the RAW folder.
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 :::

Dark Archon

  • Bay Watcher
  • Novice Mathematician
    • View Profile
Re: Golem transformation mod
« Reply #11 on: January 03, 2016, 07:50:48 am »

modtools/reactiontrigger. You need to add a line in the init.lua in the RAW folder.
Your message implies that I know a lot more than I apparently do, I am just a newbie modder :) Could you be more specific? Or point to a more detailed explanation?
Logged
Maybe you are dreaming right now.

"Meh, what's scientific progress without a few dead planets?"

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Golem transformation mod
« Reply #12 on: January 03, 2016, 08:07:20 am »

Previously dfhack was triggered from the reaction file, but now this has been outsourced to a specific file called onload.init (sorry, thought it was init.lua, which it was in the past. They also changed the name). If you dont have one, just make one, add the necessary text.

Here is an example:

Code: [Select]
#hooks for reactions, this is the dwarven library.
modtools/reaction-trigger -reactionName STUDY_LIBRARY_CONCENTRATION -command [ librarytrain4 \\WORKER_ID CONCENTRATION 4 ]

In this example the reaction will trigger a command, whenever the REACTION:STUDY_LIBRARY_CONCENTRATION is run, and the command is the script name and the arguments for it.

In this case librarytrain4, worker id, concentration and 4. It runs a script called librarytrain4, targets the worker doing the reaction, raises the skill named concentration and sets it to level 4. Aka a dwarf reads a book in the library and learns a skill.

In your case it would look different, but I'm not sure which script you use. For my golem forge I used spawnunits when a golem is constructed, I dont transform dwarves any more.
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 :::