Results 1 to 11 of 11

Thread: problems with a script

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Bibliophilic Member Atilius's Avatar
    Join Date
    Oct 2005
    Location
    America Medioccidentalis Superior
    Posts
    3,837

    Default Re: problems with a script

    What is it that you want? You say that your code isn't giving you the results you are looking for, but also that the code you've posted isn't the code you're running. It isn't clear to me that you necessarily found all the typos either. I'm at a loss to see how anyone can assist you.
    The truth is the most valuable thing we have. Let us economize it. - Mark Twain



  2. #2
    Member Member tai4ji2x's Avatar
    Join Date
    Apr 2001
    Location
    MA
    Posts
    291

    Default Re: problems with a script

    Quote Originally Posted by Atilius
    What is it that you want? You say that your code isn't giving you the results you are looking for, but also that the code you've posted isn't the code you're running. It isn't clear to me that you necessarily found all the typos either. I'm at a loss to see how anyone can assist you.
    1) well, i'm still wondering about what to do with the name issue - why can't i get a character named "Eunus" to spawn without problems.

    1a) still confused about why chirugeons don't appear when given via script, yet can still be given manually via the console/shell.

    2) ok, if you want to see, this is how i tested this part of the script for turn 0 (and yes, this time i believe i've caught the typos):
    Code:
    monitor_event FactionTurnStart FactionType romans_scipii
    and I_LocalFaction romans_julii
    and I_TurnNumber = 0
    
    
    if I_SettlementOwner Valencia != romans_julii
    console_command control romans_scipii
    console_command capture_settlement Valencia
    console_command control romans_julii
    
    spawn_army
    faction romans_scipii
    character Quintus Sertorius, named character, age 35, x 64, y 145	
    unit		roman generals guard cavalry			exp 3 armour 3 weapon_lvl 0
    unit		roman light infantry auxillia			exp 3 armour 0 weapon_lvl 0
    unit		roman light infantry auxillia			exp 3 armour 0 weapon_lvl 0
    unit		roman archer auxillia				exp 3 armour 0 weapon_lvl 0
    unit		roman archer auxillia				exp 3 armour 0 weapon_lvl 0
    unit		roman legionary cohort i			exp 5 armour 0 weapon_lvl 0
    unit		roman legionary cohort i			exp 5 armour 0 weapon_lvl 0
    unit		roman legionary cohort i			exp 5 armour 0 weapon_lvl 0
    unit		roman legionary cohort i			exp 5 armour 0 weapon_lvl 0
    unit		roman legionary cohort i			exp 5 armour 0 weapon_lvl 0
    unit		roman legionary cohort i			exp 5 armour 0 weapon_lvl 0
    unit		roman legionary cohort i			exp 5 armour 0 weapon_lvl 0
    unit		roman legionary cohort i			exp 5 armour 0 weapon_lvl 0
    unit		roman legionary cohort i			exp 5 armour 0 weapon_lvl 0
    unit		roman legionary cohort i			exp 5 armour 0 weapon_lvl 0
    unit		roman cavalry auxillia late			exp 5 armour 1 weapon_lvl 0
    unit		roman medium cavalry				exp 5 armour 1 weapon_lvl 0
    unit		roman medium cavalry				exp 5 armour 1 weapon_lvl 0
    unit		roman infantry auxillia				exp 4 armour 1 weapon_lvl 0
    unit		roman infantry auxillia				exp 4 armour 1 weapon_lvl 0
    
    console_command give_ancillary "Quintus Sertorius" historian
    console_command give_ancillary "Quintus Sertorius" orator
    console_command give_ancillary "Quintus Sertorius" chirugeon
    console_command give_trait "Quintus Sertorius" GoodCommander 3
    console_command give_trait "Quintus Sertorius" GoodDefender 2
    console_command give_trait "Quintus Sertorius" Brave 1
    console_command give_trait "Quintus Sertorius" PublicFaith 1
    console_command give_trait "Quintus Sertorius" HaleAndHearty 2
    
    console_command create_unit Valencia "roman praetorian cohort urban i" 5,4
    console_command create_unit Valencia "roman light infantry auxillia" 2,2
    console_command create_unit Valencia "roman archer auxillia" 2,2
    console_command create_unit Valencia "roman infantry auxillia" 2,4
    end_if
    
    if I_SettlementOwner Tarraco != romans_julii
    console_command control romans_scipii
    console_command capture_settlement Tarraco
    console_command control romans_julii
    
    console_command create_unit Tarraco "roman praetorian cohort urban i" 5,4
    console_command create_unit Tarraco "roman light infantry auxillia" 2,2
    console_command create_unit Tarraco "roman archer auxillia" 2,2
    console_command create_unit Tarraco "roman infantry auxillia" 2,4
    end_if
    
    if I_SettlementOwner Carthago_Novo != romans_julii
    console_command control romans_scipii
    console_command capture_settlement Carthago_Novo
    console_command control romans_julii
    
    console_command create_unit Carthago_Novo "roman praetorian cohort urban i" 5,4
    console_command create_unit Carthago_Novo "roman light infantry auxillia" 2,2
    console_command create_unit Carthago_Novo "roman archer auxillia" 2,2
    console_command create_unit Carthago_Novo "roman infantry auxillia" 2,4
    end_if
    
    end_monitor
    is there a reason why Quintus Sertorius' army is still spawning twice?

    3) i figured this part out. thank you for pointing out to me the correct syntax for SettlementBuildingExists.
    Last edited by tai4ji2x; 06-26-2007 at 15:28.

  3. #3
    CeltiberoRamiroI Member Monkwarrior's Avatar
    Join Date
    Apr 2004
    Location
    Salduie/Caesaraugusta/ Sarakusta/Saragossa
    Posts
    828

    Default Re: problems with a script

    I would try two things for the problem of two spawning armies:

    - Put a line with the word "end" just after the last unit of this army. I thought it was necessary.

    - Finish the script with:
    terminate_monitor
    end_monitor

    end_script

  4. #4
    Member Member tai4ji2x's Avatar
    Join Date
    Apr 2001
    Location
    MA
    Posts
    291

    Default Re: problems with a script

    Quote Originally Posted by Monkwarrior
    I would try two things for the problem of two spawning armies:

    - Put a line with the word "end" just after the last unit of this army. I thought it was necessary.

    - Finish the script with:
    terminate_monitor
    end_monitor

    end_script
    thanks, the addition of terminate_monitor was enough.

    although i'm still having all the other problems i described in my previous post

  5. #5
    Member Member tai4ji2x's Avatar
    Join Date
    Apr 2001
    Location
    MA
    Posts
    291

    Default Re: problems with a script

    whoops, it's not the chirugeon which is missing. it's whatever the first "give_ancillary" command gives which never appears (in this case, the historians). this problem is solved, as you suggested, by adding a line with "end" after the unit list of the spawned army.
    Last edited by tai4ji2x; 06-26-2007 at 21:40.

  6. #6
    Member Member tai4ji2x's Avatar
    Join Date
    Apr 2001
    Location
    MA
    Posts
    291

    Default Re: problems with a script

    ok... so now onto testing why i can't get a proper spawning of "Eunus"...

    EDIT - ok, nm i think i figured it out. with \data\text\names.txt, i need to make sure i use tabs to align the columns
    Last edited by tai4ji2x; 06-26-2007 at 21:55.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Single Sign On provided by vBSSO