RimWorld

RimWorld

125 ratings
Allow Adjacent Settlements
4
   
Award
Favorite
Favorited
Unfavorite
Mod, 1.3, 1.4
File Size
Posted
Updated
187.905 KB
20 Sep, 2021 @ 4:19pm
29 Oct, 2022 @ 10:47am
4 Change Notes ( view )

Subscribe to download
Allow Adjacent Settlements

Description
Removes the restriction forbidding the placement of settlements adjacent to each other, and now also comes with the option to disable the relationship penalty from settling close to another faction's settlement.
I have a slightly better idea of what I'm doing than when I made the initial version so for 1.4 I redid the patch to use a transpiler instead of a postfix, and it seems to work. It's probably compatible with anything else that doesn't touch the conditions for creating settlements.
Popular Discussions View All (1)
1
3 Apr @ 6:33am
Adjacent Settlements on Impassable Mountains
Blindayar
28 Comments
Lanz 14 May @ 1:50pm 
Thanks! Stupid restriction! working for 1.5
LTS 3 Apr @ 7:02am 
I doubt that'd make it harder to find. In fact, I recon it'd make it easier, as it'd immediately tell people that it exists and is accessible without them having to go and look for it.
whatamidoing  [author] 3 Apr @ 6:47am 
I don't even remember what I wrote, but thanks. I was thinking I'll probably make a github (or, more likely, gitlab- rather avoid microsoft) account when I get around to 1.5, and separate the source out from the main upload here. I'd link it, of course, but do you think that might make it harder to find?
LTS 3 Apr @ 5:49am 
Thank you for including your source code and it's comments, really helped me figure out how transpilers work. Have my points.
whatamidoing  [author] 15 Nov, 2022 @ 3:39am 
Probably possible, but anything the game does with tiles is not great to read, and the map tiles are hexagons while the play map is a square so there's inconsistency there.
Crimson 14 Nov, 2022 @ 9:01pm 
You're awesome, period.


Here is a wild thought, is it possible to make raids (spawning from screen sides) to avoid being spawned from a direction where an adjacent settlement exists in? (Say you have a base on the left side of your main base, it wouldn't make sense for raiders to spawn from there, type of thing) ... Just a random thought, not a request ^^

Otherwise, thanks for your work, love it
whatamidoing  [author] 29 Oct, 2022 @ 10:50am 
Knocked that out and it looks like it's working, let me know if there's any issues.
whatamidoing  [author] 29 Oct, 2022 @ 9:33am 
Harmony lets you do three different kinds of patches. Prefixes run code before the patched method and postfixes run code after the patched method, but transpilers let you modify the internal instructions of the patched method and are more complicated to make. I had no clue how they (or Harmony in general) worked when I made this, so I made a postfix that, when the result is that the tile is invalid, reruns all the checks except the one for a settlement being adjacent. Now, I'd like to basically remove the block of code that checks for a settlement being adjacent.
Narlindir 29 Oct, 2022 @ 8:59am 
I like your words magic man!
New patch sounds new good!


but whats a transpiler?
A reverse compiler?

it sounds like its a pretty humerous (not to say backwards) way of solving a problem.
So I state my written approval and exitement

You go man ^^
whatamidoing  [author] 29 Oct, 2022 @ 8:51am 
No clue. I don't think the method I patched is different, but I've been thinking of redoing my sloppy patch which basically runs the checks again on failure with a transpiler, so I'll see if I can get that done with a build made for 1.4.