Bay 12 Games Forum

Please login or register.

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

Author Topic: Casting anvils at the smelter.  (Read 2183 times)

gtmattz

  • Bay Watcher
  • [PREFSTRING:BEARD]
    • View Profile
Casting anvils at the smelter.
« on: May 10, 2010, 05:26:22 pm »

Since, realistically, one can cast an anvil from molten metal, I am trying to make a smelter reaction so that I can smelt anvils from iron bars.

I have added the following to reaction_smelter:

Code: [Select]
[REACTION:CAST_IRON_ANVIL]
[NAME:cast anvil from iron]
[BUILDING:SMELTER:NONE]
[REAGENT:A:150:BAR:NO_SUBTYPE:METAL:IRON]
[PRODUCT:100:1:ANVIL:NONE:GET_MATERIAL_FROM_REAGENT:A:NONE]
[FUEL]
[SKILL:SMELT]

And this to entity_default under the dwarves section:
Code: [Select]
[PERMITTED_REACTION:CAST_IRON_ANVIL]
I tried adding this to the raws of an already generated worlds raw folder and when that did not work added it to the main raws and still cannot seem to smelt an anvil from iron.

Correction, after fixing a typo in the main raws and generating a new world I was able to make an anvil, however, according to the sticky in this section of the forums I should be able to add these to the raws of my active fortress and have it work...  Is the sticky incorrect? 
« Last Edit: May 10, 2010, 05:31:41 pm by gtmattz »
Logged
Quote from: Hyndis
Just try it! Its not like you die IRL if Urist McMiner falls into magma.

Deon

  • Bay Watcher
  • 💀 💀 💀 💀 💀
    • View Profile
Re: Casting anvils at the smelter.
« Reply #1 on: May 10, 2010, 05:55:13 pm »

Which sticky? That sticky is wrong then. You have to generate a new world every time you add a totally new reaction. You can only replace old ones if you want to keep your world.
Logged
▬(ஜ۩۞۩ஜ)▬
✫ DF Wanderer ✫ - the adventure mode crafting and tweaks
✫ Cartographer's Lounge ✫ - a custom worldgen repository

gtmattz

  • Bay Watcher
  • [PREFSTRING:BEARD]
    • View Profile
Re: Casting anvils at the smelter.
« Reply #2 on: May 10, 2010, 05:57:02 pm »

Which sticky? That sticky is wrong then. You have to generate a new world every time you add a totally new reaction. You can only replace old ones if you want to keep your world.

This one...
http://www.bay12forums.com/smf/index.php?topic=29157.0

Looks as if he edited it today to state that reactions have been hit or miss for people apparently.
Logged
Quote from: Hyndis
Just try it! Its not like you die IRL if Urist McMiner falls into magma.

Deon

  • Bay Watcher
  • 💀 💀 💀 💀 💀
    • View Profile
Re: Casting anvils at the smelter.
« Reply #3 on: May 10, 2010, 06:04:16 pm »

It's not hit or miss, it was always like that and it's certain.
Logged
▬(ஜ۩۞۩ஜ)▬
✫ DF Wanderer ✫ - the adventure mode crafting and tweaks
✫ Cartographer's Lounge ✫ - a custom worldgen repository

Askot Bokbondeler

  • Bay Watcher
  • please line up orderly
    • View Profile
Re: Casting anvils at the smelter.
« Reply #4 on: May 10, 2010, 06:20:28 pm »

also changes to entities raws require a worldgen, i think

Deon

  • Bay Watcher
  • 💀 💀 💀 💀 💀
    • View Profile
Re: Casting anvils at the smelter.
« Reply #5 on: May 10, 2010, 06:34:33 pm »

You're right.
Logged
▬(ஜ۩۞۩ஜ)▬
✫ DF Wanderer ✫ - the adventure mode crafting and tweaks
✫ Cartographer's Lounge ✫ - a custom worldgen repository

gtmattz

  • Bay Watcher
  • [PREFSTRING:BEARD]
    • View Profile
Re: Casting anvils at the smelter.
« Reply #6 on: May 10, 2010, 06:47:16 pm »

Well, yeah. I knew that it used to be that you had to regen for new smelter entries, I just assumed that something in a sticky would be correct and was psyched that i could just add new ones, oh well.
Logged
Quote from: Hyndis
Just try it! Its not like you die IRL if Urist McMiner falls into magma.

Ilmoran

  • Bay Watcher
    • View Profile
Re: Casting anvils at the smelter.
« Reply #7 on: May 11, 2010, 10:39:58 am »

Well, yeah. I knew that it used to be that you had to regen for new smelter entries, I just assumed that something in a sticky would be correct and was psyched that i could just add new ones, oh well.

A nice way around that (in the future) is to create dummy buildings and reactions in the raws, then if you see something you like, you can add the details for it to the dummy entry.  Since the reaction was already there, and you're just changing the details, it doesn't require a regen.

Example:
My reaction file contains:
Code: [Select]
[CUSTOM_REACTION1]
[CUSTOM_REACTION2]
[CUSTOM_REACTION3]
[CUSTOM_REACTION4]
[CUSTOM_REACTION5]

Then, if I wanted to make a cast anvil reaction, I would just change it to read:
Code: [Select]
[CUSTOM_REACTION1]
[NAME:cast anvil from iron]
[BUILDING:SMELTER:NONE]
[REAGENT:A:150:BAR:NO_SUBTYPE:METAL:IRON]
[PRODUCT:100:1:ANVIL:NONE:GET_MATERIAL_FROM_REAGENT:A:NONE]
[FUEL]
[SKILL:SMELT]
[CUSTOM_REACTION2]
[CUSTOM_REACTION3]
[CUSTOM_REACTION4]
[CUSTOM_REACTION5]
Logged

Master Catfish

  • Bay Watcher
    • View Profile
Re: Casting anvils at the smelter.
« Reply #8 on: May 11, 2010, 12:39:56 pm »

This seems like a really good idea to me.  Is the code in the OP now devoid of said typos?  I'd like to use that reaction myself.  Also, if I wanted it to take 5 iron bars to make an anvil (seems more reasonable to me), would the following work?
Code: [Select]
[REAGENT:5:150:BAR:NO_SUBTYPE:METAL:IRON]
Logged

Deon

  • Bay Watcher
  • 💀 💀 💀 💀 💀
    • View Profile
Re: Casting anvils at the smelter.
« Reply #9 on: May 11, 2010, 12:40:38 pm »

INORGANIC in place of METAL.
Logged
▬(ஜ۩۞۩ஜ)▬
✫ DF Wanderer ✫ - the adventure mode crafting and tweaks
✫ Cartographer's Lounge ✫ - a custom worldgen repository

Ilmoran

  • Bay Watcher
    • View Profile
Re: Casting anvils at the smelter.
« Reply #10 on: May 11, 2010, 12:43:28 pm »

This seems like a really good idea to me.  Is the code in the OP now devoid of said typos?  I'd like to use that reaction myself.  Also, if I wanted it to take 5 iron bars to make an anvil (seems more reasonable to me), would the following work?
Code: [Select]
[REAGENT:5:150:BAR:NO_SUBTYPE:METAL:IRON]

[REAGENT:A:750 not [REAGENT:5:150.  The 150 refers to the "product dimension".  When you create bars, they have product dimension 150 (wheres thread has 15000, and cloth has 10000), so 750 makes the reaction require 750/150=5 bars.
Logged

Master Catfish

  • Bay Watcher
    • View Profile
Re: Casting anvils at the smelter.
« Reply #11 on: May 11, 2010, 12:52:52 pm »

Excellent, thanks!  And METAL is the typo, right?  Right now in my raws it reads:
Code: [Select]
[REAGENT:A:750:BAR:NO_SUBTYPE:INORGANIC:IRON]
...This is correct?
Logged

Deon

  • Bay Watcher
  • 💀 💀 💀 💀 💀
    • View Profile
Re: Casting anvils at the smelter.
« Reply #12 on: May 11, 2010, 01:03:46 pm »

That is correct :).
Logged
▬(ஜ۩۞۩ஜ)▬
✫ DF Wanderer ✫ - the adventure mode crafting and tweaks
✫ Cartographer's Lounge ✫ - a custom worldgen repository

JmzLost

  • Bay Watcher
    • View Profile
Re: Casting anvils at the smelter.
« Reply #13 on: May 12, 2010, 10:39:07 pm »

Code: [Select]
[REAGENT:A:150:BAR:NO_SUBTYPE:METAL:IRON]

This is the line from the reaction to make steel.   "METAL:IRON" works just fine.  Since you're specifying "IRON" in reagent A, you can also use "METAL:IRON" in the product, since you're always going to make an iron anvil.

JMZ
Logged
Also, obviously, magma avalanches and tsunamis weren't exactly a contingency covered in the mission briefing.
I can assure you that Ardentdikes is not the first fortress to be flooded with magma. What's unusual is that we actually meant to flood it with magma.

Deon

  • Bay Watcher
  • 💀 💀 💀 💀 💀
    • View Profile
Re: Casting anvils at the smelter.
« Reply #14 on: May 13, 2010, 03:38:22 am »

METAL is not read in this case. It would be the same as
[REAGENT:A:150:BAR:NO_SUBTYPE:NONE:IRON]

The correct value is INORGANIC.
Logged
▬(ஜ۩۞۩ஜ)▬
✫ DF Wanderer ✫ - the adventure mode crafting and tweaks
✫ Cartographer's Lounge ✫ - a custom worldgen repository
Pages: [1] 2