• 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.

faiuwle

Field Marshal
30 Badges
Sep 3, 2016
3.618
18
  • Crusader Kings II
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Republic
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Holy Fury
  • Crusader Kings II: Jade Dragon
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Reapers Due
  • Stellaris
  • Crusader Kings II: Conclave
  • Crusader Kings II: Horse Lords
  • Pillars of Eternity
  • Crusader Kings II: Way of Life
  • Europa Universalis III: Collection
  • Semper Fi
  • Majesty 2 Collection
  • Heir to the Throne
  • Magicka 2
  • Hearts of Iron III Collection
  • Hearts of Iron III: Their Finest Hour
  • Hearts of Iron III
  • For the Motherland
  • Divine Wind
  • Europa Universalis III
  • Cities in Motion 2
Will CK3 use the same general scripting language as CK2? I expect anything affecting the map or provinces will have to be completely redone, but will it use the same general model for things like events and decisions?
 
I'd hazard it'll have a similar general structure of events, decisions, etc. existing but the bread and butter of the actual scripts being rather different as in newer titles
 
  • 2
  • 1
Reactions:
Ehh, if the titles are different, that's something I'd expect. I'm more concerned with, is the general idea of nested scopes still present, is the syntax the same, are most of the scopes, commands, and conditions from CK2 scripting still present.
 
Ah, I meant "in newer titles" as in akin to the new syntaxes introduced in Imperator, Stellaris and co. :oops:
 
  • 2
  • 1
Reactions:
Ahh. I haven't modded for those games, but neither of them are sequels to an existing game which had an existing scripting syntax. Or are you saying that scripting is very similar in those two games, and the scripting for CK3 is likely to be the same?
 
A little bit of both, really. For example, here's an event from Imperator:
Code:
monarchy_events.1 = {
    type = country_event
    title = "monarchy_events.1.t"
    desc = "monarchy_events.1.desc"
    picture = proscription
 
    left_portrait = root.current_ruler
    right_portrait = scope:legitimacy_denier
 
    trigger = {
        is_monarchy = yes
        any_character = {
            is_pretender = yes
            exists = father
            NOT = {
                is_child_of = root.current_ruler
            }
            father = {
                exists = father
                NOT = {
                    is_child_of = root.current_ruler
                }
            }
            loyalty < 50
        }
        legitimacy > 10
    }
 
    immediate = {
        random_character = {
            limit = {
                is_pretender = yes
                exists = father
                loyalty < 50
                NOT = {
                    is_child_of = root.current_ruler
                }
                father = {
                    exists = father
                    NOT = {
                        is_child_of = root.current_ruler
                    }
                }
            }
            save_scope_as = legitimacy_denier
        }
    }
 
    option = { # ignore it
        name = "monarchy_events.1.a"
        add_legitimacy = subtract_legitimacy_large
    }
 
    option = { # publicly repudiate the claims
        name = "monarchy_events.1.b"
        remove_stability_effect = yes
        scope:legitimacy_denier = {
            add_loyalty = subtract_loyalty_medium
        }
    }
}
It's all perfectly understandable using only CK2's scripts as a reference, but there are still new things (like using a period as a delimiter to traverse scopes or the event ID and event type switching places in the declaration) which may throw some wrenches into the works.
 
  • 2
Reactions:
Ahh, thanks. I think that looks pretty good to me, if CK3 scripts will work like that. That dot operator will actually be very useful, so I think it would be worth the conversion to be able to use it in the future.
 
RIP PREVPREVPREV
 
Honestly, I'm kind of glad for that. Having to reference other scopes using PREV was really awkward and you could only do 4 PREVs in a row before they just stopped working, and then you have to completely rework your scope chain and save event targets and so forth to get around that.
 
Depends what type of mods for script and event mods the structure seems simmler enough for portrait and art mods it looks like your flat out of luck
 
Honestly, I'm kind of glad for that. Having to reference other scopes using PREV was really awkward and you could only do 4 PREVs in a row before they just stopped working, and then you have to completely rework your scope chain and save event targets and so forth to get around that.
CK2 Scripting or: How I Learned to Stop Worrying and Love FROMFROMFROMFROM :p
 
  • 2
Reactions:
Well, since at least in that Imperator script there is still root, there might still be a from, but hopefully instead of FROMFROMFROMFROM it will be something more reasonable like from.from.from.from with unlimited froms. The only places I really needed multiple FROMs in CK2 was when there was an on_action event that had some scope predefined as FROMFROM or FROMFROMFROM or something.
 
Well, since at least in that Imperator script there is still root, there might still be a from, but hopefully instead of FROMFROMFROMFROM it will be something more reasonable like from.from.from.from with unlimited froms. The only places I really needed multiple FROMs in CK2 was when there was an on_action event that had some scope predefined as FROMFROM or FROMFROMFROM or something.
And hopefully they'll have self-explanatory names now.