Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: dfhack: fuel added as job item is not consumed  (Read 1045 times)

Bogus

  • Bay Watcher
    • View Profile
dfhack: fuel added as job item is not consumed
« on: October 10, 2015, 06:29:20 am »

im trying to implement the typical vanilla [FUEL] behaviour for a custom (dfhack-made) job. basically i generate a reaction with fuel tag at some point in time while the game is running and then issue a job for it. this works fine, except the [FUEL] doesnt - the job behaves as if there was no fuel needed. i dont know why this happens, presumably because the reaction didnt exist when the game was loaded first?

so i tried to add a bar of fuel to the job struct directly, which is possible, but the fuel will not be used up in the process. my dwarf will get a bar of fuel, use it in the reaction, and then the bar of fuel will remain in the workshop.

what can i do about this?

« Last Edit: March 14, 2016, 03:42:03 am by Bogus »
Logged

CulixCupric

  • Bay Watcher
    • View Profile
Re: job item not consumed
« Reply #1 on: October 11, 2015, 01:49:20 am »

--
could you have the reaction preformed at a smelter?
Logged
Don't know what to put here... let me know if you have any ideas...

Bogus

  • Bay Watcher
    • View Profile
Re: job item not consumed
« Reply #2 on: October 11, 2015, 09:07:38 am »

not currently but it probably makes no difference, it doesnt seem to have anything to do with the building. (altho the workhop im using is not a furnace type, the script that does all this can only handle normal workshops at this point.)
« Last Edit: March 14, 2016, 03:43:02 am by Bogus »
Logged

Bogus

  • Bay Watcher
    • View Profile
Re: dfhack: fuel added as job item is not consumed
« Reply #3 on: March 14, 2016, 03:39:53 am »

bump.
Logged

Deon

  • Bay Watcher
  • 💀 💀 💀 💀 💀
    • View Profile
Re: dfhack: fuel added as job item is not consumed
« Reply #4 on: March 14, 2016, 05:22:29 am »

Is your workshop a "furnace" type? Try changing it to furnace if it's a workshop.
A bit more information could be provided by DFHack team themselves, I am not sure a lot of people out here know how dfhack scripting works :)>
Logged
▬(ஜ۩۞۩ஜ)▬
✫ DF Wanderer ✫ - the adventure mode crafting and tweaks
✫ Cartographer's Lounge ✫ - a custom worldgen repository

milo christiansen

  • Bay Watcher
  • Something generic here
    • View Profile
Re: dfhack: fuel added as job item is not consumed
« Reply #5 on: March 14, 2016, 09:43:02 am »

Do you need to set flags on the job item to make it be consumed? Do you set the required amount to "150"? (if the amount is not 150 it may work 150 times before consuming the fuel item)
Logged
Rubble 8 - The most powerful modding suite in existence!
After all, coke is for furnaces, not for snorting.
You're not true dwarven royalty unless you own the complete 'Signature Collection' baby-bone bedroom set from NOKEAS

Bogus

  • Bay Watcher
    • View Profile
Re: dfhack: fuel added as job item is not consumed
« Reply #6 on: March 14, 2016, 10:20:57 am »

yeah its set to 150. not sure about the flags tho, but i dont think there are any of the sorts.

Spoiler (click to show/hide)

the fuel is added at index n + 1 in the reaction reagents struct, n being the number of reagents used in the reaction.
« Last Edit: March 14, 2016, 10:24:36 am by Bogus »
Logged

milo christiansen

  • Bay Watcher
  • Something generic here
    • View Profile
Re: dfhack: fuel added as job item is not consumed
« Reply #7 on: March 14, 2016, 10:32:07 am »

I have never really done much with job items, so I can't really help. Sorry...
Logged
Rubble 8 - The most powerful modding suite in existence!
After all, coke is for furnaces, not for snorting.
You're not true dwarven royalty unless you own the complete 'Signature Collection' baby-bone bedroom set from NOKEAS

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: dfhack: fuel added as job item is not consumed
« Reply #8 on: March 16, 2016, 06:40:34 am »

Have you analyzed a manually-added smelter job to see what its fuel job_item looks like?
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.

Bogus

  • Bay Watcher
    • View Profile
Re: dfhack: fuel added as job item is not consumed
« Reply #9 on: March 16, 2016, 09:30:37 am »

not yet, but thats a good idea. thanks.
Logged