Jump to content

Changing land tiles into water tiles


Recommended Posts

Hey folks, I'm trying to edit my map a little bit, so i can have a natural boat-launch next to my base.
I really only need the space to be a few tiles smaller for a boat to fit through, and while I found some old threads addressing this with console commands, I can't get them to work.

Found this:
(https://forums.kleientertainment.com/forums/topic/48448-any-way-to-change-land-into-ocean/?_fromLogin=1)

Which specifies,

Quote
On 11/21/2014 at 4:18 PM, rezecib said:

Interesting idea. I think the walls would be pretty laggy, though, since the game calculates collision for each wall independently. The only way to really get around that it remove the terrain outside of where the walls are now, and then remove the walls-- that way the game is using the more efficient collision detection around the edges of the land.

 

I added this function in consolecommands.lua for this purpose:

function c_setTile(newType)

    local pos = TheInput:GetWorldPosition()

    local x, y = TheWorld.Map:GetTileCoordsAtPoint(pos.x, pos.y, pos.z)

    local oldType = TheWorld.Map:GetTileAtPoint(pos.x, pos.y, pos.z)

    TheWorld.Map:SetTile(x, y, newType)

    TheWorld.Map:RebuildLayer(oldType, x, y)

    TheWorld.Map:RebuildLayer(newType, x, y)

    TheWorld.minimap.MiniMap:RebuildLayer(oldType, x, y)

    TheWorld.minimap.MiniMap:RebuildLayer(newType, x, y)

end

 

To remove the land (set it to water), use:

c_setTile(1)

 

(it applies it at the tile closest to the mouse).

But any attempts to do use this command now seem non-functional. I'm not sure if I'm doing something wrong, or what.
I'm running the latest version of the game and have reconnected as it instructs.

Any help would be much appreciated!

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...