+ Reply to Thread
Page 2 of 8 FirstFirst 1 2 3 4 ... LastLast
Results 21 to 40 of 143

Thread: Event scripting: tricks and traps explained

  1. #21
    Moderator Moderator Cat Lord's Avatar
    Crusader Kings IIEU3 CompleteDivine WindHeir to the ThroneMagicka
    Sword of the StarsMount & Blade: Warband

    Join Date
    May 2002
    Location
    Montpellier, France
    Posts
    10,828
    Quote Originally Posted by Orlando
    So are there a fixed number of polls per year or is the polling random?
    I am not sure to be honest.

    I would say there is between 1 and 4 polls a year, but I have never conducted extensive test to verify...

    Cat
    Pour l'histoire: Un concours original, La partie de ScrAARble

    "Le monde est un jeu de Go, dont les règles ont été inutilement compliquées"

    (proverbe chinois)

    Si l'on retranchait du patriotisme de la plupart des hommes la haine et le mépris des autres nations, il resterait peu de choses.
    [Duc de Lévis, "Maximes et réflexions"]

    Soyez attentif à mes posts de modérateur, ils sont de cette couleur / Be aware when I write a moderation post in this color.

  2. #22
    Hmm, interesting. Thanks for the information. I think if we did get flags in there we could attempt some non-random events, at least, assuming we ever wanted to. Doesn't look like anybody is really inclined in that direction at the moment.

  3. #23
    Hey,

    For character events is it possible to check conditions of other people in your court. For example I want to see if my wife has not type = fertility value = 1, then the event would fire giving the player an option to:

    effect = { type = death value = spouse }

  4. #24
    Field Marshal MrT's Avatar

    Join Date
    Dec 2001
    Location
    Out of exile
    Posts
    12,472
    Orlando: It's dynamic polling somewhat based on other demands on the processor so there isn't a fixed period or set polling frequency. Very roughly speaking, each event is tested for every available character and province about every 90 days on average. You are correct with regards to the general shape and intent of the event probability curve.

    Aquitaine: the event engine doesn't lend itself very well to fixed events in the way that EU2's does. This is very definitely a design decision to avoid predeterminism in the game and that philosophy is (IMO) unlikely to be changed...although it is possible that a flag could be offered at some point in the future.

    andrey0: there are a few characters in your court that can be tested in a character event - see the event effects.txt file for details.
    If I use this colour text or this one then I'm "speaking" as a moderator. Ignore at your peril.

    Please take a moment to register your copy of EU3. "The [EU3] registration key is not a copy protection measure, tragically people will always crack your copy protection. Rather it is a paying customer support measure. Rather than have the support forum swamped by people who pirate our games, we can make sure that our paying customers get their support quicker. Similarly with bug reports, we want to improve the things our paying customers want not the pirates. Finally we put that little icon below your avatar so that we see your feedback (both good and bad) we know that these are the things that our paying customers like (or dislike) and can use this information for future projects." - King

    Winner of the TOEE POTY 2003

  5. #25
    I think i got it, I will have an event for female chars that triggers when their fertility is low, this in effect will trigger the option for the husband to plan assasination if he wants to.
    But the only prob i c is the fertility trigger, type = fertility value = V, it says V is a float, so what would be a low value for fertility? Would this be fine:
    condition = {
    type = not
    value = {
    type = fertility value = 1}
    }


    MRT:
    this is the only one i c in event effects.txt:
    type = father_trait value = [trait type]
    as well as
    type = ruler_child

  6. #26
    Moderator Moderator Cat Lord's Avatar
    Crusader Kings IIEU3 CompleteDivine WindHeir to the ThroneMagicka
    Sword of the StarsMount & Blade: Warband

    Join Date
    May 2002
    Location
    Montpellier, France
    Posts
    10,828
    BTW, it is not possible for the moment to make an event happening on one character by checking condition on another character.

    Some combinations to manage to involve more than one character in a chain of events are very difficult to craft properly...

    For your first events, keep it simple, and try to make events those apply to the character who fires them

    Also, province event cannot fire character event, and vice-versa.

    Cat
    Pour l'histoire: Un concours original, La partie de ScrAARble

    "Le monde est un jeu de Go, dont les règles ont été inutilement compliquées"

    (proverbe chinois)

    Si l'on retranchait du patriotisme de la plupart des hommes la haine et le mépris des autres nations, il resterait peu de choses.
    [Duc de Lévis, "Maximes et réflexions"]

    Soyez attentif à mes posts de modérateur, ils sont de cette couleur / Be aware when I write a moderation post in this color.

  7. #27
    Quote Originally Posted by Cat Lord
    BTW, it is not possible for the moment to make an event happening on one character by checking condition on another character.

    Some combinations to manage to involve more than one character in a chain of events are very difficult to craft properly...

    For your first events, keep it simple, and try to make events those apply to the character who fires them

    Also, province event cannot fire character event, and vice-versa.

    Cat

    aww, you mean this isn't going to work?:

    #################################
    # Wife Wacking event #
    #################################

    character_event = {
    id = 100001

    trigger = {
    condition = { type = gender value = female }
    condition = {
    type = not
    value = {
    type = fertility value = 1}
    }
    }

    mean_time_to_happen = {
    months = 60
    }

    action_a = {#Try To hide your infidelity
    effect = { type = trigger for = spouse value = 100002}
    }
    }


    character_event = {
    id = 100002
    picture = "event_intrigue"

    action_a = {#I have no more use for you
    effect = { type = death value = spouse }
    }
    }

  8. #28
    Moderator Moderator Cat Lord's Avatar
    Crusader Kings IIEU3 CompleteDivine WindHeir to the ThroneMagicka
    Sword of the StarsMount & Blade: Warband

    Join Date
    May 2002
    Location
    Montpellier, France
    Posts
    10,828
    No, in fact it will.

    Never realise "spouse" was a valid target char.

    But you are right, it is in event 1194 in Claims_Events.txt...

    Code:
    action_a = {#Behead her and punish the deceitful man
    		ai_chance = 50
    		effect = { type = add_title_claim value = random_neighbor }
    		effect = { type = death value = spouse }
    		effect = { type = add_trait value = vengeful }
    	}
    Thanks,

    Cat
    Pour l'histoire: Un concours original, La partie de ScrAARble

    "Le monde est un jeu de Go, dont les règles ont été inutilement compliquées"

    (proverbe chinois)

    Si l'on retranchait du patriotisme de la plupart des hommes la haine et le mépris des autres nations, il resterait peu de choses.
    [Duc de Lévis, "Maximes et réflexions"]

    Soyez attentif à mes posts de modérateur, ils sont de cette couleur / Be aware when I write a moderation post in this color.

  9. #29
    Moderator Moderator Cat Lord's Avatar
    Crusader Kings IIEU3 CompleteDivine WindHeir to the ThroneMagicka
    Sword of the StarsMount & Blade: Warband

    Join Date
    May 2002
    Location
    Montpellier, France
    Posts
    10,828
    What I was having in mind is, for example, events those happen to the ruler, checking the attribute/traits of his Marshal, or any other courtier.

    Those combination are not working, because the ruler of a courtier is not his liege (they are not his "vassals" in the game mechanism), and also court position are valid conditions, but they are no target char.

    Cat
    Pour l'histoire: Un concours original, La partie de ScrAARble

    "Le monde est un jeu de Go, dont les règles ont été inutilement compliquées"

    (proverbe chinois)

    Si l'on retranchait du patriotisme de la plupart des hommes la haine et le mépris des autres nations, il resterait peu de choses.
    [Duc de Lévis, "Maximes et réflexions"]

    Soyez attentif à mes posts de modérateur, ils sont de cette couleur / Be aware when I write a moderation post in this color.

  10. #30
    Games Player steveh11's Avatar
    Crusader Kings IIDivine WindFor the MotherlandHearts of Iron IIIHOI3: Their Finest Hour
    Heir to the ThroneEuropa Universalis III: In NomineEU3 Napoleon's AmbitionRome GoldSemper Fi
    SengokuVictoria 2Victoria II: A House DividedVictoria II: Heart of DarknessCK2: Holy Knight
    EU3 Collectors Edition500k clubEuropa Universalis IV: Pre-order

    Join Date
    Jun 2001
    Location
    EU, EU2, CK, Vicky, HOI, HOI2, et al...
    Posts
    1,885
    OK Guys, a question:

    Is it possible to fire one-or-more province (or character, I suppose) events from one main event?

    I like to write in subroutines if at all possible, you see.

    So, I'd like to write a 'top level' event that 'calls' >1 sub-events.

    In EU2 or HOI, or Victoria, this was easy enough. Is there an equivalent syntax in CK?

    Steve.
    "Nature always obeys her own laws"
    - Leonardo da Vinci

  11. #31
    Moderator Moderator Cat Lord's Avatar
    Crusader Kings IIEU3 CompleteDivine WindHeir to the ThroneMagicka
    Sword of the StarsMount & Blade: Warband

    Join Date
    May 2002
    Location
    Montpellier, France
    Posts
    10,828
    There are no "main" event.

    There are either character or province events.

    You can fire a character event from another character event, providing you use:

    - either the character ID (which is useless apart at the beginning of scenario when you know a character exists and which ID he has)

    - a valid [target char] (see the list in event_effect.txt, the list is slightly incomplete)

    You cannot fire a province event from another province event (but there are "spread" events from provinces to provinces)

    You cannot fire a province event from a character event (but there is a syntax to have effect on provinces of you are a ruler)

    You cannot fire a character event from a province event (but there is a syntax to have some effect on the province's ruler).

    Cat
    Pour l'histoire: Un concours original, La partie de ScrAARble

    "Le monde est un jeu de Go, dont les règles ont été inutilement compliquées"

    (proverbe chinois)

    Si l'on retranchait du patriotisme de la plupart des hommes la haine et le mépris des autres nations, il resterait peu de choses.
    [Duc de Lévis, "Maximes et réflexions"]

    Soyez attentif à mes posts de modérateur, ils sont de cette couleur / Be aware when I write a moderation post in this color.

  12. #32
    Major Wilhelm II.'s Avatar

    Join Date
    Dec 2003
    Location
    good old europe
    Posts
    772
    Another question:
    What's with the event desription?
    Is it like in other games "name = description" or must it be in the
    event_text.csv(i hope not )?
    Wilhelm II. (1859-1941)
    ---------------------------------------------------
    German emperor and king of Prussians (1888-1918)
    „Aus dem Deutschen Reich ist ein Weltreich geworden.“ – Wilhelm II., Kaiser, 18. Jan. 1896


    Try the Event Creator for CK
    Scenario Attribute Ranomizer for CK
    ---------------------------------------------------
    CK beta wannabe

  13. #33
    Sergeant Orlando's Avatar
    EU3 CompleteDivine WindHeir to the ThroneEuropa Universalis: RomeVictoria 2
    Europa Universalis IV

    Join Date
    Dec 2002
    Location
    La Laguna
    Posts
    92
    Quote Originally Posted by Wilhelm II.
    Another question:
    What's with the event desription?
    Is it like in other games "name = description" or must it be in the
    event_text.csv(i hope not )?
    For what I've tried, you can do it either way

  14. #34
    Moderator Moderator Cat Lord's Avatar
    Crusader Kings IIEU3 CompleteDivine WindHeir to the ThroneMagicka
    Sword of the StarsMount & Blade: Warband

    Join Date
    May 2002
    Location
    Montpellier, France
    Posts
    10,828
    Quote Originally Posted by Wilhelm II.
    Another question:
    What's with the event desription?
    Is it like in other games "name = description" or must it be in the
    event_text.csv(i hope not )?
    Alas, it's only in the .csv file.

    But you shouldn't be using event_text.csv, but extra_text.csv instead.

    Cheers,

    Cat
    Pour l'histoire: Un concours original, La partie de ScrAARble

    "Le monde est un jeu de Go, dont les règles ont été inutilement compliquées"

    (proverbe chinois)

    Si l'on retranchait du patriotisme de la plupart des hommes la haine et le mépris des autres nations, il resterait peu de choses.
    [Duc de Lévis, "Maximes et réflexions"]

    Soyez attentif à mes posts de modérateur, ils sont de cette couleur / Be aware when I write a moderation post in this color.

  15. #35
    Moderator Moderator Cat Lord's Avatar
    Crusader Kings IIEU3 CompleteDivine WindHeir to the ThroneMagicka
    Sword of the StarsMount & Blade: Warband

    Join Date
    May 2002
    Location
    Montpellier, France
    Posts
    10,828
    Quote Originally Posted by Orlando
    For what I've tried, you can do it either way
    Oh good !

    I am wrong then

    Cat

    PS: In fact I think I never tried in CK, I always used the .csv file, because our events will get translated at some point...
    Pour l'histoire: Un concours original, La partie de ScrAARble

    "Le monde est un jeu de Go, dont les règles ont été inutilement compliquées"

    (proverbe chinois)

    Si l'on retranchait du patriotisme de la plupart des hommes la haine et le mépris des autres nations, il resterait peu de choses.
    [Duc de Lévis, "Maximes et réflexions"]

    Soyez attentif à mes posts de modérateur, ils sont de cette couleur / Be aware when I write a moderation post in this color.

  16. #36
    Major Wilhelm II.'s Avatar

    Join Date
    Dec 2003
    Location
    good old europe
    Posts
    772
    That are good news!
    Wilhelm II. (1859-1941)
    ---------------------------------------------------
    German emperor and king of Prussians (1888-1918)
    „Aus dem Deutschen Reich ist ein Weltreich geworden.“ – Wilhelm II., Kaiser, 18. Jan. 1896


    Try the Event Creator for CK
    Scenario Attribute Ranomizer for CK
    ---------------------------------------------------
    CK beta wannabe

  17. #37
    Major Wilhelm II.'s Avatar

    Join Date
    Dec 2003
    Location
    good old europe
    Posts
    772
    Quote Originally Posted by Cat Lord
    Oh good !

    I am wrong then

    Cat

    PS: In fact I think I never tried in CK, I always used the .csv file, because our events will get translated at some point...
    Does this mean we will get more events with next patch/DEM?
    Would be a cool thing!
    Wilhelm II. (1859-1941)
    ---------------------------------------------------
    German emperor and king of Prussians (1888-1918)
    „Aus dem Deutschen Reich ist ein Weltreich geworden.“ – Wilhelm II., Kaiser, 18. Jan. 1896


    Try the Event Creator for CK
    Scenario Attribute Ranomizer for CK
    ---------------------------------------------------
    CK beta wannabe

  18. #38
    Major Wilhelm II.'s Avatar

    Join Date
    Dec 2003
    Location
    good old europe
    Posts
    772
    Another important question -> Is there currently an event command to end a crusade(like crusade=no or end)?
    If not it would be great if it will be added with next DEM!
    Wilhelm II. (1859-1941)
    ---------------------------------------------------
    German emperor and king of Prussians (1888-1918)
    „Aus dem Deutschen Reich ist ein Weltreich geworden.“ – Wilhelm II., Kaiser, 18. Jan. 1896


    Try the Event Creator for CK
    Scenario Attribute Ranomizer for CK
    ---------------------------------------------------
    CK beta wannabe

  19. #39
    Moderator Moderator Cat Lord's Avatar
    Crusader Kings IIEU3 CompleteDivine WindHeir to the ThroneMagicka
    Sword of the StarsMount & Blade: Warband

    Join Date
    May 2002
    Location
    Montpellier, France
    Posts
    10,828
    Quote Originally Posted by Wilhelm II.
    Another important question -> Is there currently an event command to end a crusade(like crusade=no or end)?
    If not it would be great if it will be added with next DEM!
    Crusades are hard-coded, not triggered or ended by events.

    Cat
    Pour l'histoire: Un concours original, La partie de ScrAARble

    "Le monde est un jeu de Go, dont les règles ont été inutilement compliquées"

    (proverbe chinois)

    Si l'on retranchait du patriotisme de la plupart des hommes la haine et le mépris des autres nations, il resterait peu de choses.
    [Duc de Lévis, "Maximes et réflexions"]

    Soyez attentif à mes posts de modérateur, ils sont de cette couleur / Be aware when I write a moderation post in this color.

  20. #40
    Games Player steveh11's Avatar
    Crusader Kings IIDivine WindFor the MotherlandHearts of Iron IIIHOI3: Their Finest Hour
    Heir to the ThroneEuropa Universalis III: In NomineEU3 Napoleon's AmbitionRome GoldSemper Fi
    SengokuVictoria 2Victoria II: A House DividedVictoria II: Heart of DarknessCK2: Holy Knight
    EU3 Collectors Edition500k clubEuropa Universalis IV: Pre-order

    Join Date
    Jun 2001
    Location
    EU, EU2, CK, Vicky, HOI, HOI2, et al...
    Posts
    1,885
    Quote Originally Posted by Cat Lord
    There are no "main" event.

    There are either character or province events.

    You can fire a character event from another character event, providing you use:

    - either the character ID (which is useless apart at the beginning of scenario when you know a character exists and which ID he has)

    - a valid [target char] (see the list in event_effect.txt, the list is slightly incomplete)

    You cannot fire a province event from another province event (but there are "spread" events from provinces to provinces)

    You cannot fire a province event from a character event (but there is a syntax to have effect on provinces of you are a ruler)

    You cannot fire a character event from a province event (but there is a syntax to have some effect on the province's ruler).

    Cat
    Oh. Bother
    "Nature always obeys her own laws"
    - Leonardo da Vinci

+ Reply to Thread
Page 2 of 8 FirstFirst 1 2 3 4 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts