Advice on How To Mod

skribbz14

Chieftain
Joined
Mar 5, 2025
Messages
3
I'm a developer and I've been watching my friend make his own personal UI mods for Civ 7. His workflow is absolutely insane. He'll adjust some javascript/css and then boot up the game to see what happens. If the game crashes, he has no idea why, because there are no error logs. Based on my own experience I'm having a hard time believing that there isn't something out there that could help him work more efficiently. I was poking around the tutorials on here, but didn't find an answer, so I thought I'd ask. Are there any unofficial modding tools or ways for him to debug faster than booting up the game to see what happens every time?

Thank you!
 
I'm not a real modder and certainly no developer, but a few quickies:

Point him to https://forums.civfanatics.com/threads/how-to-enable-the-in-game-console.694859/
or even https://forums.civfanatics.com/resources/chrispressos-debug-console-cdc.31995/

Also, let him check the UI.log. And tell him to insert console.warn commands in his JS files for easier debugging which part works and which fails (but you might already have done that).

And last but not least, point him to the Civ V Modding Helpline: https://discord.gg/zVkNfqMtYU
 
Last edited:
The in game console has a button for ReloadUI. I'm not sure if it reloads the scripts from disk or just restarts the initialization process. The game was running 200+ FPS at 100% GPU utilization so I didn't care to leave it running. I've since started using RivaTuner to limit FPS making it more feasible but I was past the part where I restarted the game frequently. ReloadUI takes like a second. So if it does reload the scripts from disk that could save a good deal of time. Just leave the game running.
 
I was playing and tried a few things out. ReloadUI does reload the scripts. That's definitely more useful in windowed mode than full screen. It also helps to use RivaTuner to slow this runaway beast down. I could have sworn they mentioned frame limits in the patch. You can also paste a function into a browser debugger window to syntax check it. You can run the code there as well as long as you don't call any functions provided by the game. Getting a browser to display game HTML is beyond my merger abilities. You can do limited testing of DOM in a browser.
 
Back
Top Bottom