Page 1 of 3 123 LastLast
Results 1 to 20 of 46

Thread: OfferedForMarriage event

  1. #1
    Titus le Chmakus's Avatar Biarchus
    Join Date
    Aug 2014
    Location
    Skiing on the Spine of the World or hunting in Lurkwood
    Posts
    648

    Default OfferedForMarriage event

    Yup

    I'd like to know when this event takes place ? Is it as soon as the offer pops up ? Or is it when you have accpeted the mariage ?

    In fact, what I need to know is : how can I trigger some traits to fire when the player marries one of his girls, so that the newcomer has chances to get the new traits ? I want it to fire when the player has already accepted the marriage. Same for OfferedForAdoption ...

    Thanks

  2. #2
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,096
    Blog Entries
    35

    Default Re: OfferedForMarriage event

    It takes place when the offer pops up: the traits for the guy being offered for adoption\marriage seem to be sure enough support of that.

    Linking the character to traits of his father in law isn't something I would give much of a chance unless it's via the spouse (SpouseTrait\Attribute condition), the adopting father however can be linked directly via the FatherTrait\Attribute\Anc condition.










  3. #3
    Titus le Chmakus's Avatar Biarchus
    Join Date
    Aug 2014
    Location
    Skiing on the Spine of the World or hunting in Lurkwood
    Posts
    648

    Default Re: OfferedForMarriage event

    No it is not a matter of Father trait or whatever. It is just that I've seen in the docudemon OfferedForMarriage and CharacterMarries. Any idea of the difference ? Same for OfferedForAdoption and BrotherAdopted ... ?

  4. #4
    Withwnar's Avatar Script To The Waist
    Join Date
    Oct 2008
    Location
    Earth
    Posts
    6,329

    Default Re: OfferedForMarriage event

    OfferedForMarriage = as Gigantus said: when the offer is made, which can be accepted or rejected.
    CharacterMarries = when the marriage actually happens, e.g. when you (or AI) agree to the offer.

    OfferedForAdoption = like OfferedForMarriage but for adoptions.
    BrotherAdopted = when someone is adopted this fires on the character(s) who are now his brothers, i.e. other son(s) of whoever adopted him.

  5. #5
    Titus le Chmakus's Avatar Biarchus
    Join Date
    Aug 2014
    Location
    Skiing on the Spine of the World or hunting in Lurkwood
    Posts
    648

    Default Re: OfferedForMarriage event

    Ok so I'd better use CharacterMarries.

    For the second one, is there an equivalent to CharracterMarries but for Adoption ? And the same for LesserGeneralOfferedForAdoption ? I really want them to get traits but I have some unexpected crashes that are not listed in my log. It is pretty weird as the game runs normally for some factions but it crashes with one of them, despite having the same triggers (faction specific).

  6. #6
    Titus le Chmakus's Avatar Biarchus
    Join Date
    Aug 2014
    Location
    Skiing on the Spine of the World or hunting in Lurkwood
    Posts
    648

    Default Re: OfferedForMarriage event

    Quote Originally Posted by Withwnar View Post
    OfferedForMarriage = as Gigantus said: when the offer is made, which can be accepted or rejected.
    CharacterMarries = when the marriage actually happens, e.g. when you (or AI) agree to the offer.

    OfferedForAdoption = like OfferedForMarriage but for adoptions.
    BrotherAdopted = when someone is adopted this fires on the character(s) who are now his brothers, i.e. other son(s) of whoever adopted him.
    Got questions finally regarding father trait !

    1/If I code
    Code:
    ;------------------------------------------
    Trigger school_student1
        WhenToTest OfferedForMarriage
    
        Condition AgentType = named character
            and FatherTrait IsInSettlementWithSchool > 0
              
        Affects GoodCommander  1  Chance  5
    Then, the father in law who has the Trait > 0 should not be tested as you said above.

    2/But if I code

    Code:
    ;------------------------------------------
    Trigger school_student1
        WhenToTest CharacterMarries
    
        Condition AgentType = named character
            and FatherTrait IsInSettlementWithSchool > 0
              
        Affects GoodCommander  1  Chance  5
    Will it work ? I mean, the character's father in law is now considered his "real" father by the game ... ? Is it the same with OfferedForAdoption / BrotherAdopted ? Is there a way to limit this trigger to fire only once ? Because if I use BrotherAdopted/CharacterMarries, it will fire every trurn ?

    3/ If I code

    Code:
    ;------------------------------------------
    Trigger school_student1
        WhenToTest AgentCreated
    
        Condition AgentType = named character
            and FatherTrait IsInSettlementWithSchool > 0
              
        Affects GoodCommander  1  Chance  5
    Will the game consider the characters being "created" if adopted or married ? I mean could I replace these 2 OfferedForAdoption and OfferedForMarriage with the only AgentCreated ? Or does it only fire when you recruit a general via Unit recruitment ?

    Thanks
    Last edited by Titus le Chmakus; May 30, 2018 at 05:29 AM.

  7. #7

    Default Re: OfferedForMarriage event

    2, Don't think a father in law is taken as the father like in a adoption. But there is the SpouseTrait for married generals if it can fit your plans. Marriage and adoption events can fire only once by character, so you are safe on that.
    3, It's a good question, but my guess would be no. Docudemon say, AgentCreated, 'an agent has been trained'.

  8. #8
    Withwnar's Avatar Script To The Waist
    Join Date
    Oct 2008
    Location
    Earth
    Posts
    6,329

    Default Re: OfferedForMarriage event

    1) I don't know who "father" is for that event. The would-be father or his current father.

    2) What do you mean "fire every turn"? It won't fire literally every turn. CharacterMarries only fires once on a character because he only marries once. BrotherAdopted could fire up to three times on a character: if he's the only son and his father adopts three sons.

    3) Not sure when AgentCreated fires on named character types. Maybe never. Possibly if you recruit a general_unit unit because this does create a named character. Somehow I doubt it fires as a result of marriage and adoptions but it would need to be tested.

  9. #9
    Titus le Chmakus's Avatar Biarchus
    Join Date
    Aug 2014
    Location
    Skiing on the Spine of the World or hunting in Lurkwood
    Posts
    648

    Default Re: OfferedForMarriage event

    3, It's a good question, but my guess would be no. Docudemon say, AgentCreated, 'an agent has been trained'.
    Yup, but named character is in the AgentType of the docudemon ... Got to try that then ! I'll tell you !

    For the rest, I think I will stick to CharacterComeOfAge and AgentCreated, if it is not possible to apply it to the 2 other conditions of Generals creation.

    Thanks

    Edit : Damn you were right, AgentCreated does not work eighther with AgentType = named character, nor with = general not with TrainedAgentType = named character, nor with = general

    Is there any way you can think of to appy traits to recruited generals ?
    Last edited by Titus le Chmakus; May 31, 2018 at 06:56 AM.

  10. #10

    Default Re: OfferedForMarriage event

    AgentCreated doesn't work on EDB recruited general either? Now this, is unexpected. The only non family named character I can have are the scripted ones, and I have quite lowered this kind of spawn since a while, but beside traits given in the spawn, the other triggers based on TurnStart/End, PostBattle ect, work normally for them too.

    But I thought the sons in law were your biggest issue for now? Can't you use the SpouseTrait? FatherTrait must work even on non princesses daughters?

  11. #11
    Titus le Chmakus's Avatar Biarchus
    Join Date
    Aug 2014
    Location
    Skiing on the Spine of the World or hunting in Lurkwood
    Posts
    648

    Default Re: OfferedForMarriage event

    AgentCreated doesn't work on EDB recruited general either?
    Nop, unfortunatly it does not ... Or at least I haven't found the right Event or Condition ... Maybe because the game considers you recruit the Bodyguards and not the general ...?

    TurnStart/End, PostBattle ect, work normally for them too.
    Yeah I bet so, but it is of no help to what I want to do ... In fact, I want the generals created in a certain city to benefit from some of the buildings present in the city. I have created a school (3 levels) and various churches (it is a fantasy world with a lot of gods, like the romans). So each time a character is created by any mean, I want him to gain some traits. This works with Coming of Age characters because Withwnar told me how to do :

    Trait
    Code:
    ;------------------------------------------
    Trait IsInSettlementWithSchool
        Characters family
        Hidden
    
        Level Schoolstudent
            Description Schoolstudent_desc
            EffectsDescription Schoolstudent_effects_desc
            Threshold  1

  12. #12
    Titus le Chmakus's Avatar Biarchus
    Join Date
    Aug 2014
    Location
    Skiing on the Spine of the World or hunting in Lurkwood
    Posts
    648

    Default Re: OfferedForMarriage event

    Trigger:
    Code:
    ;------------------------------------------
    Trigger school_father1
        WhenToTest CharacterTurnEndInSettlement
    
        Condition AgentType = named character
    
        Affects IsInSettlementWithSchool -1 Chance 100  ;this one is to reset the trait every turn, so that if you take the character out of the city,he won't have the trait anymore
    
    ;------------------------------------------
    Trigger school_father2
        WhenToTest CharacterTurnEndInSettlement
    
        Condition AgentType = named character
            and SettlementBuildingExists = school
    
        Affects IsInSettlementWithSchool 1 Chance 100  ;this one is to give the trait back to every general remaining in the cities with the right building
    Last edited by Titus le Chmakus; June 01, 2018 at 03:24 AM.

  13. #13
    Titus le Chmakus's Avatar Biarchus
    Join Date
    Aug 2014
    Location
    Skiing on the Spine of the World or hunting in Lurkwood
    Posts
    648

    Default Re: OfferedForMarriage event

    Then
    Code:
    ;------------------------------------------
    Trigger school_student1
        WhenToTest CharacterComesOfAge
    
        Condition AgentType = named character
            and FatherTrait IsInSettlementWithSchool > 0
              
        Affects GoodCommander  1  Chance  5
        Affects GoodAdministrator  1  Chance  5
        Affects Intelligent  1  Chance  5
        Affects StrategicSkill  1  Chance  5
        Affects Disciplinarian  1  Chance  5
        Affects InspiringSpeaker  1  Chance  5
        Affects RhetoricSkill  1  Chance  5
        Affects MathematicsSkill  1  Chance  5
        Affects PoliticsSkill  5  Chance  5
        Affects LogisticalSkill  1  Chance  5
    
    ;------------------------------------------
    Trigger school_student2
        WhenToTest CharacterComesOfAge
    
        Condition AgentType = named character
            and FatherTrait IsInSettlementWithSchool > 0
    
        Affects GoodFarmer  3  Chance  5
        Affects GoodMiner  1  Chance  5
        Affects GoodEngineer  1  Chance  5
        Affects GoodTrader  12  Chance  5
        Affects GoodBuilder  12  Chance  5
        Affects GoodTaxman  1  Chance  5
        Affects GoodManager 1  Chance  5
    But it only works for Coming of Age generals and I cannot use SpouseTrait, because the spouse can never be in the settlement (as she does not appear ingame, appart from the family tree) ...

    And I wanted to be able to code these very same triggers for the created generals, the adopted generals, the married generals and the lesser generals ... But this damn game cannot have the SettlementBuildingExists testing character_record ... It is very annoying to me !

  14. #14
    Withwnar's Avatar Script To The Waist
    Join Date
    Oct 2008
    Location
    Earth
    Posts
    6,329

    Default Re: OfferedForMarriage event

    From memory the point of the ComeOfAge one was that he, as a child, spent time in the settlement's school. Just curious: why would an adopted or married general (a man, who could be of any age) be 'schooled' simply because his would-be father is currently near a school? Seems to me whether he's schooled or not depends on how he spent his childhood. He might have gone to school, he might not, so it would be a random chance that he did.

  15. #15
    Titus le Chmakus's Avatar Biarchus
    Join Date
    Aug 2014
    Location
    Skiing on the Spine of the World or hunting in Lurkwood
    Posts
    648

    Default Re: OfferedForMarriage event

    True ! But as I need it for other traits, not related to schools but other building, that is why I ask !

  16. #16
    Withwnar's Avatar Script To The Waist
    Join Date
    Oct 2008
    Location
    Earth
    Posts
    6,329

    Default Re: OfferedForMarriage event

    So if, upon marriage or adoption, his new father is in a settlement with building X then this general gets a trait. Is that what you're trying to do?

  17. #17
    Titus le Chmakus's Avatar Biarchus
    Join Date
    Aug 2014
    Location
    Skiing on the Spine of the World or hunting in Lurkwood
    Posts
    648

    Default Re: OfferedForMarriage event

    Yup !

    And also to generals recruited via Bodyguards recruitment ...

  18. #18

    Default Re: OfferedForMarriage event

    I might tell you a foolisheness, it's the hit, my brain is getting slower in summer and all, but I still don't see the big difference between your adopted/recruited getting the trait right at their creation, or at TurnEnd? Especially if this school trait is supposed to be removed when they aren't in a shool settlement, like the 'fathers'?

    One thing I can tell:
    Code:
    ;------------------------------------------
    Trigger school_father1
        WhenToTest CharacterTurnEndInSettlement
    
        Condition AgentType = named character
        and Trait IsInSettlementWithSchool > 0
    
    
       Affects IsInSettlementWithSchool -1 Chance 100  ;this one is to reset the trait every turn, so that if you take the character out of the city,he won't have the trait anymore
    This will only work for character inside a settlement with no school. For characters on the outside, you need a other:
    Code:
    ;------------------------------------------
    Trigger school_father3
        WhenToTest CharacterTurnEnd
    
        Condition AgentType = named character
        and not EndedInSettlement
        and Trait IsInSettlementWithSchool > 0
    
       Affects IsInSettlementWithSchool -1 Chance 100  ;this one is to reset the trait every turn, so that if you take the character out of the city,he won't have the trait anymore
    
    You might want to add the condition Trait as I did, even if this trait has only one level, it's a good habit so that triggers don't fire for nothing.
    No idea if attributing traits to EDB recruits is actually possible at creation, your trials seem to say it's not. And as for adopted, well apparently not when one requirement is a specific building. This kind of things happen to me all the time, having to re-think things from a new angle because one event, condition or whatever doesn't exist or doesn't work as planned.

    So, if TurnEnd isn't good enough for the rest of your plans, you might want to think up a other condition which has nothing to do with buildings for adopted/married characters at creation? That's where I would be in your boots I guess, browsing docudemons for inspiration. Other times I move on to other features on work and inspiration come later.
    Last edited by selv; June 01, 2018 at 08:43 AM.

  19. #19
    Withwnar's Avatar Script To The Waist
    Join Date
    Oct 2008
    Location
    Earth
    Posts
    6,329

    Default Re: OfferedForMarriage event

    This will only work for character inside a settlement with no school. For characters on the outside, you need a other:
    That's true. Alternatively, just change that first original trigger to CharacterTurnEnd.

    No idea if attributing traits to EDB recruits is actually possible at creation, your trials seem to say it's not.
    Yeah, seems there's no relevant event for it to use as the WhenToTest. Not directly.

    This works...

    A new hidden trait:

    Code:
    ;------------------------------------------
    Trait IsNotANewlyRecruitedGeneral
        Characters family
        Hidden
    
        Level IsNotANewlyRecruitedGeneral
            Description IsNotANewlyRecruitedGeneral_desc
            EffectsDescription IsNotANewlyRecruitedGeneral_effects_desc
            Threshold  1
    
    ;------------------------------------------
    Trigger IsNotANewlyRecruitedGeneral_trigger1
        WhenToTest CharacterTurnStart
    
        Condition Trait IsNotANewlyRecruitedGeneral = 0
    
        Affects IsNotANewlyRecruitedGeneral 1 Chance 100
    
    ;------------------------------------------
    Trigger IsNotANewlyRecruitedGeneral_trigger2
        WhenToTest CharacterMarries
    
        Condition Trait IsNotANewlyRecruitedGeneral = 0
    
        Affects IsNotANewlyRecruitedGeneral 1 Chance 100
    
    ;------------------------------------------
    Trigger IsNotANewlyRecruitedGeneral_trigger3
        WhenToTest OfferedForAdoption
    
        Condition Trait IsNotANewlyRecruitedGeneral = 0
    
        Affects IsNotANewlyRecruitedGeneral 1 Chance 100
    
    ;------------------------------------------
    Trigger IsNotANewlyRecruitedGeneral_trigger4
        WhenToTest LesserGeneralOfferedForAdoption
    
        Condition Trait IsNotANewlyRecruitedGeneral = 0
    
        Affects IsNotANewlyRecruitedGeneral 1 Chance 100
    
    ;------------------------------------------
    Trigger RecruitedGeneral_trigger1
        WhenToTest CharacterTurnEndInSettlement
    
        Condition Trait IsNotANewlyRecruitedGeneral = 0
             ;and [building test or whatever can go here]
    
        Affects ...
    It works because unit recruitment (and therefore recruited general creation) happens before CharacterTurnEnd/CharacterTurnEndInSettlement. CharacterTurnStart has not yet fired upon him so he does not yet have the IsNotANewlyRecruitedGeneral trait. i.e. IsNotANewlyRecruitedGeneral = 0 means that he IS a newly recruited general.

    Everybody else starts 'life' (in this faction) with the IsNotANewlyRecruitedGeneral trait. No need for a ComesOfAge trigger because CharacterTurnStart will fire upon them before CharacterTurnEnd does. Whereas marriages and adoptions happen between TurnStart and TurnEnd so, without those triggers, RecruitedGeneral_trigger1 would think that they're recruited.

    EDIT: not the red trigger! See post 33.
    Last edited by Withwnar; June 06, 2018 at 04:27 AM.

  20. #20

    Default Re: OfferedForMarriage event

    Quote Originally Posted by Withwnar View Post
    This works...

    A new hidden trait:

    Code:
    ;------------------------------------------
    Trait IsNotANewlyRecruitedGeneral
        Characters family
        Hidden
    
        Level IsNotANewlyRecruitedGeneral
            Description IsNotANewlyRecruitedGeneral_desc
            EffectsDescription IsNotANewlyRecruitedGeneral_effects_desc
            Threshold  1
    
    ;------------------------------------------
    Trigger IsNotANewlyRecruitedGeneral_trigger1
        WhenToTest CharacterTurnStart
    
        Condition Trait IsNotANewlyRecruitedGeneral = 0
    
        Affects IsNotANewlyRecruitedGeneral 1 Chance 100
    
    ;------------------------------------------
    Trigger IsNotANewlyRecruitedGeneral_trigger2
        WhenToTest CharacterMarries
    
        Condition Trait IsNotANewlyRecruitedGeneral = 0
    
        Affects IsNotANewlyRecruitedGeneral 1 Chance 100
    
    ;------------------------------------------
    Trigger IsNotANewlyRecruitedGeneral_trigger3
        WhenToTest OfferedForAdoption
    
        Condition Trait IsNotANewlyRecruitedGeneral = 0
    
        Affects IsNotANewlyRecruitedGeneral 1 Chance 100
    
    ;------------------------------------------
    Trigger IsNotANewlyRecruitedGeneral_trigger4
        WhenToTest LesserGeneralOfferedForAdoption
    
        Condition Trait IsNotANewlyRecruitedGeneral = 0
    
        Affects IsNotANewlyRecruitedGeneral 1 Chance 100
    
    ;------------------------------------------
    Trigger RecruitedGeneral_trigger1
        WhenToTest CharacterTurnEndInSettlement
    
        Condition Trait IsNotANewlyRecruitedGeneral = 0
             ;and [building test or whatever can go here]
    
        Affects ...
    It works because unit recruitment (and therefore recruited general creation) happens before CharacterTurnEnd/CharacterTurnEndInSettlement. CharacterTurnStart has not yet fired upon him so he does not yet have the IsNotANewlyRecruitedGeneral trait. i.e. IsNotANewlyRecruitedGeneral = 0 means that he IS a newly recruited general.

    Everybody else starts 'life' (in this faction) with the IsNotANewlyRecruitedGeneral trait. No need for a ComesOfAge trigger because CharacterTurnStart will fire upon them before CharacterTurnEnd does. Whereas marriages and adoptions happen between TurnStart and TurnEnd so, without those triggers, RecruitedGeneral_trigger1 would think that they're recruited.
    I feel like a dwarf, in the company of a giant... Otherwise known as, if I was able to see further than the other men, it's because I stood on the shoulders of a giant...

    You must spread reputation before giving it again, on the other hand, is a much less fitting sentence.
    Last edited by selv; June 02, 2018 at 02:01 AM.

Page 1 of 3 123 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
  •