FS22 Power Tools: Developer v1.0.0.0

FS22 Other

FS22 Power Tools: Developer v1.0.0.0


Power Tools: Developer is a quality-of-life mod for modders that works well alongside Power Tools, Easy Dev Controls and Global Explorer.

An improved style of visualizing in-game tables, together with the possibility to save tables to well-formed Lua files, opens up a new way of understanding the FS object model!

FEATURES:
– New console commands to restart the game (see below for details)
– Console command to print Lua table contents to either the console/log or a separate file
– Console command to clear the log file

CONSOLE COMMANDS:
– dtRestart (or ‘r’): Restarts the current savegame using a soft restart (slightly faster than a hard reset)
– dtRestartHard (or ‘rr’): Performs a hard reset (this will ensure everyhing is unloaded from memory)
– dtTable: Prints the contents of a Lua table to the console/log
– dtSaveTable: Save the contents of a Lua table to a file (3-4x times faster than printing a table to the log)
– dtVisualizeTable [beta]: An improved way of printing tables to the log, both faster, more memory efficient and visually improved.
– dtClearLog (or ‘cls’): Clears the log.txt file to get a fresh log (especially useful when using the restart command)

CAUTION!
The console commands to restart the game will do this -without- asking you to save your progress first. I.e. you risk losing progress if you are not cautious!

SAVING TABLES
The ‘dtSaveTable’ allows you to quickly dump a Lua table to disk in a well-formatted Lua file, meaning you can load this file as a source file in the Lua interpreter or in-game. This has several use cases, especially to understand the FS object model.

Optionally you can choose the depth of the output, especially important when saving top level tables (e.g. g_currentMission) that may contain many child tabled and/or large tables. Thanks to a well optimized code it is still possible to save g_currentMission with some 5-6 levels of depth before the Lua engine starts to leak memory and becomes unstable (the default depth is set to 2).

Example:
To dump the g_currentMission table to a file you could use the command ‘dtSaveTable g_currentMission currentMission.lua 1’. This would export the g_currentMission table to a file named ‘currentMission.lua’ and only include the direct descendants of g_currentMission.

Note: due to security restrictions, the generated .lua file will be stored in your ‘My GamesFarmingSimulator2022modSettingsFS22_000_DevTools’ folder.

PRINTING TABLES
Similar to ‘dtSaveTable’, the command ‘dtTable’ can be used to output a table to the log. It takes the table name as mandatory parameter and the maxDepth as an optional parameter (with a default value of 2).

Important! Due to the nature of how FS prints to the log it is only recommended for fairly small tables and/or shallow structures (depth should not exceed 2-3). E.g. printing g_currentMission to the console with a depth of 4 will make FS consume some 10-15GB of system ram and then crash in an out-of-memory error.

If you need to print a deeper structure it is recommended to use ‘dtSaveTable’.

Credits:
w33zl


What is this Farming Simulator 25 / 22 mods use for:

Farming Simulator game is so great that is hard to believe that it could be even greater. However, it can be if you play this game with mods! You can have more fun simply installing Farming Simulator 25 mods / Farming Simulator 22 mods. The game became so popular because of supporting mods! What is more, all FS25 mods / FS22 mods are completely free. Every mod has different designation and when there’re so many of them, until you’ll try it you can only imagine what the limits of this game are. So many improvements new tractors and more are waiting for you until you download all of Farming Simulator 25 mods / Farming Simulator 22 mods. Create your own combination of FS 25 mods / FS 22 mods and see how it works in game. Maybe you’re the one who will create a perfect game which doesn’t have any issues. So why don’t you try. Download and install these LS 25 mods / LS22 mods and create your Farming Simulator 25 / Farming Simulator 22 game. Welcome to the biggest Farming Simulator modding community! If you like this mod, please comment bellow.






Best FS22 Other mods

Leave a Reply

Do you need any help or to say thanks to the mod author? Just leave a comment below!