World of Banished

MODS Garage => Mod Talk => Topic started by: Necrolex on March 07, 2026, 07:45:35 PM

Title: Professions
Post by: Necrolex on March 07, 2026, 07:45:35 PM
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.
Title: Re: Professions
Post by: RedKetchup on March 08, 2026, 12:09:10 AM
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 (https://mega.nz/file/oVUmDDrZ#yqCuZS8kV19dJ9hjCE7_mVQEpIdE7VCBZ9K20E5ZkJ4)
Title: Re: Professions
Post by: RedKetchup on March 08, 2026, 12:10:23 AM
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'
Title: Re: Professions
Post by: Necrolex on March 08, 2026, 03:17:37 AM
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!
Title: Re: Professions
Post by: RedKetchup on March 08, 2026, 06:24:13 AM
let us know if you succeed hehe