• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.
Various parts are now in the latest CleanSlate commits on GitHub (see my signature). Relevant files are the following:
history\provinces\562 - Lykia.txt
common\cb_types\religious_cbs.txt
events\base_on_action_events.txt

Some of the reports above were from slightly modified files, to generate said Validator reports. Below some examples for the remaining parts:

In a province history file:

Code:
# 562 - Lykia
title = c_lykia
terrain = mountain

# All of the following work both outside and inside date clauses.
build_wonder = wonder_mausoleum_halicarnassus # Only one allowed
set_wonder_stage = 4
build_wonder_upgrade = upgrade_quadriga_statue # More than one upgrade can be added, but never more than one of the same type.
set_wonder_name = SOME_LOC_KEY
set_wonder_description = SOME_OTHER_LOC_KEY
add_custom_history = YET_ANOTHER_LOC_KEY # There could be multiple of these, all leaving entries in the wonder's history.
set_wonder_stage = 0 # Not useless, since it and the previous 'set_wonder_stage = 4' leave entries in the wonder's history.
destroy_wonder_upgrade = upgrade_quadriga_statue # Not useless, since it leaves an entry in the wonder's history.
destroy_wonder = yes # This is the only unreasonable effect here, since it removes any and all trace of the preceding effects.

A basic demonstration of has_army/navy/combat, wrapped in custom tooltips, because these generate no tooltips of their own.
Code:
some_character_scope = {
    custom_tooltip = { text = "Has an army in province 1950" has_unit = 1950 }
    custom_tooltip = { text = "Has a navy in province 1950" has_navy = 1950 }
    custom_tooltip = { text = "Has an army fighting in province 1950" has_combat = 1950 }
}

Further testing has shown that these four are available from character, religion, province, title and society scope, with further requirements that the Validator cannot be expected to account for (instead the modder should be expected to keep them in mind and carefully test, as always). I'm more than willing to provide these requirements and will likely update the wiki eventually, should you have further questions.
They work both as a left and right hand side (i.e. vassal_of = official_crusade_recipient and the Validator already recognises some of those being used this way (also see CleanSlate events HFP.41072 and HFP.49122 in HFP_crusade_events.txt). Some of these uses may be very niche (accessing them from society and title scope), but I can imagine potential mechanics using them.

Code:
official_crusade_recipient
crusade_target_char
crusader_king
crusade_target_title
For

official_crusade_recipient
crusade_target_char
crusader_king
crusade_target_title

They can be on the right hand side when expecting what on the RHS? Char, title, either, etc?
 
For

official_crusade_recipient
crusade_target_char
crusader_king
crusade_target_title

They can be on the right hand side when expecting what on the RHS? Char, title, either, etc?

The first three work when expecting a character, the last one when expecting a title. Thanks for the swift work!
 
The first three work when expecting a character, the last one when expecting a title. Thanks for the swift work!
Note that not all triggers/commands use the standard "title things" and "char things" for historical reasons, so you may have to report individual triggers/commands with the problem (e.g. crusade_target_title was already in "title things", so any commands/triggers not accepting them need to be changed to use "standard title things")
 
Found two bugs when trying to validate a converted imperator game/mod.

1. When trying to check for issues with titles as the Validator crashes when trying to validate titles only. (log attached)
2. Not sure if this is a bug or me not understanding information, but the validator points out things like this:

--- Error 1 of 1 ---
Parse Failure
Path: <mod>\decisions\ir_roman_title_decisions.txt
Approximate location: Line -1, column -1
Error: The file was not properly closed by a closing bracket.

I don't get how to look at -1, -1, AFAIK that's impossible so I'm assuming it's a bug (the file is closed properly as far as I can tell)
 

Attachments

  • log.txt
    37,4 KB · Views: 0
Found two bugs when trying to validate a converted imperator game/mod.

1. When trying to check for issues with titles as the Validator crashes when trying to validate titles only. (log attached)
2. Not sure if this is a bug or me not understanding information, but the validator points out things like this:

--- Error 1 of 1 ---
Parse Failure
Path: <mod>\decisions\ir_roman_title_decisions.txt
Approximate location: Line -1, column -1
Error: The file was not properly closed by a closing bracket.

I don't get how to look at -1, -1, AFAIK that's impossible so I'm assuming it's a bug (the file is closed properly as far as I can tell)
Please link the mod.

However, for the second issue, are you missing any closing brackets in the file? A good text editor can help you check.
 
Ah sorry, here's the mod.

As for brackets, I don't think so. I use notepad++ with a plugin that highlights stuff like that. I'll upload one of the smaller files that caused this issue. I'm expecting that it's me being blind now though haha.

Thanks for the speedy reply btw!
 

Attachments

  • Coritania.7z
    3,7 MB · Views: 0
  • 03_cultures_mr.txt
    6,4 KB · Views: 0
Ah sorry, here's the mod.

As for brackets, I don't think so. I use notepad++ with a plugin that highlights stuff like that. I'll upload one of the smaller files that caused this issue. I'm expecting that it's me being blind now though haha.

Thanks for the speedy reply btw!
What about the .mod file? I don't think it's included?
 
  • 1Like
Reactions:
My bad again (see it's stuff like this that makes me think it's user error somehow)

Zipped it because it wouldn't let me upload it otherwise.
In ir_roman_title_decisions.txt the end of the file needs 3 closing brackets; 1 for effect, 1 for irck2_create_k_dacia, and 1 for decisions. I recommend you figure out ways to use notepad++ more effectively, e.g. by clicking after a bracket and seeing if the bracket turns red (meaning it has a match) or not.

The crash is due to the number of parse errors along with bad parallelism code causing problems. The next version will improve parallelism to avoid the crash but fixing the parse errors seems like a good idea.
 
  • 1Like
Reactions:
In ir_roman_title_decisions.txt the end of the file needs 3 closing brackets; 1 for effect, 1 for irck2_create_k_dacia, and 1 for decisions. I recommend you figure out ways to use notepad++ more effectively, e.g. by clicking after a bracket and seeing if the bracket turns red (meaning it has a match) or not.

The crash is due to the number of parse errors along with bad parallelism code causing problems. The next version will improve parallelism to avoid the crash but fixing the parse errors seems like a good idea.
1. Entirely fair, this is "my" first mod for CK2 so I'm not very experienced. (in case you were curious, that's why a lot of files end with Ÿ. No idea why the converter did that). Sorry for reporting a false bug!

2. Thanks! Looks like hoofing my way through these errors will be a good way to properly learn how to mod.
 
@Jamie550 I think I've found a bug (in v1.38.3): ROOT is not recognised as a valid offmap power by the Validator, but it definitely works in-game. IE: This is a false positive error message.

(I can't easily check that the ai_will_do logic is actually working as intended in-game, but it's near-identical to the player logic, so I think it's a pretty safe assumption.)

--- Error 1 of 1 ---
At <mod>\common\scripted_triggers\expd_pdxrptg_artifact_triggers_daedric.txt [expd_pdxrptg_this_character_has_enough_offmap_currency_to_purchase_daedric_artifact_from_root\trigger_if\has_offmap_currency\offmap] (Line 403, column 27):
"ROOT" is not a valid OffmapPower.
* called from <mod>\decisions\ek_offmap_daedric_artifacts.txt [offmap_decisions\oblivion_weapon_skull_of_corruption\allow\FROM\expd_pdxrptg_this_character_has_enough_offmap_currency_to_purchase_daedric_artifact_from_root] (Line 1909, column 5)

--- Error 1 of 1 ---
At <mod>\common\scripted_effects\expd_pdxrptg_daedric_effects.txt [expd_pdxrptg_subtract_offmap_currency_to_purchase_daedric_artifact\if\add_offmap_currency\offmap] (Line 11, column 4):
"ROOT" is not a valid OffmapPower.
* called from <mod>\decisions\ek_offmap_daedric_artifacts.txt [offmap_decisions\oblivion_weapon_skull_of_corruption\effect\FROM\expd_pdxrptg_subtract_offmap_currency_to_purchase_daedric_artifact] (Line 1929, column 5)

--- Error 1 of 1 ---
At <mod>\common\scripted_triggers\expd_pdxrptg_artifact_triggers_daedric.txt [expd_pdxrptg_this_character_has_double_the_offmap_currency_needed_to_purchase_daedric_artifact_from_root\trigger_if\has_offmap_currency\offmap] (Line 423, column 27):
"ROOT" is not a valid OffmapPower.
* called from <mod>\decisions\ek_offmap_daedric_artifacts.txt [offmap_decisions\oblivion_weapon_skull_of_corruption\ai_will_do\modifier\FROM\expd_pdxrptg_this_character_has_double_the_offmap_currency_needed_to_purchase_daedric_artifact_from_root] (Line 1952, column 14)

The error is triggering for this scripted_effect (and similar scripted_triggers):
Code:
expd_pdxrptg_subtract_offmap_currency_to_purchase_daedric_artifact = {
    if = {
        limit = {
            # Audax Validator "." Ignore_NEXT
            is_immortal = yes
        }
        add_offmap_currency = {
            offmap = ROOT
            value = -7500
        }
    }
    else_if = {
        limit = {
            # Audax Validator "." Ignore_NEXT
            is_long_lived = yes
        }
        add_offmap_currency = {
            offmap = ROOT
            value = -5000
        }
    }
    else = {
        add_offmap_currency = {
            offmap = ROOT
            value = -2500
        }
    }
}

Example of an offmap decision which spawns loads of spurious errors:
Code:
offmap_decisions = {
    
    
    
    
    
    #Azura
    oblivion_azuras_star = {
        only_playable = yes
        button_name = offmap_boons
        ai_check_interval = 12
        
        from_potential = {
            has_dlc = "Jade Dragon"
            mercenary = no
            holy_order = no
            is_landed = yes
            is_adult = yes
            # Audax Validator "." Ignore_NEXT
            worships_azura = yes
        }
        
        potential = {
            # Audax Validator "." Ignore_NEXT
            is_offmap_tag = oblivion_azura
        }
        
        allow = {
            show_only_failed_conditions = yes
            FROM = {
                show_scope_change = no
                expd_pdxrptg_can_activate_daedric_artifact_azura = yes
                expd_pdxrptg_this_character_has_enough_offmap_currency_to_purchase_daedric_artifact_from_root = yes
                prisoner = no
                NOT = { trait = incapable }
                is_inaccessible_trigger = no
            }
            # Audax Validator "." Ignore_NEXT
            oblivion_azura_boon_decisions_enabled_trigger = yes
            ROOT = {
                expd_pdxrptg_this_daedric_lord_is_not_in_cataclysm = yes
                offmap_ruler = {
                    # Audax Validator "." Ignore_NEXT
                    has_artifact = azuras_star
                }
            }
        }
        
        effect = {
            FROM = {
                show_scope_change = no
                sound_effect = china_grace_spend
                expd_pdxrptg_subtract_offmap_currency_to_purchase_daedric_artifact = yes
            }
            hidden_effect = {
                ROOT = {
                    offmap_ruler = {
                        random_artifact = {
                            limit = {
                                # Audax Validator "." Ignore_NEXT
                                artifact_type = azuras_star
                            }
                            transfer_artifact = {
                                from = PREV
                                to = FROM
                            }
                        }
                    }
                }
            }
        }
        
        ai_will_do = {
            factor = 0.05 # Slow down
            modifier = {
                FROM = { expd_pdxrptg_this_character_has_double_the_offmap_currency_needed_to_purchase_daedric_artifact_from_root = yes }
                factor = 2
            }
            modifier = {
                FROM = { expd_pdxrptg_this_character_really_wants_a_daedric_artifact = yes }
                factor = 5
            }
            modifier = {
                FROM = { expd_pdxrptg_this_character_has_trait_dragonborn = yes }
                factor = 1000
            }
        }
    }

I've also attached a zip of the current version of the mod, in case you want to test it on your end. (It's a submod of someone else's Workshop mod, so you'll need to comment-out the dependency on the main mod before running the Validator.)
 

Attachments

  • expanded_decisions_pdxrptg.zip
    75,6 KB · Views: 0
And another issue with submods: It doesn't seem to be possible to suppress "duplicate ID" errors, where the main mod has overwritten something from vanilla (by replacing the entire folder) and my submod is overwriting the main mod.

--- Error 1 of 1 ---
Duplicate ID: nun
[1]: common\traits\02_traits.txt (289, 1)
[2]: <mod>\common\traits\expd_pdxrptg_16_misc_traits_unaltered.txt (310, 1)

I have set # Audax Validator "!" Ignore_NEXT at the top of the text file, and I have also set # Audax Validator "." Ignore_NEXT immediately above the modded version of the "nun" trait. But I'm still getting the error message.
 

Attachments

  • expd_pdxrptg_16_misc_traits_unaltered.txt
    26,1 KB · Views: 0
@Jamie550 I think I've found a bug (in v1.38.3): ROOT is not recognised as a valid offmap power by the Validator, but it definitely works in-game. IE: This is a false positive error message.

(I can't easily check that the ai_will_do logic is actually working as intended in-game, but it's near-identical to the player logic, so I think it's a pretty safe assumption.)

--- Error 1 of 1 ---
At <mod>\common\scripted_triggers\expd_pdxrptg_artifact_triggers_daedric.txt [expd_pdxrptg_this_character_has_enough_offmap_currency_to_purchase_daedric_artifact_from_root\trigger_if\has_offmap_currency\offmap] (Line 403, column 27):
"ROOT" is not a valid OffmapPower.
* called from <mod>\decisions\ek_offmap_daedric_artifacts.txt [offmap_decisions\oblivion_weapon_skull_of_corruption\allow\FROM\expd_pdxrptg_this_character_has_enough_offmap_currency_to_purchase_daedric_artifact_from_root] (Line 1909, column 5)

--- Error 1 of 1 ---
At <mod>\common\scripted_effects\expd_pdxrptg_daedric_effects.txt [expd_pdxrptg_subtract_offmap_currency_to_purchase_daedric_artifact\if\add_offmap_currency\offmap] (Line 11, column 4):
"ROOT" is not a valid OffmapPower.
* called from <mod>\decisions\ek_offmap_daedric_artifacts.txt [offmap_decisions\oblivion_weapon_skull_of_corruption\effect\FROM\expd_pdxrptg_subtract_offmap_currency_to_purchase_daedric_artifact] (Line 1929, column 5)

--- Error 1 of 1 ---
At <mod>\common\scripted_triggers\expd_pdxrptg_artifact_triggers_daedric.txt [expd_pdxrptg_this_character_has_double_the_offmap_currency_needed_to_purchase_daedric_artifact_from_root\trigger_if\has_offmap_currency\offmap] (Line 423, column 27):
"ROOT" is not a valid OffmapPower.
* called from <mod>\decisions\ek_offmap_daedric_artifacts.txt [offmap_decisions\oblivion_weapon_skull_of_corruption\ai_will_do\modifier\FROM\expd_pdxrptg_this_character_has_double_the_offmap_currency_needed_to_purchase_daedric_artifact_from_root] (Line 1952, column 14)

The error is triggering for this scripted_effect (and similar scripted_triggers):
Code:
expd_pdxrptg_subtract_offmap_currency_to_purchase_daedric_artifact = {
    if = {
        limit = {
            # Audax Validator "." Ignore_NEXT
            is_immortal = yes
        }
        add_offmap_currency = {
            offmap = ROOT
            value = -7500
        }
    }
    else_if = {
        limit = {
            # Audax Validator "." Ignore_NEXT
            is_long_lived = yes
        }
        add_offmap_currency = {
            offmap = ROOT
            value = -5000
        }
    }
    else = {
        add_offmap_currency = {
            offmap = ROOT
            value = -2500
        }
    }
}

Example of an offmap decision which spawns loads of spurious errors:
Code:
offmap_decisions = {
    
    
    
    
    
    #Azura
    oblivion_azuras_star = {
        only_playable = yes
        button_name = offmap_boons
        ai_check_interval = 12
        
        from_potential = {
            has_dlc = "Jade Dragon"
            mercenary = no
            holy_order = no
            is_landed = yes
            is_adult = yes
            # Audax Validator "." Ignore_NEXT
            worships_azura = yes
        }
        
        potential = {
            # Audax Validator "." Ignore_NEXT
            is_offmap_tag = oblivion_azura
        }
        
        allow = {
            show_only_failed_conditions = yes
            FROM = {
                show_scope_change = no
                expd_pdxrptg_can_activate_daedric_artifact_azura = yes
                expd_pdxrptg_this_character_has_enough_offmap_currency_to_purchase_daedric_artifact_from_root = yes
                prisoner = no
                NOT = { trait = incapable }
                is_inaccessible_trigger = no
            }
            # Audax Validator "." Ignore_NEXT
            oblivion_azura_boon_decisions_enabled_trigger = yes
            ROOT = {
                expd_pdxrptg_this_daedric_lord_is_not_in_cataclysm = yes
                offmap_ruler = {
                    # Audax Validator "." Ignore_NEXT
                    has_artifact = azuras_star
                }
            }
        }
        
        effect = {
            FROM = {
                show_scope_change = no
                sound_effect = china_grace_spend
                expd_pdxrptg_subtract_offmap_currency_to_purchase_daedric_artifact = yes
            }
            hidden_effect = {
                ROOT = {
                    offmap_ruler = {
                        random_artifact = {
                            limit = {
                                # Audax Validator "." Ignore_NEXT
                                artifact_type = azuras_star
                            }
                            transfer_artifact = {
                                from = PREV
                                to = FROM
                            }
                        }
                    }
                }
            }
        }
        
        ai_will_do = {
            factor = 0.05 # Slow down
            modifier = {
                FROM = { expd_pdxrptg_this_character_has_double_the_offmap_currency_needed_to_purchase_daedric_artifact_from_root = yes }
                factor = 2
            }
            modifier = {
                FROM = { expd_pdxrptg_this_character_really_wants_a_daedric_artifact = yes }
                factor = 5
            }
            modifier = {
                FROM = { expd_pdxrptg_this_character_has_trait_dragonborn = yes }
                factor = 1000
            }
        }
    }

I've also attached a zip of the current version of the mod, in case you want to test it on your end. (It's a submod of someone else's Workshop mod, so you'll need to comment-out the dependency on the main mod before running the Validator.)
In offmap power decisions, what is the root of allow/etc? Right now Validator says it is Char. Should it actually be an "offmapPower" scope?
 
In offmap power decisions, what is the root of allow/etc? Right now Validator says it is Char. Should it actually be an "offmapPower" scope?
The wiki has nothing to say on this point.

I checked ...\decisions\jd_grace_decisions.txt, and it seems like the base game exclusively uses ROOT in these decisions to mean "the governor of the western protectorate" (the only offmap power), not the offmap power itself.

And yet, my code (which assumes that ROOT is the offmap power) works:
20240714234426_1.jpg20240714234455_1.jpg20240714234512_1.jpg

And I verified that it's my code that's active here (not the base mod's code) by changing the amount that's charged for this interaction (from 7500 to 9876), and it still works:
20240714234914_1.jpg20240714234938_1.jpg20240714234946_1.jpg

...So now I'm confused. ROOT should either be the offmap power, or the governor, not both... right?!

Unless there's some kind of undocumented passthrough which means that ROOT can be either the governor or the offmap power depending on whether the command/condition is looking for a character or an offmap power?