Author Topic: Calibrating seasons for 6 tpy  (Read 1905 times)

DCLXVIMRTRVEBLAKKOKKVLTDCLXVI

  • Posts: 92
  • Karma: 0
    • View Profile
    • Awards
Calibrating seasons for 6 tpy
« on: October 09, 2016, 01:57:32 PM »
Hi guys,

Is there anyone who could create a script or little program to generate triggers similar to the ones in the text file that can be found on my google drive but for 6 tpy from 270 to 30 BC (season 5 would need 4 triggers and season 6 would need 5 triggers)
https://drive.google.com/file/d/0B_bazriEPu5oM0ZhWG0wWGFsRzg/view?usp=sharing

Gigantus

  • Posts: 93
  • Karma: 4
  • Sure the voices aren't real, but them has ideas!
    • View Profile
    • Awards
Re: Calibrating seasons for 6 tpy
« Reply #1 on: October 09, 2016, 02:37:13 PM »
It's probably easiest to have the TPY script set an event counter (named it 'SeasonCount' in example) according to the 'season' and then have traits refer to it. Underneath one cycle of six seasons, to be repeated from count 1 again in next segment:


Code: [Select]
console_command date -270
console_command season summer
advance_advice_thread Turn_0_Year_270_BC_Season_1_Thread
set_event_counter SeasonCount 1    ; <--- the event counter
while I_TurnNumber = 0
    suspend_unscripted_advice true
end_while

console_command date -270
console_command season summer
advance_advice_thread Turn_1_Year_270_BC_Season_2_Thread
set_event_counter SeasonCount 2
while I_TurnNumber = 1
    suspend_unscripted_advice true
end_while

console_command date -270
console_command season summer
advance_advice_thread Turn_2_Year_270_BC_Season_3_Thread
set_event_counter SeasonCount 3
while I_TurnNumber = 2
    suspend_unscripted_advice true
end_while

console_command date -270
console_command season summer
advance_advice_thread Turn_3_Year_270_BC_Season_4_Thread
set_event_counter SeasonCount 4
while I_TurnNumber = 3
    suspend_unscripted_advice true
end_while

console_command date -270
console_command season winter
advance_advice_thread Turn_4_Year_270_BC_Season_5_Thread
set_event_counter SeasonCount 5
while I_TurnNumber = 4
    suspend_unscripted_advice true
end_while

console_command date -270
console_command season winter
advance_advice_thread Turn_5_Year_270_BC_Season_6_Thread
set_event_counter SeasonCount 6
while I_TurnNumber = 5
    suspend_unscripted_advice true
end_while

console_command date -269
console_command season winter
advance_advice_thread Turn_6_Year_269_BC_Season_1_Thread
set_event_counter SeasonCount 1
while I_TurnNumber = 6
    suspend_unscripted_advice true
end_while

This would mean instead of referring to endless turn numbers you simply use the number of the event counter (example only):

Code: [Select]
Trigger summer_calibration_turn_1
  WhenToTest CharacterTurnStart

    Condition I_EventCounter SeasonCount = 1
          and Trait Season < 2

  Affects Season  1  Chance  100

It's functionality is however dependent on the firing of the TPY script - I am not versed enough about the show_me script principle to know if this script starts automatically or has to be triggering at every loading.
« Last Edit: October 09, 2016, 02:46:15 PM by Gigantus »
.



DCLXVIMRTRVEBLAKKOKKVLTDCLXVI

  • Posts: 92
  • Karma: 0
    • View Profile
    • Awards
Re: Calibrating seasons for 6 tpy
« Reply #2 on: October 15, 2016, 05:13:01 PM »
I get an error when I try to use the event counter. Are you sure it works in rtw?

Gigantus

  • Posts: 93
  • Karma: 4
  • Sure the voices aren't real, but them has ideas!
    • View Profile
    • Awards
Re: Calibrating seasons for 6 tpy
« Reply #3 on: October 16, 2016, 05:18:53 AM »
I am afraid my scripting is based on m2tw. This is a really basic script command and I had expected it to be present in RTW as well.

If the event_counter condition doesn't work then the 'regular' counter will, notice the additional declaration of the counter and the altered SeasonCount lines:

Code: [Select]
declare_counter SeasonCount

console_command date -270
console_command season summer
advance_advice_thread Turn_0_Year_270_BC_Season_1_Thread
set_counter SeasonCount 1    ; <--- the counter for reference in trigger
while I_TurnNumber = 0
    suspend_unscripted_advice true
end_while

console_command date -270
console_command season summer
advance_advice_thread Turn_1_Year_270_BC_Season_2_Thread
set_counter SeasonCount 2
while I_TurnNumber = 1
    suspend_unscripted_advice true
end_while

console_command date -270
console_command season summer
advance_advice_thread Turn_2_Year_270_BC_Season_3_Thread
set_counter SeasonCount 3
while I_TurnNumber = 2
    suspend_unscripted_advice true
end_while

console_command date -270
console_command season summer
advance_advice_thread Turn_3_Year_270_BC_Season_4_Thread
set_counter SeasonCount 4
while I_TurnNumber = 3
    suspend_unscripted_advice true
end_while

console_command date -270
console_command season winter
advance_advice_thread Turn_4_Year_270_BC_Season_5_Thread
set_counter SeasonCount 5
while I_TurnNumber = 4
    suspend_unscripted_advice true
end_while

console_command date -270
console_command season winter
advance_advice_thread Turn_5_Year_270_BC_Season_6_Thread
set_counter SeasonCount 6
while I_TurnNumber = 5
    suspend_unscripted_advice true
end_while

console_command date -269
console_command season winter
advance_advice_thread Turn_6_Year_269_BC_Season_1_Thread
set_counter SeasonCount 1
while I_TurnNumber = 6
    suspend_unscripted_advice true
end_while

The trigger will then change slightly as well, again check the SeasonCount line:

Code: [Select]
Trigger summer_calibration_turn_1
  WhenToTest CharacterTurnStart

    Condition I_CompareCounter SeasonCount = 1
          and Trait Season < 2

  Affects Season  1  Chance  100
Big note: I found the docudemons for BI, they contain the scripting events, commands and conditions as well as console commands. As ALX got released after BI I am assuming that they will work for us.
« Last Edit: October 16, 2016, 05:51:18 AM by Gigantus »
.