Results 1 to 2 of 2

Thread: Hotseat Local Faction script

Hybrid View

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

    Default Hotseat Local Faction script

    Ok, so I've heard that the LocalFaction condition doesn't work properly in hotseat. I think I found a way to get it to work:
    Spoiler Alert, click show to read: 

    monitor_event PreFactionTurnStart FactionIsLocal
    and I_CompareCounter rebels_done = 1
    inc_counter turn_counter 1
    end_monitor
    monitor_event FactionTurnEnd FactionIsLocal
    and I_CompareCounter rebels_done == 1
    set_counter rebels_done 0
    end_monitor

    monitor_event FactionTurnEnd FactionType slave
    set_event_counter rebels_done 1
    end_monitor



    Now, unless I'm missing something, this counter will allow the FactionIsLocal to fire only once per year/month/whatever timescale is one turn, i.e. it will allow a 6-TPY script to function without anything new.
    A well informed opinion is a well formed opinion.

  2. #2

    Icon1 Re: Hotseat Local Faction script

    Good idea:
    Code:
    declare_counter period
    declare_counter local_faction
    
    set_counter period 1 ;set to Jan -Feb
    
    	monitor_event PreFactionTurnStart FactionIsLocal ; set the season for each period
    		and I_CompareCounter local_faction = 0
    		set_counter local_faction 1
    		if I_CompareCounter period == 1 ;Jan, Feb
    		console_command season winter
    	end_if	
    		if I_CompareCounter period == 2 ;March April
    		console_command season summer
    	end_if	
    		if I_CompareCounter period == 3 ;May June
    		console_command season summer
    	end_if	
    		if I_CompareCounter period == 4 ;July Aug
    		console_command season summer
    	end_if	
    		if I_CompareCounter period == 5 ;Sept Oct
    		console_command season summer
    	end_if
    		if I_CompareCounter period == 6 ;Nov Dec
    		console_command season winter
    	end_if	
    		inc_counter period 1 ;advance the period
    		if I_CompareCounter period == 7 ;start a new year
    		set_counter period 1
    	end_if
    	end_monitor
    
    	monitor_event FactionTurnEnd FactionType slave
    		set_counter local_faction 0
    		if I_CompareCounter period > 1
    		console_command season summer
    	end_if
    	end_monitor

Posting Permissions

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