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.

Unnat7

A mod to NOT pause game when opening Map Screen

Recommended Posts

Unnat7    14

First I know Minimap HUD exists I don't want to use that. I want that you can still walk while map screen is open and other features

I do know a bit of LUA ( enough to edit a mod but not enough to make one mod ) but the problem with that is I can't find where are the file containing the coding about minimap is. I found one named 'farseer.lua' but it is just for Hamlet. If some one could tell me where those exist it would be very helpful.

And if possible I would like to add the mechanic of DST in with the things in an unloaded area does not get recorded by itself on the map.

Thanks for any replies!

EDIT:- Found it! it's the 'mapscreen.lua' in scripts/screens but would it work if I remove the SetPause(true/false) like in DST? and how do I add the unloaded thing

Share this post


Link to post
Share on other sites
Unnat7    14

No Replies? :C

Ok I couldn't find out how do I add and edit the mapscreen.lua  to my mod, I did look in other mods but couldn't understand what they did to add screens

I did however tried editing the game file and it works perfectly fine just like as in DST!

I still do need some help.

Share this post


Link to post
Share on other sites
Unnat7    14
7 hours ago, inferjus4 said:

--[[Long Short Short]]--

I do know enough LUA to make my custom mod 

And the thing that you asked, I just opened the mapscreen.lua in the game files and edited this (written below in the quote)

Quote

function MapScreen:OnBecomeInactive()
    MapScreen._base.OnBecomeInactive(self)

    if GetWorld().minimap.MiniMap:IsVisible() then
        GetWorld().minimap.MiniMap:ToggleVisibility()
    end
    SetPause(false) -- kept this as it is
    TheFrontEnd:GetSound():PlaySound("dontstarve/HUD/map_close")

    if self.onbecomeinactivefn then
        self.onbecomeinactivefn(self)
    end
end

function MapScreen:OnBecomeActive()
    MapScreen._base.OnBecomeActive(self)

    if not GetWorld().minimap.MiniMap:IsVisible() then
        GetWorld().minimap.MiniMap:ToggleVisibility()
    end
    self.minimap:UpdateTexture()
    SetPause(true) -- to SetPause(false) (this tells the game to not pause the whole game when I open the map)
    TheFrontEnd:GetSound():PlaySound("dontstarve/HUD/map_open")

    if self.onbecomeactivefn then
        self.onbecomeactivefn(self)
    end
end

And it worked! 

Or the other thing I tried to do is completely remove the 'SetPause(...)' by adding '--' in front of them and it works the same.

I just have two questions

1. How do I add/enable my custom mapscreen.lua file in my mod and

2. What are the game files in DST that make it so that things in unloaded areas do not get updated automatically in the map.

 

Share this post


Link to post
Share on other sites