
- PRISON ARCHITECT SCRIPT DEBUGGER HOW TO
- PRISON ARCHITECT SCRIPT DEBUGGER .EXE
The first thing you want to do is check your dynamic loc, make sure you did not make a mistake when writing it. Search and destroy/replace.Įrror Spam: Debugging Dynamic Loc and Trigger Conditions Īre you getting thousands of errors every second you run your event? Don't panic!
Duplicate Key or Hash: Somewhere either in or outside your file there is a key with the same name or content as another key.
To solve the issue simply make a key with the contents of your string.
Unrecognized Key: Same solution as above, but this also happens when you use a string in your script (using "my text here" instead of a loc key). Missing Key: You probably misspelled the loc key or forgot to save (it happens to the best of us), make sure to save, double-check and re-type your loc key.
You may also encounter issues with missing keys, unrecognized keys or duplicate hashes:
Visual Studio Code: At the bottom of the window (bottom-most right) is the encoding and syntax highlight tab, select UTF8 (or whatever else it is set to) → "Save with Encoding" → "UTF8 with BOM". Sublime Text: File → "Save With Encoding." → "UTF8 with BOM". Here is how you save your loc file with the correct encoding: The first thing you must make sure of is that your loc file is encoded correctly (the game will tell you if it is not), you should use utf8bom. Localization has improved a lot since the epoch of Crusader Kings 2 and it is now easier than ever, but that does not mean it is fool-proof. Be sure to clear your console to remove old errors. Note: Newer error logs are at the top, while older logs will be at the bottom. Modders are (mostly) friendly folk ready to lend a hand to beginners and they are sure to answer your many questions. If an error says it does not recognize a loc key, then it probably means exactly that.īelow is some general advice that will help solve your issue 80% of the time, for the remaining 20%, reach out to other members of the CK3 modding community. The Art of Debugging Ĭonfused by an error? Great! The first step is to remain calm and read the error again while taking the text as literally as possible. You can also use that same window to execute effects such as add_gold = 999999 and add_trait = lunatic_genetic to help meet the conditions necessary to properly run the event you are testing. This is the primary way of testing events that have not yet been added to a pulse or otherwise connected to the game in any way a player could naturally encounter. To test your event, simply type event name.id into the command input window and press enter (examples: event diplomacy_foreign.1074 and event central_asia.0011). The Basics of the Developer Console īelow is an image explaining what each button in the debug UI does: This will also allow you to get messages from Errorhoof warning you of any script errors: the game will automatically open a notepad window with a list of any errors at it finds startup, but clicking error hoof will allow you to create a new notepad window with all the latest and greatest of your mistakes. Once this has been done, you will be able to access the developer console in-game via the ` key Known as the "grave accent" key, which is usually located at the top left of a keyboard. View the image on the right for an example. PRISON ARCHITECT SCRIPT DEBUGGER .EXE
exe file (eg: C:\Program Files (x86)\Steam\steamapps\common\Crusader Kings III\binaries) and create a shortcut with the -debug_mode parameter at the end. The first thing you want to do is enable debug on your game, to do this you must find your game's.
PRISON ARCHITECT SCRIPT DEBUGGER HOW TO
Note: if you are using the Steam version of the game, you can right click on the title in your library, click "properties" and add -debug_mode startup to your launch options.ĭebugging is easy! This page will help you understand how to debug and fix issues with your script.
(Scripting) commands are different from console commands, though some console commands have a scripting equivalent.Īvailable commands depend on the current scope type.A screenshot of a shortcut created from the CK3 steam build binary. scripted effects, which can be used to group commands into re-usable macro.command blocks (the immediate and option sections of events, or similar: effect, creation_effect, gain_effect, success.Please help to improve the wiki by taking part in the discussion of the proposed merger.Ĭommands or effects are used in scripting to alter the target that was selected with scopes and conditions. This article is a candidate to be merged with Effects.