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

Thread: next my try

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default next my try

    Hi again
    i didn't surrender and made next try with scripts. Because i have made some successful try i made naxt try of script changing the religion.
    It looks like this:
    monitor_event FactionTurnStart
    add_events
    event counter byzantium_conversion_accepted
    event counter byzantium_conversion_declined
    date 0
    end_add_events

    terminate_monitor
    end_monitor

    monitor_event FactionTurnStart FactionType byzantium
    and I_TurnNumber = 2
    historic_event byzantium_conversion true factions { byzantium, }
    terminate_monitor
    end_monitor
    monitor_conditions I_EventCounter byzantium_conversion_accepted = 1
    set_religion byzantium catholic
    retire_characters byzantium priest
    change_population_religion byzantium catholic 75 orthodox
    terminate_monitor
    end_monitor
    Unfortunately there's something wrong, but i can't understand what log file shows as a mistake.
    can someone check it and tell me what can be wrong?

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

    Default Re: next my try

    'monitor_event FactionTurnStart' needs a condition. Event monitors always have a condition.

  3. #3

    Icon1 Re: next my try

    Quote Originally Posted by Taiji View Post
    'monitor_event FactionTurnStart' needs a condition. Event monitors always have a condition.
    attyla: The good news is that you don’t need the first bit of that script any way:
    Code:
    monitor_event FactionTurnStart
    add_events
    event counter byzantium_conversion_accepted
    event counter byzantium_conversion_declined
    date 0
    end_add_events
    
    terminate_monitor
    end_monitor

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

    Default Re: next my try

    Judging from the log, you've not yet created an entry for byzantium_conversion in data\text\historic_events.txt. The event is firing fine but it looks like the text entry for the event is missing.

  5. #5

    Default Re: next my try

    TNZ
    Are you sure? it wont work without this part of script.

    Taji
    You was right. Strange because i was sure i made it too

  6. #6
    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: next my try

    The first bit was creating a counter, but what you needed was an event_counter in this case (accept and decline).
    As TNZ pointed out: it is not necessary to create an event_counter beforehand. By either accepting or declining the byzantium_conversion historic event the event_counter (accept or declined) will be created automatically and set to 1. The same holds true for any event_counter.










  7. #7

    Default Re: next my try

    so why it doesn't work without this first part?

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

    Default Re: next my try

    Quote Originally Posted by attyla View Post
    so why it doesn't work without this first part?
    I think TNZ is right, it should work fine without it

  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: next my try

    monitor_event FactionTurnStart FactionType byzantium
    and I_TurnNumber = 2
    historic_event byzantium_conversion true factions { byzantium, }
    terminate_monitor
    end_monitor

    monitor_event I_EventCounter byzantium_conversion_accepted = 1
    and I_EventCounter byzantium_conversion_accepted > 0
    set_religion byzantium catholic
    retire_characters byzantium priest
    change_population_religion byzantium catholic 75 orthodox
    terminate_monitor
    end_monitor










  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: next my try

    Also you don't need a condition, some of the kingdoms campaign scripts have monitors without a condition, but you should include one. If you don't actually want to check anything just use the TrueCondition condition.
    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
    /|\/|\/|\/|\/|\/|\/
    Join Date
    Jun 2005
    Posts
    10,770

    Default Re: next my try

    I stand corrected, FactioTurnStart doesn't seem to need one.

  12. #12

    Default Re: next my try

    I've reworked bulgarian faction to faction spawned during the game. I've made it on the base of mongols faction from vanilla. Unfortunately iśve made something wrong because script doesn't work.
    Here are my entries:
    descr_sm_faction:
    faction normans, spawned_on_event
    culture eastern_european
    religion orthodox
    symbol models_strat/symbol_england.CAS
    rebel_symbol models_strat/symbol_rebels.CAS
    primary_colour red 255, green 150, blue 10
    secondary_colour red 255, green 0, blue 0
    loading_logo loading_screen/symbols/symbol128_england.tga
    standard_index 26
    logo_index FACTION_LOGO_ENGLAND
    small_logo_index SMALL_FACTION_LOGO_ENGLAND
    triumph_value 5
    custom_battle_availability no
    can_sap no
    prefers_naval_invasions yes
    can_have_princess yes
    has_family_tree yes
    descr_strat:
    faction normans, balanced smith
    ai_label orthodox
    dead_until_resurrected
    denari 10000
    denari_kings_purse 3000
    and campaign_script:
    monitor_event FactionTurnStart FactionIsLocal
    and I_TurnNumber = 2

    spawn_army
    faction normans
    character Boris, named character, male, leader, age 48, x 351, y 187
    traits Factionleader 1 , GoodCommander 3 , PublicFaith 1 , BattleDread 2 , ReligionStarter 1 , HaleAndHearty 1
    army
    unit Bulgarian Bodyguard exp 1 armour 0 weapon_lvl 0
    unit Slav Levies exp 1 armour 1 weapon_lvl 0
    unit Slav Levies exp 1 armour 1 weapon_lvl 0
    unit Slav Levies exp 1 armour 1 weapon_lvl 0
    unit Slav Levies exp 1 armour 1 weapon_lvl 0
    unit Slav Levies exp 1 armour 1 weapon_lvl 0
    unit Slav Levies exp 1 armour 1 weapon_lvl 0
    unit Dismounted Bulgarian Cavalry exp 1 armour 0 weapon_lvl 0
    unit Dismounted Bulgarian Cavalry exp 1 armour 0 weapon_lvl 0
    unit Bulgarian Brigands exp 1 armour 0 weapon_lvl 0
    unit Bulgarian Brigands exp 1 armour 0 weapon_lvl 0
    unit Bosnian Archers exp 1 armour 0 weapon_lvl 0
    unit Bosnian Archers exp 1 armour 0 weapon_lvl 0
    unit Cuman Horse Archers exp 1 armour 0 weapon_lvl 0
    unit Cuman Horse Archers exp 1 armour 0 weapon_lvl 0
    unit Bulgarian Cavalry exp 1 armour 0 weapon_lvl 0
    unit Bulgarian Cavalry exp 1 armour 0 weapon_lvl 0

    end

    spawn_army
    faction normans
    character Ivan, named character, male, age 18, x 353, y 183
    traits Factionheir 1 , GoodCommander 2 , BattleDread 3 , ReligionStarter 1 , LoyaltyStarter 1 , Austere 1
    army
    unit Bulgarian Bodyguard exp 1 armour 0 weapon_lvl 0
    unit Slav Levies exp 1 armour 1 weapon_lvl 0
    unit Slav Levies exp 1 armour 1 weapon_lvl 0
    unit Slav Levies exp 1 armour 1 weapon_lvl 0
    unit Slav Levies exp 1 armour 1 weapon_lvl 0
    unit Slav Levies exp 1 armour 1 weapon_lvl 0
    unit Slav Levies exp 1 armour 1 weapon_lvl 0
    unit Dismounted Bulgarian Cavalry exp 1 armour 0 weapon_lvl 0
    unit Dismounted Bulgarian Cavalry exp 1 armour 0 weapon_lvl 0
    unit Bulgarian Brigands exp 1 armour 0 weapon_lvl 0
    unit Bulgarian Brigands exp 1 armour 0 weapon_lvl 0
    unit Bosnian Archers exp 1 armour 0 weapon_lvl 0
    unit Bosnian Archers exp 1 armour 0 weapon_lvl 0
    unit Cuman Horse Archers exp 1 armour 0 weapon_lvl 0
    unit Cuman Horse Archers exp 1 armour 0 weapon_lvl 0
    unit Bulgarian Cavalry exp 1 armour 0 weapon_lvl 0
    unit Bulgarian Cavalry exp 1 armour 0 weapon_lvl 0

    end
    terminate_monitor
    end_monitor
    What made i wrong?

  13. #13

    Default Re: next my try

    If you are making them spawn with just an army during play, you need to give them "horde" capability.
    Code:
    faction      mongols, spawned_on_event
    culture      middle_eastern
    religion     islam
    symbol      models_strat/symbol_mongols.CAS
    rebel_symbol    models_strat/symbol_rebels.CAS
    primary_colour    red 244, green 231, blue 170
    secondary_colour   red 0, green 0, blue 0
    loading_logo    loading_screen/symbols/symbol128_mongols.tga
    standard_index    8
    logo_index     FACTION_LOGO_MONGOLS
    small_logo_index   SMALL_FACTION_LOGO_MONGOLS
    triumph_value    5
    custom_battle_availability yes
    horde_min_units    10
    horde_max_units    20
    horde_max_units_reduction_every_horde 10
    horde_unit_per_settlement_population 250
    horde_min_named_characters 2
    horde_max_percent_army_stack 80
    horde_disband_percent_on_settlement_capture 0
    horde_unit     Mongol Infantry
    horde_unit     Mongol Foot Archers
    horde_unit     Mongol Heavy Archers
    horde_unit     Mongol Heavy Lancers
    horde_unit     Mongol Light Lancers
    horde_unit     Mongol Horse Archers
    can_sap      yes
    prefers_naval_invasions  yes
    can_have_princess   no
    has_family_tree    yes
    If you do not want them to turn into a horde when thier last town is destroyed, use this:
    Code:
    faction normans, spawned_on_event
    culture eastern_european
    religion orthodox
    symbol models_strat/symbol_england.CAS
    rebel_symbol models_strat/symbol_rebels.CAS
    primary_colour red 255, green 150, blue 10
    secondary_colour red 255, green 0, blue 0
    loading_logo loading_screen/symbols/symbol128_england.tga
    standard_index 26
    logo_index FACTION_LOGO_ENGLAND
    small_logo_index SMALL_FACTION_LOGO_ENGLAND
    triumph_value 5
    custom_battle_availability no
    horde_min_units    0
    horde_max_units    0
    horde_max_units_reduction_every_horde 0
    horde_unit_per_settlement_population 1000
    horde_min_named_characters 0
    horde_max_percent_army_stack 80
    horde_disband_percent_on_settlement_capture 100
    horde_unit     Mongol Infantry
    can_sap no
    prefers_naval_invasions yes
    can_have_princess yes
    has_family_tree yes

  14. #14

    Default Re: next my try

    i've added it, but the faction still doesn't appear.

  15. #15
    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: next my try

    Have you tried to use your script entry on it's own?


    script

    restrict_strat_radar false ; to check if the script fired - no radar map restriction = srcipt fires

    Your campaign_script entry from the post before goes here

    wait_monitors
    end_script
    and delete the marked entry in both instances:

    ...
    traits ....
    army
    unit Bulgarian Bodyguard exp 1 armour 0 weapon_lvl 0
    ....










  16. #16

    Default Re: next my try

    i completly don't know what you mean. What should i change in my script or somewhere else? You mean i should erase characters traits or "army" word only?

    I've erased "army" commands in script, but it still doesn't work.
    Last edited by attyla; February 27, 2011 at 05:44 AM.

  17. #17

    Default Re: next my try

    Remove the word "army"
    Code:
    spawn_army
    faction normans
    character Ivan, named character, male, age 18, x 353, y 183 
    traits Factionheir 1 , GoodCommander 2 , BattleDread 3 , ReligionStarter 1 , LoyaltyStarter 1 , Austere 1
    unit Bulgarian Bodyguard exp 1 armour 0 weapon_lvl 0
    unit Slav Levies exp 1 armour 1 weapon_lvl 0
    unit Slav Levies exp 1 armour 1 weapon_lvl 0
    unit Slav Levies exp 1 armour 1 weapon_lvl 0
    unit Slav Levies exp 1 armour 1 weapon_lvl 0
    unit Slav Levies exp 1 armour 1 weapon_lvl 0
    unit Slav Levies exp 1 armour 1 weapon_lvl 0
    unit Dismounted Bulgarian Cavalry exp 1 armour 0 weapon_lvl 0
    unit Dismounted Bulgarian Cavalry exp 1 armour 0 weapon_lvl 0
    unit Bulgarian Brigands exp 1 armour 0 weapon_lvl 0
    unit Bulgarian Brigands exp 1 armour 0 weapon_lvl 0
    unit Bosnian Archers exp 1 armour 0 weapon_lvl 0
    unit Bosnian Archers exp 1 armour 0 weapon_lvl 0
    unit Cuman Horse Archers exp 1 armour 0 weapon_lvl 0
    unit Cuman Horse Archers exp 1 armour 0 weapon_lvl 0
    unit Bulgarian Cavalry exp 1 armour 0 weapon_lvl 0
    unit Bulgarian Cavalry exp 1 armour 0 weapon_lvl 0

  18. #18

    Default Re: next my try

    as i wrote i removed the world "army" and it changed nothing. Normans faction still doesn't appear.

  19. #19

    Default Re: next my try

    OK I have some informations by log file:
    16:14:31.593 [game.script] [error] Script parsing error at line 12, column 37 in mods/Deus_Vult/data/world/maps/campaign/imperial_campaign/campaign_script.txt
    Unrecognised character data string (male)
    16:14:31.593 [game.script] [error] Script parsing error at line 14, column 1 in mods/Deus_Vult/data/world/maps/campaign/imperial_campaign/campaign_script.txt
    Couldn't create a script from file mods/Deus_Vult/data/world/maps/campaign/imperial_campaign/campaign_script.txt
    What does it mean?

  20. #20
    irishron's Avatar Cura Palatii
    Moderator Emeritus

    Join Date
    Feb 2005
    Location
    Cirith Ungol
    Posts
    47,023

    Default Re: next my try

    Is the name at that location in the script in the names.txt and descr_names.txt?

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
  •