Results 1 to 10 of 10

Thread: Replenish unit script question

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Harbinger of... saliva Member alpaca's Avatar
    Join Date
    Aug 2003
    Location
    Germany
    Posts
    2,767

    Default Re: Replenish unit script question

    You can't have a monitor inside another one. You could just use the Condition monitor anyways and add "and FactionIsLocal" to it.
    EndedInSettlement doesn't take a parameter, either, you can't check the character name anyhow afaik.
    Last edited by alpaca; 01-09-2006 at 18:54.

  2. #2

    Default Re: Replenish unit script question

    Yep, our inability to check the character's name for anything prevents us from having quite a few neat features
    Epistolary Richard's modding Rules of Cool
    Cool modders make their mods with the :mod command line switch
    If they don't, then Cool mod-users use the Mod Enabler (JSGME)
    Cool modders use show_err
    Cool modders use the tutorials database Cool modders check out the Welcome to the Modding Forums! thread Cool modders keep backups Cool modders help each other out

  3. #3
    Shaidar Haran Senior Member SAM Site Champion Myrddraal's Avatar
    Join Date
    Feb 2004
    Location
    UK
    Posts
    5,752

    Default Re: Replenish unit script question

    You can get rid of one of the monitors, either by using an 'and' as was suggested, or by using an 'if'. Also, I think that this is how you use EndedInSettlement:

    Code:
    script
    declare_counter loop
    set_counter loop 0
    	
    		monitor_event CharacterTurnStart Quintus		
    			and EndedInSettlement 
    			replenish_units Quintus		
    		end_monitor
    				
    	while I_CompareCounter loop = 0
    	end_while
    
    end_script

  4. #4

    Default Re: Replenish unit script question

    Myyrdal,

    Thanks for your suggestion. Interesting behaviour with your version of the script. If Quintus is NOT in a settlement, his units get replenished. If he IS in a settlement and needs replenishment, the game CTDs. I'll try a couple more things.

  5. #5

    Default Re: Replenish unit script question

    If I change the monitor like so:

    Code:
    monitor_event CharacterTurnStart Quintus		
    		and not InEnemyLands 
    		replenish_units Quintus		
    		end_monitor
    Quintus gets replenished whether he is in friendly or enemy lands, and the game still crashes if he is in a settlement when replenished. I am starting to have serious doubts that my mod is even possible.

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

    Default Re: Replenish unit script question

    Could it be a problem with the authomatic slow replenishment of the general unit in a settlement?
    In fact the general unit in campaign has not a fixed number of soldiers and this type of script may interfer with that feature.

    Perhaps it is a silly question but, can you link the replenishment to a settlement instead of a general?

  7. #7
    Simulation Monkey Member The_Mark's Avatar
    Join Date
    Dec 2004
    Location
    Helsinki, Finland
    Posts
    2,613

    Default Re: Replenish unit script question

    Managing generals in settlements is quite an awkward business with other commands also (e.g. console_command move_character creates a ghost character when you're trying to teleport someone in a city..), so it's probably that. I also doubt that you'll be able to replenish settlements, but trying wouldn't hurt.

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