News:

Welcome to World of Banished!

Main Menu

Professions

Started by Necrolex, March 07, 2026, 07:45:35 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Necrolex

Hi everyone!

Could someone give me the source for the "Worker" profession?
I understood exactly how it's done inside another larger Mod, but how can it be made to be a standalone Mod?
I'm looking to create a Mod for a new profession.

RedKetchup

you will find it in the Laboratory , inside RKEC code


although i can type few things here...

Profession/Profession.rsc:

Profession worker
{
StringTable _stringTable = "UI/RKEditorChoiceEditionStringTable.rsc";
SpriteSheet _spriteSheet = "UI/RKEditorChoiceEditionSpriteSheet.rsc";

String _text = "ProfessionWorker";
String _toolTipText = "ProfessionWorkerTip";
String _deathText = "ProfessionWorkerDeath";

int _sortPriority = 920;
bool _transient = false;

RandomSelection _deathSelector
{
float _years = 10;
float _population = 500;
}
}


it refers to MY rkec stringtable and spritesheet, you gonna have to change that.

in my stringtable :

{ String _name = "ProfessionWorker"; String _text = "Worker"; }
{ String _name = "ProfessionWorkerTip"; String _text = "A worker can assume a large variety of jobs."; }
{ String _name = "ProfessionWorkerDeath"; String _text = "depressed about his/her situation and committed suicide."; }

and spritesheet:

{ String _name = "ProfessionWorker"; String _source = "UI/Sprite/Worker.png"; }

Worker.png
> > > Support Mods Creation developments with Donations by Paypal  < < <
Click here to Donate by PayPal .

RedKetchup

#2
thats what you wanted ?

i dont see the purpose of a stand alone.

a profession we make, like this "worker", it is same as we would create a "beekeeper" or a "baker" :P

if you do a mod with a "worker" will be assigned to a specific building , this code need to be inside your mod that contain your building, and all mods you will assign a 'worker' to something.

it is not a replacement for 'laborer'
> > > Support Mods Creation developments with Donations by Paypal  < < <
Click here to Donate by PayPal .

Necrolex

Thanks for the explanation, but I actually already have those files. My goal is to isolate the logic and create a standalone version, exactly like the profession I'm already developing that functions independently without the need for a specific building. I'm focusing on the modularity of the code right now. Appreciate the input!

RedKetchup

let us know if you succeed hehe
> > > Support Mods Creation developments with Donations by Paypal  < < <
Click here to Donate by PayPal .