News:

Welcome to World of Banished!

Main Menu

Will mods allow complex job defaults?

Started by seanth, April 24, 2018, 01:07:31 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

seanth

I'm using Banished in a modelling class and we were mapping building types onto Maslow's Hierarchy of Needs as a way to understand job importance in the game and how it applies to human sustainability. Doing that led to some ideas about how jobs could cascade based on importance.

Right now, if a Tailor has nothing to do, their behavior will default to a Laborer. Does the modkit allow for more complex job paths that would, for example:

If a Tailor has nothing to do, it acts like a Gatherer
If a Gatherer has nothing to do, it acts like a Laborer

That's just a simple example, but I think you get the idea and can imagine how all the job types could interlink and cascade.

So? Possible?

RedKetchup

i dont think they can.... @Discrepancy  would be the best to test and talk about it.
> > > Support Mods Creation developments with Donations by Paypal  < < <
Click here to Donate by PayPal .

Discrepancy

Unfortunately no we can't to that extent.

All we can do is change the default worker from laborer to something else like a farmer, and that would make every citizen automatically and permanently until otherwise assigned to another task as a farmer. So it's really not worth doing unless someone really wants this? tasks like clearing land, supplying building sites and emptying some workplaces would still require a laborer workforce anyway.
Game\Profession\Profession.rsc:resource

ProfessionList resource
{
Profession _default = "farmer";    // changed from laborer
Profession _builder = "builder";
Profession _child = "child";
Profession _student = "student";
}




As all of the citizens AI functions are hidden from us we cannot see how their idling places are chosen, or what they do if they have nothing to do at their workplace.

tangent

#3
So, I'm gonna go on a limb here and say 'maybe'.

The object that Discrepancy pointed out definitely sets defaults for the standard templates that the citizen resource can be assigned to:


ProfessionList resource
{
Profession _default = "laborer";
Profession _builder = "builder";
Profession _child = "child";
Profession _student = "student";
}


BUT there's a boolean value passed to each class/profession that seems to indicate that it can be used as a fallback, specifically `bool _transient = true`.


Profession laborer : "base"
{
String _text = "ProfessionLaborer";
String _toolTipText = "ProfessionLaborerTip";
String _deathText = "ProfessionLaborerDeath";

int _sortPriority = 100;
bool _transient = true;

RandomSelection _deathSelector
{
float _years = 50;
float _population = 100;
}
}


If I were guessing, I'd say that the _sortPriority has 2 purposes:

1 - to order jobs within the Professions GUI (since the values map 1:1 there. e.g. laborer has a sortPriority of 100, and is the first slot. Builder has a sortPriority of 200, and is the 2nd slot, etc)

2- to indicate what jobs to use when their current profession has no work. So since laborer has a sortPriority of 100 and returns true for _transient, if a farmer doesn't have a field to work, they'll become 'transient', and draw from an array of 'transient' jobs, picking the highest priority available.

I'd test by setting the builder profession's _transient value to 'true', then see if a farmer without work will construct a building before doing laborer tasks.

EDIT: Tested. This is not the case. I set the entire village to 'farmers' and placed a house and resource destruction. They all performed laborer actions, but no the builder ones. That doesn't necessarily mean that trickle down is impossible, I may have just flipped the significance of the priority (so the lowest priority is selected, meaning laborer). Either that or only 1 class can be assigned as the transient one.

Tom Sawyer

Welcome to Banished modding @tangent! :)

_sortPriority defines only the order in profession lists of the UI. It has no influence on a "fall back profession" which is always laborer (default).

tangent

so I've learned  ::)

There's always the transient value, but it seems that you can only assign 1 profession to be transient

RedKetchup

there is many things that are hidden from us. with time we called those : game mechanics ^^
> > > Support Mods Creation developments with Donations by Paypal  < < <
Click here to Donate by PayPal .