Results 1 to 1 of 1

Thread: Randomizing army spawning

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Quinn Inuit's Avatar Artifex
    Join Date
    Sep 2006
    Location
    Virginia, USA
    Posts
    4,968

    Default Randomizing army spawning

    Is this a good way to randomize a spawn army? I'd like to give it a named character if possible.

    Code:
    monitor_event FactionTurnStart FactionType scythia
        if RandomPercent < 3
        spawn_army
    		faction scythia
    		character Kudurmabug, general, age 30, , x XXX, y YYY
            unit		sarmatian noble cavalry				exp 0 armour 1 weapon_lvl 1
            unit		sarmatian horse archer				exp 0 armour 0 weapon_lvl 0
            unit		sarmatian horse archer				exp 0 armour 0 weapon_lvl 0
            unit		sarmatian archer			exp 0 armour 0 weapon_lvl 0
            unit		sarmatian archer					exp 0 armour 0 weapon_lvl 0
        end
        end_if
        if RandomPercent > 99   
        spawn_army
    		faction scythia
    		character Kudurmabug, general, age 30, , x XXX, y YYY
            unit		sarmatian noble cavalry				exp 0 armour 1 weapon_lvl 1
            unit		sarmatian horse archer				exp 0 armour 0 weapon_lvl 0
            unit		sarmatian horse archer				exp 0 armour 0 weapon_lvl 0
            unit		sarmatian archer			exp 0 armour 0 weapon_lvl 0
            unit		sarmatian archer					exp 0 armour 0 weapon_lvl 0
            unit		sarmatian noble cavalry				exp 0 armour 1 weapon_lvl 1
            unit		sarmatian horse archer				exp 0 armour 0 weapon_lvl 0
            unit		sarmatian horse archer				exp 0 armour 0 weapon_lvl 0
            unit		sarmatian archer			exp 0 armour 0 weapon_lvl 0
            unit		sarmatian archer					exp 0 armour 0 weapon_lvl 0
        end
        end_if
    end_monitor
        
    monitor_event FactionTurnStart FactionType scythia
        while I_TurnNumber <= 399
        end_while
        if I_TurnNumber = 400
            console_command kill_character "Kudurmabug"
        spawn_army
    		faction scythia
            character Kudurmabug, named character, command 0, influence 0, management 0, subterfuge 0, age 40, , x XXX, y YYY
            unit		barb chieftain cavalry scythian				exp 1 armour 1 weapon_lvl 1
            unit		sarmatian horse archer				exp 0 armour 0 weapon_lvl 0
            unit		sarmatian horse archer				exp 0 armour 0 weapon_lvl 0
            unit		sarmatian archer			exp 0 armour 0 weapon_lvl 0
            unit		sarmatian noble cavalry				exp 0 armour 1 weapon_lvl 1
            unit		sarmatian archer					exp 0 armour 0 weapon_lvl 0
            unit		sarmatian horse archer				exp 0 armour 0 weapon_lvl 0
            unit		sarmatian horse archer				exp 0 armour 0 weapon_lvl 0
            unit		sarmatian archer			exp 0 armour 0 weapon_lvl 0
            unit		sarmatian noble cavalry				exp 0 armour 1 weapon_lvl 1
            unit		sarmatian archer					exp 0 armour 0 weapon_lvl 0
            unit		sarmatian horse archer				exp 0 armour 0 weapon_lvl 0
            unit		sarmatian horse archer				exp 0 armour 0 weapon_lvl 0
            unit		sarmatian archer			exp 0 armour 0 weapon_lvl 0
            unit		sarmatian noble cavalry				exp 0 armour 1 weapon_lvl 1
            unit		sarmatian archer					exp 0 armour 0 weapon_lvl 0
            unit		sarmatian horse archer				exp 0 armour 0 weapon_lvl 0
            unit		sarmatian horse archer				exp 0 armour 0 weapon_lvl 0
            unit		sarmatian archer			exp 0 armour 0 weapon_lvl 0
            unit		sarmatian archer					exp 0 armour 0 weapon_lvl 0
        end
            console_command give_trait "Kurdurmabug" GoodCommander 3
        if I_TurnNumber >= 401
                terminate_monitor ; Loaded game.
        end_if
    end_monitor
    Last edited by Quinn Inuit; March 15, 2008 at 09:07 AM.
    RTR Platinum Team Apprentice, RTR VII Team Member, and Extended Realism Mod Team Coordinator. Proud member of House Wilpuri under the patronage of Pannonian

    The ExRM forum: come for the mod, stay for the Classical History discussions. Or vice versa.

    My writing-related Twitter feed.

Posting Permissions

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