PDA

View Full Version : 4 turns a year with more than one winter - final release



Myrddraal
08-09-2005, 03:55
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.


Instructions - How to install:

Download (http://www.totalwar.org/Downloads/Rtw_Uploads/RTWupload/More_turns_per_year_V2_by_Myrddraal.zip)

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!


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.


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

Stuie
08-09-2005, 04:01
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!

Epistolary Richard
08-10-2005, 13:52
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.

lt1956
08-19-2005, 10:03
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

Epistolary Richard
08-19-2005, 11:41
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).

lt1956
08-20-2005, 02:04
The next turn cant activate it?

Wierd.

shifty157
08-20-2005, 02:35
Well then the script would be activated every turn. Im guessing that would cause it to restart its cycle of seasons every time.

Duke John
08-31-2005, 09:24
Could this moved to the Forge? It would be a shame to lose this.

Dromikaites
09-20-2005, 19:25
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.

LorDBulA
09-20-2005, 20:57
Ok i must say that i am puzzeled.

How does it work?

This is part of the script that maters for 4 winters:




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?

Mammut
10-03-2005, 19:55
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/v603/Kotik/screenshots/scripterror.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.

SigniferOne
10-05-2005, 00:18
Myrddraal, got a question about how your script works:

What is the point of having this:



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:


if I_TurnNumber = 20
console_command date -265
console_command season summer
end_if

player1
10-05-2005, 00:23
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.

PROMETHEUS
10-05-2005, 00:35
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?

SigniferOne
10-05-2005, 00:52
Geez how the heck does the while loop work in RTW?

Myrddraal
10-05-2005, 03:21
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

Duke John
10-07-2005, 07:11
Could this be moved to the Forge? Wouldn't like to see it swallowed by the Second Page From Hell.

Mammut
10-07-2005, 17:45
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.

PROMETHEUS
10-07-2005, 18:49
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?

Myrddraal
10-08-2005, 03:19
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...

PROMETHEUS
10-08-2005, 10:16
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?

Myrddraal
10-08-2005, 18:21
I'm not sure of the exact syntax yet Prom, but I'll look into it and maybe make a new release.

Ciaran
10-08-2005, 18:50
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.

Mammut
10-08-2005, 20:23
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:

SigniferOne
10-08-2005, 21:19
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.

Myrddraal
10-09-2005, 13:38
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.

a_b_danner
10-09-2005, 14:42
can '4 turns a year' be used with BI? It's hard to go back to 2 turns a year after playing 4.

Myrddraal
10-09-2005, 14:55
I don't see why not, but I guess the simple way to find out is to try :smile:

Mammut
10-09-2005, 15:12
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.

Myrddraal
10-09-2005, 15:21
sorry, wrong line... I was getting mixed up with the MP campaign I'm working on.... oops


;------------------------------------------
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

SigniferOne
10-10-2005, 07:12
Adherbal,


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.so are you saying that if the script had something like counters ("declare_counter"), then you wouldn't be able to save? Or that upon reloading all the data in the counters would be lost?

LorDBulA
10-10-2005, 10:31
All data is lost when you load script.
You can use counters in script with no problem. But they are only stored in memory. So when you reload scipt all counters are zero.

PROMETHEUS
10-10-2005, 10:55
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.



So u mean that we could script in a way what kind of models the game should use according to seasons? if so would u like to work with me on this?

Myrddraal
10-11-2005, 00:57
there are various work-around methods for storing variables tho...

hellenes
10-22-2005, 09:21
Is it for 1.3 also?
Because Ive tried it and all I get are CTD after clicking to start a campaign.

Hellenes

Riothamus
10-22-2005, 19:44
I made it work for 1.3 BI. Dl the 4 turn per year in a folder on your desk Then change the starting year within the script(4turn per year script) to 363 then for every year afterward..its in data/scripts/show_me /descr_scripts. then copy all data info into the 1.3 BI data. took me about 2 hours to get from 363 ad to 520ad lol. good luck

Riothamus
10-22-2005, 19:54
the 4 turn per year was from orb. I think his might be different from the one your talking about.

Myrddraal
10-23-2005, 03:18
the 4 turn per year was from orb. I think his might be different from the one your talking about.

What do you mean by that? The original four turns per year script was by me, so is this one...

Riothamus
10-23-2005, 03:38
Sorry Myddral if I may have confused things. I dl the rtw 6.0 4 turn per year and script it to 1.3 BI. It is 1 winter per 4 turns....thanks for this ~:cheers:

dclare4
10-24-2005, 07:19
Got a question though. Some events fire in summer or winter - will they fire on the first summer turn or winter turn or fire all summer long?

Thanks,
Harlechman

hellenes
10-24-2005, 11:56
I made it work for 1.3 BI. Dl the 4 turn per year in a folder on your desk Then change the starting year within the script(4turn per year script) to 363 then for every year afterward..its in data/scripts/show_me /descr_scripts. then copy all data info into the 1.3 BI data. took me about 2 hours to get from 363 ad to 520ad lol. good luck

No I didnt mean that I meant can I play it in RTW 1.3 NOT in BI?

Hellenes

SigniferOne
10-24-2005, 18:34
Got a question though. Some events fire in summer or winter - will they fire on the first summer turn or winter turn or fire all summer long?

Thanks,
Harlechman
Remeber that the events are triggered not on years but on turn numbers.

Myrddraal
10-25-2005, 01:54
Sorry Myddral if I may have confused things. I dl the rtw 6.0 4 turn per year and script it to 1.3 BI. It is 1 winter per 4 turns....thanks for this

The RTR script is this script. Any mod is free to include the several turns a years script so long as they inform me and give credit where credit is due. :bow:

Myrddraal
05-17-2006, 16:29
Moved to the forge

FB_Bob
10-18-2007, 23:45
its taken me ages to find this post again :wall:

Myrddraal
10-19-2007, 12:04
If you're having trouble finding a mod, check the mods database, they're grouped by category and it should be easier to find it in there.

Burns
02-01-2008, 18:04
Hope you don't mind if I incorperate this into METW, Fade? :2thumbsup:

Strange, does this work with BI?

Burns
02-03-2008, 00:55
Seems Ive blown up the campaign again due to this. METW is built on BI 1.6 and this causes a game freezing ctd during loading. I mustve done something wrong...
Damn, I cant even delete the frackin file. What the hell is this.

Myrddraal
02-08-2008, 17:14
What file can't you delete?

You're welcome to use it in your mod, I'd appreciate credit, thanks :bow:

Luciano B
04-10-2008, 09:19
Hello

I added the script to my mod for BI; it works as soon as I start a new campaign, but every time I try to load a saved game previously started with the script activated, I get CTD.

Can you help me, please?

Thanks in advance.

Myrddraal
04-11-2008, 12:42
Since this doesn't happen to others, I think there must be more to it than the script. Do saved games load if the script wasn't running? Does the mod use any other scripts?

Does the mod save and load properly when you're not running the script?

Sorry for so many questions, but it's hard to help with little detail.

Luciano B
04-11-2008, 13:59
Thanks a lot for your quick reply.


Since this doesn't happen to others, I think there must be more to it than the script. Do saved games load if the script wasn't running?
If I load a game saved when the script was not running, all works fine; but every time I try to continue a game which was saved with the script running, I get CTD during the loading phase.


Does the mod use any other scripts?
There isn't any other script, it is the only one ...I don't know if it is relevant, but there's the show_err on.


Does the mod save and load properly when you're not running the script?

Yes, all goes smoothly as usual.

I guess I'm using RTW/BI gold ...however it is the version included in Total War: Eras

Luciano B
04-11-2008, 16:05
...some further details...

My mod starts in 334 BC; I made some successive test savings of the same campaign game in different years: 333 BC, 332 BC and 331 BC; then I attempted to load the saved games.
Here the results:

333 BC - doesn't load
332 BC - it works, OK;
331 BC - OK.

Then I started another campaign game playing with a different faction; I made successive savings in 334 BC, 333 BC, 332 BC, 331 BC; here the results, after attempting to reload them:

334 BC - OK
333 BC - NO
332 BC - NO
331 BC - OK

After the installation of the script, everytime I exit the game, the show-err function tells me that there's an error in the file export_descr_advice: "faction type not recognised"; it appens becasue the file (copied from the package including the script) has coded in the factions and the cultures of RTW, and not of BI; is it possible that those problems encountered with BI come from that file?

Luciano B
04-11-2008, 16:09
I'm starting to think that there's something corrupted with my RTW/BI installation, rather than with the script... in fact random problems when loading campaign games now occur also with normal games which were saved without the script running... suggestions?

Thanks again and sorry for boring you so much.

Myrddraal
04-11-2008, 17:05
What have you modded?

Luciano B
04-12-2008, 16:53
What have you modded?

...almost everything :)

HouseOfHam
05-13-2008, 06:02
Here's my very own generator that does pretty much the same thing.

- Written in Java 1.5
- Because it's in Java, the download itself is really small
- Lets you choose if you want to create a thread for every turn (generates threads for export_descr_advice.txt and stubs for text/export_advice.txt)
- The generated script itself is about 1/3 the size of an equivalent script generated by Myrddraal's program
-Runs super fast

Download (http://www.totalwar.org/Downloads/Rtw_Uploads/RTWupload/xtpyScriptGenerator.rar)
Run via batch file.

ps: sorry for hijacking the thread. :pirate2:

CPT Worsham
07-05-2009, 19:11
House of Ham,

I tried your script generator and I'm having an issue with it. Every winter season causes the characters to age a year. What have i done wrong?:wall:

Cretan
07-13-2010, 21:42
Thanks so much for this Myrddraal, finally i can have an epic campaign like i've always wanted.:iloveyou:


If you have a profile on TWC, tell me your name so i can + Rep you. :)

Myrddraal
07-14-2010, 01:17
Thanks Cretan, your thanks is more important to me than rep, but if you insist, I do have a profile on TWC, also called Myrddraal. You'll probably be the first person to 'rep' me there. That's not a sob story, I'm just not nearly as active over there. Plus I never really got 'rep'.


EDIT: for anyone have problems as CPT Worsham was having, the last release of my script generator avoids the winter ageing problem (hence the "more than one winter" in the title of this thread).

@CPT Worsham, sorry I didn't notice your message earlier.

Cretan
07-14-2010, 23:43
Hey,

I found you on TWC, gave you some Rep, although it seems you have it turned off anyway haha.


Thanks again, keep up the great work!

Caligula
06-07-2011, 17:08
I know it's been a while since anyone has posted here but I cannot get the script generator to run under Windows 7 64bit. I've tried run as administrator and all the options under the compatibility tab in properties. Anyone have any luck in getting it to work or will I forever be stuck with the boring 2 turns per year? LOL

Thanks in advance for any help or tips!

darkfng
06-08-2011, 13:51
I am in the same boat as Caligula, any advice? I am a little heart broken that a tool that I have used so many times over the years now seems to be lost forever to me. Maybe someone knows of another script generator that works? I tried the java based xtpy one from here http://www.twcenter.net/forums/showthread.php?t=169852 but can not get it to work.

Caligula
06-08-2011, 20:08
I got house of hams script generator working darkfng.
Follow this guide here vvv
http://wiki.answers.com/Q/How_do_you_stop_the_error_'java'_is_not_recognized_as_an_internal_or_external_command_operable_progr am_or_batch_file

I'll pop by here later to see if it helped you and to help you get it going if necessary.
Good Luck!