Skip to content

Instantly share code, notes, and snippets.

View krisk0's full-sized avatar

Dagoth Ur krisk0

  • Valenvaryon, Nirn
View GitHub Profile
@krisk0
krisk0 / CK3_bugs_discovered_by_krisk0.md
Last active November 21, 2025 12:12
List of bugs in Crusder Kimngs III scripts discovered by me

List of bugs in CK3 discovered by me.

Note to Paradox Development Studio

I attempted to report bugs via paradoxplaza. Unfortunately forum admin or forum robot did not let me in, presumably because of my IP address geo-location. I therefore report problems here.

How I discovered the bugs

I did not intentionally analyze base game scripts. I found some bugs when creating my mods.

@krisk0
krisk0 / 3001.patch
Created November 7, 2025 11:49
patch to CK3 1.18.0.2 script courtier_guest_management_events.txt
diff -purN a/courtier_guest_management_events.txt b/courtier_guest_management_events.txt
--- a/courtier_guest_management_events.txt 2025-11-07 14:38:00.000000000 +0300
+++ b/courtier_guest_management_events.txt 2025-11-07 14:43:52.000000000 +0300
@@ -918,10 +918,7 @@ courtier_guest_management.3001 = {
add = 150
}
modifier = {
- OR = {
- any_relation = { type = soulmate always = yes }
- is_married = yes
@krisk0
krisk0 / CK3_MOD_DRESS
Last active October 11, 2025 13:36
Automate CK3 .mod creation
#!/bin/bash
file_name=`find -maxdepth 1 -type d|grep -v '\.$'`
file_name=${file_name##./}
mod_name=`echo $file_name|sed 's:_: :g'`
mod_name=${mod_name^}
(
printf 'version="1.0"\ntags={\n\t"Fixes"\n}\n'
@krisk0
krisk0 / SANITIZE_md.py
Created September 15, 2025 12:51
Find .md files that contain non-ascii characters except long dash '—' and three dots '…'. If file 'some.md' needs sanitizing, save sanizitized version as 'some.ii'.
#!/usr/bin/python3
'''
Find all .md files that contain non-ascii characters excluding '—…'
If such file found, sanitize it and save as NAME.ii
'''
import glob, re
@krisk0
krisk0 / stub_liege_summons_interaction
Last active July 29, 2025 05:52
CK3 liege-summons-his-employeer character interaction with custom effects
summon_subject_interaction = {
category = realm
icon = "interaction_invite_to_court"
interaction_option_name = summon_subject_interaction
desc = summon_subject_interaction_desc
priority = 80 # 100 = max
popup_on_receive = yes
ai_min_reply_days = 1
ai_max_reply_days = 5
@krisk0
krisk0 / CK3_MOD_BOM
Created July 27, 2025 07:24
Prepare CK3 mod (insert UTF-8 BOM, remove 0xD, end-of-line spaces)
#!/bin/bash
kill_0D() {
perl -pi -e s/\\x0d//g $1
}
BOM_INSERT() {
sed -i '1s/^\(\xef\xbb\xbf\)\?/\xef\xbb\xbf/' $1
}
@krisk0
krisk0 / 15_nop_arm64.h
Created July 22, 2025 11:50
Macro to insert 15 different NOP's
#define dEbug(n) dEbug_##n();
#define dEbug_0() __asm__ __volatile__("mov x0, x0" ::: "memory")
#define dEbug_1() __asm__ __volatile__("mov x1, x1" ::: "memory")
#define dEbug_2() __asm__ __volatile__("mov x2, x2" ::: "memory")
#define dEbug_3() __asm__ __volatile__("mov x3, x3" ::: "memory")
#define dEbug_4() __asm__ __volatile__("mov x4, x4" ::: "memory")
#define dEbug_5() __asm__ __volatile__("mov x5, x5" ::: "memory")
#define dEbug_6() __asm__ __volatile__("mov x6, x6" ::: "memory")
#define dEbug_7() __asm__ __volatile__("mov x7, x7" ::: "memory")
@krisk0
krisk0 / krisk0_mods.md
Last active October 3, 2025 05:53
My Crusader kings mods; my load order
@krisk0
krisk0 / clauzewitz_override.py
Last active June 30, 2025 15:35
Clauzewitz mod override explorer. Shows which files are overridden. Meant for Linux/MacOS, will not work under Windows without modification
#!/usr/bin/python3
"""
Input: list of mod directories g_dd. The dirs should be in load order
Output: list of file overriden
"""
# The script probably will not work on Windows because of backslashes in file names
'''
@krisk0
krisk0 / filetypes.pdx.conf
Last active June 12, 2025 13:05
geany syntax definition for CK3 modding
[styling=Python]
[keywords]
primary=OR AND if else else_if limit trigger immediate option change_variable set_variable save_scope_as
identifiers=yes no scope root prev from this event_target any all none custom_tooltip type title desc name
[lexer_properties=Python]
[settings]
lexer_filetype=Python