Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Emulating Hardcoded Reactions/Workshops/Buildings  (Read 1273 times)

Solifuge

  • Bay Watcher
    • View Profile
Emulating Hardcoded Reactions/Workshops/Buildings
« on: July 16, 2010, 03:45:20 am »

I'm working on a TOP SECRET Mod, and ran into some difficulty with reactions and materials. Please let me pick your collective brains, since I'm sure we can figure these out:

1) Recreating Smelters:
I'm trying to create a series of auxiliary workshops that emulate several hard-coded workshops/reactions, but which have certain limitations on what they can do. For instance, a Smelter which can only smelt certain ores (Native Copper, Silver, Gold, etc.), but still retains the ability to melt down items. I've got the ore emulation down, since it's fairly easy... but I have no idea how to do melting of metal objects. It's not a vital function to have, but it'd be ideal provided it works without potentially melting any and every unattended metal object. Any ideas for how I might be able to make metal object melting work, ideally only objects marked for melting?

If I can tweak the raws in such a way as to prevent smelting of any ores unless there's a reaction explicitly allowing it too, that would also work.


2) Adding Custom Reactions to Hardcoded Workshops:
In the same vein, I'm looking to creating an auxiliary Mason's workshop which can produce Querns, Millstones, Statues, Blocks, and a custom Stone Anvil object out of any non-economic stone, but won't build the majority of stone furniture items.

I'd like to add this Stone Anvil reaction to the hardcoded Masonry Workshop too, and I've got a few other custom reactions that I'd rather add to the hardcoded workshops, instead of making custom ones for each (namely the Craftsdwarf's Workshop and the Leather Works). However, I don't know the tags used to specify them. Do you know if the hardcoded workshops (other than the smelter) can be used by custom reactions, and if so what the tags would be to use them? Something like "[BUILDING:LEATHER_WORKS:NONE]"?


3) Mined Soil Layers Producing Materials - Clay and Ceramics Industry:
Since ceramics are sorely lacking in Dwarf Fortress, I'd like to create a simple ceramic production line based around Clay, Kilns, and the Furnace Operator skill; however, unless you can modify the soil layers to drop material when mined (does adding [IS_STONE] make them drop material?), I see two options: change Clay to a type of layer stone (sedimentary) that shows up near topsoil, or preferably make it a non-stone mineral that exists in deposits in certain soil layers.

In either case, since lumps of wet clay don't make for good floors/walls, what material/tokens can I use to make it so that it can't be used in stone constructions in its raw state? So long as I can do that, I can make a separate stone material called "ceramic" which doesn't occur in nature, and use reactions to turn the raw clay material into the desired objects made of ceramic at a kiln.



4) Custom Buildings Made of Custom Objects:
Can custom constructed objects, such as Floor Rugs or Tapestries of woven cloth, be manufactured, and then built as a construction in rooms? Additionally, could a manufactured Mosaic be made of 3 distinct stone materials, and set to automatically depict DESCRIPTOR_SHAPE shapes similar to what statues do?


Though I'm doing my best to figure these things out, there are enough modders out there that I'm sure some of you have messed around with similar things, and have had more experience at it than I, so please share any ideas or information you have about how to make these work, or any other theories you have that I may not have thought of.
« Last Edit: July 16, 2010, 03:47:36 am by Solifuge »
Logged

3

  • Bay Watcher
    • View Profile
Re: Emulating Hardcoded Reactions/Workshops/Buildings
« Reply #1 on: July 16, 2010, 05:00:46 am »

ideally only objects marked for melting?

As far as I'm aware, such a function is essentially impossible.

If I can tweak the raws in such a way as to prevent smelting of any ores unless there's a reaction explicitly allowing it too, that would also work.

I remember that this used to be done via reaction classes, but I can't quite remember exactly how. .31 might've messed that method up, as well.

Do you know if the hardcoded workshops (other than the smelter) can be used by custom reactions, and if so what the tags would be to use them? Something like "[BUILDING:LEATHER_WORKS:NONE]"?

This should be possible with anything and everything. Check out reaction_other.txt for some examples... you'll probably just have to guess the building names.

(does adding [IS_STONE] make them drop material?),

Afaik in 28.40 doing this just broke the layer entirely.

In either case, since lumps of wet clay don't make for good floors/walls, what material/tokens can I use to make it so that it can't be used in stone constructions in its raw state?

I dunno about this. There's probably a way of doing it. The only thing that comes to my mind is making it a gem layer, which is undesirable at best. Gems used to be "the thing" to use in unorthodox reaction processes as well, along with toys and instruments, due to the few ways the player could accidentally break them (I still remember exporting cartloads of "masterfully cut paper" in Valkun's Magic Mod for extra profit).

Can custom constructed objects, such as Floor Rugs or Tapestries of woven cloth, be manufactured, and then built as a construction in rooms?

Making custom "furniture" would require you to be able to make custom item classes, which you can't do yet. So no.
Logged

Patchouli

  • Bay Watcher
  • Where very delicious cake shop?
    • View Profile
Re: Emulating Hardcoded Reactions/Workshops/Buildings
« Reply #2 on: July 16, 2010, 05:35:27 am »

I don't really know what the [IS_STONE] token does.

I was under the impression that removing [IS_STONE] and [ITEMS_HARD] would prevent it from being used for anything stones would normally be used for, with [IS_STONE] signifying that the certain inorganic material could be used for stone productions. I always assumed that as long as you had at least some sort of location for it, like [ENVIRONMENT_SPEC:GYPSUM:CLUSTER_SMALL:100], then it would at the very least appear, but without the [IS_STONE], it can't be used like a stone.

Then you can create a reaction that takes the useless stone and outputs something like a ceramic toy.

At the very least, if I'm completely wrong, adding a reaction that takes up the raw clay should automatically mark it as a economic stone, and so it shouldn't be used for walls by default.
« Last Edit: July 16, 2010, 05:38:49 am by Patchouli »
Logged

Lord Shonus

  • Bay Watcher
  • Angle of Death
    • View Profile
Re: Emulating Hardcoded Reactions/Workshops/Buildings
« Reply #3 on: July 16, 2010, 06:01:13 am »

Can custom constructed objects, such as Floor Rugs or Tapestries of woven cloth, be manufactured, and then built as a construction in rooms?

Making custom "furniture" would require you to be able to make custom item classes, which you can't do yet. So no.
Not quite. You can create a custom toy called "Rug" or "Tapestry" that can only be made via reaction, have a custom workshop that has the reaction to make it, and use it as the component for a custom workshop to simulate a rug or tapestry.
Logged
On Giant In the Playground and Something Awful I am Gnoman.
Man, ninja'd by a potentially inebriated Lord Shonus. I was gonna say to burn it.