Page 2 of 3 FirstFirst 123 LastLast
Results 21 to 40 of 50

Thread: Make a settlement a power centre for training special units.

  1. #21

    Default Re: [Tutorial] Make a settlement a power centre for training special units.

    Quote Originally Posted by Taiji View Post
    You just copied vanilla, didn't you? It works in vanilla so of course you (actually CA) got it right.
    Thanks

  2. #22

    Default Re: [Tutorial] Make a settlement a power centre for training special units.

    are you sure it works under MTW2 vanilla too? I've tryed to do it and i can't recruit firethrowers no matter if i have Constantinople or not.

  3. #23

    Default Re: [Tutorial] Make a settlement a power centre for training special units.

    Yes it will work on vanilla too coz the script is based on event_counters and vanilla has this condition type and used in for eg the world is round event.
    Check properly.

  4. #24

    Default Re: [Tutorial] Make a settlement a power centre for training special units.

    hmmm. So holds_constantinople works after "world is around" event olny? So i should call world around on start of the game forth? Is it possible? I didn't examine script for this event.

  5. #25

    Default Re: [Tutorial] Make a settlement a power centre for training special units.

    U misunderstood my sentence but forget that i know what u did wrong.
    U copied this line right?
    Code:
    recruit_pool "Greek Firethrower" 0 0.000001 0.999 0 requires factions { byzantium, } and event_counter holds_constantinople 1
    So it will not work coz the of the numbers the unit will not appear.
    Try this then it will work
    Code:
     recruit_pool "Greek Firethrower"  1   0.7   2  0  requires factions { byzantium, } and event_counter holds_constantinople 1

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

    Default Re: [Tutorial] Make a settlement a power centre for training special units.

    Why are you using '0.000001 0.999' as an example in the OP, Ishan?

    You say 'It should look like this:' but then that unit will never be recruited, nor even be used as a retraining point. Maybe put some working code in there

    Quote Originally Posted by chris7ian View Post
    Would this be how you would do it to have Germany be able to recruit Ritterbruder?

    [/COLOR]campaign_script:
    declare_counter holds_marienburg
    ;Increment
    monitor_events I_SettlementOwner Marienburg = hre
    set_counter holds_marienburg 1
    end_monitor

    ;Decrease
    monitor_events not I_SettlementOwner
    Marienburg = hre
    set_counter holds_Marienburg 0
    end_monito
    r

    EDB:
    recruit_pool "Dismounted Ritter" 0 0.000001 0.999 0 requires factions { hre, } and counter holds_Marienburg 1
    Close but EDB will only accept event counters. So you can use 'set_event_counter' instead of 'set_counter' in the script, and then 'event_counter' instead of 'counter' in edb.

    I failed to address that issue in a previous post, slipped my mind somehow
    Last edited by Taiji; September 24, 2010 at 12:58 PM.

  7. #27

    Default Re: [Tutorial] Make a settlement a power centre for training special units.

    Quote Originally Posted by Taiji View Post
    Why are you using '0.000001 0.999' as an example in the OP, Ishan?

    You say 'It should look like this:' but then that unit will never be recruited, nor even be used as a retraining point. Maybe put some working code in there
    U are right the minute attyla said it didn't work i knew that a newbie who is not familiar with EDB will make that error that was my bad.

    And Taiji the fact is that i made that thread when i was a rookie myself i didn't knew what those numbers mean. I just did exactly what was inside the EDB file. And since Crusades had a few for them for GFTs i picked the first one.
    Hell when i was new here i didn't what was vanilla. and i actually had to search the internet to understand it's meaning(it was obvious that vanilla≠ icecream in that sentence).

    Anyways i have updated the OP and hope it's all good now.

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

    Default Re: [Tutorial] Make a settlement a power centre for training special units.

    That's much much better, really clear and concise +rep
    Last edited by Taiji; September 24, 2010 at 04:12 PM.

  9. #29

    Default Re: [Tutorial] Make a settlement a power centre for training special units.

    Ishan
    maby i'm thick, bun not so much I've seen and removed your mistakes (in the code of event too - in first line you've wrote i_settlementOwner Constantiniple).
    I've checked all very carefully twise and tryed Taijis code too.
    No success. I still cannot recruit units available under this condition...

  10. #30

    Default Re: [Tutorial] Make a settlement a power centre for training special units.

    Ok post ur EDB and CS here we will take a look.

  11. #31

    Default Re: [Tutorial] Make a settlement a power centre for training special units.

    sorry. I've finally found an error.
    I've used yours code and you were wrote:
    recruit_pool "Greek Firethrower" 1 0.7 1 0 requires factions { byzantium, } and event_counter holds_constantinople 1
    I've changed this entry in this mode:
    recruit_pool "Greek Firethrower" 1 0.005 1 0 requires factions { byzantium, } and hidden_resource konstantynopol and event_counter holds_constantinople 0
    and it works.
    I didn't notice, that you use this event contrarivise: when you are holding Constantinople, you cannot recruit firethrowers aned when you will surrender this city, you can recruit them.

  12. #32

    Default Re: [Tutorial] Make a settlement a power centre for training special units.

    Quote Originally Posted by attyla View Post
    sorry. I've finally found an error.
    I've used yours code and you were wrote:

    I've changed this entry in this mode:

    and it works.
    I didn't notice, that you use this event contrarivise: when you are holding Constantinople, you cannot recruit firethrowers aned when you will surrender this city, you can recruit them.
    I don't understand what is your point?

    In your EDB entry you have added 2 conditions and the unit will be available when both of them are true.
    You have completed negated the use of the script.

  13. #33

    Default Re: [Tutorial] Make a settlement a power centre for training special units.

    No. I have 2 levels for spetial units. At first level you can recruit them on condition holding Constantinople but in particulare place or particulare region only(when i want to let recruit unit in more then one city - i.e Vardariotai you can recruit them only holding Constantinople and in some of balkan regions ). At second level (alias on next level of building) you can recruit units on condition holding Constantinople but in every city of empire.

  14. #34

    Default Re: [Tutorial] Make a settlement a power centre for training special units.

    You are not getting the point i said why are u using 2 conditions for the same unit Hidden resource is not required when u are using the event counter one.

    Use only one condition in GFT as......
    Ahhhh forget it atleast u say it's working for you.

  15. #35
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

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

    Default Re: [Tutorial] Make a settlement a power centre for training special units.

    and event_counter holds_constantinople 0
    The game does not recognize a zero in this condition. Instead use the negative way:

    and not event_counter holds_constantinople 1


    and moved to tutorials

    .
    Last edited by Gigantus; September 26, 2010 at 11:44 PM.










  16. #36

    Default Re: Make a settlement a power centre for training special units.

    i've changed it but i cannot see any different.

  17. #37

    Default Re: Make a settlement a power centre for training special units.

    Quote Originally Posted by attyla View Post
    i've changed it but i cannot see any different.
    Gigantus has already told u the thing but u are not getting my point if u are using this script as stated in my first post then u don't need to use hidden resource thing for that unit.

    Hidden resource makes the available when u have that settlement and it's available in that settlement only.
    Now this one makes it global so it will be also available in Constantinople so you don't need to use hidden resource at all in case of this unit.

    @Gigantus
    Thanks for bumping up the thread in Tut section. +rep.

  18. #38
    Polycarpe's Avatar Back into action!
    Join Date
    Feb 2010
    Location
    Quebec, Canada
    Posts
    3,338

    Default Re: Make a settlement a power centre for training special units.

    It doesn't work for me and I've follow everything

    EDB:
    recruit_pool "Guards Of Jerusalem" 0 0.4 3 0 requires factions { jerusalem, } and event_counter holds_jerusalem 1

    campaign_script:

    ;Increment
    monitor_conditions I_SettlementOwner Jerusalem = jerusalem
    and I_EventCounter holds_jerusalem == 0
    add_events
    event counterholds_jerusalem
    date 0
    end_add_events
    end_monitor

    ;Decrease
    monitor_conditions not I_SettlementOwner Jerusalem = jerusalem
    and I_EventCounter holds_jerusalem == 1
    and I'NumberOfSettlements jerusalem > 0
    set_event_counter holds_jerusalem 0
    end_monitor

    I also add for Antioch :

    ;Increment
    monitor_conditions I_SettlementOwner Antioch = jerusalem
    and I_EventCounter holds_antioch == 0
    add_events
    event counterholds_antioch
    date 0
    end_add_events
    end_monitor

    ;Decrease
    monitor_conditions not I_SettlementOwner Antioch = jerusalem
    and I_EventCounter holds_antioch == 1
    and I'NumberOfSettlements jerusalem > 0
    set_event_counter holds_antioch 0
    end_monitor

  19. #39

    Default Re: Make a settlement a power centre for training special units.

    @Byzantium guard
    The first error i see is a missing space here:-
    Code:
    add_events
    event counter*holds_jerusalem
    date 0
    where * is the missing space, so fix it.

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

    Default Re: Make a settlement a power centre for training special units.

    Perhaps just use set_event_counter if it's just an event counter that's being affected, I don't see any point using add_events there.


    And check for more typos: I'NumberOfSettlements should be I_NumberOfSettlements

    The log should be telling you about problems like that.
    Last edited by Taiji; January 06, 2011 at 04:04 AM.

Page 2 of 3 FirstFirst 123 LastLast

Tags for this Thread

Posting Permissions

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