description
Developer PowerTools is a quality-of-life mod for modders that complements tools like Power Tools, Easy Dev Controls, and Global Explorer.
It enhances the visualization of in-game tables and allows saving tables to well-formed Lua files, providing a better understanding of the FS object model.
Features:
- New console commands to restart the game
- Console command to print Lua table contents to the console/log or a separate file
- Console command to clear the log file
Console Commands:
- dtRestart (or 'r'): Soft restart of the game client
- dtRestartHard (or 'rr'): Hard reset to unload everything from memory
- dtTable: Prints Lua table contents to the console/log
- dtSaveTable: Saves Lua table contents to a file (faster than logging)
- dtVisualizeTable [beta]: Improved way of printing tables, faster and more memory-efficient
- dtClearLog (or 'cls'): Clears the log.txt file
Note: Due to FS25 limitations, automatic restart of the current savegame is disabled until Giants re-enables this feature.
Caution!
Restarting the game via console commands will not prompt you to save your progress. Ensure you save manually to avoid losing progress.
Saving Tables
The 'dtSaveTable' command allows exporting Lua tables to disk in a well-formatted Lua file, making it easier to study the FS object model.
Example: To dump the g_currentMission
table to a file, use dtSaveTable g_currentMission currentMission.lua 1
. The file will be saved in My Games/FarmingSimulator2025/modSettings/FS22_000_DevTools
.
Printing Tables
The 'dtTable' command prints a table to the log. However, deep structures (depth >3) may cause high memory usage and crashes. It is recommended to use 'dtSaveTable' for large tables.
Credits
w33zl-
16 Mar 15:59Version 1.1.0.0
-
by sraka
ago 3 days
-
by sraka
ago 3 days
-
by sraka
ago 3 days
-
by sraka
ago 3 days
-
by sraka
ago 3 days
-
by sraka
ago 3 days
0 Comments for Developer PowerTools