Any chance to have a toggle key to hide the moon UI at will, or otherwise have it automatically hide when in certain scenarios, like the quest result screen? It shows up on screenshots and so far the best solution right now is to change the position value to off the screen or changing alpha to 0 every time I want to take a screenshot.
I tried creating a toggle key function myself, but I'm very unfamiliar with lua and REF coding.
Otherwise, I love this mod, especially the UI implementation.
Well, I ended up figuring out a crude way to achieve this (No_moon.png = blank alpha image). The sleep() function causes an issue where pressing the defined toggle button (Page Down in this case) causes the game itself to suspend for the 0.1 second duration, but without the sleep, the toggle occurs rapidly even with a quick key-press.
local function sleep () local sec = tonumber(os.clock() + 0.1); while (os.clock() < sec) do end end
local toggleKey = 0x22 local displayState = true
local function toggleDisplay() if displayState then -- print('The display should now be off') displayState = false elseif not displayState then -- print('The display should now be on') displayState = true end sleep() end
re.on_frame(function() local moonparam = moon_controller_field:get_data(sdk.get_managed_singleton("app.EnvironmentManager")) if not moonparam then print("No moon controller") return end
local moondataparam = get_active_moon_method:call(moonparam) if not moondataparam then print("No active moon data") return end
if reframework:is_key_down(toggleKey) then toggleDisplay() end
if activemoonid and displayState then if firstRun then local startup = init() if not startup then print("Failed to load config file") return end getMoonDirectory() loadImage(dirString .. tostring(activemoonid) .. ".png") currentMoonCycle = activemoonid firstRun = false end if activemoonid ~= currentMoonCycle then loadImage(dirString .. tostring(activemoonid) .. ".png") currentMoonCycle = activemoonid end
if settingsUpdated then loadImage(dirString .. tostring(activemoonid) .. ".png") settingsUpdated = false end elseif currentMoonCycle ~= 42 then loadImage("lunar_cycles/native_ui/No_moon.png") currentMoonCycle = 42 end
if not activemoonid then print("Failed to get moon phase") end end)
We've been looking into a way to try to tie it to the in game UI. Namely the Mini Map. So that when the Mini Map is displayed, the mod displays, or turns off when the mini map is not displayed.
That would be perfect! I mean, this mod is almost perfect as-is with the minimap art that fits so seamlessly in with the rest of the UI. If only the darn thing would hide itself along with the Time/Season icons whenever they're hidden. This is a mod I'm definitely going to track until that sweet, sweet update comes around.
Should this mod be showing up in Fluffy Mod Manager? I've got both requirements downloaded (REFramework and REFramework D2D - both latest versions) but when I load up the game, I don't see this as an option under ScriptGenerated UI. No errors or anything like that when starting the game - I just don't see it as an option. I've added the image folders to:
There's technically only 2 file sets in here. The lunar_cycles.lua should go into the reframework//autorun folder, and it appears you have the images in the correct spot.
Oh I didn't just ask for it. I implemented it and cursey merged the changes I made to the main release. I'll toot my own horn freely on this one because I am very new to programming and C++ was not a walk in the park.
Thanks :P Challenging, but I certainly won't say it isn't fun! And especially thanks to BloodTide and Gonk for making the mod that's inspired me to learn!
I have used both new versions, and I found that no matter how I tried to change the icon style in the options, it didn't work. I also tried to check the option and restart the game, but it didn't work either. I don't know if there are any people with the same problem as me. I will ask my friends to try it later to see if they have similar problems. Thank you again for your fix and update.
Huh... yup... you're absolutely right. This was working properly when I uploaded it. There must have been a hick up with Github between Gonk and I that screwed something up before I uploaded it. I'll get this fixed ASAP
*EDIT* Update posted to fix Images not switching. Thanks again for the heads up!
It would drop my FPS to around 10 when adjusting the UI range and reaching a new day.I don't know the cause of the problem, but I can infer that it is caused by the lag every time the moon image changes. It was very smooth when I played it normally, until I installed this mod.This is a good mod, looking forward to it being fixed.
Really? That's interesting. These images are quite small impact wise in comparison. I'm curious to hear if anyone else is having this issue of a FPS drop when the images swap. Personally, I've never experienced this, at least to my noticing. Is this a constant thing for you?
Yes, my computer specs are not low, but it does reduce my fps when moving the UI or entering a new day. My friend's REF workbench even keeps erroring when using this mod, and his fps is seriously abnormal, staying around 20fps whenever he is in the game. I checked the error items and confirmed that it was this mod. I asked him to delete all of them and his game became smooth and REF no longer reported errors. His computer specs are slightly low, a 20 series desktop.I hope these info can help you.
Are you able to post the error messages? I also experience some frame drops when changing the size of the image, but do not notice any issues when the image changes. Personally, the frame drops while changing the UI aren't an issue since I'm not actively playing.
Great mod but two things. The Main File severely tanks my FPS to 1 to 2 Frames when loading from a save file. The mini-map option is great but doesn't seem to work very well on a 4K display. When I push the slider all the way to right, it stops about halfway of my screen. For now, using the 1.01 version works very well for me.
1. Are you getting an error in the main file? If so, what is it?
2. For 4k try this. -open reframework>autorun -open lunar_cycles_ui.lua with any kind of text editor. -Toward the top, like 9 lines down look for this, "local screen_w, screen_h = 1920, 1080" -change it to "local screen_w, screen_h = 3840, 2160" Without the quotations. -Save it and test it.
I found the solution: The images come in /reframework/images/, but the script looks for them in /reframework/images/lunar_cycles/. Move the 7 images and the 4 folders into /reframework/images/lunar_cycles/ (create the folder if it does not exist) and the mod will no longer encounter the error.
There is another problem with the config when selecting "Dark Background No Text" or "Volya Images" though, regarding which I've posted another bug report. This can cause a couple different issues, depending on which image set you're switching from. I don't think it will cause crashes, but you may have an unexpected image set load.
FFS. I guess when I rebuilt the directory to put the zip file together I must have accidentally skipped a whole folder. I'll fix this and replace the upload right now. Sorry I didn't get back to this sooner. Yesterday was a bit busy.
Thanks for the update! No need to apologize for having a life, imo.
The part of the script that updates the config when you make a change still contains the 2 typos. I also believe only the mod owner can close/update the status of bug reports so those are just sitting open.
Ok, I managed to fixed the slowdown I was getting with the Minimap. It seems like it was still picking up the old config with the old version. Changing one of the options and changing it back before loading the save file fixed it. I edit the the lua like you said and now it's perfect. Thank you for this very nice QoL Mod. :) This should've been standard!
Yeah I've noticed with a lot of mods most of the time if you're having issues sometimes deleting the config json files and letting the mod repopulate it can fix issues. Especially after updating to a new version lol.
For some reason nothing shows up for me, despite the script being correctly detected by REFramework. Any idea what could be the cause? I tried all the X/Y positionning and scale, there's literally nothing showing up
Are you getting any sort of error in REframework console at all? And you have d2d installed in the plugins as well? I'm not really sure. It seems like if there's no errors,maybe it's not seeing the images. Make sure there's an Images folder inside the REframework folder and a lunar_cycle folder inside of that with the pngs.
My bad i just can't read and forgot to install D2D :^) Sorry for the inconvenience. i made some custom icons with a more discreet design, feel free to use them if you want: with transparency: https://imgur.com/a/zAVlS9h opaque background: https://imgur.com/a/Ou6K0hw
61 comments
I tried creating a toggle key function myself, but I'm very unfamiliar with lua and REF coding.
Otherwise, I love this mod, especially the UI implementation.
local function sleep ()
local sec = tonumber(os.clock() + 0.1);
while (os.clock() < sec) do
end
end
local toggleKey = 0x22
local displayState = true
local function toggleDisplay()
if displayState then
-- print('The display should now be off')
displayState = false
elseif not displayState then
-- print('The display should now be on')
displayState = true
end
sleep()
end
re.on_frame(function()
local moonparam = moon_controller_field:get_data(sdk.get_managed_singleton("app.EnvironmentManager"))
if not moonparam then
print("No moon controller")
return
end
local moondataparam = get_active_moon_method:call(moonparam)
if not moondataparam then
print("No active moon data")
return
end
if reframework:is_key_down(toggleKey) then
toggleDisplay()
end
activemoonid = get_moonid_method:call(moondataparam)
if activemoonid and displayState then
if firstRun then
local startup = init()
if not startup then
print("Failed to load config file")
return
end
getMoonDirectory()
loadImage(dirString .. tostring(activemoonid) .. ".png")
currentMoonCycle = activemoonid
firstRun = false
end
if activemoonid ~= currentMoonCycle then
loadImage(dirString .. tostring(activemoonid) .. ".png")
currentMoonCycle = activemoonid
end
if settingsUpdated then
loadImage(dirString .. tostring(activemoonid) .. ".png")
settingsUpdated = false
end
elseif currentMoonCycle ~= 42 then
loadImage("lunar_cycles/native_ui/No_moon.png")
currentMoonCycle = 42
end
if not activemoonid then
print("Failed to get moon phase")
end
end)
C:\Program Files (x86)\Steam\steamapps\common\MonsterHunterWilds\reframework\images\lunar_cycles
New Alpha Slider Thanks to help from PBLivingston asking Cursey to add Alpha support to reframework-d2dOoooh exciting! :D
Making everyone's experience better, one line at a time. 🌟
*EDIT* Update posted to fix Images not switching. Thanks again for the heads up!
Its a very good mod.
2. For 4k try this.
-open reframework>autorun
-open lunar_cycles_ui.lua with any kind of text editor.
-Toward the top, like 9 lines down look for this, "local screen_w, screen_h = 1920, 1080"
-change it to "local screen_w, screen_h = 3840, 2160" Without the quotations.
-Save it and test it.
https://staticdelivery.nexusmods.com/images/6993/3122599-1743457025.png
I updated the Minimap to 1.01 but now it's giving me the same error but instead of 93, it's 79.
The images come in /reframework/images/, but the script looks for them in /reframework/images/lunar_cycles/. Move the 7 images and the 4 folders into /reframework/images/lunar_cycles/ (create the folder if it does not exist) and the mod will no longer encounter the error.
There is another problem with the config when selecting "Dark Background No Text" or "Volya Images" though, regarding which I've posted another bug report. This can cause a couple different issues, depending on which image set you're switching from. I don't think it will cause crashes, but you may have an unexpected image set load.
The part of the script that updates the config when you make a change still contains the 2 typos. I also believe only the mod owner can close/update the status of bug reports so those are just sitting open.
It shows this
what can I do?
And seems like Mini Map 1.0 isn't able to set all position on screen
*EDIT* Fix Uploaded
Any idea what could be the cause? I tried all the X/Y positionning and scale, there's literally nothing showing up
i made some custom icons with a more discreet design, feel free to use them if you want:
with transparency: https://imgur.com/a/zAVlS9h
opaque background: https://imgur.com/a/Ou6K0hw