Bay 12 Games Forum

Please login or register.

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

Author Topic: clockmaker's workshop  (Read 1998 times)

swampwater

  • Bay Watcher
  • needs alcohol to get through the working day
    • View Profile
clockmaker's workshop
« on: April 27, 2011, 09:55:15 pm »

Here is my first attempt at a custom workshop/reaction/item combo, but I'm not sure if what I had in mind is exactly possible. I got the idea while going through the translation raws, and noticing references to clocks/ticking of clocks... but wait, there are no clocks in DF! (notwithstanding the amazing albeit FPS-killing water-clock variety.) I don't like to stray too far from vanilla DF in my games but I figured that even by Toady's tech-standard some dwarfy clocks could exist, as clunky, innacurate, jewel-laden boxes. First, the workshop itself:

Spoiler (click to show/hide)

the item listing:

Spoiler (click to show/hide)

and finally, the reaction:

Spoiler (click to show/hide)

That last part is where my trouble lies, I'm sure, but I can't figure it out- why is the reaction not showing up in my workshop? I made sure to have the supplies ready before going to build one, though I'm not sure that should matter.  I spent some time trying to figure out a way to raise the value of the final product beyond the component parts but if I'm right is that just beyond modding capability at this point? And since I haven't been able to make one yet, will the description of the product mention the material of all components or is it going to be mashed into one generic material form? Any help on with this would be greatly appreciated, I'm trying to learn as I go but haven't messed this much with game mechanics since ZZT. (/showing age)
Logged

Kweri

  • Bay Watcher
    • View Profile
Re: clockmaker's workshop
« Reply #1 on: April 27, 2011, 10:05:41 pm »

You added the reaction to your entity's permitted reaction list, yes?

Also, your reagents look a bit off. Check out http://df.magmawiki.com/index.php/Reaction#Reagents

You probably want something more like
[REAGENT:A:1:BOX:NONE:NONE:NONE]
[REAGENT:B:1:TRAPPARTS:NONE:NONE:NONE]
[REAGENT:C:1:SMALLGEM:NONE:NONE:NONE]

A, B, and C can be anything; it's just the name for the reagent within your reaction. If you change A, make sure to change the line in the product tag.
Logged

Deon

  • Bay Watcher
  • 💀 💀 💀 💀 💀
    • View Profile
Re: clockmaker's workshop
« Reply #2 on: April 28, 2011, 12:31:40 am »

Also you may want to check that the box is not cloth/leather. You don't want leather clocks, do you? :)
Logged
▬(ஜ۩۞۩ஜ)▬
✫ DF Wanderer ✫ - the adventure mode crafting and tweaks
✫ Cartographer's Lounge ✫ - a custom worldgen repository

swampwater

  • Bay Watcher
  • needs alcohol to get through the working day
    • View Profile
Re: clockmaker's workshop
« Reply #3 on: April 28, 2011, 01:16:46 am »

haha- i had not considered the clock-in-a-bag problem- do i need to set up a reaction class to handle that?
I'm still not even to the point of worrying about that though, since even though I took Kweri's suggestions in hand and corrected my reaction like this:
[REACTION:MAKE_CLOCK]
   [NAME:make clock]
   [BUILDING:CLOCK_WORKSHOP:CUSTOM_K]
   [REAGENT:A:1:BOX:NONE:NONE:NONE]
   [REAGENT:B:1:TRAPPARTS:NONE:NONE:NONE]
   [REAGENT:C:1:SMALLGEM:NONE:NONE:NONE]
   [PRODUCT:100:1:TOOL:CLOCK:GET_MATERIAL_FROM_REAGENT:A:NONE]
   [SKILL:MECHANICS]

and to answer the question about my entity raws, yes- I'm slow but not that slow. :) here's what I have in my entity file:

   [PERMITTED_BUILDING:CLOCK_WORKSHOP]
   [PERMITTED_REACTION:MAKE_CLOCK]

maybe I really am that slow because I just tested it again and still nothing shows up in the workshop.  >:( Oh the awesome starting sites I've discarded in my quest to produce a lame trade good. I know that it has to be a really simple mistake on my part somewhere, and despite my foul-up earlier I really do try to read the wiki and the boards before spamming away on here, honest!
Logged

narhiril

  • Bay Watcher
  • [DUTY_BOUND]
    • View Profile
Re: clockmaker's workshop
« Reply #4 on: April 28, 2011, 01:28:21 am »

Also, colors are going to be weird because it looks like you used RGB values, whereas DF uses its own color scale.

Is the workshop building properly?  If so, is the reaction showing up on the jobs manager screen?

swampwater

  • Bay Watcher
  • needs alcohol to get through the working day
    • View Profile
Re: clockmaker's workshop
« Reply #5 on: April 28, 2011, 01:59:59 am »

oh yeah, the workshop builds just fine- I used the custom workshop builder utility, that's where those color values come from- if I'm not mistaken the color page on the wiki says DF will just use the closest values for display anyway. The workshop builds as intended and looks ok, it's just that no reaction shows up in the menu. I didn't think to check the manager menu though, thanks! I'm taking a break from banging on my head on it for the night in hopes that when I look at it again I'll see whatever idiocy is holding me back, but that sounds hopeful. :)
Logged

Deon

  • Bay Watcher
  • 💀 💀 💀 💀 💀
    • View Profile
Re: clockmaker's workshop
« Reply #6 on: April 28, 2011, 02:35:52 am »

NO reaction sounds like you do not generate a new world or make an error which stops the game from reading the files (do you have the first string in the file named properly and [OBJECT:*] in place?). Because if you even screw up the reaction, it should still appear in red.

So: Are your .txt files named the same way as the text in the first string of each file?
Logged
▬(ஜ۩۞۩ஜ)▬
✫ DF Wanderer ✫ - the adventure mode crafting and tweaks
✫ Cartographer's Lounge ✫ - a custom worldgen repository

swampwater

  • Bay Watcher
  • needs alcohol to get through the working day
    • View Profile
Re: clockmaker's workshop
« Reply #7 on: April 28, 2011, 04:49:16 pm »

sure enough Deon, as soon as I looked at it today I saw what was messing me up: missing the header in my reaction file.  :-\ The reaction shows up and... sort of works now- but instead of producing clocks it seems to just produce other random tools!  I'm really stymied this time.
Logged

Jeoshua

  • Bay Watcher
  • God help me, I think I may be addicted to modding.
    • View Profile
Re: clockmaker's workshop
« Reply #8 on: April 28, 2011, 04:53:15 pm »

This would be awesome if there were more reactions and special items for the workshop.  I can think of, off the top of my head, two things that clockworks would be useful for:

Cho-ku-no - Chinese repeating crossbow.
Swinging Pendular Trap - Like you see in the movies in every trapped hallway
Logged
I like fortresses because they are still underground.

Kweri

  • Bay Watcher
    • View Profile
Re: clockmaker's workshop
« Reply #9 on: April 28, 2011, 05:02:20 pm »

sure enough Deon, as soon as I looked at it today I saw what was messing me up: missing the header in my reaction file.  :-\ The reaction shows up and... sort of works now- but instead of producing clocks it seems to just produce other random tools!  I'm really stymied this time.

So it sounds like the issue is the clock portion, now. Just to double check, you have a file named item_clock.txt (what you pasted above says item_clock at the top of your item file)?
Logged

swampwater

  • Bay Watcher
  • needs alcohol to get through the working day
    • View Profile
Re: clockmaker's workshop
« Reply #10 on: April 28, 2011, 05:08:34 pm »

Yeah, I had thought for some time that there should be a lot more mechanic-related items available in-game, since that is almost always considered dwarven forte (the dwarf tech in the Elder Scrolls series an excellent example). I was thinking of adding another mid-point reaction to render mechanisms down into "tiny gears" more suitable for clockmaking and eventually a host of other gadgets you could build either in this workshop or another, but I figured I should focus on learning how to get my one seemingly simple reaction working first.  :-\  I really feel like there is a lot of potential here for a full-fledged mini-mod all in itself and am very open to suggestions- but my terrible n00b skills are frustrating me and keeping me from getting back to fortress-running where I belong. I keep running tests and it seems the reaction will produce any other tool EXCEPT a clock, so something is definitely off, but comparing my reaction to the wiki and to ones from other mods I don't see what the problem could be.
Logged

PTTG??

  • Bay Watcher
  • Kringrus! Babak crulurg tingra!
    • View Profile
    • http://www.nowherepublishing.com
Re: clockmaker's workshop
« Reply #11 on: April 28, 2011, 05:18:02 pm »

I like this idea. Have you considered adding an additional "clock" building? If I'm thinking correctly, that will let dwarves actually admire well-made clocks in their offices and homes.

Hm... A furniture mod...
Logged
A thousand million pool balls made from precious metals, covered in beef stock.

swampwater

  • Bay Watcher
  • needs alcohol to get through the working day
    • View Profile
Re: clockmaker's workshop
« Reply #12 on: April 28, 2011, 05:24:17 pm »

Quote
So it sounds like the issue is the clock portion, now. Just to double check, you have a file named item_clock.txt (what you pasted above says item_clock at the top of your item file)?

yes- just to to be as clear as possible, here are my filenames and corrected raws:

item_clock.txt:
Spoiler (click to show/hide)

building_clockshop.txt:
Spoiler (click to show/hide)

reaction_clock.txt:
Spoiler (click to show/hide)

and from entity_default.txt:

   [PERMITTED_BUILDING:CLOCK_WORKSHOP]
   [PERMITTED_REACTION:MAKE_CLOCK]

   [TOOL:ITEM_CLOCK]

thanks a lot for looking over this and helping me out, it's much appreciated! I hate being the goof who can't figure things out on his own but you guys and your awesome mods set the bar pretty high.
Logged

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: clockmaker's workshop
« Reply #13 on: April 28, 2011, 06:42:54 pm »

If you want to prevent cloth/leather bags from being used, try adding the [HARD_ITEM_MATERIAL] modifier right after the BOX reagent.

Also, your tool definition must be

[ITEM_TOOL:ITEM_CLOCK]
[NAME:clock:clocks]
[HARD_MAT]

to match the usage of ITEM_CLOCK in your reaction definition and entity definitions.
« Last Edit: April 28, 2011, 06:44:53 pm by Quietust »
Logged
P.S. If you don't get this note, let me know and I'll write you another.
It's amazing how dwarves can make a stack of bones completely waterproof and magmaproof.
It's amazing how they can make an entire floodgate out of the bones of 2 cats.

swampwater

  • Bay Watcher
  • needs alcohol to get through the working day
    • View Profile
Re: clockmaker's workshop
« Reply #14 on: April 29, 2011, 01:12:09 pm »

OK, I finally have a day off and won't be modding half-asleep anymore- I've fixed my last blunder that Quietust pointed out, and in my latest test finally built some real working (well not really working) clocks! It's a really hollow achievement all in all, as they basically eat a gem with no consideration of that in their value. I wanted the finished item to reflect all the materials that went into it, so if you used a good gem and some metal mechanisms in a metal box you could end up with a fairly nice trade good, but as is it's a purely flavor mod. As a temporary measure I'm further limiting the building material to metal, just to improve their base value a little more.
I don't think I have seen anyone do a custom embellishment reaction, even though the wiki seems to suggest it's possible- say instead of adding the gems at the time of constructing the clock, I had a secondary reaction, that would encrust only clocks with gems?  I know that with some stockpile manipulation this could be done anyway, I just thought that by making a specific clock-only reaction, with mechanics instead of gem setting as the operative skill, would better simulate setting the gems into the movement of the clock. So here is what I am thinking for a road ahead with this workshop and expanding the mechanic's role:

- removing gems as a primary reagent in the clock and making a customary encrusting action so their value is applied to the final product value

- PTTG's suggestion of a clock as a workshop in itself, to give dwarves good thoughts and let them keep track of time between seiges. possibly making a 'large clock' workshop, requiring more mechanisms and gems, suitable for placement on a tower or in a town square

- further intermediate steps in producing clockworks, reducing mechanisms or raw stone to small gears and clock parts?

- other small clockwork devices able to be build as trade goods via mechanic skill (small automatons, toy colossi?) I know other mods have done small drone robots as creatures but as there are plenty enough animals on any given map to kill fps I'm not really interested in that thus far.

- further mechanics-based trade goods: tool-kits, etc
Logged
Pages: [1] 2