Bay 12 Games Forum

Please login or register.

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

Author Topic: Modding Stone Drops, is it possible?  (Read 1946 times)

ullrich

  • Bay Watcher
    • View Profile
Modding Stone Drops, is it possible?
« on: December 11, 2014, 11:18:16 am »

I was looking into making a mod that simplifies items that have essentially identical properties (for fps and much easier organization). This is easy for wood, body parts etc (even done before), but not for stone.

So I want to have all the stones that are light grey just drop a stone called "light grey" without removing the actual stone names that makeup the ground, so for example you have a layer of basalt and a layer of mica when you mine them they drop light grey stones and have only 1 entry in stockpiles & construction lists etc.

But the only raws that seem to control stones are
inorganic_stone_layer
[INORGANIC:BASALT]
[USE_MATERIAL_TEMPLATE:STONE_TEMPLATE]
[STATE_NAME_ADJ:ALL_SOLID:basalt][DISPLAY_COLOR:0:7:1][TILE:131]
[IGNEOUS_EXTRUSIVE]
[IS_STONE]
[MELTING_POINT:12160]
[SOLID_DENSITY:2850]

inorganic_stone_mineral
[INORGANIC:MICA]
[USE_MATERIAL_TEMPLATE:STONE_TEMPLATE]
[STATE_NAME_ADJ:ALL_SOLID:mica][DISPLAY_COLOR:0:7:1][TILE:132]
[ENVIRONMENT:METAMORPHIC:CLUSTER:100]
[ENVIRONMENT_SPEC:GRANITE:CLUSTER:100]
[MELTING_POINT:12295]
[SOLID_DENSITY:2883]
[IS_STONE]

Would I have to make one of those special reactions that evaporates the normal stones (and flags them not as stones {remove [USE_MATERIAL_TEMPLATE:STONE_TEMPLATE] & [IS_STONE]?} to prevent them showing in stockpiles) to leave the actual stone product I want?

I have no experience doing that kind of thing so I don't even know how to start with that or am I missing something obvious?
Logged
Ullrich cancels Work: Interrupted by Dwarf Fortress
Dwarf Fortress: Engraved is an image of a Human and a video game. The Human is making a plaintive gesture.

scamtank

  • Bay Watcher
    • View Profile
Re: Modding Stone Drops, is it possible?
« Reply #1 on: December 11, 2014, 12:10:41 pm »

So I want to have all the stones that are light grey just drop a stone called "light grey" without removing the actual stone names that makeup the ground, so for example you have a layer of basalt and a layer of mica when you mine them they drop light grey stones and have only 1 entry in stockpiles & construction lists etc.

Yeah, no. You can either have one generic stone or you can have multiple identical "light grey" entries in your stockpile menus. Take your pick.
Logged

ullrich

  • Bay Watcher
    • View Profile
Re: Modding Stone Drops, is it possible?
« Reply #2 on: December 11, 2014, 12:26:44 pm »

If that is the case the evaporation item drop replacement thing might be a workaround but I have no idea how to do those special reactions (gonna peruse the masterwork df raws for ideas how to do it they have some fancy reactions in there).
Logged
Ullrich cancels Work: Interrupted by Dwarf Fortress
Dwarf Fortress: Engraved is an image of a Human and a video game. The Human is making a plaintive gesture.

Itnetlolor

  • Bay Watcher
    • View Profile
    • Steam ID
Re: Modding Stone Drops, is it possible?
« Reply #3 on: December 11, 2014, 12:51:01 pm »

If stone color is something you want sorted out (if that's the main concern, since it's more organization, like stockpiling, than anything else), you can always have someone make, or update, a DFHack script that works like the trade depot sorting script, except add color as a filter (sort by color, ROYGBIV or alphabetical when assigning stockpiles), if possible. You can also double that for wood (many shades of brown to sort through), especially if you're concerned how things would look in Stonesense or similar visualizers down the line.

Just a thought.

Kinda reminds me, Bloodfist with the latest Stonesense would look like a patchwork quilt, since it has all kinds of different wood all over the place; out of distance/convenience. Never sorted materials out like I am doing with Bloodaxe (might restart it for 40.xx. Project kinda died off after too much abscence).
« Last Edit: December 11, 2014, 12:52:55 pm by Itnetlolor »
Logged

ullrich

  • Bay Watcher
    • View Profile
Re: Modding Stone Drops, is it possible?
« Reply #4 on: December 11, 2014, 07:37:51 pm »

Looking into Masterwork DF (just gonna post stuff in the thread as I am trying to figure stuff out):
Spawning a unit
Spoiler (click to show/hide)

Spawning a localized effect "earth boulder":
Spoiler (click to show/hide)

Regional effects example:
Spoiler (click to show/hide)

I'm thinking something like combine the creature spawn templates with the base stone templates:
[INORGANIC:BASALT]
   [USE_MATERIAL_TEMPLATE:STONE_TEMPLATE]
   [STATE_NAME_ADJ:ALL_SOLID:basalt][DISPLAY_COLOR:0:7:1][TILE:131]
   [IGNEOUS_EXTRUSIVE]
   [IS_STONE]
   [MELTING_POINT:12160]
   [SOLID_DENSITY:2850]
Convert to
[INORGANIC:BASALT]
   [USE_MATERIAL_TEMPLATE:STONE_VAPOR_TEMPLATE]
   [STATE_NAME_ADJ:ALL_SOLID:basalt][DISPLAY_COLOR:0:7:1][TILE:131]
   [IGNEOUS_EXTRUSIVE]
   [SYNDROME]
   [SYN_CLASS:\AUTO_SYNDROME]
   [SYN_CLASS:\COMMAND]
   [SYN_CLASS:spawn]
   [SYN_CLASS:GREY_STONE]
   [SYN_CLASS:0]
   [SYN_CLASS:Grey Stone]
   [SYN_CLASS:\LOCATION]
can't seem to find any info on the auto_syndrome, am thinking it might be a df hack script, will need to investigate further.
Logged
Ullrich cancels Work: Interrupted by Dwarf Fortress
Dwarf Fortress: Engraved is an image of a Human and a video game. The Human is making a plaintive gesture.

Ysyua

  • Bay Watcher
  • .- ... - .-. ---
    • View Profile
Re: Modding Stone Drops, is it possible?
« Reply #5 on: December 11, 2014, 07:40:17 pm »

I was looking into making a mod that simplifies items that have essentially identical properties (for fps and much easier organization).

This is already a thing. But, your input would be totally welcome I imagine!
Logged
Quote from: Ysyua
I had a trog give birth while scaling a wall. Just before one of my crossdorfs loosed a bolt at her. The trog baby drowned.
They said the walls were impregnable. You didn't have to prove me wrong by giving birth on them.

ullrich

  • Bay Watcher
    • View Profile
Re: Modding Stone Drops, is it possible?
« Reply #6 on: December 11, 2014, 09:20:05 pm »

I was looking into making a mod that simplifies items that have essentially identical properties (for fps and much easier organization).

This is already a thing. But, your input would be totally welcome I imagine!

My problem with existing mods that do this is they tend to remove non-redundant (but very similar) items, e.g. all wood is generic wood of one color but there are different colors of wood, for stones for I want both light grey and dark grey, I want to be able to make all the different types of clothing etc.

While the FPS improvement is definitely nice to me its primarily a secondary bonus over the clean stockpile and building supply lists. I don't have ocd but it really bothers me to have disheveled looking fortresses (and I am lazy so it can be a pain to figure out which stones to use for what construction which ends up in me abandoning fortress quite a lot when I just reach a point of "I don't care anymore") and I have excessively specialized stockpiles (e.g. each farm crop has a nearby seed hut of that specific type of crop, which means >10 tiny seed stockpiles + overflow seed stockpile of non specialized seeds).
Logged
Ullrich cancels Work: Interrupted by Dwarf Fortress
Dwarf Fortress: Engraved is an image of a Human and a video game. The Human is making a plaintive gesture.

Ysyua

  • Bay Watcher
  • .- ... - .-. ---
    • View Profile
Re: Modding Stone Drops, is it possible?
« Reply #7 on: December 12, 2014, 10:39:19 am »

I was looking into making a mod that simplifies items that have essentially identical properties (for fps and much easier organization).

This is already a thing. But, your input would be totally welcome I imagine!

My problem with existing mods that do this is they tend to remove non-redundant (but very similar) items, e.g. all wood is generic wood of one color but there are different colors of wood, for stones for I want both light grey and dark grey, I want to be able to make all the different types of clothing etc.

While the FPS improvement is definitely nice to me its primarily a secondary bonus over the clean stockpile and building supply lists. I don't have ocd but it really bothers me to have disheveled looking fortresses (and I am lazy so it can be a pain to figure out which stones to use for what construction which ends up in me abandoning fortress quite a lot when I just reach a point of "I don't care anymore") and I have excessively specialized stockpiles (e.g. each farm crop has a nearby seed hut of that specific type of crop, which means >10 tiny seed stockpiles + overflow seed stockpile of non specialized seeds).

Things have changed a bit since you last checked then! There are different categories of wood in Accelerated now (redwood, softwood, regular wood and all the underground woods) and they have different colours. I thought vanilla wood was all the same colour anyway (glumprong and underground trees excepted of course). I don't fully understand why you would want all the different kinds of clothing in a mod like this though.

I get what you mean about the stones. Although, I personally like having some stone variety because I use heavier stones for catapults and the changes in layer stones let me know how far along I am in digging too deep.
Logged
Quote from: Ysyua
I had a trog give birth while scaling a wall. Just before one of my crossdorfs loosed a bolt at her. The trog baby drowned.
They said the walls were impregnable. You didn't have to prove me wrong by giving birth on them.

ullrich

  • Bay Watcher
    • View Profile
Re: Modding Stone Drops, is it possible?
« Reply #8 on: December 15, 2014, 06:27:45 pm »

Things have changed a bit since you last checked then! There are different categories of wood in Accelerated now (redwood, softwood, regular wood and all the underground woods) and they have different colours. I thought vanilla wood was all the same colour anyway (glumprong and underground trees excepted of course). I don't fully understand why you would want all the different kinds of clothing in a mod like this though.
Its been a while since I played DF a lot but I know the version I had played the most ~0.34.11? or something like that, wood had lots of different shades, wonder when that was changed. But it does seem that atm they are all the same color as base, I wonder how much of a pain it will be to try to add shades back in.

I get what you mean about the stones. Although, I personally like having some stone variety because I use heavier stones for catapults and the changes in layer stones let me know how far along I am in digging too deep.
Well that's why i am trying to keep the layer/stone walls that makeup the map the same but get them to drop more generic stone types so the world doesn't loose information just the stockpiling becomes easier.
Logged
Ullrich cancels Work: Interrupted by Dwarf Fortress
Dwarf Fortress: Engraved is an image of a Human and a video game. The Human is making a plaintive gesture.

ullrich

  • Bay Watcher
    • View Profile
Re: Modding Stone Drops, is it possible?
« Reply #9 on: December 15, 2014, 06:32:27 pm »

Back on topic of making the mod found a tag that will be quite useful:
[NO_STONE_STOCKPILE]
That should allow me to make use of "intermediate" stone items with something like autosyndrome (which is a df hack script, http://www.bay12forums.com/smf/index.php?topic=134774.0)

So atm I am reading into DF Hack which seems will be necessary to drop simplified stones.

Update on script:
Masterwork uses its own custom added script command "spawn" as seen in the autosyndrome raws, luckily this appears to only be needed since they need to gen a lot of background info for creatures.
DFHack comes with the script "createItem" (https://github.com/DFHack/dfhack#createitem) so the command would need to be something like "create-items boulders grey_stone 1" so the raw tags would then be:
[INORGANIC:BASALT]
   [USE_MATERIAL_TEMPLATE:STONE_VAPOR_TEMPLATE]
   [STATE_NAME_ADJ:ALL_SOLID:basalt][DISPLAY_COLOR:0:7:1][TILE:131]
   [IGNEOUS_EXTRUSIVE]
   [IS_STONE] included in template
   [MELTING_POINT:12160] included in template (auto vaporizes)
   [SOLID_DENSITY:2850] included in template
+ [NO_STONE_STOCKPILE] included in template
   [SYNDROME]
   [SYN_CLASS:\AUTO_SYNDROME]
   [SYN_CLASS:\COMMAND]
   [SYN_CLASS:create-items]
   [SYN_CLASS:boulders]
   [SYN_CLASS:grey_stone]
   [SYN_CLASS:1]
   [SYN_CLASS:\LOCATION]

time to start testing shit.
« Last Edit: December 16, 2014, 02:26:02 pm by ullrich »
Logged
Ullrich cancels Work: Interrupted by Dwarf Fortress
Dwarf Fortress: Engraved is an image of a Human and a video game. The Human is making a plaintive gesture.

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Modding Stone Drops, is it possible?
« Reply #10 on: December 15, 2014, 06:34:32 pm »

Things have changed a bit since you last checked then! There are different categories of wood in Accelerated now (redwood, softwood, regular wood and all the underground woods) and they have different colours. I thought vanilla wood was all the same colour anyway (glumprong and underground trees excepted of course). I don't fully understand why you would want all the different kinds of clothing in a mod like this though.
Its been a while since I played DF a lot but I know the version I had played the most ~0.34.11? or something like that, wood had lots of different shades, wonder when that was changed. But it does seem that atm they are all the same color as base, I wonder how much of a pain it will be to try to add shades back in.

It wasn't changed between 0.34.11 and 0.40.19, though a lot of trees were added. The important thing is that back in the day you saw more glumprong, featherwood, towercap, blood thorn (or whatever) and nethercaps, all of which were differently colored.

ullrich

  • Bay Watcher
    • View Profile
Re: Modding Stone Drops, is it possible?
« Reply #11 on: December 15, 2014, 07:13:40 pm »

It wasn't changed between 0.34.11 and 0.40.19, though a lot of trees were added. The important thing is that back in the day you saw more glumprong, featherwood, towercap, blood thorn (or whatever) and nethercaps, all of which were differently colored.

Could a graphics pack I always use the cause then (Phoebus) if so more props to phoebus, or am I thinking of an even older version of DF (my memory is shit)?
Logged
Ullrich cancels Work: Interrupted by Dwarf Fortress
Dwarf Fortress: Engraved is an image of a Human and a video game. The Human is making a plaintive gesture.

ullrich

  • Bay Watcher
    • View Profile
Re: Modding Stone Drops, is it possible?
« Reply #12 on: December 16, 2014, 02:22:53 pm »

Big snag hit, autoSyndrome plugin that is required is out of date and may not be upated anytime soon as the guy making masterwork df (the only apparent source of the plugin that I could find) will be very busy starting Janurary 1st.

So I can wait 14 days and hope he updates it or look into making a plugin myself (as much of the autosyndrome functionality isn't needed in this case) anyone know a good guide to making df hack plugins?
Logged
Ullrich cancels Work: Interrupted by Dwarf Fortress
Dwarf Fortress: Engraved is an image of a Human and a video game. The Human is making a plaintive gesture.

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Modding Stone Drops, is it possible?
« Reply #13 on: December 16, 2014, 06:52:29 pm »

Autosyndrome was from DFHack, the guy making Masterwork (Meph) is the only current user of it cause he hasn't updated. Meph does not make any of the DFHack stuff in Masterwork, at least last I was told by him.

Autosyndrome won't update. Not sure why you need it, reaction-trigger is the replacement.

ullrich

  • Bay Watcher
    • View Profile
Re: Modding Stone Drops, is it possible?
« Reply #14 on: December 16, 2014, 08:14:12 pm »

Autosyndrome was from DFHack, the guy making Masterwork (Meph) is the only current user of it cause he hasn't updated. Meph does not make any of the DFHack stuff in Masterwork, at least last I was told by him.
Was browsing some posts in masterwork df that gave the impression, but now on re-reading it you are correct he was referring to updating the masterwork raws to work with the new reaction-trigger interface.

Autosyndrome won't update. Not sure why you need it, reaction-trigger is the replacement.
Did some searching (came up blank other then the source code), is there documentation anywhere on how you are supposed to interface with reaction-trigger (thanks for telling me by the way about that). I am pretty much trying to get boulders that boil away (to trigger the old autosyndrome) to replace themselves using the create-item script with a generic stockpile/construction list friendly boulder.
Logged
Ullrich cancels Work: Interrupted by Dwarf Fortress
Dwarf Fortress: Engraved is an image of a Human and a video game. The Human is making a plaintive gesture.
Pages: [1] 2