Maarx Posted November 6, 2016 Share Posted November 6, 2016 FOUND - Console Command to Reveal Whole Map for All Players (ANewReignBeta) Following A New Reign Beta, I wanted to quickly generate a whole bunch of different caves and quickly view the map, to observe the patterns in world generation. Even better if I could reveal the entire map not just for myself, but for other players on the server, too. I checked a bunch of websites and mods, but couldn't find anything that worked for all players in A New Reign Beta on a Dedicated Server with Caves. So I dug through the source code (started with Ocuvigil code, lol) and managed to hack it together myself. Here is the command: for k,v in pairs(AllPlayers) do for x=-1600,1600,35 do for y=-1600,1600,35 do v.player_classified.MapExplorer:RevealArea(x,0,y) end end end It is a bit of a hack, it assumes that x=-1600,1600 and y=-1600,1600 are sufficiently large to cover your entire map. This is true for a world of default size, but if you generate a world that is much larger, you might need to make those numbers even bigger. Please note that the whole server hiccups and freezes for a moment when you run it. Link to comment Share on other sites More sharing options...
fsp98 Posted November 6, 2016 Share Posted November 6, 2016 You tricked the fog of war! Cool Link to comment Share on other sites More sharing options...
Mday Posted November 7, 2016 Share Posted November 7, 2016 20 hours ago, Maarx said: FOUND - Console Command to Reveal Whole Map for All Players (ANewReignBeta) Following A New Reign Beta, I wanted to quickly generate a whole bunch of different caves and quickly view the map, to observe the patterns in world generation. Even better if I could reveal the entire map not just for myself, but for other players on the server, too. I checked a bunch of websites and mods, but couldn't find anything that worked for all players in A New Reign Beta on a Dedicated Server with Caves. So I dug through the source code (started with Ocuvigil code, lol) and managed to hack it together myself. Here is the command: for k,v in pairs(AllPlayers) do for x=-1600,1600,35 do for y=-1600,1600,35 do v.player_classified.MapExplorer:RevealArea(x,0,y) end end end It is a bit of a hack, it assumes that x=-1600,1600 and y=-1600,1600 are sufficiently large to cover your entire map. This is true for a world of default size, but if you generate a world that is much larger, you might need to make those numbers even bigger. Please note that the whole server hiccups and freezes for a moment when you run it. This is gona be so useful in running game related tests. Thank you so much. Link to comment Share on other sites More sharing options...
CarlZalph Posted November 7, 2016 Share Posted November 7, 2016 On 11/6/2016 at 0:18 PM, Maarx said: It is a bit of a hack, it assumes that x=-1600,1600 and y=-1600,1600 are sufficiently large to cover your entire map. Here is one that makes no assumption: local w,h = TheWorld.Map:GetSize();for _,v in pairs(AllPlayers) do for x=-w*4,w*4,35 do for y=-h*4,h*4,35 do v.player_classified.MapExplorer:RevealArea(x,0,y) end end end And here's one that uses a hexagon approach for packing the circles for a slight optimization in the networking: local r=25;local p=math.sqrt(3);local q=.5*p*r;local w,h=TheWorld.Map:GetSize();w=4*w;h=4*h;for _,v in pairs(AllPlayers) do for x=-w,w,3*r do for y=-h,h,2*q do v.player_classified.MapExplorer:RevealArea(x,0,y) end end for x=-w+q*p,w,2*q*p do for y=-h+q,h,2*q do v.player_classified.MapExplorer:RevealArea(x,0,y) end end end Link to comment Share on other sites More sharing options...
Arlesienne Posted November 13, 2016 Share Posted November 13, 2016 I confirm this is working, thanks a lot! Extremely handy for deciding if the map for our roleplaying server is twisted enough . Link to comment Share on other sites More sharing options...
Arthuring Posted December 2, 2016 Share Posted December 2, 2016 On 07/11/2016 at 2:31 PM, CarlZalph said: nevermind, please delete this reply Link to comment Share on other sites More sharing options...
fayescarlet64 Posted December 18, 2016 Share Posted December 18, 2016 Oh, bless you! This is perfection. We always want big birch forests, so this is a good way to see if it's true. Link to comment Share on other sites More sharing options...
Brocca Posted December 23, 2016 Share Posted December 23, 2016 sorry for being a newb, how do i implement the code on the console should i just copy paste? thank you coz i tried copy/paste it and nothing happened Link to comment Share on other sites More sharing options...
Kzisor Posted December 23, 2016 Share Posted December 23, 2016 38 minutes ago, mags01 said: sorry for being a newb, how do i implement the code on the console should i just copy paste? thank you coz i tried copy/paste it and nothing happened Cop/Paste in console. Link to comment Share on other sites More sharing options...
CarlZalph Posted December 23, 2016 Share Posted December 23, 2016 39 minutes ago, mags01 said: sorry for being a newb, how do i implement the code on the console should i just copy paste? thank you coz i tried copy/paste it and nothing happened Also if you're copy pasting ensure to hit control again, lest you send it to the client instead of the "Remote:" server. Link to comment Share on other sites More sharing options...
Brocca Posted December 23, 2016 Share Posted December 23, 2016 Re-edited. Thanks Carl, now it works thank to pinpointing to hit control again :), is there a way to remove the fog of war completely? i mean i see the revealed map but it doesn't remove the fog of war. Cheerios Link to comment Share on other sites More sharing options...
Brocca Posted December 23, 2016 Share Posted December 23, 2016 6 minutes ago, mags01 said: 9 minutes ago, CarlZalph said: Also if you're copy pasting ensure to hit control again, lest you send it to the client instead of the "Remote:" server. Thanks Carl, now it works thank to pinpointing to hit control again :), is there a way to remove the fog of war completely? i mean i see the revealed map but it doesn't remove the fog of war.Cheerios Link to comment Share on other sites More sharing options...
Brocca Posted December 23, 2016 Share Posted December 23, 2016 12 minutes ago, Kzisor said: Cop/Paste in console. Thanks Kzisor is there a way to remove the fog of war completely? i mean i see the revealed map but it doesn't remove the fog of war.Cheerios Link to comment Share on other sites More sharing options...
CarlZalph Posted December 23, 2016 Share Posted December 23, 2016 6 minutes ago, mags01 said: Re-edited. Thanks Carl, now it works thank to pinpointing to hit control again :), is there a way to remove the fog of war completely? i mean i see the revealed map but it doesn't remove the fog of war. Cheerios Unfortunately not. The fog of war is there because the server unloads everything out of every player's view distance, and as such nothing changes so the map doesn't update. Link to comment Share on other sites More sharing options...
Brocca Posted December 23, 2016 Share Posted December 23, 2016 2 minutes ago, CarlZalph said: Unfortunately not. The fog of war is there because the server unloads everything out of every player's view distance, and as such nothing changes so the map doesn't update. Thank you, but is there a way to show the prefabs? like set pieces when revealing the map ..(walls/pig houses/ etc..) Link to comment Share on other sites More sharing options...
Kzisor Posted December 23, 2016 Share Posted December 23, 2016 7 minutes ago, mags01 said: Thanks Kzisor is there a way to remove the fog of war completely? i mean i see the revealed map but it doesn't remove the fog of war.Cheerios TheWorld.minimap.MiniMap:EnableFogOfWar(false) Link to comment Share on other sites More sharing options...
Kzisor Posted December 23, 2016 Share Posted December 23, 2016 5 minutes ago, mags01 said: Thank you, but is there a way to show the prefabs? like set pieces when revealing the map ..(walls/pig houses/ etc..) The command @CarlZalph posted should work. local w,h = TheWorld.Map:GetSize();for _,v in pairs(AllPlayers) do for x=-w*4,w*4,35 do for y=-h*4,h*4,35 do v.player_classified.MapExplorer:RevealArea(x,0,y) end end end Link to comment Share on other sites More sharing options...
Brocca Posted December 23, 2016 Share Posted December 23, 2016 3 minutes ago, Kzisor said: The command @CarlZalph posted should work. local w,h = TheWorld.Map:GetSize();for _,v in pairs(AllPlayers) do for x=-w*4,w*4,35 do for y=-h*4,h*4,35 do v.player_classified.MapExplorer:RevealArea(x,0,y) end end end It does work thank you :), but the map doesnt show walls/ pighouses/ etc.. Link to comment Share on other sites More sharing options...
Gumbus Posted January 5, 2017 Share Posted January 5, 2017 Is there a way to reverse the map reveal? I'm getting into DST with friends as map host and it's helpful to reveal a map and see it's not too hostile. After that I want to reverse it to uncovered (like the map commands in DTS which cease to apply after you log out). Link to comment Share on other sites More sharing options...
cezarica Posted January 5, 2017 Share Posted January 5, 2017 De-spawning yourself and pick character again should do the trick. Link to comment Share on other sites More sharing options...
Gumbus Posted January 7, 2017 Share Posted January 7, 2017 Thanks! great stuff. Link to comment Share on other sites More sharing options...
__orange Posted March 7, 2017 Share Posted March 7, 2017 On 2016/11/8 at 0:31 AM, CarlZalph said: Here is one that makes no assumption: local w,h = TheWorld.Map:GetSize();for _,v in pairs(AllPlayers) do for x=-w*4,w*4,35 do for y=-h*4,h*4,35 do v.player_classified.MapExplorer:RevealArea(x,0,y) end end end These commands works fine in all worlds with caves in DST. But.. I generated a world without caves in DST. Pressed "`" to open the console and pasted this code. After several seconds the map revealed. Then I pressed "`" again to open the console, the game crashed suddenly. I tried another time, and the game crashed as before. Is there any logs that I can provide? Link to comment Share on other sites More sharing options...
ihr_schutzengel Posted April 21, 2017 Share Posted April 21, 2017 after me and a friend tried this command on mine and her map, my game started bugging when i entered a friend's server, it's only with her server, i tried any other server and it worked perfectly, it's just with hers, another friend entered too and has the same bug. The bug is that it shows me i can make anything from the craft menu (but actually i can't), and my health, hunger and sanity is bugged, it shows like everytime i'm losing health, or shows that i only have 100 when i just entered the server for the first time, and sometimes suddenly starts the burn animation on the hud or te freeze or sometimes the overheating, when i die more usually, and my ghost disappears, and sometimes i can't even move Link to comment Share on other sites More sharing options...
TheMightyPikachu Posted April 21, 2017 Share Posted April 21, 2017 27 minutes ago, ihr_schutzengel said: after me and a friend tried this command on mine and her map, my game started bugging when i entered a friend's server, it's only with her server, i tried any other server and it worked perfectly, it's just with hers, another friend entered too and has the same bug. The bug is that it shows me i can make anything from the craft menu (but actually i can't), and my health, hunger and sanity is bugged, it shows like everytime i'm losing health, or shows that i only have 100 when i just entered the server for the first time, and sometimes suddenly starts the burn animation on the hud or te freeze or sometimes the overheating, when i die more usually, and my ghost disappears, and sometimes i can't even move Happens on a specific server I join too, it's not the command. Most likely mods. Link to comment Share on other sites More sharing options...
CarlZalph Posted April 21, 2017 Share Posted April 21, 2017 @ihr_schutzengel That happens when a server and a client both have a mod using RPCs, but one of them is out of date. Try updating them. Link to comment Share on other sites More sharing options...
Recommended Posts
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.