-
4 turns a year with more than one winter - final release
Sorry to post many posts, but as this is the final working release I didn't want it to get clogged up with the tests in the previous threads.
This new version allows more than one winter a year.
The problem with the beta version was a slight syntax error which has been corrected.
Quote:
Instructions - How to install:
Download
Put export_descr_advice.txt under the data folder (make a backup of the current one first)
Then use the script generator to generate a script to your liking.
The script will be generated in c:\ so you must copy it to data\scripts\show_me
Installation complete!
Quote:
Instructions - How to use:
This script must be run manually after every time you load the game or start a new game. To run the script, press escape so that the campaign menu appears. Press the question mark in the top right hand corner. Press the Show me how button on the advisor.
Play away :smile: Remember, you must activate it on every load.
Quote:
Notes
This mod can be used in combination with any other mod. Mod developpers who wish to include this script in their mod are free to do so so long as they contact me and give credit in their mod release.
Enjoy! :smile:
-Myrddraal
-
Re: 4 turns a year with more than one winter - final release
Ave, Myrddraal!! Thanks for that!
So is "suspend_unscripted_advice true" not required at all? I thought I read somewhere it was necessary at least at the top, and possibly every turn....
Edit: four years at the org and I've finally reached my 200th post!
-
Re: 4 turns a year with more than one winter - final release
Great, Myrddraal, thanks a lot.
Stuie
I believe the "suspend_unscripted_advice true" is only needed depending on what trigger you're using. If you use Myrddraal's standard F1 + help + showmehow trigger, then I don't think there should be any need to suspend advice.
-
Re: 4 turns a year with more than one winter - final release
Myrddraal,
Maybe this could be setup to run when clicking the Next turn button instead of the Advisor button?
Think its possible? That would prevent the User from having to click the advisor each time they play?
Lt
-
Re: 4 turns a year with more than one winter - final release
A script needs to be activated to take effect. The only way to activate a script is right at the start of the game (a campaign script) and through the advisor (a showme script).
-
Re: 4 turns a year with more than one winter - final release
The next turn cant activate it?
Wierd.
-
Re: 4 turns a year with more than one winter - final release
Well then the script would be activated every turn. Im guessing that would cause it to restart its cycle of seasons every time.
-
Re: 4 turns a year with more than one winter - final release
Could this moved to the Forge? It would be a shame to lose this.
-
Re: 4 turns a year with more than one winter - final release
Quote:
Originally Posted by shifty157
Well then the script would be activated every turn. Im guessing that would cause it to restart its cycle of seasons every time.
No need to worry about that - the number of turns already played is saved in the game. So the script identifies which turn is it when it's started and adjusts the season accordingly.
-
Re: 4 turns a year with more than one winter - final release
Ok i must say that i am puzzeled.
How does it work?
This is part of the script that maters for 4 winters:
Code:
console_command date 8
console_command season winter
while I_TurnNumber = 4
end_while
console_command date 8
console_command season winter
while I_TurnNumber = 5
end_while
console_command date 8
console_command season winter
monitor_event FactionTurnEnd FactionType slave
if I_TurnNumber = 6
console_command season summer
end_if
terminate_monitor
end_monitor
while I_TurnNumber = 6
end_while
console_command date 8
console_command season winter
while I_TurnNumber = 7
end_while
So new part is the monitor.
So is character aging operation performed at the begining of Player turn?
If so then changing seson back to summer before this is quite clever, but then you are doing it only 1 time out of 4 winters.
If it would worke this way you would have to do it 3 times.
So how the heck does it work?
-
Re: 4 turns a year with more than one winter - final release
Nice script. It works in RTR 6.0 but Im not sure it works in 6.1.
Have you any plans to make a similar script for RTW:BI?
Yes it is your script that messes up my RTR 6.1 becuase I get this message:
https://img.photobucket.com/albums/v...cripterror.jpg
now every time after I installed your script. It looks like there a fault in the export_descr_advice.txt but when I check with an older one I cant see anything wrong in the file.
-
Re: 4 turns a year with more than one winter - final release
Myrddraal, got a question about how your script works:
What is the point of having this:
Quote:
console_command date -265
console_command season summer
while I_TurnNumber = 20
end_while
Isn't that an empty loop? Furthermore, why didn't you code it like this:
Quote:
if I_TurnNumber = 20
console_command date -265
console_command season summer
end_if
-
Re: 4 turns a year with more than one winter - final release
Probably because game will see its not 20 turn and finish the script for good.
Empty loops are there to force game to keep script running in background.
-
Re: 4 turns a year with more than one winter - final release
Hello Myrdaal Can We use ur awesome mod in our Shogun mod We need this absolutely !:bow:
BTW is possible to edit it in a way to have autumn spring winter and summer?
-
Re: 4 turns a year with more than one winter - final release
Geez how the heck does the while loop work in RTW?
-
Re: 4 turns a year with more than one winter - final release
LorDuBulA
The reason that bit of script is included is because character ageing is tied to the switch from winter to summer.
On the first turn, its summer, so at the end of the turn it changes to winter. This switch causes no ageing, so the only code required is the code to change the season back to summer.
At the end of the second turn, the same switch happens, no code is required therefore.
On the third turn on the other hand, the switch is from winter to summer, yet we don't want the characters to age. Because of this, we need get rid of that switch. I did this by changing the season just before the switch.
Finally at the end of the last turn, we want the characters to age anyway, so the code isn't needed.
Hope that explains it.
dsrow1
The purpose of the while loop is to ensure that the script stops until the next turn. Without it, the entire script would run in one turn, leaving you on the final year.
The if loop is purely for reload purposes. When you load a game and run the script, the script will run from the beginning. It will skip past the while loops as the save game saves the turn number, but without the if loop it would run all the code between the beginning and the current turn.
PROMETHEUS
You are very welcome to use this script in your mod. Like all mods, all I want is to be informed (I like to know how many people find the script useful) and possibly a note in the credits or readme or whatever. :smile:
dsyrow1 (again) :smile:
The while loop works as any while loop does. It simply runs the script between while and end_while until the conditions are no longer met. It doesn't run anything else though, so an empty while loop will in effect cause the script to pause until the conditions are no longer true.
Hope this helps
-
Re: 4 turns a year with more than one winter - final release
Could this be moved to the Forge? Wouldn't like to see it swallowed by the Second Page From Hell.
-
Re: 4 turns a year with more than one winter - final release
Myrdraal what have you added to the export_descr_advice.txt file? Im trying to get your mod to work with RTR6.1 and forward.
I have been looking through the file but I haven't been able to find anything, not that Im saying it isn't there I just not expirienced with modding things eaily slips through.
-
Re: 4 turns a year with more than one winter - final release
A couple of questions , is possible with BI to make the forced reload at every game load be skipped and so autoloaded by the game without needing to do it manually?
another one is possible to add different theme musics for the different seasons?
is possible to make new seasonal lightinings? for summer , spring , autumn and winter?
is possible to edit the climates so to show those changes and in strat map and in battle map with snow covered fields , reddish colours of autumn , flower filled prairies and suburn summer fields?
-
Re: 4 turns a year with more than one winter - final release
Thanks for the reminder DJ, who knows what this is doing in this forum, especially now with the creation of the mod discussion forum...
The export_descr_advice.txt file contains a single line to run the right script for each faction. Search for "MP_" and you'll find that line.
Prometheus, I'm not to sure about most of this as I don't have BI yet. I believe that there is a reload event which can be used to trigger the advisor on loading a save game, but the show me how button must still be pressed.
It might be possible to play different music using the script, I think there is a play sound function.
As for editing lighting and climates in-game, I'm afraid I don't think its possible...
-
Re: 4 turns a year with more than one winter - final release
Quote:
Originally Posted by Myrddraal
Thanks for the reminder DJ, who knows what this is doing in this forum, especially now with the creation of the mod discussion forum...
The export_descr_advice.txt file contains a single line to run the right script for each faction. Search for "MP_" and you'll find that line.
Prometheus, I'm not to sure about most of this as I don't have BI yet. I believe that there is a reload event which can be used to trigger the advisor on loading a save game, but the show me how button must still be pressed.
It might be possible to play different music using the script, I think there is a play sound function.
As for editing lighting and climates in-game, I'm afraid I don't think its possible...
I asked you this becouse I have seen in the CA files remnants of a previous presence of spring and autumn lightnings and other stuff....
about music how do i place practically different musics for the different seasons?
-
Re: 4 turns a year with more than one winter - final release
I'm not sure of the exact syntax yet Prom, but I'll look into it and maybe make a new release.
-
Re: 4 turns a year with more than one winter - final release
Could the same principle be used to make one turn last one month, i.e. twelve turns per year? Considering the movement distances that time period makes more sense to me, plus I´m not sure sieges lasted over years.
-
Re: 4 turns a year with more than one winter - final release
Quote:
Originally Posted by Myrddraal
The export_descr_advice.txt file contains a single line to run the right script for each faction. Search for "MP_" and you'll find that line.
well i sorry to say it but i cant find any line that fit your description, when I tried searching on mp I had to go through every singel temple, ampitheater and and campaign word in the file and well lets say there is a couple of thousand word with the combination mp in that file... :furious3: not on you...
I would like to have abit better description on what to search for... :help:
-
Re: 4 turns a year with more than one winter - final release
search for "MP_", not "MP".
Myrddraal, question: I can see how your script works, pretty tricky and neat, but here's the thing: people believe the prologue script can't be saved during because it'd be too hard to save all the variables running during a script. But isn't your 4ypt script running throughout the entire game, after you load it? And the game allows you to save during it.
Prometheus, I think a lot more seasonal variety can be in the game than already exists. For example look at the model for trees in the ITEM folder: there are the winter versions, and the summer versions. Yet in descr_settlement_plan.txt, only ONE name is used to place a tree in a settlement, and it's not called treeA_summer, or treeA_winter, but simply treeA. And so when you search for that treeA, you will see that it's actually specified which model of treeA to use, depending on the climate.
-
Re: 4 turns a year with more than one winter - final release
dsyrow1 thats what is neat about the script. It has no user-defined variables. It only uses "I_TurnNumber" which is saved in the save file anyway.
The script allows you to save whilst playing it because it is run as a show_me. When you quit the game, you have to start it again when you reload, which is where I use the "if I_TurnNumber = " to skip through most of the script till it reaches the point at which you saved it.
-
Re: 4 turns a year with more than one winter - final release
can '4 turns a year' be used with BI? It's hard to go back to 2 turns a year after playing 4.
-
Re: 4 turns a year with more than one winter - final release
I don't see why not, but I guess the simple way to find out is to try :smile:
-
Re: 4 turns a year with more than one winter - final release
Quote:
Originally Posted by dsyrow1
search for "MP_", not "MP".
That I did first but the search said that "MP_" doesn't exsist in the document so I tried with searching for "MP" but that didn't turn up anything that I could interpet as the script.
-
Re: 4 turns a year with more than one winter - final release
sorry, wrong line... I was getting mixed up with the MP campaign I'm working on.... oops
Quote:
;------------------------------------------
AdviceThread Help_Game_Options_Scroll_Thread
GameArea Campaign
Item Help_Game_Options_Scroll_Text_01
Uninhibitable
Verbosity 0
Threshold 1
Attitude Normal
Presentation Default
Title Help_Game_Options_Scroll_Text_01_Title
Script scripts\show_me\descr_script.txt
Text Help_Game_Options_Scroll_Text_01_Text1
Thats the line I added