Jump to content

Recommended Posts

Are the minimap functions done in C++? I found some functions in maputil.lua, and of course there is prefabs/minimap.lua, but other than that I can't really find where the function for it are defined.

 

I'm mainly looking for the function where the minimap gets revealed on the position where the player is walking.

 

Thanks in advance!

In TheWorld.minimap.MiniMap

In the MiniMap userdata

local mm = TheWorld.minimap.MiniMapmm:GetTextureHandle()	mm:Offset(dx, dy)mm:ResetOffset()	mm:ShowArea(x, y, z, radius)mm:Zoom(n)mm:GetZoom()mm:AddRenderLayer(handle)mm:CacheForgottenEntities(true|false)mm:AddAtlas("atlasfilepath")mm:ToggleVisibility()mm:ClearRevealedAreas()mm:ContinuouslyClearRevealedAreas(true|false)mm:EnableFogOfWar(true|false)mm:IsVisible()mm:DrawForgottenFogOfWar(true|false)mm:SetEffects(shader_filename, fs_shader)mm:RebuildLayer(original_tile_type, x, y)mm:EnablePlayerMinimapUpdate(true|false)

If you are trying to make a mod that makes shared revealed maps, I recommend you to wait until the minimap gets exposed more.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...