Penta Posted October 22, 2013 Share Posted October 22, 2013 (edited) Hello everyone, I am trying to make working the mod Minimap which doesn't work since Nighmares Update. Ended up just writing a whole new mod:http://forums.kleientertainment.com/index.php?/files/file/352-minimap-hud/EDIT: Whoops, didn't realize there was already a mod called MiniMap. Renamed mine to Minimap HUD Thank you squeek Edited October 23, 2013 by Penta Link to comment https://forums.kleientertainment.com/forums/topic/28936-mod-wip-minimap-need-some-help/ Share on other sites More sharing options...
Wilbur Posted October 22, 2013 Share Posted October 22, 2013 I'm not good at this, but I just came here to say that a minimap in the hud would be awesome! Looking forward to this. Link to comment https://forums.kleientertainment.com/forums/topic/28936-mod-wip-minimap-need-some-help/#findComment-349358 Share on other sites More sharing options...
TheDanaAddams Posted October 22, 2013 Share Posted October 22, 2013 I'm not good at this, but I just came here to say that a minimap in the hud would be awesome! Looking forward to this. It was awesome, until the Nightmares update broke the existing one. This is a sort of revive attempt - and I'm hoping it is fixed, because I really loved this mod. =) Link to comment https://forums.kleientertainment.com/forums/topic/28936-mod-wip-minimap-need-some-help/#findComment-349365 Share on other sites More sharing options...
Wilbur Posted October 22, 2013 Share Posted October 22, 2013 It was awesome, until the Nightmares update broke the existing one. This is a sort of revive attempt - and I'm hoping it is fixed, because I really loved this mod. =)Oh, didn't recognize it was there before! My mistake! It must've been awesome... Is it adding a map to the hud so you don't have to open it up all the time? (so I didn't get that wrong too, haha!) Link to comment https://forums.kleientertainment.com/forums/topic/28936-mod-wip-minimap-need-some-help/#findComment-349370 Share on other sites More sharing options...
TheDanaAddams Posted October 22, 2013 Share Posted October 22, 2013 Oh, didn't recognize it was there before! My mistake! It must've been awesome... Is it adding a map to the hud so you don't have to open it up all the time? (so I didn't get that wrong too, haha!)Yeah, the way it worked was that you got a little minimap widget next to the calendar thing. It was fabulous! Link to comment https://forums.kleientertainment.com/forums/topic/28936-mod-wip-minimap-need-some-help/#findComment-349402 Share on other sites More sharing options...
Wilbur Posted October 22, 2013 Share Posted October 22, 2013 Yeah, the way it worked was that you got a little minimap widget next to the calendar thing. It was fabulous!Ooooohhh you're making me super excited for this!!! Hope it's going to work anytime soon!! Link to comment https://forums.kleientertainment.com/forums/topic/28936-mod-wip-minimap-need-some-help/#findComment-349404 Share on other sites More sharing options...
Penta Posted October 22, 2013 Author Share Posted October 22, 2013 Ok I will try to work a bit tonight on it but i'm stuck with assigning this function.It's present in script but visibily not declared.I don't know what to call at start of script, even if I watched some samples from Kleilocal update = GLOBAL.PlayerHud.OnUpdate Any help would be good Link to comment https://forums.kleientertainment.com/forums/topic/28936-mod-wip-minimap-need-some-help/#findComment-349412 Share on other sites More sharing options...
Blackbow Posted October 22, 2013 Share Posted October 22, 2013 i miss mini map mod so muchyou will be my hero if you make it work again =) Link to comment https://forums.kleientertainment.com/forums/topic/28936-mod-wip-minimap-need-some-help/#findComment-349433 Share on other sites More sharing options...
Seyph Posted October 22, 2013 Share Posted October 22, 2013 Do you have the original mod to compare to? If not, I have it. It'd be really cool if you got it working again. Good luck!MiniMap.zip Link to comment https://forums.kleientertainment.com/forums/topic/28936-mod-wip-minimap-need-some-help/#findComment-349435 Share on other sites More sharing options...
Penta Posted October 22, 2013 Author Share Posted October 22, 2013 (edited) It is original mod, i didnt changed the main code.I just made modinfo.lua and tex I am working on it, i'll post news here. EDIT : Than you for posting original files Edited October 22, 2013 by Penta Link to comment https://forums.kleientertainment.com/forums/topic/28936-mod-wip-minimap-need-some-help/#findComment-349466 Share on other sites More sharing options...
Penta Posted October 22, 2013 Author Share Posted October 22, 2013 Hi everybody, I think i fixed the undeclared variable. But i'm still working on second issue :The mod calls a function to scroll the minimap. You can watch it here.local function addMiniMapScroll(inst) local count = 0 for k,v in pairs(inst.inputhandlers) do if v.event == GLOBAL.MOUSEBUTTON_SCROLLUP or v.event == GLOBAL.MOUSEBUTTON_SCROLLDOWN then local scrollCam = v.fn v.fn = function () if mapVisibility == MINIMAP then local mouse = GLOBAL.TheInput:GetMouseScreenPos() local scr_w, scr_h = GLOBAL.TheSim:GetScreenSize() local x = scr_w * position local y = scr_h * map_y local w = scr_w * mapscale_x local h = scr_w * mapscale_y if mouse.x >= x and mouse.x <= x + w and mouse.y >= y and mouse.y <= y + h then if v.event == GLOBAL.MOUSEBUTTON_SCROLLUP then inst.inst.HUD.minimap.MiniMap:Zoom( -1 ) else inst.inst.HUD.minimap.MiniMap:Zoom( 1 ) end return end end scrollCam() end count = count + 1 end if count == 2 then break end endendThe error is due to this line : for k,v in pairs(inst.inputhandlers) do I think the table changed, and I don't know where it could be now. You can watch error log here : MiniMapComponent::SetAtlasInfo( minimap/minimap_data.xml )scripts/mods.lua(17,1) error calling ComponentPostInit: playercontroller in mod MiniMap[WIP]v1.0 (Mini Map): ...ont_starve/data/../mods/MiniMap[WIP]v1.0/modmain.lua:130: bad argument #1 to 'pairs' (table expected, got nil)LUA ERROR stack traceback: =[C] in function 'pairs' B:/Steam/steamapps/common/dont_starve/data/../mods/MiniMap[WIP]v1.0/modmain.lua(130,1) =(tail call) ? =[C] in function 'xpcall' B:/Steam/steamapps/common/dont_starve/data/scripts/mods.lua(15,1) in function 'fn' B:/Steam/steamapps/common/dont_starve/data/scripts/entityscript.lua(298,1) in function 'AddComponent' B:/Steam/steamapps/common/dont_starve/data/scripts/prefabs/player_common.lua(155,1) in function 'fn' B:/Steam/steamapps/common/dont_starve/data/scripts/mainfunctions.lua(90,1) =[C] in function 'SpawnPrefab' B:/Steam/steamapps/common/dont_starve/data/scripts/mainfunctions.lua(124,1) in function 'SpawnPrefab' B:/Steam/steamapps/common/dont_starve/data/scripts/gamelogic.lua(384,1) in function 'PopulateWorld'... =[C] in function 'GetPersistentString' B:/Steam/steamapps/common/dont_starve/data/scripts/saveindex.lua(67,1) in function 'Load' B:/Steam/steamapps/common/dont_starve/data/scripts/gamelogic.lua(1063,1) in function 'callback' B:/Steam/steamapps/common/dont_starve/data/scripts/playerprofile.lua(335,1) in function 'Set' B:/Steam/steamapps/common/dont_starve/data/scripts/playerprofile.lua(248,1) =[C] in function 'GetPersistentString' B:/Steam/steamapps/common/dont_starve/data/scripts/playerprofile.lua(246,1) in function 'Load' B:/Steam/steamapps/common/dont_starve/data/scripts/gamelogic.lua(1062,1) in main chunk =[C] in function 'require' B:/Steam/steamapps/common/dont_starve/data/scripts/mainfunctions.lua(602,1) scripts/mods.lua(212,1) Disabling MiniMap[WIP]v1.0 (Mini Map) because it had an error. scripts/frontend.lua(475,1) SCRIPT ERROR! Showing error screen Thank you Link to comment https://forums.kleientertainment.com/forums/topic/28936-mod-wip-minimap-need-some-help/#findComment-349691 Share on other sites More sharing options...
squeek Posted October 22, 2013 Share Posted October 22, 2013 Almost none of this code will work anymore. All of the screen code got changed around a lot in one of the updates, and very little of the variables used even exist anymore. I'll poke around and see if I can come up with anything, but the whole thing basically has to be rewritten. Link to comment https://forums.kleientertainment.com/forums/topic/28936-mod-wip-minimap-need-some-help/#findComment-349785 Share on other sites More sharing options...
Penta Posted October 22, 2013 Author Share Posted October 22, 2013 First thank you for your awnser.Do you think it could be better to rewrite all from scratch and just keep the idea? I'm not sure I've got time to do it all and I think i don't have the abilities to do it. Link to comment https://forums.kleientertainment.com/forums/topic/28936-mod-wip-minimap-need-some-help/#findComment-349814 Share on other sites More sharing options...
simplex Posted October 22, 2013 Share Posted October 22, 2013 (edited) Do you think it could be better to rewrite all from scratch and just keep the idea? That's my view on it, especially considering that it's quite a small mod (in terms of code size). Rewriting from scratch would be much easier. Edited October 22, 2013 by simplex Link to comment https://forums.kleientertainment.com/forums/topic/28936-mod-wip-minimap-need-some-help/#findComment-349872 Share on other sites More sharing options...
squeek Posted October 23, 2013 Share Posted October 23, 2013 (edited) Ended up just writing a whole new mod: http://forums.kleientertainment.com/index.php?/files/file/352-minimap-hud/ EDIT: Whoops, didn't realize there was already a mod called MiniMap. Renamed mine to Minimap HUD Edited October 23, 2013 by squeek Link to comment https://forums.kleientertainment.com/forums/topic/28936-mod-wip-minimap-need-some-help/#findComment-350114 Share on other sites More sharing options...
Penta Posted October 23, 2013 Author Share Posted October 23, 2013 OMG thank you so much, I'll take a look at the code ! Link to comment https://forums.kleientertainment.com/forums/topic/28936-mod-wip-minimap-need-some-help/#findComment-350127 Share on other sites More sharing options...
Penta Posted October 23, 2013 Author Share Posted October 23, 2013 (edited) If someone can change the main title of the topic, maybe it'll be better, I also changer first post Edut : any way to increase zoom in? Thx Edited October 23, 2013 by Penta Link to comment https://forums.kleientertainment.com/forums/topic/28936-mod-wip-minimap-need-some-help/#findComment-350142 Share on other sites More sharing options...
squeek Posted October 23, 2013 Share Posted October 23, 2013 (edited) Edut : any way to increase zoom in? Thx Short answer: No. From the comments section on the mod page: #1: Not possible. Max zoom level is hardcoded (actual value of max zoom is 0; as you zoom out that value increases, as you zoom in decreases but will never go below 0), nothing I can do about that. It does seem to scale on its own depending on resolution, though. Zoom level 0 is much more zoomed out on 1920x1080 than it is on 1024x768. However, I uploaded version 1.0.1 which fixes the size of the map on lower resolutions, so make sure you have that. Edited October 23, 2013 by squeek Link to comment https://forums.kleientertainment.com/forums/topic/28936-mod-wip-minimap-need-some-help/#findComment-350498 Share on other sites More sharing options...
Penta Posted October 23, 2013 Author Share Posted October 23, 2013 I subscribed @ steam workshop, i read the comment in mod page 1 hour ago, thank you Link to comment https://forums.kleientertainment.com/forums/topic/28936-mod-wip-minimap-need-some-help/#findComment-350603 Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now