Jump to content

Recommended Posts

I'm trying to make a character with a slightly extended 'map range'  Uh, I don't really know what it's called.

You know; the radius in which your view uncovers the black fog from the map as you explore it? Yea that.

Does anyone know where this code is located? 

I've gone through all the many different "minimap" files but I can't seem to find where it determines the radius in which the map is uncovered.

Does anyone know which file I could find this in?

Does anything I'm saying even make any sense? I dunno. But any help would be greatly appreciated!

It's hard-coded as far as I'm aware. You can, however, use this code:

 

GetWorld().minimap.MiniMap:ShowArea(x,y,z,radius)

 

Great! I got it to work after playing around with it for a few hours. (I had to put the code in my modmain.lua because it would just hard close to desktop when I tried to put it in the character's file)

 

I hooked it up to a timer and now it works like a charm! Thanks a ton!

local function mapvision( inst )	inst:DoPeriodicTask( 0.5, function()				local player = GLOBAL.GetPlayer()				local x,y,z = player.Transform:GetWorldPosition()				minimap = TheSim:FindFirstEntityWithTag("minimap")				GLOBAL.GetWorld().minimap.MiniMap:ShowArea(x,y,z,200)	end)endAddSimPostInit( mapvision )

There seems to be one problem though. The bits of the map revealed by this "extra range" aren't saved when the game saves and quits. When loading the game, all the Fog of war (I found out its official name) is back to where it would have been without the range.

 

Any Idea on how to fix that?

I already know how to save and load data, but I don't even know what this would be stored as.

@pickleplayer That's just part of the limitations to what we can access from the minimap code. See all of these threads. If you manage to find any sort of workaround, please do share.

Darn.

I played around with it for a while but didn't get anywhere. Not that I really expected to.

 

Oh well. I guess I'll try and think of a different map-related perk.

 

Thanks for all the help anyways!

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...