You must be logged in to post messages.
Please login or register

AI & RM Scripting
Moderated by Leif Ericson

Hop to:    
Welcome! You are not logged in. Please Login or Register.4 replies
Age of Kings Heaven » Forums » AI & RM Scripting » What is min_placement_distance?
Topic Subject:What is min_placement_distance?
local boi
(id: dragon14)
posted 06-08-18 05:01 AM CT (US)         
posted 06-08-18 08:48 AM CT (US)     1 / 4       
I can't seem to make any sense of this attribute.
It acts really oddly.

From my testing it accepts values from 0 to 101, but it varies from the size of the land.
For example, this code:

terrain_type DIRT
land_percent 1
left_border 40
right_border 40
top_border 40
bottom_border 40
zone 16
min_placement_distance X

This code can generate only 4 different shapes of lands, despite it having seemingly 101 available values.

Land 1 - This acts like not having the attribute at all.
X = 0 to 68

Land 2
X = 69 to 79

Land 3
X = 80 to 100

Land 4
X = 101

These X values differ when you have different border restrictions.
I'd love to hear everyone else's observations with this attribute.
posted 06-08-18 01:13 PM CT (US)     2 / 4       
The ONLY place I found it used is in the original versions of Gold Rush.
Test it and see if you can characterize the behavior.

This is one of the undocumented scripting commands I found:,40974,,all

......./ / / \ Check out my Blacksmith submissions as well as my stuff in the Steam Workshop.
....../ / /\\ \
...../ /_/_\\ \ Proud guardian of the Updated New RMS Guide <<<version 3 is out<<<
..../_____\\\ \
....\\\\\\\\\\\\\/ and the Random Map Scripting Links and FAQ thread.
posted 11-12-18 00:00 AM CT (US)     3 / 4       
Hello, thanks for solving this problem solution. I have tried to myself many times but i can't solve it correctly. Then i was searching something in website and over there i have found your post link in which you were asking about min placement distance. So, i can't stop myself by reading your post because i thought that i will surely find out my answer here. And i was right, i found my answer.

[This message has been edited by Castro08 (edited 11-12-2018 @ 00:03 AM).]

posted 11-20-18 02:47 AM CT (US)     4 / 4       
I've found it it depends on your other lands. For instance, if I create one land and then another and set min_placement_distance 100, the land with that perpetually spawns at the center; probably some bugginess going on if it can't place it anywhere else. Whereas if I don't have that land, it will spawn randomly.

It seems to me that this is the minimum placement distance from other lands as measured by the center of the lands.

We already have a similar command for this; other_zone_avoidance_distance X, except that this ensures that there will always be X tiles between the two zones (of course you need to specify zone A and zone B for the two lands)

So with that in mind it seems quite useless, as while it enforces a distance from the center of the land, that's not very useful as the center of a land is not usually obviously defined, whereas the edge of a land is reasonably easy to spot if you use other_zone_avoidance_distance .
You must be logged in to post messages.
Please login or register

Hop to:    

Age of Kings Heaven | HeavenGames