Bay 12 Games Forum

Please login or register.

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

Author Topic: Updating My Glass Mod, Questions  (Read 4286 times)

Pickerel

  • Bay Watcher
    • View Profile
Updating My Glass Mod, Questions
« on: February 04, 2018, 10:39:55 am »

I'm back and have been playing DF again in a bit of free time, and I've decided I want to update my old mods for the new code and all.  I've some questions for making it better...

Only one for now.
1. You know how the trade depot can be colored based on the colors of the bars or blocks used to make it?  How would one implement that in a custom building?  For example, I want to leave it open-ended what color flasks one uses (e.g. green glass vs clear glass), but can I get the choice to be manifested in the color of the flask tokens in the final building?
Logged

IndigoFenix

  • Bay Watcher
  • All things die, but nothing dies forever.
    • View Profile
    • Boundworlds: A Browser-Based Multiverse Creation and Exploration Game
Re: Updating My Glass Mod, Questions
« Reply #1 on: February 04, 2018, 02:58:28 pm »

Yes, but there can only be one custom color, which will take its color from a single item.  Check the example custom buildings for an example.  Unfortunately the workshop designer application doesn't include this, so you'll have to do it yourself (though you can do it after designing the building).

Pickerel

  • Bay Watcher
    • View Profile
Re: Updating My Glass Mod, Questions
« Reply #2 on: February 04, 2018, 04:43:37 pm »

Awesome!  Thanks!

As a side note, I made a mistake when transferring things over and discovered how to generate magma.  Because of a screw-up, putting my inorganic materials instead in material templates (basically leaving the materials undefined), I made one reaction that accidentally used any rough gem it could find and converted it to a powder, and another reaction that generated 5 units of magma inside a bag (which proceeded to burn through the bag, and started a wildfire on the plateau.  Nodwarf was hurt.)
Logged

Pickerel

  • Bay Watcher
    • View Profile
Next Question...
« Reply #3 on: February 04, 2018, 11:30:19 pm »

Things are going surprisingly well.  Every time I'm about to give up and ask a question, I figure it out, and feel good.

But I have given up on one thing...

I used to have it so that black glass could be used as a glaze directly, as well as other things.  I've gotten glass glazing to work fine, but that uses slightly different tokens.  I can't seem to remember how I got it to work; It seems like it would be simple now that I have the basis for it, but it isn't working.  Ash, which has the material_reaction_token hardcoded, works find, but things like black sand, or my cobaltite, don't seem to be successfully used as glazes, despite, I thought, having the right tokens to be used to that end.  If anyone can spot what's missing, please do tell!  Here's the black glass, the cobaltite, and all things related to them as they pertain to glazing.  The glazing reactions in reaction_other are unmodified, yet use ash and cassiterite just fine.  Note: though I included it, the reaction at the alchie lab to make cobalt oxide works fine, and the product can be successfully used to make cobalt glass in proper quantities (I had a little fight with reagent quantities but got it sorted).

Spoiler (click to show/hide)
Logged

scamtank

  • Bay Watcher
    • View Profile
Re: Updating My Glass Mod, Questions
« Reply #4 on: February 05, 2018, 10:33:34 am »

Ash comes in bars, tin comes in rocks... but sand comes as powder, which always has a container around it and the usual glazing reactions don't account for that part. Could that be throwing a spanner in the works?
Logged

Pickerel

  • Bay Watcher
    • View Profile
Re: Updating My Glass Mod, Questions
« Reply #5 on: February 05, 2018, 12:05:28 pm »

A good point!  The lack of bags in the reaction is likely the cause!  In fact, I tested this out with other things for other reasons, and found the bag necessary to the reaction if the stuff was in a bag, but it's applicable here. 

NOW I remember why I had to have a reaction that converted ash into ash in a bag!  Because I couldn't have a generic glazing reaction for many of my glazing reactions both from and not from bags unless I had a way to glaze specifically!  It's been so many years, I forgot about that.

Actually, that brings up a good question.  Is there a way to have an ingredient be optional in a reaction - like have a bag, but it's optional, so it can use anything in or not in bags that have GLAZE_MAT?

UPDATE: indeed, you were correct.  I entered the cassiterite and ash crushing reactions and added bags to the glazing reactions, so now everything is worked with in bags!  Which makes sense since when you glaze you really do use powders suspended in water.

Which leaves one thing.  It seems silly to have something like ash need to be pulverized and put into a bag to be a glaze, but the two ways to make ash glaze are to use the ash itself, and to mix it with clay.  So I'll have it mix it with clay, to add some sense to the action, to make the final ash glaze.

And then I want to make it so one can choose what to glaze with (I already have it that way for glass glazes - I LOVE the ability to make tiered categories!  So glad that was finally implemented!), in categories, so... the number of reactions is going to explode, but it will be easy as I'll just put it all in separate files as I go.  It'll be good.
« Last Edit: February 06, 2018, 12:37:32 am by Pickerel »
Logged

Pickerel

  • Bay Watcher
    • View Profile
Quick Logistics Questions...
« Reply #6 on: February 06, 2018, 01:37:34 am »

I could totally experiment, but I'd rather just ask (lazy me).

Back in the day, I recall glazing would destroy all other modifications on an object (rings, pictures, etc.).  Is this still the case?

With decorating, like with the 'decorate with (whatever)' commands, stuff like green glass or leather or such, it randomly gives a picture - with the probability rising as the dwarf's skill level increases, if I recall.  Is there a way to implement a similar dynamic, getting some chance of having a 'picture' upon glazing?
Logged

Pickerel

  • Bay Watcher
    • View Profile
Re: Updating My Glass Mod, Questions
« Reply #7 on: February 16, 2018, 12:48:44 am »

OKAY!

Next thing:

Something that wasn't in the original glasses and glazes, but which I learned a bit about while up collecting slag and agates around Lake Superior.  SLAG!  I want to add slag to the smelting process. 

For simplicity, I want, any time an ore is smelted, it to produce 1 unit of slag as well, a value:1 [IS_GLASS] material that can be used as a glass gem or maybe a stone (might change it to stone), or crushed and used as sand for glass making.  That used to be a thing, long long ago.  That's right, I'm adding a legitimate historical source of sand for glassmaking.  But don't be thinking you'll be mass-producing it; you smelt ores to get it. 

This is easy for the combined reactions (the smelter reactions like for making bronze right from ores): just add the production of one per ore.  However, for base ores - like if one wants to smelt malachite to copper - this seems a little more difficult.  There, it uses simply the METAL_ORE token.  Unfortunately, that seems to imply producing bars of the noted inorganic (I assume if one typed [METAL_ORE:QUARTZ:100] one would get 4 bars of INORGANIC:QUARTZ or something).  I, however, want to add the production of either a stone of slag or a rough slag.  One way I could do that is remove the METAL_ORE token from each ore, and make a corresponding reaction for each.  That would, unfortunately, de-randomize the less-likely metals (e.g. silver from tetrahedrite), but oh well.  However, I wanted to ask, first, if there's an easier way something I can add to the ores to get them to produce 1 unit of rough or stone slag, or so, when smelted?
Logged

Pickerel

  • Bay Watcher
    • View Profile
Re: Updating My Glass Mod, Questions
« Reply #8 on: February 16, 2018, 05:29:31 pm »

I figured since we have Bismuth metal in the game, I could add something quickly that I've done in my own home: growing bismuth crystals.  So I made quick reaction to make bismuth rough gems.  But I didn't want to lose or create bismuth, so I tested it out: I made a bunch of generic bismuth gems, and then smelted them down.

Turns out it's 2 gems / 1 bar of bismuth.  So for crystal growing, I should have it make 2 rough Bismuth gems at a time, and it will balance perfectly.

(On sample size: it seems to be exactly 2:1 Rough:Bar.  Sample size 106 Rough, producing 53 Bar.  107 Rough do not produce another bar.  108 do.)
« Last Edit: February 16, 2018, 07:13:12 pm by Pickerel »
Logged

Pickerel

  • Bay Watcher
    • View Profile
Re: Updating My Glass Mod, Questions
« Reply #9 on: February 16, 2018, 05:49:03 pm »

(Odd, I just made a super tiny fort, and ended up with Dancing Wisps as a stone, and Pelagic Clay on the surface.  While I have been modding, I don't think I've been doing anything that would cause that, just all basic stuff.  Should I do a bug report?)
Logged

Hugo_The_Dwarf

  • Bay Watcher
  • Modding Mentor
    • View Profile
    • Regeneration: Forced Evolution
Re: Updating My Glass Mod, Questions
« Reply #10 on: February 17, 2018, 12:55:38 am »

hmm no error report? could be a duplicate ID
Logged

Pickerel

  • Bay Watcher
    • View Profile
Re: Updating My Glass Mod, Questions
« Reply #11 on: February 17, 2018, 08:48:07 am »

Indeed, I checked and nothing seems amiss that looks like it would cause that (to my untrained eye).  I guess mayhaps a fluke, I'll wait until I have everything ready and fully troubleshot to see if it happens again.
Logged

Pickerel

  • Bay Watcher
    • View Profile
Re: Updating My Glass Mod, Questions
« Reply #12 on: February 18, 2018, 04:12:31 pm »

Okay, next question.  This is something I didn't have in the original glasses and glazes, but which pertains.  Mercury has been used in mining, and even without it, placers are productive, just need water flowing through it.  I want to make a sluice that is only functional while there is flowing water under it.  Is there a way to make it so that something requires water flowing through, under, or around it to function, as with water wheels?  But not in a way that it can be done from afar like just by providing power, instead having to be next to the water itself, or at least have water flow through it?  Again, like a water wheel, or also perhaps like how a magma furnace requires magma but with water?

Because I can't seem to find how, the only other way I can find so far would be a reaction that requires buckets or barrels of water.  But then there's the issue of getting water for this purpose... Is that a thing?  I remember it being said that one could get dwarves to bucket up water and pour it somewhere to fill a well, for example, but I've never been able to figure out how or get it to work...

(for dynamics, was thinking to have some small percent chance of producing a 'gold nugget', a gem made of gold.  now that I know from above that it takes 2 metal rough gems smelted to produce a bar (need to experiment with cut gems still - oversight on my part), and a slightly increased probability if one uses mercury, gotten from the alchemist from cinnabar, and only slightly used up (so a typical 150 unit liquid, but uses up 1 each time it is used, so over 150 uses it runs slowly out because it's never perfectly re-captured... If only I could mimic the environmental implications of this ^.^)
« Last Edit: February 18, 2018, 04:44:31 pm by Pickerel »
Logged

Pickerel

  • Bay Watcher
    • View Profile
Re: Updating My Glass Mod, Questions
« Reply #13 on: February 18, 2018, 05:11:24 pm »

Discovery.  I made Bismuth rough gems using my reaction.  It works fine, and as mentioned above, they can be melted down just fine, at a rate of 2 rough : 1 bar.  However, I was having trouble getting the bismuth rough gems to be cut.  I have lots of Bismuth gems, and I have them both in bins and laying on the floor, and I can go to the jeweler's shop and designate them to be cut into cut gems.  However, the gem cutter immediately cancels the task, saying they need bismuth.

So I experimented with the IS_GEM token.  It turns out that that token controls more than the wiki has one believe.  The IS_GEM token is integral to the ability to take a rough gem and cut it.

So I added [IS_GEM:bismuth:STP:OVERWRITE_SOLID] to the entry for the metal Bismuth.  Since there's no 'Bismuth' stone to worry about suddenly becoming guaranteed when mining, it seems to cause no issues.  However, it allowed my Bismuth rough gems to be able to be cut.

Also, thereafter I was able to test it.  Rough gems are smelted at a 2:1 gem:bar ratio.  Luckily, cut gems and large gems have the same ratio!  So you can cut bismuth gems, and no harm done, you can melt them down as rough or cut!  Excellent for practicing alchemy, then gem cutting, then smelting, then repeat, all with as little as one bismuth bar.
« Last Edit: February 18, 2018, 07:23:29 pm by Pickerel »
Logged

Pickerel

  • Bay Watcher
    • View Profile
Re: Updating My Glass Mod, Questions
« Reply #14 on: February 20, 2018, 08:17:02 am »

My update nears completion.

PRACTICAL QUESTION!
For some reason it's kicking out an error for Stibnite.  I can't figure out why.

*** Error(s) found in the file "raw/objects/inorganic_stone_modifications.txt"
STIBNITE:Unrecognized Inorganic Material Definition Token: 5
STIBNITE:Unrecognized Inorganic Material Definition Token: 6

Spoiler (click to show/hide)

Nothing that I can find seems to be amiss...  It kicks this error out consistently.
Logged
Pages: [1] 2