Crafting: workAmount

Started by Pandora, January 03, 2015, 05:58:41 AM

Previous topic - Next topic

Pandora

If, for example I made crafting an item: <workAmount>60000</workAmount> (which is how long it take to make abstract sculpture). Would my colonist be able to stop and continue a task on a worktable? I found that in Alpha 7, a colonist would stay until the task was complete, often starving or tired.

mrofa

Craft is same as research in that matter, pawn will come to workbench and do x ammount of work and he will stop, check for needs like food, tierdnes and stuff, if its all ok and if x> work needed he will do it again. So basicly pawns just work on a single item in bursts.
But normal craft dont retain work needed for longer time, and this is where unfinished comes in, it create a objects that saves the work done. So pawn can do other stuff like go eat or sleep and then come back and not loose the work hes done.
All i do is clutter all around.

Pandora

In my mod, colonists use an item on a worktable and gain silver in return. I haven't set an unfinished item in thingdefs, so any work will be lost if the colonist leaves without finishing?

mrofa

Yes if colonist leave workbench normal craft will loose its work done.
All i do is clutter all around.

Pandora

Would adding the unfinished stage be as simple as adding the line: <unfinishedThingDef>UnfinishedItem</unfinishedThingDef> or would I need to create an unfinished texture?

mrofa

This i cant tell since i didnt try it yet, just saw how it works in the code ;p
All i do is clutter all around.

Pandora

#6
After some digging I figured it out. I needed to re-design my items to the new stuffCategories and costStuffCount. I added WorkGiverDefs and unfinishedThingDefs. Colonists can now start and finish unfinished items then use them in future constructions. Having the whole code in one thingsdef eliminates the need for separate recipedefs.

mrofa

All i do is clutter all around.