Skip to content
Richard Braakman edited this page Oct 11, 2024 · 29 revisions

Ideas for potential checks

General

  • for the various parameters defined in for example innovations, check that they are used somewhere
  • calculate the possible output range of script values, so that they can be warned about, similar to vd.numeric_range. Of course it's not always possible to calculate the range, especially with nested script values.
  • root.set_variable doesn't work; an effect can't be chained to a scope. Suggest root = { set_variable ... } instead of just complaining about unknown token.
  • Some code (in scripted_lists and in lifestyles) is not allowed to use scripted content in its triggers
  • When using a scripted trigger in an effect, don't just say unknown token. Say this is a trigger and it should be in a limit field.
  • Certain script values are referenced in code; check that they are defined and have the right scopes.
  • It should be possible to follow scope definitions through on_actions and events and make sure every scope: reference is one that was set in previous code.
  • There are now a bunch of scopes that have "Execute Effects: no" in event_scopes.log. Check that those aren't used in effects (especially including the set_variable effect).
  • Warn if a modifier has triggers but no add or factor
  • Warn about trying to override individual events
  • Warn about reusing phase names in struggles
  • Verify for exactly which iterators even_if_dead works, and warn about the rest
  • Mark province ids that are not represented on provinces.png, and warn if their prov ids are used
  • Warn about if/else_if sequences where the limit blocks are identical, or where the effects are identical
  • Warn about duplicate events in on_actions
  • Warn if trying to use a vassal effect on what may be an independent ruler, such as when doing has_vassal_stance inside any_ruler. This is a tricky one.
  • Warn about duplicate triggers in a list of triggers
  • Warn if a duel does not use scope:duel_value anywhere

Advice

  • 50 = 0 in random_list is invalid, suggest 50 = {} instead
  • sometimes you want an any_ list with empty trigger. User might try any_... = yes, but it should be any_... = {}
  • If script does scope:something = { random_mercenary_company ... } where the iterator is a global iterator, it might be that they mistakenly thought the iterator was for that scope. Advise them that the scope:something is redundant.
  • The error.log complains if an interaction category has no common interactions. Make that a static check.
  • When a game update removes a datatype function or promote, give specific advice about it being removed instead of just saying it doesn't exist. Where possible, suggest a new function to use.

GUI

  • ck3 crashes if you have multiple objects with resizeparent in one parent
  • also crashes if both parent and child container have resizeparent
  • Can't do datacontext = [Character.GetLiege] if your datacontext is already Character (and more generally, writing the datacontext you're already in)
  • Warn if trying to use a saved scope inside a branch of Select_CString or Select_Localization

Tooltips

  • create_character is not executed during tooltip generation, so the scope it creates won't exist yet. Suggest hidden_effect_new_object.
  • iterators should have a custom = to summarize the iterator. ("All infidel counties:" for example)
  • Check for duplicate traits in stress_impact. They cause duplicate tooltips and probably indicate a logic error as well

Performance

  • Doing if = { limit = { in an iterator is often redundant, you can do limit = { directly in the iterator instead.
  • Warn about nested AND in a trigger that's already AND, or a double nested OR.
  • every_living_character with a limit that restricts it to rulers, or to players, can be made more performant by using a more restrictive iterator.

Maps

  • Check resolution and graphics format for all the pngs in map_data
  • Check that heightmap.png is not newer than indirection_heightmap.png and packed_heightmap.png
  • map dimensions should be multiple of 32x32

History

  • title history: Warn if one character gets multiple different lieges on the same day

Gfx

  • CK3 needs all of its bones to be oriented y+ in rest position

Features

  • The games have their version in field rawVersion of launcher/launcher-settings.json in their steamapp dir. We can use that to check if the version matches with what tiger expects.
  • Some kind of "#tiger: ignore(...)" syntax in the script to turn off specific warnings for the next blockitem.

Crashes

  • If you try to use scripted triggers in music files it will crash on startup
  • scripted_triggers in the dynasty legacy tracks too, though individual perks are fine
  • Sometimes the error.log complains about not being able to generate a default coa for a title or a dynasty due to missing information. It doesn't mention that this is also a crashing bug. Would be nice if tiger can catch it.
Clone this wiki locally