Basics of the Developer Console[编辑 | 编辑源代码]
This section should explain the basics of what your averge console log looks like, that each part means and how that can help you improve your code.
Error Message | Script Still Executes? | Meaning |
---|---|---|
Sample error message | ✓ or ✗ | What the error actually means, maybe how to fix it too. |
Unrecognized loc key | ✓ | The localisation key you used (ex stewardship_domain_special.1002.c.tt) does not exist. |
The Art of Debugging[编辑 | 编辑源代码]
todo - h
If you open the developer console and type script_docs
, you will create a series of log files on the C:\Users\YOURUSERNAME\Documents\Paradox Interactive\Crusader Kings III\logs
folder directory
Hot-loading[编辑 | 编辑源代码]
Hot-loading, in the context of CK3, is the act of overwriting scripts with their newly edited counterparts while the game is still running. This is specially useful for testing minor changes to events (such as strings, scope references and other), since it means that you can edit, save and test your script without the need to reload the whole game.
However, it is not perfect, it will not reload scripts that have not been modified, meaning that large changes that change how the script inteacts with other scripts may lead to an avalance of errors. The general rule is to only hot-load when making minor changes and debugging simple things. Anything beyond that runs the risk of causing errors when in reality all you needed was to just reload the game.