Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Making other types of rock coal bearing stone  (Read 1024 times)

Bokaza

  • Bay Watcher
  • Forts lost: A lot
    • View Profile
Making other types of rock coal bearing stone
« on: March 10, 2014, 11:00:27 am »

Is it possible to turn normal rocks into coal-bearing ones by making new processes in the smelter? I've tried copypasta and modifying the existing lines of code for smelting bit coal and lignite to turn petrified wood into one:

I put this inside one of my save's raw files named 'reaction_smelter':
Spoiler (click to show/hide)

There was no option available in game. Is this because it is not possible to mod running saves or because I forgot something? Alas, I am aware that I have probably underestimated the magic that is DF modding, but any help you could provide this humble noob would be appreciated.
Logged
Ah, RL. The only true slayer of fortresses.
A vile force of Reality has arrived!

Hugo_The_Dwarf

  • Bay Watcher
  • Modding Mentor
    • View Profile
    • Regeneration: Forced Evolution
Re: Making other types of rock coal bearing stone
« Reply #1 on: March 10, 2014, 11:10:27 am »

Adding new things means a new world generated, altho most changes to existing things work (most not all) also the reaction needs to be permitted in the entity, this is normally found above ethics.

so move that editied reaction_smelter.txt to the default raw file, and gen a new world (don't forget to permit that reaction) and it will make 5 coke from 1 boulder of pet. wood
Logged

Bokaza

  • Bay Watcher
  • Forts lost: A lot
    • View Profile
Re: Making other types of rock coal bearing stone
« Reply #2 on: March 10, 2014, 12:25:18 pm »

Thank you, but if it does require a restart then it can't solve my problems. The problem is that I insisted on building a surface fort and there is no coal deposits of any kind. Although wood is plentiful, I still have to rely on massive wood and coal imports to get my metal industry flowing. I thought to make a pipeline for magma to get it working, but after reaching it (some 150 levels below), I realized I'll have to resort to some extremely dwarfy solutions. The kind I sadly don't have time for.
Logged
Ah, RL. The only true slayer of fortresses.
A vile force of Reality has arrived!

Wannabehero

  • Bay Watcher
    • View Profile
Re: Making other types of rock coal bearing stone
« Reply #3 on: March 10, 2014, 04:22:53 pm »

I personally modded peat to be burnable into charcoal.  Unlimited fuel from lots of collection labor.  Requires some rebuild of the inorganic_soil.  Sadly, anything you do will require a regen.

Adding anything new to the raws requires a regen of the world.  New raw files, new entries in a raw file, and any change to the entity files (such as permitting your new reactions).   Modifying an already existing entry in the raws (but not entity_default) is usually compatible and will not require a regen.

There are a few rarely-used reactions that are good candidates for modding an existing game without screwing things up to badly.  MAKE_WAX_CRAFTS, MAKE_SOAP_FROM_OIL, and just about any of the redundant smelter reactions (such as PEWTER_TRIFLE_MAKING2, make trifle pewter bars (use bars)).  I say pick one of those and make it a fuel producing reaction.

Example:
I will never ever ever use PEWTER_TRIFLE_MAKING2, where you make trifle pewter from bars.  If I need trifle pewter for a mandate, I will smelt it from ore.  This makes the reaction redundant for me personally.  I will change it to produce fuel.

How should I get my fuel?  I could cheat and setup a reaction to produce unlimited fuel for no resources, but that is not fun.  Instead, what would a good dwarf do?  Fuel my metal industry with quarry bush plants.

In the reaction_other.txt raw file, change the entry for PEWTER_TRIFLE_MAKING2 to the following:
Code: [Select]
[REACTION:PEWTER_TRIFLE_MAKING2]
[NAME:burn quarry bush into charcoal]
[BUILDING:SMELTER:NONE]
[REAGENT:A:1:PLANT:NONE:PLANT_MAT:BUSH_QUARRY:STRUCTURAL]
[PRODUCT:100:1:BAR:NO_SUBTYPE:COAL:CHARCOAL][PRODUCT_DIMENSION:150]
[PRODUCT:100:1:SEEDS:NONE:GET_MATERIAL_FROM_REAGENT:A:SEED]
[PRODUCT:50:1:SEEDS:NONE:GET_MATERIAL_FROM_REAGENT:A:SEED]
[PRODUCT:50:1:SEEDS:NONE:GET_MATERIAL_FROM_REAGENT:A:SEED]
[SKILL:SMELT]

Then build some huge quarry bush farms.  As a bonus, you could end up with lots of rock nuts by setting up a fuel industry this way, which means lots of rock nut paste and oil for your dwarves to enjoy.

_____

Of course, you could also just use your alternative stone concept, just replace an already existing reaction with the new one, but do not change the token of the reaction (the part that says REACTION:"make_blah_blah")
« Last Edit: March 10, 2014, 04:25:00 pm by Wannabehero »
Logged

kiwiphoenix

  • Bay Watcher
    • View Profile
Re: Making other types of rock coal bearing stone
« Reply #4 on: March 10, 2014, 08:31:05 pm »

I personally modded peat to be burnable into charcoal.  Unlimited fuel from lots of collection labor.  Requires some rebuild of the inorganic_soil.  Sadly, anything you do will require a regen.

Sorry to derail somewhat, but how'd you enable peat collection without breaking the clay industry?
Logged

BlackFlyme

  • Bay Watcher
  • BlackFlyme cancels Work: Interrupted by bird.
    • View Profile
Re: Making other types of rock coal bearing stone
« Reply #5 on: March 10, 2014, 09:06:14 pm »

I personally modded peat to be burnable into charcoal.  Unlimited fuel from lots of collection labor.  Requires some rebuild of the inorganic_soil.  Sadly, anything you do will require a regen.

Sorry to derail somewhat, but how'd you enable peat collection without breaking the clay industry?

Reaction classes would be my guess.

Give all clay types something like [REACTION_CLASS:CLAY] and alter every kiln reaction that requires raw clay to only accept that reaction class.

Since peat does not have the reaction class, it is ignored by those reactions.
Logged

kiwiphoenix

  • Bay Watcher
    • View Profile
Re: Making other types of rock coal bearing stone
« Reply #6 on: March 10, 2014, 11:01:33 pm »

Quote
Give all clay types something like [REACTION_CLASS:CLAY] and alter every kiln reaction that requires raw clay to only accept that reaction class.

Since peat does not have the reaction class, it is ignored by those reactions.

Works like a charm, thank you!
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Making other types of rock coal bearing stone
« Reply #7 on: March 11, 2014, 05:38:36 am »

I do the same. gather peat like clay, compress it into a peat block in the screw press and then make coke with it in the smelter. Free but more work intensive.
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 :::

Bokaza

  • Bay Watcher
  • Forts lost: A lot
    • View Profile
Re: Making other types of rock coal bearing stone
« Reply #8 on: March 11, 2014, 06:56:23 am »

I will try. Thank you, guys.
Logged
Ah, RL. The only true slayer of fortresses.
A vile force of Reality has arrived!

Wannabehero

  • Bay Watcher
    • View Profile
Re: Making other types of rock coal bearing stone
« Reply #9 on: March 11, 2014, 12:02:39 pm »

Quote from: BlackFlyme
Reaction classes would be my guess.

Give all clay types something like [REACTION_CLASS:CLAY] and alter every kiln reaction that requires raw clay to only accept that reaction class.

Since peat does not have the reaction class, it is ignored by those reactions.

Quote from: Meph
I do the same. gather peat like clay, compress it into a peat block in the screw press and then make coke with it in the smelter. Free but more work intensive.

Pretty much this, yep.  Reaction classes are a beautiful thing.
Logged