Life is Feudal: Forest Village Wiki
Explore
Main Page
All Pages
Interactive Maps
navigation
Main page
Community portal
Recent changes
Random page
Admin noticeboard
Gamepedia
Gamepedia support
Report a bad ad
Help Wiki
Contact us
FANDOM
Fan Central
BETA
Games
Anime
Movies
TV
Video
Wikis
Explore Wikis
Community Central
Start a Wiki
Don't have an account?
Register
Sign In
Sign In
Register
Life is Feudal: Forest Village Wiki
603
pages
Explore
Main Page
All Pages
Interactive Maps
navigation
Main page
Community portal
Recent changes
Random page
Admin noticeboard
Gamepedia
Gamepedia support
Report a bad ad
Help Wiki
Contact us
Editing
Debugging
Back to page
Edit
VisualEditor
View history
Talk (0)
Edit Page
Debugging
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
Step-by-step debugging is advanced technique of programming for finding and resolving proble === Setup === * Find root game directory at your system. Usualy it is something like this: <blockquote>C:\Steam\steamapps\common\Life is Feudal Forest Village\</blockquote> * Create debug.cmd in this directory with following content: "ForestVillage.exe" -debug -console * Find script.pak in the same directory. [[Package|Extract it by QuickBMS]]. * Download and install [[https://studio.zerobrane.com/download ZeroBrane IDE]]. Run it. * Select <font color=gray>''Project -> ProjectDirectory -> Choose''</font> and select root game directory. * Select <font color=gray>''Project -> LuaInterpretor -> Moai''</font> * Select <font color=gray>''Edit -> Preference -> Settings: System''</font>. Add this lines at the end of file and save it: debugger.runonstart = true debugger.redirect = 'c' path.moai = "debug.cmd" * Restart ZeroBrane IDE. === Usage === * [[If]] setup done correctly you can press "start debugging" button (green triangle) and game will start. * When the game window pops up start a new game. * Browse project window <font color=gray>''(Project View -> Project/FileTree)''</font> and open some scripts. Click next to any line number to toggle breakpoint at this line (red circle). When script execution reaches this line the game will stop. * Use stack window <font color=gray>''(Project View -> Stack)''</font> to examine stack and local variables at this point. [[File:Debug.png|800px]]<br /> * Use <font color=gray>''Project -> Step Into, Step Over, Step Out''</font> buttons to step-by-step execution. * Use this command in scripts to print any information into <font color=gray>''View -> Output''</font> window: <span style="color:#9b703f">print</span>(<span style="color:#8f9d6a">"text")</span> * To print information about the running game you can just put available global variables in print statements. If you put the following code in one of your Mod-Lua files it will print all elements of the fv.core Table to the Zerobrane console: <span style="color:#9b703f">for <span style="color:#8f9d6a">key,val</span> in pairs (<span style="color:#8f9d6a"> fv.core </span>) do </span> <span style="color:#9b703f"> print( <span style="color:#8f9d6a">key,val</span> ) </span> <span style="color:#9b703f">end </span> * Find more info about ZeroBrane IDE on [[https://studio.zerobrane.com/documentation official site]].
Summary:
Please note that all contributions to the Life is Feudal: Forest Village Wiki are considered to be released under the CC BY-NC-SA
Cancel
Editing help
(opens in new window)
Follow on IG
TikTok
Join Fan Lab