王国风云2
ParaWikis
Notice
: Undefined index: HTTP_ACCEPT_LANGUAGE in
/data/wwwroot/www.parawikis.com/skins/Liberty/LibertyTemplate.php
on line
185
最新百科
都市天际线2百科
英雄无敌3百科
维多利亚3百科
奇妙探险队2百科
罪恶帝国百科
英白拉多:罗马百科
热门百科
群星百科
欧陆风云4百科
十字军之王2百科
十字军之王3百科
钢铁雄心4百科
维多利亚2百科
ParaWikis
申请建站
ParaWikis
ParaCommons
最近更改
随机页面
加入QQ群
工具
链入页面
相关更改
特殊页面
页面信息
页面值
帮助
译名手册
字词转换
编辑指南
编辑规范
练手沙盒
资助我们
ParaTranz
资助我们
×
欢迎访问王国风云2百科!
注册一个账号
,一起参与编写吧!这里是
当前的工程
。
全站已采用新UI,任何使用上的问题请点击
这里
。欢迎所有对百科感兴趣的同学加入QQ群:
497888338
。
阅读
查看源代码
查看历史
讨论
查看“故障排除”的源代码
←
故障排除
因为以下原因,您没有权限编辑本页:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
{{version|2.7}}[[File:CTD.jpg|frame|right|The CTD... Don't expect Windows to find any solution for you, you'll have to dig !]] '''Troubleshooting''' is the identification of the cause of crashes, bugs or other problems. Some of CK2's debugging features are restricted in retail builds, but there is still plenty to work with. == Log files == The game stores various log files in your CK2 user folder (<code>~\Documents\Paradox Interactive\Crusader Kings II\logs\</code>). These are overwritten every time the game starts. More logging can be activated by using command line arguments (via Steam game properties / define launch options): <code>-debug -debugscripts</code> {| class="wikitable sortable" |- ! File ! Description |- | game.log | In game notifications and output of <code>log</code> [[commands]]. Since [[patch 2.4.1]] only logged if <code>-debugscripts</code> is enabled. |- | setup.log | Game data [[#loading|loading]] logs (gui, modifiers, traits, ...) |- | error.log | Parsing and loading errors. More asserts will be logged when enabling <code>-debugscripts</code>. The following lines are OK if no elements is listed: <pre> [technology.cpp:718]: Missing Tech seed values: [technology.cpp:755]: None. [texturehandler.cpp:181]: Couldn't find texture file: . </pre> |- | historical_setup_errors.log | Extra errors linked to title/character history. Only logged if <code>-fullhistoricalsetuplog</code> is enabled. |- | system_interface.log | Errors linked to [[interface modding]] |- | graphics.log | Errors linked to [[map modding]] |- | system.log | Hardware report |- | system_interface.log | Interface errors |- | text.log | Asserts on [[localization]] keys |- | script_optimizations.log | Asserts on events that fire for courtiers |- | ai.log | |- | exceptions.log | In case of crash, you may get a stacktrace, with the last method called (ex: CLandedTitle::GetShortName) |- | time.log | Logs the game loading time. |- | memory.log | Logs the memory usage. |- |} ==Loading== When launching the game the following steps occur: *Initialising Map Logic *Loading Databases *Generating Coat of Arms *Loading Events *Loading Sounds *(Loading of vanilla history files occurs here (even if is replace_path), though it'll still show as "Loading Sounds") - very slow step ! *Processing Flags - generates the flag sprites in gfx\flags from the individual .tga files *Loading Flags *Loading Graphics *Creating Provinces *Loading Map(Creating Terrain) *Loading Map(Creating Borders) *Loading Map(Creating Trees) *Loading Map(Creating Textures) Once this is done the lobby interface will be rendered. ==Crashes== Crashes or Crash To Desktop (CTD) are the despair of the players and nightmare of the modders. There is usually little to no information to identify the cause. Here is a list of known issues: {| class="wikitable" |- ! Symptom !! Troubleshooting |- | Instant CTD clicking Play in the launcher | Check no new defines.lua entries are missing in the mod (or better use [[defines]] folder to override, and avoid duplication) |- | CTD at "Loading Databases" | *Compare setup.log with the mod and with raw vanilla : next steps normally logged in vanilla are the likely cause of the crash *Check the format and color indexes of [[Map modding|map files]] (terrain.bmp, ...) |- | CTD at "Loading Events" | * Check for unbalanced quotes, such as ''has_dlc = "Reapers'' * Can be caused by excessively long log commands with multiple references to global variables. |- | CTD when rendering the lobby interface | Check that interface .gui and .gfx files are properly [[Merging guide|merged with vanilla]], if copied in the mod. |- | CTD on applying history (initial load or selecting a bookmark) | Check that all groups in technology history have an entry for earliest starting date of the mod. See [[technology modding]]. |- | CTD on load/resign | *Check that no character has a death date past the end date of the mod. *Check that no character has a birth date later than death date.<ref>In 2.6.3 game is fully playable and crashes only if you load saved game or resign the game</ref> |- | CTD when hovering or clicking an event option | Invalid syntax in the event, or calling a command with an invalid value. |- | CTD when clicking on religion screen | Check that no more than 5 holy sites are defined in landed_titles for that religion |- | CTD when clicking on button to open [[College of Cardinals]] | See [[Interface modding#Papal succession]] |- | CTD when starting typing specific letters in the Title finder | Check that there are no empty geographical regions (at least 1 valid province) |- |} === Debugging === In last resort you can use '''Visual Studio''' (including the free [http://www.visualstudio.com/products/visual-studio-express-vs Express editions]; get the "Windows Desktop" one) to see detailed debugging information. Though it won't let you debug step by step, as the sources for the game are not available. Simply start the game, then use the ''Debug > Attach to process...'' menu option. Use the Output window to read the game's messages, which will include script validation errors and performance data. For best results create an empty project and configure it to launch CK2.exe with your mod active (i.e. with the argument <code>-mod=mod/foo.mod</code>); check the documentation for details on how to do this. You will then be able to launch the game with debugging by clicking the green Play button in Visual Studio. This will ensure that you capture any problems that show up right after the game starts. When the game crashes Visual Studio will freeze it, tell you where the offset at which crash happened, and provide the option to save a "minidump". The offset and dump won't mean much to you but if you want to report the crash to Paradox they would find both useful. ==Bugs== Bugs are usually easier to identify than crashes, as there is in-game context to identify the cause. Most non-functional bugs can be spotted via [[The Validator]], a third-party tool which checks script files for various kinds of problems. {| class="wikitable" |- ! Symptom !! Troubleshooting |- | Blank event popups that pause the game and can't be closed. | *Save the game after the popups have appeared (without checking the compress save checkbox), and look in the save for the faulty eventID that is the source. They will be at the bottom of the file, in a <code>player_event</code> section. *Use [[The Validator]], check for Parse failures, or invalid node type errors. |- | Scripting keywords appearing in decisions/councillor names | *Use [[The Validator]], check for parse errors, missing curly braces |- | Decision not appearing | *Move conditions from potential to allow block, to see failing conditions in tooltip. |- | Decision not having any effect when taken | *Use [[The Validator]], check for duplicate decision IDs |- | Truncated localization | *Open .csv file with [[Localisation#OpenOffice Calc|OpenOffice]] and check for extra columns containing text *Make sure translations do not contain semi-colon character, as it used separate languages |- | Localization not appearing in game | *Ensure file extension is .csv, not .txt *Check that mod folder is named ''localisation'', not ''localization''. *Ensure overridden vanilla keys are loaded before vanilla (i.e. 00_ file prefix) |- | Localized names show strange characters (Ã) | *Check encoding of landed_titles, culture, and localization files to be Windows 1252 (ANSI), and not any type of Unicode. |- | Events not triggering (but OK via console testevent) | *Check for invisible non-breakable spaces in event files (they can be found with Notepad++ by searching with "Extended mode" the Unicode string \u00A0) |- | Titles have wrong flags | *Clean the flag cache in ~\Documents\Paradox Interactive\Crusader Kings II\(Mod user_dir)\gfx\flags *Make sure all titles above barony have a corresponding flag in gfx/flags (with [[The Validator]]) *Try to see at which title it starts messing up, that's usually where you're missing the flag. |- | Black coats of arms | *Verify the pattern file size in [[Coats of arms.txt]] *Ensure all religion match a CoA group |- | Missing layers in portraits for custom ethnicities | *See [[Portrait modding#Custom ethnicities referencing DLC assets]] |- | Casus Belli immediately ends inconclusively | *Make sure can_use/can_use_title/is_valid_title blocks are in synch. |- | All units models use wrong gfx | *Check that no province history files reference a barony that is not defined in landed_titles (with [[The Validator]]) |- | Title is badly displayed on the map (not visible or way outside its area) | * Check for stray pixels in provinces.bmp |- | Popups like naming children not showing up | * When using <code>replace_path = "events"</code>, the following script needs to be added in the mod events folder: <pre> # ID 1 and 2 are empty dummy events that are used by the message system to spawn messages # that should be displayed as events, their descriptions are filled in by the message system letter_event = { id = 1 is_triggered_only = yes desc = "A" } character_event = { id = 2 is_triggered_only = yes desc = "B" } </pre> |- |} ==Testing== Testing is the process of checking your mod for bugs, including crashes, broken functionalities, or gameplay/balance issues. Tooling for testing include: *[[Console commands|In-game console]], with various debugging (or cheating...) features, in particular <code>play</code>, <code>testevent</code> and <code>event</code> commands. Note that the "debug_" console commands are currently disabled in retail builds. *Cheat mods, allowing to automate many console commands, or things not achievable or too complex via console commands. *Observer mode (<code>observe</code> console command), to check for game balance, and detect random CTDs over hundred of in-game years. ==References== <references/> {{ModdingNavbox}} [[Category:Modding]]
本页使用的模板:
Template:Clear
(
查看源代码
)
Template:ModdingNavbox
(
查看源代码
)
Template:Navbox
(
查看源代码
)
Template:Navboxgroup
(
查看源代码
)
Template:Version
(
查看源代码
)
返回
故障排除
。
×
登录
密码
记住登录
加入王国风云2百科
忘记密码?
其他方式登录