Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: How hard would it be to make a reaction to stack bolts?  (Read 1986 times)

SharkForce

  • Bay Watcher
    • View Profile
How hard would it be to make a reaction to stack bolts?
« on: April 04, 2012, 01:15:49 pm »

Just trying to wrap my head around it. it *seems* like it shouldn't be too hard to make a reaction that, say, requires 5 bolts in stacks of 1 each, and turns them into a stack of 5 (you could then follow up with a reaction to take 5 stacks of 5, and make one stack of 25).

but then, i have *extremely* little experience in modding the game, so i'm just curious if there's something obvious that i've missed (or perhaps it's quite possible that people simply don't care enough to have done this yet).

also, just to keep things reasonable, it should probably set the exp gained from this activity to zero i would think. not sure at all how possible that is.
Logged

i2amroy

  • Bay Watcher
  • Cats, ruling the world one dwarf at a time
    • View Profile
Re: How hard would it be to make a reaction to stack bolts?
« Reply #1 on: April 04, 2012, 01:22:37 pm »

The largest problem with doing something like this is that reactions deal with the number of stacks, not the number of bolts in each. As such you certainly could make a reaction that took 5 stacks of bolts and gave you 1 stack of 5 bolts. However it will take stacks of any size, including the ones that it just made. So a reaction like that could just as easily take 5 stacks of 25 bolts each and make 1 stack of 5 bolts, effectively destroying your bolts.
Logged
Quote from: PTTG
It would be brutally difficult and probably won't work. In other words, it's absolutely dwarven!
Cataclysm: Dark Days Ahead - A fun zombie survival rougelike that I'm dev-ing for.

SharkForce

  • Bay Watcher
    • View Profile
Re: How hard would it be to make a reaction to stack bolts?
« Reply #2 on: April 04, 2012, 01:46:37 pm »

The largest problem with doing something like this is that reactions deal with the number of stacks, not the number of bolts in each. As such you certainly could make a reaction that took 5 stacks of bolts and gave you 1 stack of 5 bolts. However it will take stacks of any size, including the ones that it just made. So a reaction like that could just as easily take 5 stacks of 25 bolts each and make 1 stack of 5 bolts, effectively destroying your bolts.

huh. how do they make bone crafting work (that is, the kinds of bone crafting that *don't* use up the entire stack...)

i suppose alternately i could look to cooking for inspiration. that seems to take stack size into account as well.

so much for my hopes of just looking up the proper names to plug in though =S
Logged

i2amroy

  • Bay Watcher
  • Cats, ruling the world one dwarf at a time
    • View Profile
Re: How hard would it be to make a reaction to stack bolts?
« Reply #3 on: April 04, 2012, 01:47:57 pm »

Bone crafting is hardcoded and as such, effectively circumvents all of the pesky limits that us modders need to put up with. :P

At least dwarves will pick up several stacks now and put them in their quivers, they used to only pick up one stack, period.
Logged
Quote from: PTTG
It would be brutally difficult and probably won't work. In other words, it's absolutely dwarven!
Cataclysm: Dark Days Ahead - A fun zombie survival rougelike that I'm dev-ing for.

SharkForce

  • Bay Watcher
    • View Profile
Re: How hard would it be to make a reaction to stack bolts?
« Reply #4 on: April 04, 2012, 02:02:31 pm »

Bone crafting is hardcoded and as such, effectively circumvents all of the pesky limits that us modders need to put up with. :P

At least dwarves will pick up several stacks now and put them in their quivers, they used to only pick up one stack, period.

is cooking also hardcoded?
Logged

narhiril

  • Bay Watcher
  • [DUTY_BOUND]
    • View Profile
Re: How hard would it be to make a reaction to stack bolts?
« Reply #5 on: April 04, 2012, 02:07:34 pm »

Bone crafting is hardcoded and as such, effectively circumvents all of the pesky limits that us modders need to put up with. :P

At least dwarves will pick up several stacks now and put them in their quivers, they used to only pick up one stack, period.

is cooking also hardcoded?

Sort of.  You can create food in a custom reaction, but it won't have the ingredients list that normal prepared food does.

Gizogin

  • Bay Watcher
  • [EVIL][RAWMANCER]
    • View Profile
Re: How hard would it be to make a reaction to stack bolts?
« Reply #6 on: April 04, 2012, 02:29:35 pm »

Bone crafting is hardcoded and as such, effectively circumvents all of the pesky limits that us modders need to put up with. :P

At least dwarves will pick up several stacks now and put them in their quivers, they used to only pick up one stack, period.

is cooking also hardcoded?

Sort of.  You can create food in a custom reaction, but it won't have the ingredients list that normal prepared food does.
Well, you can create custom cooked meals, but you cannot make them take more than four or fewer than two ingredients.  For example, you could make a "pizza" prepared meal that takes two ingredients; then, when you order your dwarves to make a basic meal, they'd cook it as normal, and the meal would be either a biscuit or a pizza, decided randomly.
Other than that, you can't change the actual in-game cooking.
Logged
Quote from: franti
"Let's expose our military to zombie-dust so they can't feel pain. They don't NEED skin."
Quote from: Ipwnurmom221
One FB post. Many dick jokes. Pokemon. !!VOLCANO!!. Dwarven mood thingee. Derailment itself. Girlinhat's hat. Cuba. Karl Marx. This is why i love Bay12 forums.
The rest of my sig.
Fear the fluffballs

Rose

  • Bay Watcher
  • Resident Elf
    • View Profile
Re: How hard would it be to make a reaction to stack bolts?
« Reply #7 on: April 04, 2012, 02:31:03 pm »

It'd proably be easier to write a dfhack plugin that'll do it.
Logged

narhiril

  • Bay Watcher
  • [DUTY_BOUND]
    • View Profile
Re: How hard would it be to make a reaction to stack bolts?
« Reply #8 on: April 04, 2012, 02:36:44 pm »

It'd proably be easier to write a dfhack plugin that'll do it.

"dfnoms"

SharkForce

  • Bay Watcher
    • View Profile
Re: How hard would it be to make a reaction to stack bolts?
« Reply #9 on: April 04, 2012, 02:38:36 pm »

Bone crafting is hardcoded and as such, effectively circumvents all of the pesky limits that us modders need to put up with. :P

At least dwarves will pick up several stacks now and put them in their quivers, they used to only pick up one stack, period.

is cooking also hardcoded?

Sort of.  You can create food in a custom reaction, but it won't have the ingredients list that normal prepared food does.
Well, you can create custom cooked meals, but you cannot make them take more than four or fewer than two ingredients.  For example, you could make a "pizza" prepared meal that takes two ingredients; then, when you order your dwarves to make a basic meal, they'd cook it as normal, and the meal would be either a biscuit or a pizza, decided randomly.
Other than that, you can't change the actual in-game cooking.

hmmm... perhaps a better way to phrase my question (though it's sounding like the answer is that it won't work):

can i just borrow the code from cooking that takes 2-4 stacks of something and combines it into 1 bigger stack (usually of something else, but i'd like it to be the same thing) and make it work for bolts?
Logged

i2amroy

  • Bay Watcher
  • Cats, ruling the world one dwarf at a time
    • View Profile
Re: How hard would it be to make a reaction to stack bolts?
« Reply #10 on: April 04, 2012, 02:53:12 pm »

No. Cooking is a mostly hardcoded thing, that works with a completely different format then reactions, and cannot be utilized in this case.
Logged
Quote from: PTTG
It would be brutally difficult and probably won't work. In other words, it's absolutely dwarven!
Cataclysm: Dark Days Ahead - A fun zombie survival rougelike that I'm dev-ing for.