Page 1 of 2 12 LastLast
Results 1 to 20 of 34

Thread: needs a living character?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,682
    Blog Entries
    35

    Default needs a living character?

    Anyone got an idea why my trigger causes an error? I am testing for a character with an army before testing for the percentage. Have I forgotten something? "baggage" is the attribute of a unit in the EDU.

    Code:
    Trigger Verpflegung
    WhenToTest CharacterTurnStart
        Condition IsGeneral
        and FactionIsLocal
        and PercentageUnitAttribute baggage > 0
    
        Affects Verpflegung 1 chance  100
    Code:
    21:10:29.322 [game.script] [error] Trigger processing error in <Verpflegung> 
    : PercentageUnitAttribute needs a living character with an army.










  2. #2
    Aikanár's Avatar no vaseline
    Join Date
    Mar 2009
    Location
    Sanctuary
    Posts
    12,516
    Blog Entries
    3

    Default Re: needs a living character?


    Have you tryed to substitute FactionIsLocal with CharacterIsLocal and if so to what result?


    Son of Louis Lux, brother of MaxMazi, father of Squeaks, Makrell, Kaiser Leonidas, Iskar, Neadal, Sheridan, Bercor and HigoChumbo, house of Siblesz

    Not everything that counts can be counted, and not everything that can be counted counts.

  3. #3

    Default Re: needs a living character?

    Maybe this:
    Code:
    Trigger Verpflegung
    WhenToTest CharacterTurnStart
        Condition CharacterIsLocal
        and IsGeneral
        and TimeWithArmy >= 1
        and PercentageUnitAttribute baggage > 0
    
        Affects Verpflegung 1 chance  100

  4. #4

    Default Re: needs a living character?

    maybe you have a general whitout army and because it need a army it crash. try whit and IsFactionLeader

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

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,682
    Blog Entries
    35

    Default Re: needs a living character?

    It doesn't crash, just an annoying error message in my otherwise pristine log.

    According to the Docudemons "IsGeneral" tests if a character has an army. I will try with "TimeWithArmy" but I have my doubts.
    "CharacterIsLocal" is worth a try as well.


    TimeWithArmy doesn't work, must be for agents
    CharacterIsLocal works, but error message remains
    Last edited by Gigantus; November 28, 2010 at 08:00 PM.










  6. #6
    /|\/|\/|\/|\/|\/|\/
    Join Date
    Jun 2005
    Posts
    10,770

    Default Re: needs a living character?

    Maybe add:

    and not EndedInSettlement

    Just thinking perhaps a garrison doesn't count as an army.
    Last edited by Taiji; November 28, 2010 at 08:40 PM.

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

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,682
    Blog Entries
    35

    Default Re: needs a living character?

    It does need an army to fire in the first place, problem is, that IsGeneral is supposed to test if the character has an army.
    There are no negative effects of the error if a character hasn't got an army.

    My thought: this was originally only for battle (where every general has an army), hence it hasn't got a proper check.










  8. #8
    /|\/|\/|\/|\/|\/|\/
    Join Date
    Jun 2005
    Posts
    10,770

    Default Re: needs a living character?

    I think your thought may be right. It's potentially very useful in battle scripting, so it might be restricted to it.

    Note:

    Identifier: IsGeneral
    Trigger requirements: character_record
    Parameters: None
    Sample use: IsGeneral
    Description: Test to see if the character can command a land army
    Battle or Strat: Either
    Class: CHARACTER_IS_GENERAL
    Implemented: Yes
    Author: Lee

    It only tests if the character is capable of command. So generals and family, no agents.
    Last edited by Taiji; November 28, 2010 at 08:52 PM.

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

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,682
    Blog Entries
    35

    Default Re: needs a living character?

    Something like "HasArmy" would be helpful here.










  10. #10

    Default Re: needs a living character?

    Identifier: IsAdmiral
    Trigger requirements:
    character_record
    Parameters: None
    Sample use: IsAdmiral
    Description: Test to see if the character has an army
    Battle or Strat:
    Either
    Class:
    CHARACTER_IS_ADMIRAL

    maybe this work.
    Last edited by wolf-yop; November 29, 2010 at 01:50 AM.

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

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,682
    Blog Entries
    35

    Default Re: needs a living character?

    Same as IsGeneral, just for an admiral (fleet).










  12. #12

    Default Re: needs a living character?

    I think there is no solution, even if you have a condition HasArmy because if its not true the trigger still will check the condition PercentUnitAttribute for all generals and then you will have the error. If IsGeneral work like you wanted then you will cant give traits to generals whitout army.

    Whit this PercentageUnitCategory Infantry > 0 before the PercentUnitAttribute still gives error. You will need whentotest character(whitarmy)turnstart
    Last edited by wolf-yop; November 29, 2010 at 06:27 AM.

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

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,682
    Blog Entries
    35

    Default Re: needs a living character?

    Guess I will have to live with those spots in my otherwise pristine log, sigh...










  14. #14
    Aikanár's Avatar no vaseline
    Join Date
    Mar 2009
    Location
    Sanctuary
    Posts
    12,516
    Blog Entries
    3

    Default Re: needs a living character?

    Hm, since TimeWithArmy works for agents and checks the character_record, why not abandon the IsGeneral condition all together and use AgentType = general ?


    Son of Louis Lux, brother of MaxMazi, father of Squeaks, Makrell, Kaiser Leonidas, Iskar, Neadal, Sheridan, Bercor and HigoChumbo, house of Siblesz

    Not everything that counts can be counted, and not everything that can be counted counts.

  15. #15

    Icon1 Re: needs a living character?

    Quote Originally Posted by Aikanár View Post
    Hm, since TimeWithArmy works for agents and checks the character_record, why not abandon the IsGeneral condition all together and use AgentType = general ?
    Good idea Aikanár. That might work:
    Code:
    Trigger Verpflegung
    WhenToTest CharacterTurnStart
        Condition CharacterIsLocal
        and AgentType >= general
        and TimeWithArmy >= 1
        and PercentageUnitAttribute baggage > 0
    
        Affects Verpflegung 1 chance  100

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

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,682
    Blog Entries
    35

    Default Re: needs a living character?

    I will give it a spin.

    Edit: summary

    AgentType = general
    - tests for a captain, needs 'named character'

    TimeWithArmy
    - does not fire with named character

    Back to square one
    Last edited by Gigantus; November 30, 2010 at 12:16 AM.










  17. #17
    Aikanár's Avatar no vaseline
    Join Date
    Mar 2009
    Location
    Sanctuary
    Posts
    12,516
    Blog Entries
    3

    Default Re: needs a living character?

    dang!


    Son of Louis Lux, brother of MaxMazi, father of Squeaks, Makrell, Kaiser Leonidas, Iskar, Neadal, Sheridan, Bercor and HigoChumbo, house of Siblesz

    Not everything that counts can be counted, and not everything that can be counted counts.

  18. #18
    Swagger's Avatar Imperial Coffee-Runner
    Join Date
    Apr 2007
    Location
    Portugal
    Posts
    12,453

    Default Re: needs a living character?

    and not AgentType = heretic
    excluding 1 [crap character] automaticly makes the engine accept all others.

    Code:
    Trigger Verpflegung
    WhenToTest CharacterTurnStart
        Condition FactionIsLocal
        and not AgentType = heretic
        and PercentageUnitAttribute baggage > 0
    
        Affects Verpflegung 1 chance  100
    Last edited by Swagger; December 01, 2010 at 11:16 AM.
    Under the Patronage of the Dreadful cedric37!
    Ancs Guide, Emergent Factions , Yes/No Events |L'Outremer for Modders| Swagger's Skymod


  19. #19
    /|\/|\/|\/|\/|\/|\/
    Join Date
    Jun 2005
    Posts
    10,770

    Default Re: needs a living character?

    Gigantus, perhaps try it with an event which exports an army. Like GeneralCaptureSettlement or something similar. Possibly it's an unlisted requirement.

    I appreciate it might not be useful in the application you're trying to build but it might be nice to see it work on the strat map.

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

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,682
    Blog Entries
    35

    Default Re: needs a living character?

    @ swagger

    I will give that a try. Might take a while to come back as I am busy adding factions to that mod.










Page 1 of 2 12 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
  •