Looks like you didn't read my note about what happens if you try to use wait in a monitor_event block.
Looks like you didn't read my note about what happens if you try to use wait in a monitor_event block.
RTR website/SVN admin
- Settlement coordinate locator -for RTW/M2TW
- EDB Validator v1.2.8 (Oct 16, 2012) - for RTW/M2TW
- RTW scripting tutorials
- n-turns per year script generator
Let me know what happens, but I don't think it'll apply the wait between monitors -
it doesn't exactly read everything in order, as far as I can understand, it'll go through all the things not in monitors first unless they have a turn based 'if' clause, then will look up monitors when it gets to
something with
monitor_.... FactionTurnEnd
monitor_... SettlementTurnStart etc type trigger in the order the game normally processes them between turns - eg. you'll get all the FactionTurnEnd's in order you've written them, but whilst it's doing that it won't be processing anything you've written inbetween like FactionTurnStart..
if you use monitor_conditions you can get away with wait commands, but a lot of open monitor_conditions can make game lag
unless you're just testing I'm curious; what you're hoping console_command toggle_fow
will do, I've got a little hitch in my mod that after using reveal_tile, I can't get to hide it again, tried toggle_fow twice and that didn't help.
P.S.
waits anywhere the player can bugger it up - by pressing End Turn etc, whilst script is still waiting to do next bit also get you in a mess - if you need to stall script until message or something is cleared a while might be better
Last edited by makanyane; May 04, 2009 at 01:54 PM.
Visit Total War Center Wiki for:
Total War Mods - Modding Portal - Total War Series
M2TW Modding - Battle Map Buildings - Techtrees - worldpkgdesc
Rome Remastered Modding - New Campaign Map
IWTE functions for RR - Unit models in RR
Try something like this:
Code:declare_counter isFowToggled monitor_event FactionTurnStart FactionIsLocal and I_CompareCounter SettlementOwner_Sparta = 2 and RandomPercent < 100 console_command move_character Kleomenes of Sparta, 139,46 console_command toggle_fow set_counter isFowToggled 1 end_monitor monitor_conditions I_CompareCounter isFowToggled = 1 wait 5 console_command toggle_fow set_counter isFowToggled 0 end_if
RTR website/SVN admin
- Settlement coordinate locator -for RTW/M2TW
- EDB Validator v1.2.8 (Oct 16, 2012) - for RTW/M2TW
- RTW scripting tutorials
- n-turns per year script generator
Thx , I'll try it out .. The script i posted above yours worked the first time , but didn't work later .. Does the 'I_Compare_Counter' "erase" the counter ? So it's brought to 0 again ?
Alright , if thos doesn't try , I'll try yours
Spoiler Alert, click show to read:
Edit : All tries failed .. Now gonna test yours
Edit 2 : looks like your script did it Awesome HoH ! Well , you are best RTW scripter , or not
Hey, there may be something existing already, but in the three major scripting tutorials I've read I don't see anywhere where it is broken down like one of the 'complete guides' would be.
I mean, if I read it enough times I can 'guess' what all the parts of the advicethread section do, but it seems as though these tutorial throw it out there are though you already know it. I'm a bit dense when I first wade into something new and the parts of the Advice thread part like verbosity are completely meaningless to me. Are these important, and if so, is there any tutorial or post that breaks them down as to what each part does?
Thanks
Under the Patronage of Lord Condormanius
Yes, it is expected that you already know quite a bit about modding other things before you try scripting. Some of them, like advice threads, you don't really need to know in great detail, since you do it once, and then it's pretty much just cut and paste.
0 - Anything after a semicolon is a comment. Optional.Code:0. ;------------------------------------------ 1. AdviceThread BackgroundScriptThread 2. GameArea Campaign 3. Item BackgroundScriptItem1 4. Uninhibitable 5. Verbosity 0 6. Threshold 1 7. MaxRepeats 0 8. RepeatInterval 1 9. Attitude Normal 10. Presentation Default 11. Title BackgroundScriptTitle1 12. On_display scripts\show_me\background_script.txt 13 Text BackgroundScriptText1
1 - Name of the advice thread. Referenced in triggers and/or scripts. Required.
2 - Where this advice can be seen, ie. Campaign or Battle. Required.
3 - Name of the advice item block. An advice thread can have multiple of these, each with its own settings and message. Required.
4 - Not sure, but all advice threads seem to have it. Theoretically, it may have something to do with whether other events in the UI could force it not to display or hide after being displayed without user closing it manually.
5 - Can be 0-3. 0 - show at any adviser verbosity setting, 1 - high, 2 - medium, 3 - low. Required (in this case). Not sure what the default is.
6 - How many times the advice thread must be "advanced" (triggered) before the message will actually show. Required (in this case)
7 - The number of times this message can repeated after the threshold has been reached. Required.
8 - I think this is the mimimum amount of time that must pass before this advice message would show again. Only makes sense to use if MaxRepeats > 0.
9 - Ignored. Can also be Angry/Concerned/Excited/Normal, but it doesn't seem to have any effect.
10 - Ignored.
11 - Index of the advice title in export_advice.txt. Required.
12 - On_Display tells it to run the script without waiting for the player to press the "Show me how" button. Can also be Script, then you have to press the button to start the script. The rest is the path to the script. Only present when a thread is used to start a script.
13 - Index of the advice text in export_advice.txt. Required. There may be multiple Text lines per Item block.
The Item section can also contain these lines (search EDA for examples):
- Suppressible y/n - if set to y, will allow the player to click x, then that advice will never show again. Delete the preferences/advice file to reset all.
- Parameter object - Object can be CharacterName/SettlementName/TargetCharacterName/RegionName/TargetSettlementName and possibly other
- PauseBattle - pauses the battle when it shows up
Last edited by HouseOfHam; May 20, 2009 at 10:42 AM.
RTR website/SVN admin
- Settlement coordinate locator -for RTW/M2TW
- EDB Validator v1.2.8 (Oct 16, 2012) - for RTW/M2TW
- RTW scripting tutorials
- n-turns per year script generator
Thank you HousofHam.
I'm actually pretty familiar with most of the other documents in the game just the scripting stuff seemed overly complicated to me, or I just made it seem that way, so I was hoping someone could make it idiot proof for me, which you certainly helped to do. So, thanks again.
It might be a good idea to add that list to one of the beginning scripting guides floating around here.
Now to attempt to make my first script.
Under the Patronage of Lord Condormanius
Believe me Rama , scripting isn't as though as it looks (before you want to start learning it ..) You just need to start off basic , and slowly build your skills up .. Then , try some more complicated stuff .
A must-download are the RTW docudemons , for both scripting and traits
Good luck with your scripting-project !
Btw , i would add the list to my tutorial , but it's HouseOfHam's ; copyright issues and stuff
Feel free to quote.
RTR website/SVN admin
- Settlement coordinate locator -for RTW/M2TW
- EDB Validator v1.2.8 (Oct 16, 2012) - for RTW/M2TW
- RTW scripting tutorials
- n-turns per year script generator
Thx HouseOfHam i'll add an export_descr_advice section soon
Although i have a problem atm .. I have made a custom mission , and all went well , except for 1 thing : When you have captured the settlement within the right time , you get a message .. however , wehn you don't have it , there should be a message about failure at turn 10 (=9 in-game)
Here are scripts :
background_script (setup)
Spoiler Alert, click show to read:
First mission.txt (in show_me folder)
Spoiler Alert, click show to read:
export_descr_advice
Spoiler Alert, click show to read:
and export_advice (in text folder)
Spoiler Alert, click show to read:
When the settlement is captured , i egt a 'congratulations' message .. However , when it is not captured , i don't get a 'Failure' message ..
Any suggestions ?
Thx in advance ,
KingTheo
The 'not' doesn't work with conditions that use logical operators. Remove the 'not' and use '!=' (not equal) instead of '='.
Btw, there is no need to run it in a separate script. In fact, it might cause problems. I'd recommend that you move the monitors from First mission.txt into your background script and remove the script line from the first_mission thread.
RTR website/SVN admin
- Settlement coordinate locator -for RTW/M2TW
- EDB Validator v1.2.8 (Oct 16, 2012) - for RTW/M2TW
- RTW scripting tutorials
- n-turns per year script generator
ahh, I'd realised by experimentation that:
and not I_CompareCounter counterName = 2
didn't work but had been getting around it with
two monitors one for
and I_CompareCounter counterName > 2
and one
and I_CompareCounter counterName < 2
presumeably
and I_CompareCounter counterName != 2
would be the correct solution? I never knew that code option existed!
Visit Total War Center Wiki for:
Total War Mods - Modding Portal - Total War Series
M2TW Modding - Battle Map Buildings - Techtrees - worldpkgdesc
Rome Remastered Modding - New Campaign Map
IWTE functions for RR - Unit models in RR
*nod*
RTR website/SVN admin
- Settlement coordinate locator -for RTW/M2TW
- EDB Validator v1.2.8 (Oct 16, 2012) - for RTW/M2TW
- RTW scripting tutorials
- n-turns per year script generator
Does it matter in wich order your script is set up ? ause i'm getting a CTD , and i have no idea what could be the cause ..
in background_script.txt
Spoiler Alert, click show to read:
In EDA :
Spoiler Alert, click show to read:
And in export_advice (in text folder)
Spoiler Alert, click show to read:
Notes :
I am using a modfolder .
I want to make a first mission , and after that is done , give a new mission (that's the reason for the counters) The first mission works great (i get a message before the mission is completed , and after , and they're both correct)
But then , at the time the advisor should pop up for the secodn mission , it CTD's ..
Any help ?
it's probably the advisor thread/text set up causing the problem
you've got
Second_Mission_Text_01_Text1
in EDA
and
second_Mission_Text_01_Text1
in EA
make them exactly the same including the CAPS by copying and pasting and see if that helps.
Visit Total War Center Wiki for:
Total War Mods - Modding Portal - Total War Series
M2TW Modding - Battle Map Buildings - Techtrees - worldpkgdesc
Rome Remastered Modding - New Campaign Map
IWTE functions for RR - Unit models in RR