This village distance (240) can only impact as a positive factor and also needs less than 2 other villagers in house range (50).
To maximize the happiness of a certain villager you need to place at least 2 NPC he likes nearby.
The negative impact of crowding only applies if more than 2 villagers are in housing range. If he likes all of them it will still have a positive impact to add them all.
That means this village happiness bonus is only an extra for small villages. You can only use it for settlements of less than 5 villagers.
There might only be a problem for small villages which are located nearby or small settlements inside a larger town/castle.
But now the Mechanic is unhappy because she's stuck living underground.
Unless it is another valid biome expect forest. E.g. in snow underground biome she is happy about it. To get tinker and mechanic happy your settlement could be placed at the intersection of underground forest biome with underground snow biome.
One of the biggest problems with the location of NPCs when calculating their luck is the position of the NPC Banner, which the player has absolutely no influence on. ... If players were able to choose where to hang the flag using the house menu, they would have more freedom when building their structures, as it could really affect the distance of their NPCs.
Is there a chance that players will get control of this element?
You can have impact the the flag location. NPC like to stay near (but not at!) almost any furniture item (except chests and door) and dont like solid blocks or platforms nearby.
To force a NPC at the certain location pick a location with 4 free blocks height (and solid block as ground) and place furniture at the 2 rows (4 height) to the left and right (dont place any in mid).
Unless there is no other such location inside the house the flag will be placed there. The height of the flag should have no impact. Afaik the first solid block tile below the flag will be used for distance computation.
-------------------------------------------------------------------
I dont like the incapability to max out the happiness from the NPC of your choice, the symmetry of love/hate distance and the hard borders between house range.
Not that a big deal but the village range is also a little large for small worlds.
Some ideas how to change it:
1.) pets also give some small bonus: *0.98 (for each in a town)
2.*) Liked/loved NPC count less for crowding/space: e.g. 0.5 for loved, 0.75 for liked. For this you can get still the space bonus if at least one is liked.
3.) for liked//loved: house range: 32, village range: from 48 to 128. In between is some linear(?) transition.
e.g. for an loved NPC: 0-32: factor 0.88, at 48-128: 1, in between: factor 1-(0.12*(3-distance/16))
4.) for disliked/hated: house range: 16, village range: from 32 to 128. In between is some linear(?) transition.
e.g. for an disliked NPC: 0-16: factor 1.06, at 32-128: 1, in between: factor 1+(0.06*(2-distance/16))
5.*) Other than positive the disliked/hated also scale with their unit count for crowding/space
0-16: disliked 1.25, hated 1.5, 32 to 128 as 1. In between is some linear(?) transition.
6.*) NPC count: house 0 to 32, valley 48 to 128. in between some linear(?) separation. Furthermore scaling down in valley from 48 (count factor 1) to 128 (count factor 0)
7. bonus for 1.) To add some complexity the bonus for each pet could be different for each NPC. Some are cat-people, some are dog-people.
Could be: favorite 0.98, bunny 0.985, disliked 1.00 except it is closer than 16 blocks. If it is closer it will be 1.04 scaling with distance (from 0 to 16).
*NPC count with fraction is possible. The negative trait only applies partially scaled with the remainder. E.g. If the housing count is 2.25 the factor would be 1+0.05*0.25=1.0125
The positive bonus factor will be max with count 1 or less can and scale down to 1 if count is 2 or above.
With this each normal NPC is able to reach max happiness. Furthermore it will open some more variations for village composition compared to the current implementation which is very limited.
---
e.g. for max happiness the merchant (dog-people) need to stay in forest biome and have the nurse, golfer and princess in less than 32 range and a dog in town range
(bunny instead of dog would not be enough, reducing housing count to less than 2 to trigger space bonus (by distance one npc to 38) would not be enough (if dog missing), one npc could stand further away up to 35 distance, if bunny added up to 39 )
That means NPC's which currently cant reach max happiness wont be to easy then as well.
---
This text is way to long. I hope it increases the chance for implementing something like this for more than 0.1%