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

Thread: Script : about ANCILLARIES

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Nirnaeth Arnoediad's Avatar Vive l'Empereur !
    Join Date
    Jun 2009
    Location
    In the greatest civilization
    Posts
    807

    Default Script : about ANCILLARIES

    Since I try to script few events, I meet a big problem ; how can we remove or give ancillaries to a general with the campaign_script.txt file ?

    I know the "console_command give_ancillary this ancillary" code, but it seems to work only when the character is selected on the campaign map.
    I thought to have find a solution with the command : "e_select_character", but it not work.

    I wait your propositions, thanks.

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

    Default Re: Script : about ANCILLARIES

    As far as I know you've to name the Character.


    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
    Squid's Avatar Opifex
    Patrician Artifex Technical Staff

    Join Date
    Feb 2007
    Location
    Frozen waste lands of the north
    Posts
    17,751
    Blog Entries
    3

    Default Re: Script : about ANCILLARIES

    You must have the character selected if you want this to work otherwise it doesn't know which character to give it to. If you want it to work where the character isn't selected you'd need their name.
    Under the patronage of Roman_Man#3, Patron of Ishan
    Click for my tools and tutorials
    "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe." -----Albert Einstein

  4. #4
    Nirnaeth Arnoediad's Avatar Vive l'Empereur !
    Join Date
    Jun 2009
    Location
    In the greatest civilization
    Posts
    807

    Default Re: Script : about ANCILLARIES

    I know that there are others codes like "this", but I don't remember well these codes. "all" isn't it ?
    Can you tell me that are the other codes, used at the same place as 'this" ?

  5. #5
    konny's Avatar Artifex
    Join Date
    Jul 2007
    Location
    Germania Inferior
    Posts
    3,631

    Default Re: Script : about ANCILLARIES

    Only possiblities would be "name" (maybe "lable" too) or THIS. This means you can only remove ancillaries from characters you know the name of, what means only started characters or those that are spawned (of course, not with random_name); or if you find a way to force the player to select this character.

    e_select, ASFAIK, is outruled by physical selection. This means, when the player has selected any character when this monitor is executed, for example on TurnEnd, this one will be the "selected", not the character you tried to select by script.

    Team member of: Das Heilige Römische Reich, Europa Barbarorum, Europa Barbarorum II, East of Rome
    Modding help by Konny: Excel Traitgenerator, Setting Heirs to your preference
    dHRR 0.8 beta released! get it here
    New: Native America! A mini-mod for Kingdoms America

  6. #6
    Nirnaeth Arnoediad's Avatar Vive l'Empereur !
    Join Date
    Jun 2009
    Location
    In the greatest civilization
    Posts
    807

    Default Re: Script : about ANCILLARIES

    Bad news... Also it's impossible to remove ancillaries, and more important, to give ancillaries to a specific charater at a specific time ?

  7. #7
    Squid's Avatar Opifex
    Patrician Artifex Technical Staff

    Join Date
    Feb 2007
    Location
    Frozen waste lands of the north
    Posts
    17,751
    Blog Entries
    3

    Default Re: Script : about ANCILLARIES

    Only in RTW, check out ged's scripts, specifically the hiring ancillaries one, if you want to see how to do it with ancillaries in Kingdoms.
    Under the patronage of Roman_Man#3, Patron of Ishan
    Click for my tools and tutorials
    "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe." -----Albert Einstein

  8. #8
    Nirnaeth Arnoediad's Avatar Vive l'Empereur !
    Join Date
    Jun 2009
    Location
    In the greatest civilization
    Posts
    807

    Default Re: Script : about ANCILLARIES

    Thanks a lot, great script, I'll try.
    But as I want to give an ancillaries to an AI character, I don't believe it'll work, because he can't be selected.

  9. #9
    konny's Avatar Artifex
    Join Date
    Jul 2007
    Location
    Germania Inferior
    Posts
    3,631

    Default Re: Script : about ANCILLARIES

    There should be no problems with giving an ancillary to anyone on the map: use EDA. It would be helpfull to know what exactly are you trying to do.

    Team member of: Das Heilige Römische Reich, Europa Barbarorum, Europa Barbarorum II, East of Rome
    Modding help by Konny: Excel Traitgenerator, Setting Heirs to your preference
    dHRR 0.8 beta released! get it here
    New: Native America! A mini-mod for Kingdoms America

  10. #10
    Squid's Avatar Opifex
    Patrician Artifex Technical Staff

    Join Date
    Feb 2007
    Location
    Frozen waste lands of the north
    Posts
    17,751
    Blog Entries
    3

    Default Re: Script : about ANCILLARIES

    You can give an ancillary to the AI because you are able to select the AIs characters, but as konny said what exactly are you trying to accomplish.
    Under the patronage of Roman_Man#3, Patron of Ishan
    Click for my tools and tutorials
    "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe." -----Albert Einstein

  11. #11
    Nirnaeth Arnoediad's Avatar Vive l'Empereur !
    Join Date
    Jun 2009
    Location
    In the greatest civilization
    Posts
    807

    Default Re: Script : about ANCILLARIES

    I've try to use the technique ; EDA modded with a special condition, depending on an event in campaign_script. It works not very well for the moment.

    What I want ? Give an ancillary to a character (AI or human) when an event occurs in campaign_script.
    But how can I select an AI character ?

  12. #12
    konny's Avatar Artifex
    Join Date
    Jul 2007
    Location
    Germania Inferior
    Posts
    3,631

    Default Re: Script : about ANCILLARIES

    Quote Originally Posted by Nirnaeth Arnoediad View Post
    What I want ? Give an ancillary to a character (AI or human) when an event occurs in campaign_script.
    But how can I select an AI character ?
    Again, you don't need to when you want to give an ancillary. You can give traits and ancillaries depending on zillions of requirements without the need to bother the script.

    For example, when you want to make a Startegos of a Byzantine Thema you would make that a transferable unique ancillary for the player and a trait that is acquired for the governor of the town and lost when leaving the province for the AI.

    Team member of: Das Heilige Römische Reich, Europa Barbarorum, Europa Barbarorum II, East of Rome
    Modding help by Konny: Excel Traitgenerator, Setting Heirs to your preference
    dHRR 0.8 beta released! get it here
    New: Native America! A mini-mod for Kingdoms America

  13. #13
    GrnEyedDvl's Avatar Liberalism is a Socially Transmitted Disease
    Artifex Technical Staff

    Join Date
    Jan 2007
    Location
    Denver CO
    Posts
    23,851
    Blog Entries
    10

    Default Re: Script : about ANCILLARIES

    You need to be a bit more specific about exactly what you want to do. It can probably be done, but just telling us that you want it to happen when an event fires doesnt help.

    I made a feudal system that gives AI characters ancillaries all over the place, but its a combination of script, traits, and ancillaries.

  14. #14
    Nirnaeth Arnoediad's Avatar Vive l'Empereur !
    Join Date
    Jun 2009
    Location
    In the greatest civilization
    Posts
    807

    Default Re: Script : about ANCILLARIES

    ok, I will explain my goal.

    When a character have the ancilary, a historic event with possible answer (accept or refuse) occurs ; the player chooses between keep the ancillary or give it to the pope. If he want the second possibility, the ancillary have to be removed and then given to the Pope.

    I have already success for the first part, remove the ancillary of the character.
    But give it to the pope is more difficult.
    I've try with a trigger in EDA, associated with a special condition : I_CharacterExists x (x= a character created by campaign_script when the player choose to remove the ancillary). And chance is also 100. I want to give the ancillary to the papal faction, but not necesserly to pope, to a general would be enought.

    Trigger gnagna
    WhenToTest CharacterTurnStart
    Condition CharFactionType papal_states
    and IsGeneral
    and not I_WorldwideAncillaryExists my_ancillary true
    and I_CharacterExists x

    AcquireAncillary my_ancillary chance 100

    Maybe you won't all understand in my script above because I have a lot of other variables that I don't have to expose here.
    The ideas is : how give an ancillary to a AI faction after an event.

  15. #15
    konny's Avatar Artifex
    Join Date
    Jul 2007
    Location
    Germania Inferior
    Posts
    3,631

    Default Re: Script : about ANCILLARIES

    suggestion:

    Code:
    Trigger gnagna
        WhenToTest CharacterTurnStart
        Condition CharFactionType papal_states
       and IsFactionLeader
       and not I_WorldwideAncillaryExists my_ancillary true
       and I_EventCounter MrX_spawned = 1
                
        AcquireAncillary my_ancillary chance  100
    set this counter in campaign_script to 1 when Mr.X was spawned and reset it to 0 at the end of the slave or papal turn.

    Team member of: Das Heilige Römische Reich, Europa Barbarorum, Europa Barbarorum II, East of Rome
    Modding help by Konny: Excel Traitgenerator, Setting Heirs to your preference
    dHRR 0.8 beta released! get it here
    New: Native America! A mini-mod for Kingdoms America

  16. #16
    Nirnaeth Arnoediad's Avatar Vive l'Empereur !
    Join Date
    Jun 2009
    Location
    In the greatest civilization
    Posts
    807

    Default Re: Script : about ANCILLARIES

    Euh, ... I've try to make the script for AI and it's more problematic.

    The question is : how remove an ancillary from an AI character ? Because when the faction is not local, the script don't work.
    Selected character ? No, because I think the AI cannot select ?
    I've try to kill the Ai character having the ancillary (died, he will never more possess the ancillary), but no success, because to do it he must be named, but in my script he is not attached to a name.

    How remove an ancillary from an AI character without specific name ?
    Last edited by Nirnaeth Arnoediad; July 19, 2009 at 03:53 PM. Reason: New problem

  17. #17
    konny's Avatar Artifex
    Join Date
    Jul 2007
    Location
    Germania Inferior
    Posts
    3,631

    Default Re: Script : about ANCILLARIES

    Quote Originally Posted by Nirnaeth Arnoediad View Post
    The question is : how remove an ancillary from an AI character ?
    How remove an ancillary from an AI character without specific name ?
    There was a thread where this question was answered. Wait, I got the link somewhere; ah, yes here it is: http://www.twcenter.net/forums/showthread.php?p=5602367

    Team member of: Das Heilige Römische Reich, Europa Barbarorum, Europa Barbarorum II, East of Rome
    Modding help by Konny: Excel Traitgenerator, Setting Heirs to your preference
    dHRR 0.8 beta released! get it here
    New: Native America! A mini-mod for Kingdoms America

  18. #18
    Nirnaeth Arnoediad's Avatar Vive l'Empereur !
    Join Date
    Jun 2009
    Location
    In the greatest civilization
    Posts
    807

    Default Re: Script : about ANCILLARIES

    Welle, maybe it's amazing, but I don't see any answer to my question in this thread ;
    my question is HOW REMOVE AN ANCILLARY FROM AN AI CHARACTER ?
    Also I can reformulate ; how select an AI character with a script, in order to set the command "remove_ancillary" ?

  19. #19
    konny's Avatar Artifex
    Join Date
    Jul 2007
    Location
    Germania Inferior
    Posts
    3,631

    Default Re: Script : about ANCILLARIES

    The answer is: It is not possible

    Only possiblities would be "name" (maybe "lable" too) or THIS. This means you can only remove ancillaries from characters you know the name of, what means only started characters or those that are spawned (of course, not with random_name); or if you find a way to force the player to select this character.

    Team member of: Das Heilige Römische Reich, Europa Barbarorum, Europa Barbarorum II, East of Rome
    Modding help by Konny: Excel Traitgenerator, Setting Heirs to your preference
    dHRR 0.8 beta released! get it here
    New: Native America! A mini-mod for Kingdoms America

  20. #20
    Nirnaeth Arnoediad's Avatar Vive l'Empereur !
    Join Date
    Jun 2009
    Location
    In the greatest civilization
    Posts
    807

    Default Re: Script : about ANCILLARIES

    But can I create a label for the character, and after use the label to identify the character ?
    And if it's possible, how ?

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
  •