News:

Welcome to World of Banished!

Main Menu

Guaranteed Housing for Professionals

Started by Necrolex, September 30, 2025, 02:22:43 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Necrolex

Hi!

Is it possible to associate a house with only one specific professional?
I want to make it so that some professionals already have their houses guaranteed.
In the houses' code, there is a part where you choose a professional, just like other buildings, but is it possible to associate a house with a professional already without a trespassing family moving in as soon as the player finishes building the house?

RedKetchup

i dont think so, i rather think it is just a kind of internal priority

try it lol
go ahead and experiment !
> > > Support Mods Creation developments with Donations by Paypal  < < <
Click here to Donate by PayPal .

Necrolex

It worked!

I assigned a little house to the herbalist.

In the game, I built that house, and a couple of workers with a child soon came to live in it. But as soon as I built the building called 'Herbalist's', the couple became herbalists.

I thought it might just be a coincidence, so I repeated the process two more times, and both times the residents became the professionals associated with the house.

RedKetchup

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

Necrolex

[url="http://[url="https://ibb.co/xSSvMByV\""][/url]]

Necrolex

WorkPlaceDescription workplace
{
    // no actual work done here once the building is built
    //Profession _profession = herbalist;
    //Profession _pickupProfession = null;
}

RedKetchup

#6
did you put that "herbalist house" next to the herbalist hut ? because thats normal, the game is designed to do that when the game shuffle all the jobs. it assign the workers from nearest housing. try that with the furthest house and wait the shuffle to see what happends (and make sure to set another building between )
> > > Support Mods Creation developments with Donations by Paypal  < < <
Click here to Donate by PayPal .

RedKetchup

#7
euh ... you know what // means ?

it means and tells the compiler to not take care of what coming next (it is only a way to mark some notes in the code for ourself) it means disregard what come next and don't try to execute

/*

blah blah blah
blah blah blah
blah blah blah
blah blah blah
blah blah blah

*/

is a way to disregard a whole paragraph.
> > > Support Mods Creation developments with Donations by Paypal  < < <
Click here to Donate by PayPal .

RedKetchup

if you want to have the modkit really read it you need to take out the //

WorkPlaceDescription workplace
{
    // no actual work done here once the building is built
   Profession _profession = herbalist;
   Profession _pickupProfession = null;
}
> > > Support Mods Creation developments with Donations by Paypal  < < <
Click here to Donate by PayPal .

Necrolex

I put in this code and ModKit showed errors, but I told it to continue and it compiled.
In the game, it seems it's necessary to build the house first, and then the professional building.
If you do it the other way around, it will take a long time to adjust.

RedKetchup

Quote from: Necrolex on September 30, 2025, 10:22:16 PMIf you do it the other way around, it will take a long time to adjust.

yeah thats the game is doing it, it is hidden code (hard coded like we say) the game is made to shuffle all the jobs time to time. when you see the game "stop momentarailly' a few seconds, it is shuffle the jobs and place all the workers from nearest house. this is something the developper did to optimize his game.

if you take out the // , and crash, then it doesnt accept the code, code is invalid.

but really the // is telling the compiler to not read what you write after. when you want to put note in the .rsc file , like to remember something, you put a // or a /* paragraph */ to tell compiler to ignore

Kid will tell you the same thing

thats what i think, your idea is totally not working
> > > Support Mods Creation developments with Donations by Paypal  < < <
Click here to Donate by PayPal .

Necrolex

It's a shame we can't do that, because it would help a lot.
If I'm not mistaken, there are Mods that have houses that connect to a production building, but I don't remember where I saw it, or if I'm getting something confused.

RedKetchup

#12
they not connected, it is just the game doing it. it is recommanded to place some housing in a forest hub for example...
because the shuffle of jobs the game is doing. when it will shuffle, the game will attribute the gatherers, foresters, herbalist, hunters from the nearest housing...

a thumb rule is to take for granted the game is not made to accept 2 differents thing to the same building, giving a dual purpose (like put housing capability to a forester lodge for example). the game is not set to accept that.
> > > Support Mods Creation developments with Donations by Paypal  < < <
Click here to Donate by PayPal .

brads3

Quote from: Necrolex on September 30, 2025, 11:08:49 PMIt's a shame we can't do that, because it would help a lot.
If I'm not mistaken, there are Mods that have houses that connect to a production building, but I don't remember where I saw it, or if I'm getting something confused.

there is only 1 that i remember. RED's hunter cabin. split into 2 parts, the hunter and the house that builds so looks like 1 building. yes, 1 will generally be the hunter. however, if u set the hunter hut to `1 worker, the other household member will not be a hunter in the next forest over but more likely be assigned as a forester or gatherer for the forest they live in.

it is an interesting concept. but if a way was found now to do that, it would be painful. i do not see modders, many who have moved already, re-writing codes for the houses we have.

RedKetchup

yeah the game is taking care of it, assigning the workers from the nearest house. and this is why this game go aweful lag at 2000+ pop
> > > Support Mods Creation developments with Donations by Paypal  < < <
Click here to Donate by PayPal .