amtep / ck3-tiger Goto Github PK
View Code? Open in Web Editor NEWChecks Crusader Kings 3 user mod files for common mistakes and warns about them.
License: GNU General Public License v3.0
Checks Crusader Kings 3 user mod files for common mistakes and warns about them.
License: GNU General Public License v3.0
Currently vic3-tiger will output error(structure): expected value, found block
for using in-place script value block instead of a direct value, which is allowed in the game engine
Example:
s:STATE_ALSACE_LORRAINE = {
add_arable_land = {
value = region_state:FRA.arable_land
multiply = 0.5
}
}
ck3-tiger/vic3-tiger/src/lib.rs
Line 6 in 114cd89
This should be updated to 1.7.1 (or 1.7.3 if #120 is merged)
num_enemy_units
can be used like 'value triggers', while requiring input data scope inside parensname
property allows block to implement dynamic naming (just like those in desc
)limited_to_frontier_colonization
in law
is still not recognized by tigertrigger_event
can also trigger on_actions, like trigger_event = { on_action = XXX days = 1 }
subject_types
: can_be_used_in_sway_offers
(boolean), lower_autonomy_subject_type_alternatives
(array), same_autonomy_subject_type_alternatives
(array), higher_autonomy_subject_type_alternatives
(array), ai_value
(value block), can_target_with_transfer_wargoal
(boolean)on_researched
in technology
Scripted trigger courtier_guest_management_1001_exceptional_marriage_candidate_trigger in courtier_guest_management_events.txt throwing this error
[MOD] file events/courtier_guest_management_events/courtier_guest_management_events.txt
line 393 TIER >= scope:host.highest_held_title_tier
line 393 ^
ERROR (validation): expectedTIER =
or?=
, found>=
marriage_between_characters_unlocks_alliance_of_min_tier_trigger = {
MY_CHARACTER = scope:host
THEIR_CHARACTER = scope:marriage_candidate
TIER >= scope:host.highest_held_title_tier
}
Using a scoped trait in add_trait_xp effect causes a missing item error.
For example
add_trait_xp = {
trait = scope:trait
track = hunter
value = 10
}
This is a valid code. But gives an error(missing-item): trait scope:trait not defined in common/traits/
error.
modifier_
prefix any morescope:law
in can_impose
scope under law definitions produces law_type
instead of law
(However, scope:law
in ai_enact_weight_modifier
indeed produces law
, that is strange, but I've confirmed it under Debug Mode)
Colonization
technology for Kaurna, try to impose Colonial Exploitation
for it and you can see the correct tooltip, then change scope:law
to scope:law.type
in the law definition & restart (or hot reload), you'll get thousands of error log complaining about wrong scope typeScripted trigger pilgrimage_0500_valid_holy_site_trigger in pilgrimage_events.txt throwing this error
[MOD] file events/activities/pilgrimage_activity/pilgrimage_events.txt
line 285 this = capital_province.barony
line 285 ^
WARNING (scopes):barony
produces landed title but expected character
The line numbers may be slightly off as it is a edited event but the trigger is untouched vanilla
scripted_trigger pilgrimage_0500_valid_holy_site_trigger = {
#... we really shouldn't talk about the holy site we might be _in_ right now / invalid capital_province holy site
NOR = {
this = root.location.barony
AND = {
exists = capital_province
this = capital_province.barony
}
}
}
Currently tiger will accept scripted_button with no name
and desc
field. Such scripted_button will not trigger error logs, but will cause the game to crash after opening the journal entry containing it. So perhaps tiger should warn for this.
Hello!
So I decided to try to become a modder for ck3 and for the milestone in it I set the updating an old mod. However, I failed at setupping ck3-tiger correctly for days now 😔. I come to concussion that there may be a bug within tiger code because it would be very embarrassing if that was iust my fault and I'm apologizing already to for it🙏. So this is how i tried to launch it(I tried many ways, this error appears the most).
PS E:\Narzedzia do modow\ck3\tiger> .\ck3-tiger.exe --ck3 "c:/Games/Steam/steamapps/common/Crusader Kings III" "c:/Games/Steam/steamapps/workshop/content/1158310/2218620123/descriptor.mod"
This validator was made for Crusader Kings version 1.12.3 (Scythe).
If you are using a newer version of Crusader Kings, it may be inaccurate.
!! Currently it's inaccurate anyway because it's in beta state.
Using CK3 directory: c:/Games/Steam/steamapps/common/Crusader Kings III
Using mod directory: c:/Games/Steam/steamapps/workshop/content/1158310/2218620123
thread '<unnamed>' panicked at 'index out of bounds: the len is 13 but the index is 211', src\ck3\data\interaction_cats.rs:71:42
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
PS E:\Narzedzia do modow\ck3\tiger>
As I couldn't find the mentioned file src\ck3\data\interaction_cats.rs
in my ck3 directory so I tried by verifying integrity of files, no success. I don't know what to do I really want to make mods for this game and this tool seems essential to me. I would be very grateful for help.
Thanks for the reading and have a nice day!
I get these errors but this is vanilla syntax and it's used quite a lot throughout vanilla, with no error log complaints, so not sure if this is legal syntax or not.
line 19847 any_relation = { this = root }
line 19847 ^
ERROR (field-missing): required field `type` missing
country_can_have_mass_migration_to = [country scope]
: Not used in vanilla but has its localization in vanilla, and the engine still recognize itcan_be_used_in_sway_offers = [bool]
and sway_maneuvers_cost = [int]
: In common/diplomatic_actions
pop_consumption_can_add_infrastructure = [bool]
: In common/goods
I have a personal mod that is split over a couple of mods, also a few personal compatches.
I'm finding that running ck3-tiger over some of my mods, especially the compatches are throwing errors because ck3-tiger does not know about triggers, effects, modifiers, etc that are defined in other mods.
I personally think it would make the tool more useful if mods could be specified in an include = { } section in the conf file, so ck3-tiger could load them to resolve a lot of the associated errors.
ofc I would not want to see ck3-tiger actually process the include mods for errors/warning, just to use them as a source for resolution.
Currently errors from DLCs are always displayed, however I think these should be (almost) treated the same as those from the original game, thus also controlled by --show-vanilla
Currently tiger will emit "warning(logic): setting value here will overwrite the previous calculations" if you use value = xxx
in a script value's body (not the first line). This works for most situations, but it will cause false positive with save_temporary_value_as
Example:
da_value_max_3 = {
if = {
limit = { scope:_1 > scope:_2 }
if = {
limit = { scope:_1 > scope:_3 }
value = scope:_1
}
else = {
value = scope:_3
}
}
else_if = {
limit = { scope:_2 > scope:_3 }
value = scope:_2
}
else = { value = scope:_3 }
}
da_test_value = {
value = 100
save_temporary_value_as = _1
value = 200
save_temporary_value_as = _2
value = -100
save_temporary_value_as = _3
value = da_value_max_3
}
In this example, the paired value = xxx
and save_temporary_value_as = yyy
actually acts like passing parameters and then call a function, so perhaps we can suppress the warning if it follows a save_temporary_value_as
? Or simply treat save_temporary_value_as
as the start of a new script value?
The current main message for error(filename) is a constant 'file in unexpected directory', which has no effective information
Perhaps we could add the quoted filename and/or directory to the main message so that it can be filtered using text
For example, when I update my mod for a new version, I usually move some of my files/folders into a special .obsolete
folder, and I'd like tiger to only ignore files in this folder, however, due to the insufficient main message of error(filename), I can only ignore the whole filename
key
limited_to_frontier_colonization
in common/laws/00_colonial_affairs.txt
, with a boolean argument (not documented but used in original game file)show_as_unavailable
in all event options, it's actually a trigger block (not documented but can work)min_hiring_rate
, max_hiring_rate
, and ignores_productivity_when_hiring
in building_groups (documented in info and used in original game file)city_lights_color_index
in production_methods of urban center (not documented but used in origianl game file at least since 1.4.0)group
in jounal entries (documented and used)Can you please write version of the game to releases description? Like, I want to download a release for 1.8 version, what release should I download?
When using vic3-tiger
with --unused
switched on and with either --show-vanilla
switched on or off, the validator will output thousands of unused items, and most of them are in the vanilla game, also they're actually used.
In Victoria 3, the folder common/modifier
contains detailed modifiers which can be added directly to an entity (country, character, etc.)
While the folder common/modifier_type
contains modifier types that may be used in modifiers or something else, it can also be accessed via modifier:xxx
.
Currently, vic3-tiger outputs error(missing-item): modifier XXX not defined in common/modifiers/
when the mod accesses user-defined modifier types, however, actually it should read from common/modifier_types
to find user-defined modifier types
GUI field rightclicksound creates a false positive of being unknown.
While this field is not used in anywhere in vanilla CK3 GUI files, it is a valid parameter. As can be seen on Advanced Cheat Menu mod. (Shameless plug.)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.