Results 1 to 9 of 9

Thread: [solved] FactionTurnStrat

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    SpyrosM91's Avatar Despotes
    Join Date
    Aug 2010
    Location
    Patras, Greece
    Posts
    3,675

    Default [solved] FactionTurnStrat

    do characters age and die, units are created, and buildings get constructed after the "FactionTurnStart"???
    what is the difference in these cases with the "PreFactionTurnStart"???


    if yes, how can i solve issues with events and counters [that work in the beginning of each turn], that are tied to these.... ???


    thanks in advance!!
    Last edited by SpyrosM91; October 27, 2012 at 10:55 AM.
    Proud Tsardoms Total War: Historian - Coder - Scripter - Mapper

  2. #2
    AJStoner's Avatar Lord of Entropy
    Join Date
    Dec 2010
    Location
    Currently exiled to Florida
    Posts
    1,746

    Default Re: FactionTurnStrat

    The progression of a winter turn into a summer turn causes character aging. I believe building and units advance at the end of the faction's turn.

    As to solving "issues with events and counters" could you give an example of what you mean? I'm a little unclear on what you're asking.

    *MEMBER OF THE HOUSE OF HADER* *UNDER THE CRUEL & MERCILESS PATRONAGE OF y2day*

  3. #3
    SpyrosM91's Avatar Despotes
    Join Date
    Aug 2010
    Location
    Patras, Greece
    Posts
    3,675

    Default Re: FactionTurnStrat

    i have a monitor that monitors () when a person is not alive, it runs every factionturnstart... but when the character dies... his death must have come after the monitor event...., because the historic_event that i have also added pops up in the next turn....

    i think, the same must be happening with the buildings...
    Proud Tsardoms Total War: Historian - Coder - Scripter - Mapper

  4. #4
    AJStoner's Avatar Lord of Entropy
    Join Date
    Dec 2010
    Location
    Currently exiled to Florida
    Posts
    1,746

    Default Re: FactionTurnStrat

    So you are getting the regular "Faction Announcements" notification of the death and then your special script happens the NEXT turn, correct? Post the script you are using, that will make this easier.

    *MEMBER OF THE HOUSE OF HADER* *UNDER THE CRUEL & MERCILESS PATRONAGE OF y2day*

  5. #5
    SpyrosM91's Avatar Despotes
    Join Date
    Aug 2010
    Location
    Patras, Greece
    Posts
    3,675

    Default Re: FactionTurnStrat

    the script:

    Code:
        monitor_event PreFactionTurnStart FactionType byzantium
               set_event_counter patriarch_alive_ecumenical 0
        end_monitor
    
    
    
        monitor_event CharacterTurnStart CharFactionType byzantium
        and Trait Priest_Level >= 5
        and HasAncType Patriarch_Roman
               set_event_counter patriarch_alive_ecumenical 1
        end_monitor
    
    
    
        monitor_event FactionTurnStart FactionType byzantium
        and I_EventCounter patriarch_alive_ecumenical = 0
    
            if I_LocalFaction byzantium
                historic_event patriarch_dead_ecumenical_player
            end_if
            if I_IsFactionAIControlled byzantium
                historic_event patriarch_dead_ecumenical_ai
            end_if
    
        end_monitor
    it's not completed yet.... i will put another counter so that, if there is no patriarch any more, the event will pop up only once... but you get the point....

    the thing is that the patriarch dies in the beginning of a turn and the event pops up in the next one....
    Proud Tsardoms Total War: Historian - Coder - Scripter - Mapper

  6. #6
    boboav's Avatar Decanus
    Join Date
    Sep 2009
    Location
    Italy
    Posts
    532

    Default Re: FactionTurnStrat

    this should work immediately:

    Code:
    monitor_event FactionTurnStart FactionType byzantium
    	add_events
    		event	counter	Patriarch_status
    	 	date	0
    	 end_add_events
    
    	if I_WorldwideAncillaryExists Patriarch_Roman
    		set_event_counter Patriarch_status 1
    	end_if
    
    	if not I_WorldwideAncillaryExists Patriarch_Roman
    		set_event_counter Patriarch_status 0
    	end_if
    end_monitor
    
    monitor_conditions I_EventCounter Patriarch_status = 0
    	historic_event patriarch_dead
    terminate_monitor
    end_monitor
    Last edited by boboav; October 09, 2011 at 10:37 AM.
    Modder of "Bellum Crucis" and "De Bello Mundi"

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

    Default Re: FactionTurnStrat

    Just an event when someone with an anc has died?

    Code:
    monitor_event FactionTurnStart FactionIsLocal
    and FactionType byzantium
    and not I_WorldwideAncillaryExists Patriarch_Roman
    historic_event patriarch_dead
    end_monitor
    Last edited by Taiji; October 10, 2011 at 06:18 AM.

  8. #8
    boboav's Avatar Decanus
    Join Date
    Sep 2009
    Location
    Italy
    Posts
    532

    Default Re: FactionTurnStrat

    Quote Originally Posted by Taiji View Post
    Just an event when someone with an anc has died?

    Code:
    monitor_event FactionTurnStart FactionIsLocal
    and FactionType byzantium
    and not I_WorldwideAncillaryExists Patriarch_Roman
    historic_event patriarch_dead
    end_monitor
    yes mate, but that script will works only in the turn after the patriarch dies, for example if an assassin kills the patriarch the event will appears in the following turn, but our friend here need (if I have understood ) that the event appears when the patriarch dies
    Last edited by boboav; October 10, 2011 at 07:33 AM.
    Modder of "Bellum Crucis" and "De Bello Mundi"

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

    Default Re: FactionTurnStrat

    OK, the exact instant the game has registered the death?

    Code:
    monitor_conditions not I_WorldwideAncillaryExists Patriarch_Roman
    and I_CompareCounter deadevent != 1
    historic_event patriarch_dead
    set_counter deadevent 1
    end_monitor
    Assign the anc at character turn end and then:

    Code:
    monitor_event FactionTurnStart FactionIsLocal
    and I_WorldwideAncillaryExists Patriarch_Roman
    and I_CompareCounter deadevent == 1
    set_counter deadevent 0
    end_monitor
    I guess that might work. At least you'd see in the log exactly when the character's anc vanished.
    Last edited by Taiji; October 10, 2011 at 08:14 AM.

Posting Permissions

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