View Full Version : More than two turns a year - release
Myrddraal
03-09-2005, 11:38
Download (http://82.68.81.226/david/ScriptGen/ScriptGenerator.exe)
Many thanks to all the people who helped me work out this script.
Follow the instructions in the readme below which includes instructions or how to run and use the script.
Thx Myrddraal
README
The following is a method for increasing the number of
turns in one year.
CONTENTS
- HOW TO INSTALL
- HOW TO USE
- NOTES
--------------------------HOW TO INSTALL--------------------------
1.
First, download the script generator and use it to generate a script called descr_script in the show me folder. This is where you set the start and end dates and the number of turns you want per year NOTE: There will only be one turn for winter or else aging is affected, so if you mod is in cold climates, I would recommend you have about 4 turns a year max (one 'season' for winter). Note if you are using a mod you have to change the start date to the appropriate date for the mod
2.
Open the file export_descr_advice.txt in the Data
folder.
Search for
AdviceThread
Help_Campaign_Keyboard_Shortcuts_Scroll_Thread
Select the entire section (from ;--------- to Text)
and replace it with:
;------------------------------------------
AdviceThread Help_Campaign_Keyboard_Shortcuts_Scroll_Thread
GameArea Campaign
Item Help_Campaign_Keyboard_Shortcuts_Scroll_Text_01
Uninhibitable
Verbosity 0
Threshold 1
Attitude Normal
Presentation Default
Title four_turns_Title
Script scripts\show_me\descr_script.txt
Text four_turns_Text1
3.
Open export_descr_advice_enums.txt in the Data folder.
Add to the bottom of this file the following text:
four_turns_Title
four_turns_Text1
4.
Open export_advice.txt in Data\text
Add to the bottom of this file the following text:
;-------------------
{four_turns_Title} Four turns a year
{four_turns_Text1}
To finish loading the four turns a year script, click
on the 'Show me how' button. Remember, you must do
this every time you load a saved game.
5.
Now go to Data\world\maps\campaign\imperial_campaign
(or whichever campaign you want to apply the script
to)
Create a new text file called descr_script.txt
containing the following text:
script
advance_advice_thread
Help_Campaign_Keyboard_Shortcuts_Scroll_Thread
select_ui_element advisor_show_me_button
simulate_mouse_click lclick_down
simulate_mouse_click lclick_up
end_script
7.
Now open descr_strat.txt in the same folder and add
the following lines to the bottom of the file
script
descr_script.txt
Installation complete.
--------------------------HOW TO USE--------------------------
When starting a new campaign, the script should
automatically run after about one second. You must
relaunch the script each time you load the game. To
run the script, when starting a new campaign, or when
loading a saved game, press F1.
A panel will appear with a list of shortcuts. In the
top right hand corner, click on the question mark.
The advisor will appear and ask you to click on the
'show me how' button. Once this is done, play as
usual.
Remember that this must be done not only at the start
of the campaign, but also each time you load the saved
game.
--------------------------Notes--------------------------
Many thanks go to those at the www.totalwar.org (http://www.totalwar.org/) forums
who helped me develop the ideas used in this script.
If you wish to officially use this script in a mod,
you are very welcome to, but please inform me as I
like to know how my work is put to use.
Myrddraal
Nice - this should make the four-turns-per-year people happy. Although build times/income/etc should probably be adjusted.
Have you found any other uses for the scripting in RTW? Specifically, I'm trying to force the Civil War to start earlier for a mod I'm working on. Is there a way to script it in?
Yes but doesnt the use of Scripts ingame cause NO saves to be possible? Was that fixed in the 1.2 patch? Because I know that was a problem before where you could not save a game whiile running the script?
Thanks,
Lt
Myrddraal
03-09-2005, 15:41
No lt, it wasn't fixed in the patch, thats only the use of campaign scripts, to get around this, I have used a show me script which allows saved games. I only use the campaign script to launch the show me script. I assure it does work ~;)
By the way, any feedback would be good, I want to make sure it works on another pc...
Thats right I forgot about the advice section. I think CA should have went 4 turns anyway, its a shame they didnt and also if you look at no Sea battles its sad, I know they wanted to add them. ~:)
I hope they fix the problems with the battlefield AI from the 1.2 patch because the AI is technically worse for battles now than before, but the campaign AI is better. lol But also LESS aggressive I noticed. In the First SPQR without the 1.2patch the player was attacked alot, now the AI seems more passive and there is nothing you can do about it.
Lt
Good show on the script! ~:)
Myrddraal, since I haven't been following the development: Were you able to solve the problem of the script not automatically running?
Sundjata Keita
03-09-2005, 22:47
Thanks Myrddraal, is this easily changable to a script with 12 turns per year?
Myrddraal
03-10-2005, 11:43
@ khelvan: The script runs automatically the first time you play, but needs to be relaunced manually on loading a saved game...
@ Sundjata: Yes it is, just follow the instructions, but there can only be one winter turn...
Myrddraal
03-17-2005, 16:01
I have written a standalone version of the script generator, I will upload it when I get home...
Myrddraal
03-18-2005, 13:52
Standalone exe made, original download updated
Yes but doesnt the use of Scripts ingame cause NO saves to be possible? Was that fixed in the 1.2 patch? Because I know that was a problem before where you could not save a game whiile running the script?
Thanks,
Lt
Yeah, but really, did it take two seasons to build a basic barracks? Consider each turn a season, Spring, Summer, Fall, Winter. If it takes 4 turns to build, that's an entire year your peasants could be hard at work. If it should take more, you can edit the turns in
C:\Program Files\Activision\Rome - Total War\Data\export_descr_buildings.txt
I've been poking around the scripts and editing them myself :)
Myrddraal
03-18-2005, 19:49
Well if you like you can have 12 turns a year, but remember the limitation, you can only have one winter turn per year or ageing gets screwed. I guess CA weren't expecting us to do this when they linked aging to winter...
Myrddraal
03-30-2005, 13:56
If anyone downloaded this before I updated the script generator, I included a readme with instructions which I have now lost... Could someone send it to mad_toad@hotmail.com?
Epistolary Richard
04-06-2005, 15:45
If you're having no joy getting the script to run automatically when a game is loaded, could a new trigger be defined to automatically bring the advisor up in the first turn when a game is reloaded?
Something like:
Trigger 3000_Multiple_Turns_Trigger
WhenToTest FactionTurnStart
Condition FactionType slave
AdviceThread Help_Campaign_Keyboard_Shortcuts_Scroll_Thread 0
And include in the AdviceThread a maximum number of times it can appear
MaxRepeats 0
Of course, this would only work if the save game doesn't make a note of advice already received. If it does then you'll only get it the first time you start a campaign.
Myrddraal
04-06-2005, 22:55
I've tried this, but why faction slave?
I tried with the it as the faction I was playing as, but apparently it doesn't count the loading the game as the start of the factions turn...
BTW, I've got the readme as you can tell by the first post.
SwordsMaster
04-06-2005, 23:03
I've tried this, but why faction slave?
I tried with the it as the faction I was playing as, but apparently it doesn't count the loading the game as the start of the factions turn...
BTW, I've got the readme as you can tell by the first post.
If I may answer that, this is only an assumption: when you save the game, your faction´s turn is already launched, and thus it can´t trigger anything, as once you´ve loaded the game, it starts at the same point where you saved it,in the middle of the turn.
I think that the slave faction is a nice pick, as it is the only factio that can never be wiped out, thus allowing to run the script even if you erase from the map all the other potential "triggers".
Myrddraal
04-06-2005, 23:05
Yes but you need to end the turn to get that advice, which means its too late to run the script
It has to be run as soon as the game is loaded...
SwordsMaster
04-06-2005, 23:12
Yes but you need to end the turn to get that advice, which means its too late to run the script
It has to be run as soon as the game is loaded...
well, technically yes. But IMHO the script has to be run before NEXT turn starts rather than before the current one ends. Altho I dont really know how the engine loads the turns, I mean, does it load them as they happen?
Because that way, you could do the thing with the slave faction. If it loads the next turn as the current turn is happening, for instance, then you cannot do that.
Epistolary Richard
04-07-2005, 10:26
Yes but you need to end the turn to get that advice, which means its too late to run the script
It has to be run as soon as the game is loaded...
If you have to run the script before you hit the end turn button then my suggestion wouldn't work. I assumed that the script had to be run at any time before the year change, but perhaps that's not the case. I picked slave because its (almost always) at the end of the faction list and so it will always occur before the year change and after everyone else. All these are just ideas as to how to make it more obvious to players to run the script, the existing method works perfectly well so long as they remember to relaunch it each time.
There are some more possibilities, but I'd prefer to come back with something that I know works rather than talking off the top of my head. Hopefully I'll have a chance to get my hands dirty over the weekend.
Myrddraal
04-07-2005, 11:02
Your quite right about the script needing to be run before the end of the year not the turn, but I don't know that an advice thread pauses the AI sequence...
I thought that the advice would come up, and the turn would continue on, right up until the year changes, effectively meaning that the advice would appear at the start of the next turn....
If it does pause the AI sequence then thats ideal...
Can I ask, I didn't use that extra bit of script which is supposed to make it run automatically when you start a campaign, and as nobody mentioned it, I get the impression it doesn't work.... Does it?
Epistolary Richard
04-09-2005, 15:29
I've had a chance to test this out now. First I got CTDs on startup with an error about unrecognised property in the eda, but then I realised that I had copied blind:
AdviceThread
Help_Campaign_Keyboard_Shortcuts_Scroll_Thread
GameArea Campaign
Item
Help_Campaign_Keyboard_Shortcuts_Scroll_Text_01
When I think it should have read.
AdviceThread Help_Campaign_Keyboard_Shortcuts_Scroll_Thread
GameArea Campaign
Item Help_Campaign_Keyboard_Shortcuts_Scroll_Text_01
That let me into the game.
When I went into the campaigns, the script didn't start up. When I started it manually, here's what happened...
Trial 1
Turn 1 Summer 270 BC
Turn 2 Winter 270 BC
Turn 3 Summer 269 BC
activate script on activation year jumps to 866 AD
Turn 4 Summer 867 AD
Trial 2
Turn 1 Summer 270 BC
activate script icon turns to winter, but no changes to map
Turn 2 Winter 269 BC
Turn 3 Winter 268 BC
Turn 4 Winter 267 BC
Trial 3
as trial 2
Trial 4
Turn 1 Summer 270 BC
activate script icon turns to winter, year jumps to 866 AD
Turn 2 Summer 867 AD
Turn 3 Winter 867 AD
Turn 4 Summer 868 AD
At this point I exited the game and saw the error message:
campaign\descr_script.txt line 3 column 1, don't recognise this token Help_Campaign_Keyboard_Shortcuts_Scroll_Thread
Trial conditions:
m/m/Briton
Used default 4 turn a script from generator
Script activation by F1, ?, click on show_me_how, click on tick sign to get rid of shortcuts
No other actions apart from hitting end turn button
I'm going to poke around and see if I can tell what's going wrong. The significance of the 866AD is that this is the year that the generated script ends (which seems a bit strange as the end date was supposed to be 14AD).
console_command date 866
console_command season summer
console_command season winter
while I_TurnNumber = 1136
end_while
end_script
I'll try using replacing it with one of the ones you did manually and see if that's make a difference.
Epistolary Richard
04-09-2005, 16:18
That sorted it. I used this script you wrote in the Scripting thread:
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
And it worked (well, the years started going backwards but that's just how it's written), though I got the same error message as before. So it would seem that auto-start at the beginning of a campaign isn't working and there's maybe something not quite right with the Script Generator.
------------
On the subject of triggers, the idea for the trigger before the slave faction didn't work. As you thought, the AI doesn't stop and so the new turn rolls over before the script can be run.
Instead I tried out this:
;------------------------------------------
Trigger 2150_Multiple_Turns_Trigger
WhenToTest ButtonPressed
AdviceThread Help_Campaign_Keyboard_Shortcuts_Scroll_Thread 0
When you start a new campaign, this triggers the advisor the first time you press the faction, recruitment or building buttons on the UI (and the end turn as well). If you dismiss the advice without running the script, she will appear again, however if you accept it then she doesn't return again.
Unfortunately, the same can't be said for a loaded game. In that case she appears when you push any of the above buttons. But even if you run the script she reappears every time you push one of those buttons.
Myrddraal
04-12-2005, 11:57
This is what worries me:
console_command date 866
console_command season summer
console_command season winter
while I_TurnNumber = 1136
I'll have a look at the script gen. Thx ER
Myrddraal
04-16-2005, 19:38
I've fixed the ScriptGenerator, but I can't upload it yet. I will ASAP.
MajorFreak
04-18-2005, 11:13
oh bugger, dead link. *cries*
[cF]HanBaal
04-18-2005, 23:58
When you start a new campaign, this triggers the advisor the first time you press the faction, recruitment or building buttons on the UI (and the end turn as well). If you dismiss the advice without running the script, she will appear again, however if you accept it then she doesn't return again.
Unfortunately, the same can't be said for a loaded game. In that case she appears when you push any of the above buttons. But even if you run the script she reappears every time you push one of those buttons.
That's good (and some bad) news if I follow correctly. The good ones is that we finally have something to ALWAYS remind us to press F1 after each load, and before the end of that turn correct? And the bad ones is that the "reminder"/advisor appears every time we press any of those UI buttons you mentioned, even after we put the script up and running correct?
Suggestion (I'm n00b in modding stuff so this may sound crazy): can you make your trigger make the advisor appear only when we push the 'end button', instead of all those UI buttons? That way the 'reappearing' problem wouldn't be a problem coz we only press the end button once (in the end of each turn and before the next turn starts, as we need). The question would be: When you press the 'end button' does the advisor/ stalls the action 'end of turn' and let's you do anything? In other words, does it gives us time to still press F1 before the new turn begins as we need?
Epistolary Richard
04-19-2005, 10:13
The UI buttons would replace the F1 - so you reload the game and click any button and the advisor will pop up and ask you to press the showmehow button which will then run the script. But on a reload (not on an initial start-up) he then keeps appearing when you subsequently press the UI buttons.
Unfortunately using the endturn button wouldn't work because the game would then start going into the AI factions - giving only a limited amount of time to press the showmehow button. And the advisor would still pop up when you pressed endturn subsequently.
There should be a way of ensuring that it only appears once, which I thought was already inherent in the advice thread but evidently not. The effect of the advice thread variables - though they appear obvious - haven't been properly documented so finding a solution for this approach is a matter of trial and error.
MajorFreak
04-19-2005, 11:20
hellooooooooo...dead link from the forum specific thread. help
Epistolary Richard
04-19-2005, 12:26
If you're referring to the Download link at the top of this thread, then Myrddraal already said that he took it down to fix the ScriptGenerator and it will go back up again shortly.
Myrddraal
04-19-2005, 12:34
Sorry guys. I've actually got the working script gen here. I'm having trouble uploading it....
The_Mark
04-19-2005, 15:42
Shouldn't the "suspend_unscripted_advice" command prevent her from popping up while the script is running?
Myrddraal
04-19-2005, 16:20
It should yes. I seem to remember that needs to be run at the beginning of each turn. In the meantime. The link is back up with the corrected ScriptGen
MajorFreak
04-20-2005, 03:32
hooray!!!
I have tried now a couple of times but it doesn't work for me. I do as you say in your first post except for Im using the script gen. Im using RTR 5.4.1 if that is any help...
Myrddraal
04-20-2005, 08:38
Are you using the new script gen? The one I just uploaded?
Does the script run at all?
Are you using the new script gen? The one I just uploaded?
Does the script run at all?
well what do you mean with "just"? I uploaded it some 1 hour before I wrote the post.
When I run the script I get up a menu were I can choose what file to script and I push a button which says "generate" and a progress bar fills up. But now is there only one file to script or are there more? A small readme might be good have if there is more things to do.
Epistolary Richard
04-20-2005, 18:32
There are installation instructions in the first post of this thread. Is there any other information that you need?
[cF]HanBaal
04-20-2005, 22:18
Unfortunately using the endturn button wouldn't work because the game would then start going into the AI factions - giving only a limited amount of time to press the showmehow button.
I see. It would be indeed a not-so-good solution.
------------
There should be a way of ensuring that it only appears once, which I thought was already inherent in the advice thread but evidently not. The effect of the advice thread variables - though they appear obvious - haven't been properly documented so finding a solution for this approach is a matter of trial and error.
Shouldn't the "suspend_unscripted_advice" command prevent her from popping up while the script is running?
It should yes. I seem to remember that needs to be run at the beginning of each turn
I'm waiting eagerly for a successful update on this by either you or Myrdraal! Any success? This is the final step for making the 4turn-year mod perfect so I (and many mods' team members) would be VERY apreciated if anyone with time and skill could look into it asap...please :embarassed:
------
If anyone out there has the skills and time but feels this is a not so important feature to waste your precious time, please consider on these important advantages:
-more realistic movements and actions/reactions (the "time bandits" expression a member of the mod I'm working on mentioned, sums the irrealistic consequence that would happen if armies would be given realistic 6month movement points);
-realistic aging in relation to moves' range (Alexander wouldn't be dead before he reached India);
-more realistic training&building times&diferentiation (most basic units won't take 6months anylonger to get recruited and in fact the whole training/building system would actually be perfected due to a better diferentiation)
-a realistic snow season (instead of inadequately having snow 6months per year on many regions)
Cmon people, we're closer than ever to make rtw SOOO much better ~:)
Shigawire
04-21-2005, 01:04
Hear hear!
Let's be solution-oriented! ~:cheers:
There are installation instructions in the first post of this thread. Is there any other information that you need?
I missread what he wrote in the first post. I thought the instructions was for doing it manually and not using a script generator.
Myrddraal
04-21-2005, 12:43
No, you need to follow them :smile:
[cF]HanBaal
04-22-2005, 16:18
*bump*
https://forums.totalwar.org/vb/showpost.php?p=751858&postcount=38
Could you at least reply to the above Myrddraal? If I understand, your current script still hasn't a way yet to ALWAYS remind people to press F1 after each load correct? Can't you or Epistolary Richard look at that UI buttons' trigger suggestion to ALWAYS remind us by E.R. and complete it with that "suspend_unscripted_advice command" to make it perfect and nonrepetitive? Please mates, this is the final step.
Epistolary Richard
04-22-2005, 17:14
I haven't used "suspend_unscripted_advice" before, but I'll give it a try this evening (or the wee hours of the morning more likely). And even if we keep the advisor under wraps it's not an ideal solution because the player still has to press a UI button before pressing end turn.
Plus, of course, it might well stop the advisor popping up for any other reason.
Edit: Later that day...
Okay, I put in "suspend_unscripted_advice" each turn as Myrddraal suggested and it seemed to work both for new games and for reloads. This is the script that I've been using, it's one of Myrddraal's early versions, before the script generator. As you see, it just has "suspend_unscripted_advice" each turn.
script
suspend_unscripted_advice true
suspend_during_battle on
console_command date -50
console_command season summer
while I_TurnNumber = 0
end_while
suspend_unscripted_advice true
disable_shortcuts options_button true
console_command date -50
console_command season summer
while I_TurnNumber = 1
end_while
suspend_unscripted_advice true
console_command date -50
console_command season summer
while I_TurnNumber = 2
end_while
suspend_unscripted_advice true
console_command date -50
console_command season winter
while I_TurnNumber = 3
end_while
suspend_unscripted_advice true
disable_shortcuts options_button false
console_command date -51
console_command season summer
while I_TurnNumber = 4
end_while
suspend_unscripted_advice true
disable_shortcuts options_button true
console_command date -51
console_command season summer
while I_TurnNumber = 5
end_while
suspend_unscripted_advice true
console_command date -51
console_command season summer
while I_TurnNumber = 6
end_while
suspend_unscripted_advice true
console_command date -51
console_command season winter
while I_TurnNumber = 7
end_while
suspend_unscripted_advice true
disable_shortcuts options_button false
console_command date -52
console_command season summer
while I_TurnNumber = 8
end_while
suspend_unscripted_advice true
disable_shortcuts options_button true
console_command date -52
console_command season summer
while I_TurnNumber = 9
end_while
suspend_unscripted_advice true
console_command date -52
console_command season summer
while I_TurnNumber = 10
end_while
suspend_unscripted_advice true
console_command date -52
console_command season winter
while I_TurnNumber = 11
end_while
suspend_unscripted_advice true
disable_shortcuts options_button false
console_command date -53
console_command season summer
while I_TurnNumber = 12
end_while
suspend_unscripted_advice true
disable_shortcuts options_button true
console_command date -53
console_command season summer
while I_TurnNumber = 13
end_while
suspend_unscripted_advice true
console_command date -53
console_command season summer
while I_TurnNumber = 14
end_while
suspend_unscripted_advice true
console_command date -54
console_command season summer
while I_TurnNumber = 15
end_while
end_script
... with this trigger
------------------------------------------
Trigger 2150_Multiple_Turns_Trigger
WhenToTest ButtonPressed
AdviceThread Help_Campaign_Keyboard_Shortcuts_Scroll_Thread 0
With this method, pressing any one of the following buttons will bring up the advisor. You have to click on her and she'll start talking about the 4 turns script, then click on show me how and it'll run it.
I didn't try refusing the advice - I assume if you do, she won't appear again.
Note, also I found that requested advice still seems to appear.
Edit: Even later that day...
Okay, there's another problem. The advisor stays away right up until I go into a battle. As soon as I come out and hit a button then she pops back up. The solution may be no more complicated than repeating the suspend during battle line in the same way as the suspend unscripted advice...
I have done as you have written in your first post Myrddraal but it still doesn't work. The advisor do say that if I click on the "show me how" button it will be activated but the button is greyed out (mybe supposed to be?). I have also tried with waiting a few minuites before doing anything from the beginning.
I wonder if the text within the () just down below is supposed to be in the file.
4.
Open export_advice.txt in Data\text
Add to the bottom of this file the following text:
;-------------------
{four_turns_Title} (Four turns a year)
{four_turns_Text1}
(To finish loading the four turns a year script, click
on the 'Show me how' button. Remember, you must do
this every time you load a saved game.)
In the file export_descr_advice there are two places which says:
AdviceThread
Help_Campaign_Keyboard_Shortcuts_Scroll_Thread
the first only says like above then there are another one futher down that looks like this:
;------------------------------------------
Trigger 2137_Help_Campaign_Keyboard_Shortcuts_Scroll_Trigger
WhenToTest ScrollAdviceRequested
Condition ScrollAdviceRequested help_scroll
AdviceThread Help_Campaign_Keyboard_Shortcuts_Scroll_Thread 0
Are Im supposed to change anything here too?
Myrddraal
04-23-2005, 18:27
you don't change the trigger one
Thanks for the help Myrddraal but I have to give up on this. I simply dont have the knowledge to correct the problem.
It is a good mod as it would be more correct then the 2 turns years that CA made. I hope it will be included in RTR as it would do a lot for the game.
Myrddraal
04-24-2005, 21:51
I'll upload the files eventually :sad: then it should be an easy install
What happens if the player does not run the script upon loading? It simply runs 2 turns a year with no other adverse effects? What if upon a second load the player hits F1. Will this cause issues?
[cF]HanBaal
04-25-2005, 07:51
I haven't used "suspend_unscripted_advice" before, but I'll give it a try this evening (or the wee hours of the morning more likely).
Thx for giving it a try ~:)
----
Okay, I put in "suspend_unscripted_advice" each turn as Myrddraal suggested and it seemed to work both for new games and for reloads. This is the script that I've been using, it's one of Myrddraal's early versions, before the script generator. As you see, it just has "suspend_unscripted_advice" each turn.
That's great news! If no bugs appear this means the main problem (advisor repetitiveness) is solved.
Okay, there's another problem. The advisor stays away right up until I go into a battle. As soon as I come out and hit a button then she pops back up. The solution may be no more complicated than repeating the suspend during battle line in the same way as the suspend unscripted advice...
I believe that if it worked before that same "suspend advice" command can also properly function in this situation too. And I seriously hope those "..." you put in the end mean you meant taking another look at it eh? ~;)
And even if we keep the advisor under wraps it's not an ideal solution because the player still has to press a UI button before pressing end turn.
That's not even a problem I believe. If I understand correctly the advisor will pop up after we load/start campaign and every time we press any of the training/building/faction UI buttons right? I believe any player always presses at least one of those, after loading/starting any campaign even if it is just for a quick overlook. Even if he doesn't (which I think will be a 1 in a million case) and since the advisor also pops up when we press end turn (right?), the player will immediately understand he 'forgot' to start the script before ending the turn... and reload again. But as I said, I don't believe this is going to happen.
-----------------
Final question:
Do we need to have the advisor on to get this 'reminder'? If so, is it possible to "suspend" EVERY other advice? If not, can we at least have it at 'low advice level'?
Myrddraal
04-25-2005, 08:18
What happens if the player does not run the script upon loading? It simply runs 2 turns a year with no other adverse effects? What if upon a second load the player hits F1. Will this cause issues?
If the player forgets to run the script the first turn, or starts the script after playing a bit of normal two turns, when he runs the script, the date and season will revert to what they would have been had the script been run from the beginning. The only adverse effect I can think of is that people who had grown older would keep the years they had aquired without the script running.
Okay, there's another problem. The advisor stays away right up until I go into a battle. As soon as I come out and hit a button then she pops back up. The solution may be no more complicated than repeating the suspend during battle line in the same way as the suspend unscripted advice...
The suspend during battle line stops the script being cancelled if a battle is played. This means you don't have to start the script again after every battle.
I've tried this solution before, but whatever you do, you can't have the advisor pop up immediately on load. The user has to do something. Like you can make the advisor pop up on selection of an army or anything, but there has to be something. There is no trigger: onload as far as I know.
The_Mark
04-25-2005, 14:12
but whatever you do, you can't have the advisor pop up immediately on load
Yes you can. A trigger that checks if turn number > 0 will return always true, popping up at the start of a turn.
Also, shouldn't advancing the advice thread in question forward prevent her from popping up?
Myrddraal
04-25-2005, 14:40
:dozey:
Stupid me...
Epistolary Richard
04-25-2005, 15:34
Do we need to have the advisor on to get this 'reminder'? If so, is it possible to "suspend" EVERY other advice? If not, can we at least have it at 'low advice level'?
No, you don't need to have the advisor on. The conditionals on whether or not the advisor appears when the trigger is activated are listed in the AdviceThread lines which I really don't understand properly. Needless to say, there are some advice threads such as 'Why don't you consider moving your troops, you lazy dumb-ass?" which are turned off and some such as the advice threads that are actually requested which are still on.
Yes you can. A trigger that checks if turn number > 0 will return always true, popping up at the start of a turn.
What event would you tie that trigger to? Would a factionturnstart event work if you reloaded a game that had been saved in the middle of your turn?
The_Mark
04-25-2005, 16:24
Gah. Why can't the advisor only check a condition...
:dozey:
Stupid me...
I deserved that. Thanks.
Myrddraal
04-25-2005, 17:17
Um, I wasn't being sarcastic... (perhaps that was a bad smilie) But now you say it, I remember why I said the first thing. Thats right it has to check an event!
Now I feel even more of an idiot. Oh well :smile:
The_Mark
04-25-2005, 17:58
Well, you're not the only one ~D
I'm really beginning to miss OFP scripting now.
gah.
Epistolary Richard
04-25-2005, 18:44
Just remember, kids, smilies are a powerful tool, but they can be used for both good and evil :wink:
Now returning to the matter in hand...
Also, shouldn't advancing the advice thread in question forward prevent her from popping up?
Unfortunately, I can't test anything for the next couple of weeks at least. If you've got an idea then run with it ~ otherwise I think Hanbaal might explode :grin:
[cF]HanBaal
04-25-2005, 19:33
The suspend during battle line stops the script being cancelled if a battle is played. This means you don't have to start the script again after every battle.
Nice. One less problem till perfection.
No, you don't need to have the advisor on.
And there goes 2 :balloon2: . I believe that with these 2 solved, we reach perfection and even the few unbelievers, nay-saying folks in our mod won't have the arguments to deny what most people already want ~:)
--------------
Unfortunately, I can't test anything for the next couple of weeks at least. If you've got an idea then run with it ~ otherwise I think Hanbaal might explode
2 WEEKS!!! :bomb:
Since E.Richard is off for some time could you, Myrdraal or anyone capable, compile a new version with this new advisor/"reminder" (popping up every time we press any of the UI buttons or even also the selection of an army as you suggested) and with its "suspend" commands (to avoid its repetitiveness after the script is running)? I would be grateful a million times if you could do that for us :bow:
The_Mark
04-25-2005, 21:43
I didn't try refusing the advice - I assume if you do, she won't appear again.
She should, and CA had this in mind while doing this. AdviceSupressed-event should fire when player dismisses her, so we can keep her popping up until the player gets the message and starts the script ~D
Thanks for the help Myrddraal but I have to give up on this. I simply dont have the knowledge to correct the problem.
It is a good mod as it would be more correct then the 2 turns years that CA made. I hope it will be included in RTR as it would do a lot for the game.
:embarassed: Here I come back with my tail between my legs. After writing my post I had completly given up and put the game on the side.
This morning while eating my breakfast and thinking about what to do in school it suddenly hit me like a ton of bricks...in the script generator the original date was set on -270 while I use the RTR which starts in -280. :furious3: I have tried it now and it works now. Sorry about my pesting on this thread... :embarassed:
Myrddraal
04-26-2005, 20:39
:smile:
No problem, I'm glad you got it working. Perhaps you could upload the exact files you used. I.e. export_descr_advice.txt, export_descr_advice_enums.txt and export_advice.txt. For the ease of use of others.
:smile:
No problem, I'm glad you got it working. Perhaps you could upload the exact files you used. I.e. export_descr_advice.txt, export_descr_advice_enums.txt and export_advice.txt. For the ease of use of others.
I dont have the slightest idea of how to do that so I going to need some :help: on that. I got winRAR so that is the easy part but uploading is ???
MajorFreak
04-27-2005, 15:58
he might be talking about using the html uploader: http://www.totalwar.org/Downloads/Uploaders/RTWFinal.php
a_b_danner
04-28-2005, 16:01
Don't know if it has been mentioned...
I've been playing the Bouis RTR mod for 240 turns using this mod - 4 turns a year. No problems at all, with the exception that there are no random disasters - storms, floods, locust, earthquake, etc. Has anyone else noticed this?
MajorFreak
04-29-2005, 11:47
wouldn't shed a tear if that was the case. That's the main reason i save game with RTW - can you imagine losing that general/admiral you've been breeding for 240 turns over successive generations merely over an act of god/dess?
Myrddraal
04-29-2005, 12:20
I never see storms anyway. Am I just unlucky or what? I can't remember the last time I saw a storm. I've never ever ever seen a flood. The only disasters I see are volcanoes and plague.
Back to the point, I can't see why the script would stop plagues, unless they're set by year, but I thought they were random.... Hm
MajorFreak
04-29-2005, 16:27
small booboo on your part which prevented the autorun at start of campaign: (i'd been getting an annoying error txt about help campaign blah blah)did extensive testing and still got error until i figured it was just a carriage return typo
script
advance_advice_thread
Help_Campaign_Keyboard_Shortcuts_Scroll_Thread
select_ui_element advisor_show_me_button
simulate_mouse_click lclick_down
simulate_mouse_click lclick_up
end_script
script
advance_advice_thread Help_Campaign_Keyboard_Shortcuts_Scroll_Thread
select_ui_element advisor_show_me_button
simulate_mouse_click lclick_down
simulate_mouse_click lclick_up
end_script
works like a charm now. let's see if it gives only one winter...yes. works like you intended.
edit: AAAAAAAAAAGHHH!!! now, after that one perfect run, i couldn't replicate it. in fact, the darned script didn't work. add to that, i got a wierd error message when i hit alt+f4 after the 10th attempt, in frustration.
blah blah 5567, 5
don't recongize this token: endid a find in that file and found it to be the very last line...looked like the script had failed to complete and had stopped at year 8. i don't think this is related to my problems. I have to sleep now, but i'll try some more playtesting - perhaps a reboot? Anyhows, if worse comes to worse i'll revert to vanilla 1.2 and try again.
post-edit: tried a reboot. upon new campaign (provincial) i not only did not see the advisor popup, i even tried the F1 and question mark but the "showme" was greyed out - upon hitting the end turn i went to winter...i haven't a clue what's going on now. perhaps i bolloxed it up by all the restarts? (plus i was dicking around with "descr_strat_all.txt" and "descr_strat.txt"...even put the script lines at the end of both)pretty sure i tried duplicating the script in "_all" when i ran into problems, not before
a_b_danner
04-29-2005, 18:08
I never see storms anyway. Am I just unlucky or what? I can't remember the last time I saw a storm. I've never ever ever seen a flood. The only disasters I see are volcanoes and plague.
Back to the point, I can't see why the script would stop plagues, unless they're set by year, but I thought they were random.... Hm
I know that prepatch (1.2) that loading a savegame would stop all Disasters from occuring. I thought that had been fixed with the patch, but have mostly been playing with the four-turns-a-year since the patch came out. Maybe it wasn't fixed.
As to having storms/floods/earthquakes kill people off, well, it did sorta happen in real life.
Myrddraal
04-30-2005, 17:58
MajorFreak, just a question, how many years is your script set for? and how many turns a year?
MajorFreak
05-04-2005, 06:49
MajorFreak, just a question, how many years is your script set for? and how many turns a year?
the default of -170 to 14 plus 4 turns per year. VERY bizarre that your default would cut short at "en..." at 8 AD. i've tried doing the script generator more than once and each time i get the same error. i suppose i could change it manually, but i just thought i'd let you know. just tried it again for 0 AD and got a truncated "year -3" instead....even tried downloading it again. no joy.
:dizzy2:
Myrddraal
05-04-2005, 08:41
Very very weird. I'm sorry about this, it hasn't been a very smooth release. I'll see if I can fix it.
MajorFreak
05-05-2005, 10:35
np. One learns to be patient in these matters.
LorDBulA
05-06-2005, 18:45
Hi Myrddraal.
Does this part of your scipt work?
advance_advice_thread Help_Campaign_Keyboard_Shortcuts_Scroll_Thread
select_ui_element advisor_show_me_button
simulate_mouse_click lclick_down
simulate_mouse_click lclick_up
I tryed to replicate it but i was unsucesful.
This is what i made so far.
console_command trigger_advice Advise_Thread_Name
select_settlement Write_Eny_Settlement_Name
simulate_mouse_click lclick_up
wait 1
select_ui_element advisor_portrait_button
simulate_mouse_click lclick_up
wait 1
select_ui_element advisor_show_me_button
simulate_mouse_click lclick_up
select_ui_element advisor_dismiss_button
simulate_mouse_click lclick_up
As you can see its much more complicated then your script.
I would reelly apriciate any clue how to make your script work (that part that automaticly calls script).
Myrddraal
05-06-2005, 18:56
Why this bit?
select_settlement Write_Eny_Settlement_Name
simulate_mouse_click lclick_up
I'm not sure if mine works actually, it should do...
LorDBulA
05-06-2005, 20:02
The problem is that Advisor doesnt pop up afther console_command trigger_advice command.
But he will immidietly pop up when you open any scroll, press end turn button, select settlement etc ... Becouse selecting settlement is unnoticable for player i choose to use it in script.
the default of -170 to 14 plus 4 turns per year. VERY bizarre that your default would cut short at "en..." at 8 AD. i've tried doing the script generator more than once and each time i get the same error. i suppose i could change it manually, but i just thought i'd let you know. just tried it again for 0 AD and got a truncated "year -3" instead....even tried downloading it again. no joy.
:dizzy2:
MajorFreak you have donr the same mistake as me. In the RTR you have to change the time in the scriptgen to -180 instead of -170.
From what you have written I understand that you have tried with the RTR.
Myrddraal can you in your first post add a line saying that if you are using the RTR mod you have to cahnge the beginning time in the scriptgenerator from -170 to -180 and otherwise do just as you say to get it to work.
MajorFreak
05-10-2005, 03:05
MajorFreak you have donr the same mistake as me. In the RTR you have to change the time in the scriptgen to -180 instead of -170.
From what you have written I understand that you have tried with the RTR.
uhhhhh...i'm using the vanilla version with the CVP, plus the far eastern map mod...beyond that i've only got the ballistas of dumbo slaying plus the BUGFIXER "patch", and a few tweaks to the units.
Download link broken, i'm going to cry, anyone think they could email Myrddraal's script gen to me?
I recently got the Script Generator from Caius' site, from a link I got in the Chat room. After fiddling with all the files to install and re-generating the script to match the 280BC start date of RTR 5.4.1, every time I hit "end turn", the date is advanced by a whole year, skipping all the summer seasons.
I may be the only person to have this problem, and it may be my own fault...but...help?
Epistolary Richard
06-11-2005, 17:45
Post the file that it generated, or at least the first section of it or so. Could be Caius has an old buggy version of the generator.
Post the file that it generated, or at least the first section of it or so. Could be Caius has an old buggy version of the generator.
Will do.
;This script is designed by Myrddraal to edit the number of turns in one year. It was automatically generated using Myrddraals Script Generator on the
script
suspend_during_battle on
console_command date -280
console_command season summer
console_command season winter
while I_TurnNumber = 0
end_while
console_command date -279
console_command season summer
console_command season winter
while I_TurnNumber = 1
end_while
console_command date -278
console_command season summer
console_command season winter
while I_TurnNumber = 2
end_while
console_command date -277
console_command season summer
console_command season winter
while I_TurnNumber = 3
end_while
console_command date -276
console_command season summer
console_command season winter
while I_TurnNumber = 4
end_while
console_command date -275
console_command season summer
console_command season winter
while I_TurnNumber = 5
end_while
&c..
Epistolary Richard
06-11-2005, 20:38
Yeah, I had the same thing happen to me. That's an old version of the script generator. I don't think I have a copy of the working version... try the link at the beginning of this thread and if that's broken then hopefully someone will host it.
wipeout140
06-29-2005, 14:47
Anybody got the lastest version as i would like to try it out.
Myrddraal, please update the downloadlink to the script. I want to try it with the new RTR 6.0.
Cant seem to download the script generator. Anyone else able to? Want to use it for a mini mod I am tryingto do for RTR v6.0
Kushan
Edit: Even later that day...
Okay, there's another problem. The advisor stays away right up until I go into a battle. As soon as I come out and hit a button then she pops back up. The solution may be no more complicated than repeating the suspend during battle line in the same way as the suspend unscripted advice...
Did anybody ever work this out? I have it working up to this point, but the advisor comes back after battles. Any way to keep her supressed?
Got it working. The trigger needs a "not PostBattle" condition added:
------------------------------------------
Trigger 2150_Multiple_Turns_Trigger
WhenToTest ButtonPressed
Condition not PostBattle
AdviceThread Help_Campaign_Keyboard_Shortcuts_Scroll_Thread 0
Now the advisor stays put after battles. ~:)
I actually use two triggers - one for the first turn and one for reloads. That way the advisor pops up in both circumstances - I could only get her to appear in one instance or the other otherwise. I can post details later if anyone is interested.
SigniferOne
09-15-2005, 05:50
So... any luck on uploading the script generator?
So... any luck on uploading the script generator?
https://forums.totalwar.org/vb/showthread.php?t=52168
~:)
SigniferOne
09-15-2005, 13:01
Ah ok thanks.
TheSilverKnight
07-20-2006, 02:52
I tried to implement this using BI, but I haven't got any pop-up advisor or anything. Is there something I've done wrong? or does BI not allow the use of a script like this with the version? :help:
I tried to implement this using BI, but I haven't got any pop-up advisor or anything. Is there something I've done wrong?
You must have done something wrong - I've create scripts for several mods that use BI with no problems.
Myrddraal
07-22-2006, 20:22
This thread is out of date. A new version has been released. Please see here:
https://forums.totalwar.org/vb/showthread.php?t=52168
vBulletin® v3.7.1, Copyright ©2000-2025, Jelsoft Enterprises Ltd.