Oh, another issue is birth and marriage rates. These are turn based. This might need some adjustments.
Oh, another issue is birth and marriage rates. These are turn based. This might need some adjustments.
Just thinking - re agriculture, wouldn't it be more realistic to have two winters: one in the beginning, one in the end of the year? Most of late autumn and early spring can be considered winter for vegetational purposes in the northern climate...
Although if the year and ageing is bound to winter, this means even more trouble. So maybe this isn't such a good idea after all.
I'm still not here
Salvete Milites,
Not trying to be party-pooper here, but unless a practical fix is found for the 'no savegame' and 'recurring winter' problems... then it would seem that all further discussion about the potential of this 4 season scripting mod is just academic..
No one is going to put this into a campaign game if they can't save and reload the game later... and if the script falls apart after 5 or 6 turns and and every other turn is a winter turn with snow, then what's the point of have 4 seasons?
Valete, Dux of Earl
Artillerie... l'Argument Final des Rois
I haven't experianced the constant winter issue, but I did do some work into trying to work out the save/load problem.
Sadly, its not good, at all.... It seems as if the game is set so that save/load functionality is disabled whilst a script is running, as soon as the script ends, save/load goes back to normal. Im guessing this is due to fact that the save functionalty doesn't save any scripting, like where the player is up to in the script, and the variables set in the script are set to at that point in time.
So, to enable save/load-ing, I am guessing you need to stop the script alright, and I can't find a way to restart it, especially half way through. I wish we could bind it to be run when a turn ends (like when they press the button!) we could do something with it that way, but it doesn't appear to be.
Sigh, why do I feel that this was one of those really cool features that only got half completed.... perhaps in the expansion? I think that's a long shot really, but we must hope.
Caligula and Hadrian - Unit and Building editors for Rome: Total War.
Now editing -
export_descr_unit.txt, export_descr_unit_enums.txt, export_units.txt, descr_model_battle.txt
export_descr_buildings.txt, export_descr_buildings_enums.txt, export_buildings.txt
@GPM... yeah, this reminds me of the blood mod... it started out pretty good too... and then hit a big brick wall with the RTW coding.. just like this one..
I'm not expecting that CA will do anything to facilitate the incorporation of either a blood mod or the 4 season mod in an expansion pack... that would be too much customer satisfaction for them to handle..
Vale, Dux of Earl
Artillerie... l'Argument Final des Rois
That sounds defeatist to me, I won't have it! You can save during the Prologue can't you? There is a script running through most of that. I'll have a look at the commands they use and come back to you.
Untill the script ends, you can't save in the prologue, I even went and tried it (and damn, the prologue is long and boring!).Originally Posted by Myrddraal
Anyway, I ran a simple test, I made a simple script like this
When I start a game with it, it gives me 10000 denarii, which tells me the script has loaded, then it pauses itself for 20 seconds, and in that time I can't save ro load, then it gives me another 10000 denarii, which tells me the pause is over, the script will then unload (as the next line terminates it) and hey presto, I can save and load again.Code:console_command add_money 10000 campaign_wait 20 console_command add_money 10000 terminate_script
I am hopeing there is a way arround this problem, but I'm not very optimistic on the matter.
Caligula and Hadrian - Unit and Building editors for Rome: Total War.
Now editing -
export_descr_unit.txt, export_descr_unit_enums.txt, export_units.txt, descr_model_battle.txt
export_descr_buildings.txt, export_descr_buildings_enums.txt, export_buildings.txt
Damn. Maybe CA can give us a hint???
@Myrddraal,
Enrique Ordono (Camera Hack mod) has suggested a possibility... use the show-me folder for the script.. and then rig a trigger in the game to start and stop the script... sounds too complicated for me to do though..
But, it does work for his Camera Hack script.. I can still save campaign games with the Camera Hack script loaded up...
However, the Camera Hack only runs during campaign battles... when the battle is done and I return to the Campaign map, I presume that the script is turned off again...
In the current problem, it would be probably necessary to trigger the start of the 4 season script by doing something concurrent with loading a game... and then trigger the termination of the 4 season script concurrent with pressing the ESC key (to bringup the savegame menu)..
How this can be setup I do not know.. maybe using the show-me sliding menu thingie can help...
Vale, Dux of Earl
Last edited by Dux of Earl; 12-07-2004 at 18:08.
Artillerie... l'Argument Final des Rois
the other problem is saving any global data. Once the script terminates it's variable values are gone. This means that the script can't store any info between runs. So how would you know to advance the year counter every fourth run of the script?
It might be possible, to make it so you can only save every four turns (i.e. at the end of the year). Then you could have one script file which runs for one cycle. I assume that the turns are counted from the moment the script is run. Also the script would have to have more variables in. At the moment it sets the date to a fixed number.
The other problem is how to trigger the script.
What if:
Your script only runs through 3 summer seasons and leaves the winter to the machine, so the autosaves/saves/loads would occur in winter.
This way you dont need storing anything as the script will be generating summers only. Then will be called again and generate 3 summers and so on. As aging is related to winters you have no problem there.
I havent actually read the code, so forgive me if Im wrong.
Managing perceptions goes hand in hand with managing expectations - Masamune
Pie is merely the power of the state intruding into the private lives of the working class. - Beirut
Or another idea. If the script runs from the start, but terminates itself if:
the player goes to the menu scroll
and
its in the first season of the turn.
Then the player can save/load.
This would mean that you could only save/load on the first turn of each year.
To restart the script once you've loaded a game, we put a copy of the script in the show me folder etc.
I took Enrique Orduno’s advice, and started working on a way to load the script using the show_me method.
This is what I have come up with, and it works!
First, open data/export_descr_advice.txt
Find the entry AdviceThread City_Construction_Build_mines_Next_Thread and add this to it;
Then scroll to the bottom of the file, and addCode:Script scripts\show_me\turn_script.txt
Finally copy your script into /data/scripts/show_me and call it turn_script.txt (or what ever you used for a file name in the first bit of code). Make sure your script starts with the ‘script’ statement, and ends with a ‘end-script’ not ‘terminate_script’.Code:Trigger 9999_Fix_Turns WhenToTest ButtonPressed Condition ButtonPressed faction_button AdviceThread City_Construction_Build_mines_Next_Thread 1
For example,
Now run the game, turn on advice, and click the faction information button, then hit the “Show Me How” button, and away we go! You can now turn off advice, but this needs to be done at the start of each game.Code:script console_command date 0 while I_TurnNumber = 0 end_while console_command date 0 console_command season summer while I_TurnNumber = 1 end_while console_command date 0 console_command season summer while I_TurnNumber = 2 end_while console_command date 0 console_command season summer while I_TurnNumber = 3 end_while console_command date 0 console_command season winter while I_TurnNumber = 4 end_while console_command date 1 console_command season summer while I_TurnNumber = 5 end_while console_command date 1 console_command season summer while I_TurnNumber = 6 end_while console_command date 1 console_command season summer while I_TurnNumber = 7 end_while console_command date 1 console_command season winter end_script
A bit of an inconvenience, but it does work, so it’s a big step forward!
What I would like to do is have it automatically run the script when ever the end turn button is pressed, I can set up a trigger for it, but I still have to press the “Show Me How”. Anyone got an idea on this one?
Last edited by GodsPetMonkey; 12-08-2004 at 00:28.
Caligula and Hadrian - Unit and Building editors for Rome: Total War.
Now editing -
export_descr_unit.txt, export_descr_unit_enums.txt, export_units.txt, descr_model_battle.txt
export_descr_buildings.txt, export_descr_buildings_enums.txt, export_buildings.txt
That should be easy. There's plenty of auto-launching advices in the prologue script. On a quick glance, I see that 'dismiss_advice' is a command for,well, dismissing advice ;) And perhaps advance_advice_thread launches advice? Or maybe declare_show_me?
I'm still not here
but then you would need another script to launch the second script... that wouldn't work.
Also remember that if you want the turns to work, you need to save during the first summer of a year.
To save the script needs to be stopped. As far as i can see, your script would also need to be run every 2 years.
You talking about my adaptation?Originally Posted by Myrddraal
If you are, nope on all counts (from my limited testing anyway, I felt after 2 years of 4 turns each with a few saves then loads, it was pretty sound), the save game keeps track of the turn number, so when you load a game, regardless of when you saved it, and then run the script (with out ending the turn first) by the show me method it will effectively fast forward through the script to the last point (really, all the iteration conditions evaluate as true untill the one concerning the current turn is hit).
Apart from having to load the script each time you want to play, its pretty much exactly what we are looking for. If we could solve the loading part, it would be perfect (or as close as we can get). Sadly I can't find any examples of the game automatically launching a show me sequence.
Caligula and Hadrian - Unit and Building editors for Rome: Total War.
Now editing -
export_descr_unit.txt, export_descr_unit_enums.txt, export_units.txt, descr_model_battle.txt
export_descr_buildings.txt, export_descr_buildings_enums.txt, export_buildings.txt
No i wasn't, I was talking about eadingas' suggestion. He mentions script commands to launch a script.
As for urs, wouldn't it need to be re-launced every time the script ended. You should make the script last ages and put in a way of terminating it so you can save.
That shouldn't be too hard. Monitor a condition like clicking on the faction button again. And make a new counter that changes to 1 on the first turn of each year, and 0 otherwise. If these two conditions are met, the script ends, and you can save your game. The script then has to be re-launched after saving.
Last edited by Myrddraal; 12-08-2004 at 13:57.
Or don't bother and save anyway
As its a show me script, the game can be saved/loaded whilst its running.
That's right, CA made it so that you can't save during a script loaded by the campaign files, but those started by the advisor proves no problem.
Though who said it had to make sense?
Caligula and Hadrian - Unit and Building editors for Rome: Total War.
Now editing -
export_descr_unit.txt, export_descr_unit_enums.txt, export_units.txt, descr_model_battle.txt
export_descr_buildings.txt, export_descr_buildings_enums.txt, export_buildings.txt
If I read correctly what you say, then the only problem is automatically launching the Show Me script at the beginning of the campaign, right? Then it shouldn't be a problem at all, since the same thing is done in Prologue, IIRC, we just have to check what commands are used for it...
I'm still not here
Sadly no, it doesnt load an external script, it just contains the code of those scripts in the prologue script.Originally Posted by eadingas
And using a prologue style script (one that loads with the start of a campaign) is what we tried originally.
Sigh.
Still, at least its not a major issue.
Caligula and Hadrian - Unit and Building editors for Rome: Total War.
Now editing -
export_descr_unit.txt, export_descr_unit_enums.txt, export_units.txt, descr_model_battle.txt
export_descr_buildings.txt, export_descr_buildings_enums.txt, export_buildings.txt
In which case, make a short script which loads up the advisor on the right thread. The player then clicks 'show me' and away we go. The original script ends and its done.
Ok here is a script which should be run from the beginning. It should end the script if the player presses the escape key and it is the first turn of a year. This will enable the player to save/load. He then needs to start up an identical script in the show_me folder. I haven't done that yet, and I haven't tested this one either. It may or may not work:
Code:declare_counter IsFirstTurn monitor_event EscPressed TrueCondition and I_CompareCounter IsFirstTurn = 1 end_script terminate_monitor end_monitor console_command date -50 set_counter IsFirstTurn 1 while I_TurnNumber = 0 end_while console_command date -50 console_command season summer set_counter IsFirstTurn 0 while I_TurnNumber = 1 end_while console_command date -50 console_command season summer while I_TurnNumber = 2 end_while console_command date -50 console_command season winter while I_TurnNumber = 3 end_while console_command date -51 console_command season summer set_counter IsFirstTurn 1 while I_TurnNumber = 4 end_while console_command date -51 console_command season summer set_counter IsFirstTurn 0 while I_TurnNumber = 5 end_while console_command date -51 console_command season summer while I_TurnNumber = 6 end_while console_command date -51 console_command season winter while I_TurnNumber = 7 end_while console_command date -52 console_command season summer set_counter IsFirstTurn 1 terminate_script
I'm confused.
I don't really see the point of running a script with campaign load, when the only way they are going to be able to save or load is if they end it, then when they do that, make them run a show me script in order to continue.
Why not just get them to run a show me script from the very begining? You never need to worry about saveing/loading then, you wont need an exit clause, and they can do it at any time they choose. You do have to make them run the script every time they load a game of that campaign, but you have to do that either way.
Caligula and Hadrian - Unit and Building editors for Rome: Total War.
Now editing -
export_descr_unit.txt, export_descr_unit_enums.txt, export_units.txt, descr_model_battle.txt
export_descr_buildings.txt, export_descr_buildings_enums.txt, export_buildings.txt
I guess so, I don't know why I did that then...
Seeing as nobody else has done anything. I though I'd try and develop some of the ideas we had:
First of all I made a new trigger in export_descr_advice.txt:
Then I made a new thread above this:Code:;------------------------------------------ Trigger 2123_fourseasons WhenToTest FactionTurnStart Condition FactionIsLocal and I_TurnNumber = 0 and FactionType romans_julii and not I_MapName data/world/maps/campaign/sons_of_mars/descr_strat.txt AdviceThread Seasons_Thread 1
This is just so that whenever you run a new game as the Julii (I guess that condition could be removed) the advisor asks you to run the script, I'll make a personalised text for it eventually.Code:;------------------------------------------ AdviceThread Seasons_Thread GameArea Campaign Item Seasons Suppressible y Uninhibitable Verbosity 1 Priority 1 Threshold 1 MaxRepeats 100 RepeatInterval 1 Attitude Concerned Presentation Default Title Settlement_Rebels_Take_Action_Text_01_Title Script scripts\show_me\fourturns_script.txt Text Settlement_Rebels_Take_Action_Text_01_Text1
This is the script called fourturns_script.txt:
Code:script suspend_unscripted_advice true suspend_during_battle on console_command date -50 console_command season summer while I_TurnNumber = 0 end_while disable_shortcuts options_button true console_command date -50 console_command season summer while I_TurnNumber = 1 end_while console_command date -50 console_command season summer while I_TurnNumber = 2 end_while console_command date -50 console_command season winter while I_TurnNumber = 3 end_while disable_shortcuts options_button false console_command date -51 console_command season summer while I_TurnNumber = 4 end_while disable_shortcuts options_button true console_command date -51 console_command season summer while I_TurnNumber = 5 end_while console_command date -51 console_command season summer while I_TurnNumber = 6 end_while console_command date -51 console_command season winter while I_TurnNumber = 7 end_while disable_shortcuts options_button false console_command date -52 console_command season summer while I_TurnNumber = 8 end_while disable_shortcuts options_button true console_command date -52 console_command season summer while I_TurnNumber = 9 end_while console_command date -52 console_command season summer while I_TurnNumber = 10 end_while console_command date -52 console_command season winter while I_TurnNumber = 11 end_while disable_shortcuts options_button false console_command date -53 console_command season summer while I_TurnNumber = 12 end_while disable_shortcuts options_button true console_command date -53 console_command season summer while I_TurnNumber = 13 end_while console_command date -53 console_command season summer while I_TurnNumber = 14 end_while console_command date -54 console_command season summer while I_TurnNumber = 15 end_while end_script
As you can see at the top I used 'suspend_during_battle on. It worked! The script no longer ends when I play a battle. This is great news.
You'll also see I added 'disable_shortcuts options_button' at some points in the script. I haven't tested this yet, but it should stop the player going to the main menu unless it is the first turn of a year. This will stop the player saving at the wrong time.
Now all we need is a trigger and advice which askes the player to run the script when you load a game.
Now for some more interesting stuff I found. I found the following commands whilst looking through files:
I know that 'advisor_portrait_button' is the correct term for that button. I might be possible to put it in a startup script like this:Code:e_select_settlement select_ui_element selected_item_button simulate_mouse_click rclick_up reveal_advice
Code:select_ui_element advisor_portrait_button simulate_mouse_click rclick_up
This might not seem usefull at first glance, but. What if the show me button was called 'advisor_show_me_button' or something like that. Then we could have a startup script which goes something like:
This would mean there would be no need for the player to do anything, the script would run itself. Of course this wouldn't work for loading games but it would still be amazing, I have yet to test it.Code:Script Wait 2 ;Wait two seconds for the advisor portrait to appear. Reveal_advice ;Start the advisor talking (assuming that is what this command does) select_ui_element advisor_show_me_button simulate_mouse_click rclick_up ;Start the script dissmiss_advice ;Stop the advisor end_script ;Stop the script
Last edited by Myrddraal; 12-15-2004 at 09:36.
You say no saving between years - does that disable quicksave?
I'm still not here
No, I didn't think of that, but players should know that saving between years screws up the dates system.
The show_me button is named "advisor_show_me_button". I've always have had trouble monitoring wether a button was pressed or not, so it might not work to simulate it.
Anyway, nice implementation of the scripting stuff.
Thx Enrique, I thought it was, but I hadn't seen it anywhere.
I can't test it right now (problems with my computer) but if it works it means we have a way of running startup scripts without stopping the player saving.
Bookmarks