Lua cave generation and keeps
Moderator: Forum Moderators
Lua cave generation and keeps
Hi,
This is driving me crazy, I have explicit x and y values for a chamber and a place_castle=yes item_location.
For some reason the keep isn't exactly on the given x,y values. It is sometimes off by 1 or 2.
I'm looking at the cave_map_generator.lua and can't see anything out of the ordinary there that might be causing the shift.
Any ideas on what might be going on?
Edit: ok, looks like I have to set the chamber size to 1 in order to get an exact id location.
So, the chamber gets cleared, then a random tile from that set gets selected for the id.
This is driving me crazy, I have explicit x and y values for a chamber and a place_castle=yes item_location.
Code: Select all
x=5
y=5
jagged=0
I'm looking at the cave_map_generator.lua and can't see anything out of the ordinary there that might be causing the shift.
Any ideas on what might be going on?
Edit: ok, looks like I have to set the chamber size to 1 in order to get an exact id location.
So, the chamber gets cleared, then a random tile from that set gets selected for the id.
local index = random(#locs_list)
This is what was causing it.