Bay 12 Games Forum

Please login or register.

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

Author Topic: Modding Glass (You know it was bound to come up).  (Read 4959 times)

Pickerel

  • Bay Watcher
    • View Profile
Re: Modding Glass (You know it was bound to come up).
« Reply #15 on: March 17, 2011, 10:55:45 am »

Oh, sorry.  I copied and pasted the wrong thing.  I MEANT to copy and paste this:
Spoiler (click to show/hide)

Which is of course little more than a modified version of the generic glazing, but with glass ^.^  Sorry about that.
Logged

Pickerel

  • Bay Watcher
    • View Profile
Re: Modding Glass (You know it was bound to come up).
« Reply #16 on: March 17, 2011, 03:21:36 pm »

Perhaps this is a bug with the ANY_RAW_MATERIAL tag? I have so far used it only with a specified reaction class tag (or reaction product tags, etc) and its worked fine with bars as well. Perhaps try to use a reaction class tag on lead?
I went through and just added reaction class mats to the necessary materials, and sure enough, it works!  Thanks!
Logged

Pickerel

  • Bay Watcher
    • View Profile
Re: Modding Glass (You know it was bound to come up).
« Reply #17 on: March 17, 2011, 03:58:14 pm »

Okay, next question on the agenda.  Currently, the reaction raws for glazing, both in Toady's way and my own (which are little more than copies of his), specify types of items to glaze.  Jugs, crafts, ect.  However I tried a 'glaze any random item' where any item of any can_glaze material is glazed.  The result is that the dwarf kept trying to glaze my pyrolusite blocks, which do not actually hold improvements in game, so it repeatedly failed (while using up the glass).

My question: Is there a way to specify ALMOST any item, but only ones which are improveable?  The other alternative is a huge plethora of reactions, which I still want to avoid (clutters the heck out of everything).  They have, in the tool raws, a token which defines 'unimprovable'...  And in the reaction raws, there is, as I used in the reaction itself, ANY_RAW_MATERIAL, but do they have anything that is specifically 'improveable' or 'ANY_FINISHED_MATERIAL'?
Logged

darkflagrance

  • Bay Watcher
  • Carry on, carry on
    • View Profile
Re: Modding Glass (You know it was bound to come up).
« Reply #18 on: April 20, 2011, 05:29:29 am »

Okay, next question on the agenda.  Currently, the reaction raws for glazing, both in Toady's way and my own (which are little more than copies of his), specify types of items to glaze.  Jugs, crafts, ect.  However I tried a 'glaze any random item' where any item of any can_glaze material is glazed.  The result is that the dwarf kept trying to glaze my pyrolusite blocks, which do not actually hold improvements in game, so it repeatedly failed (while using up the glass).

My question: Is there a way to specify ALMOST any item, but only ones which are improveable?  The other alternative is a huge plethora of reactions, which I still want to avoid (clutters the heck out of everything).  They have, in the tool raws, a token which defines 'unimprovable'...  And in the reaction raws, there is, as I used in the reaction itself, ANY_RAW_MATERIAL, but do they have anything that is specifically 'improveable' or 'ANY_FINISHED_MATERIAL'?

Interesting. This reaction still works on improvable things such as swords right? If so, we might just have to advertise this problem to users of the mods to look out for - I would be interested in seeing your reaction as is. Have you looked at the string dump for DF 2010?

However, due to the way that Toady set up the default reactions, I doubt he made such a token when he didn't require it.
Logged
...as if nothing really matters...
   
The Legend of Tholtig Cryptbrain: 8000 dead elves and a cyclops

Tired of going decades without goblin sieges? Try The Fortress Defense Mod

Deon

  • Bay Watcher
  • 💀 💀 💀 💀 💀
    • View Profile
Re: Modding Glass (You know it was bound to come up).
« Reply #19 on: April 20, 2011, 01:44:55 pm »

True... Or maybe something else but with a different concept.  Maybe these colored glasses would be 'alchemical' or so?  Anyway, thanks much!  You are wonderfully helpful and informative!

But more questions:
One way I can see to do this is to use glass items and simply 'convert' them to another type.  This would allow one to not require many reactions for the plethora of items made with glass, but a single one capable of dealing with all items of similar type.  I know we can specify to gt the MATERIAL from the reagent, but can we specify getting the TOKEN from the reagent?  I looked at the glazing raws, and this is what I think might work, or something similar (and with some trial and error to get bugs out):

[REACTION:CONVERT_GLASS_RED]
   [NAME:color green glass item red]
   [BUILDING:KILN:CUSTOM_SHIFT_R]
   [REAGENT:colorant:1:BAR:NONE:NONE:NONE]
      [PRESERVE_REAGENT]
      [REACTION_CLASS:RED_GOLD_COLORANT]
   [REAGENT:item:1:NONE:NONE:GLASS_GREEN:NONE]
      [EMPTY]
      [NOT_IMPROVED]
   [PRODUCT:100:1:item:NONE:INORGANIC:GLASS_GOLD]
   [FUEL]
   [SKILL:GLASSMAKING]

Off to test it!
Heh, that's what I did yesterday :P.  And in Genesis I've just made it so they turn glass into rubies. I didn't want to make "artificial ruby" (too long for a name) :D.
Logged
▬(ஜ۩۞۩ஜ)▬
✫ DF Wanderer ✫ - the adventure mode crafting and tweaks
✫ Cartographer's Lounge ✫ - a custom worldgen repository

Pickerel

  • Bay Watcher
    • View Profile
Re: Modding Glass (You know it was bound to come up).
« Reply #20 on: April 21, 2011, 05:49:14 pm »

Actually, the 'ruby' thing doesn't even need to be real ruby.  The thing is, ruby-gold glass in real life is made by adding colloidal gold to glass.  The method for making the stuff is a series of steps that the real alchemists figured out back in the day.  I put it into my mod, found here,
http://www.bay12forums.com/smf/index.php?topic=80803.msg2123696#msg2123696
wherein I put in an alchemical system based on the real alchemists, which currently, in my game, exists solely to produce glass and glaze colorants.  I tried to mimic glass exactly.  I used the DFwiki file on glass with it's raw-hacked sample, and went through to try to make the glass itself act identically right down to the hotkeys in the furnace. 
Anyway, see the read-me in the file for more about it, or Wikipedia is fraught with info.  If I remember correctly for ruby gold glass, the gist is:
Sulfides + heat + oxygen = H2SO4 + metal oxides.
H2SO4 + Saltpeter = Nitric Acid + Sodium/Potassium sulfate.
NaCl + Clay + heat = HCl
Nitric Acid + HCl = aqua regia, which is capable of disolving gold, but this does not last long so I just have the reaction be Nitric Acid + HCl + gold = Purple of Urist.  Technically all that really precipitates out would be a super-fine-particle gold, unless one used I believe tin chloride which would make Purple of Cassius, but for simplicity sake and the ability to name something after Urist McReaction I have this name.  Either way, this is the colloidal gold used in making Ruby-Gold Glass. 
This glass was a more expensive glass, all the moreso in my mod because of the calculation associated with value-added materials based on number of steps and rarities of materials that I used.  Again, see read-me.

Logged

Deon

  • Bay Watcher
  • 💀 💀 💀 💀 💀
    • View Profile
Re: Modding Glass (You know it was bound to come up).
« Reply #21 on: April 23, 2011, 12:22:42 pm »

The thing is, ruby-gold glass in real life is made by adding colloidal gold to glass.
Heh, that's what I did yesterday :P.
Personal experience is much better than internet articles :).
Logged
▬(ஜ۩۞۩ஜ)▬
✫ DF Wanderer ✫ - the adventure mode crafting and tweaks
✫ Cartographer's Lounge ✫ - a custom worldgen repository

Pickerel

  • Bay Watcher
    • View Profile
Re: Modding Glass (You know it was bound to come up).
« Reply #22 on: April 25, 2011, 04:30:50 pm »

OH!  I misinterpreted, I didn't know you actually meant that you had made red glass RL, I thought you meant something in-game in the genesis mod or something. 
You are a RL glassworker then?  AWESOMENESS!
Logged
Pages: 1 [2]