I've also tried many ways, copying entries from descr_battle.txt (like it says you should), the sample use given by CA, and even entries from descr_strat. Of course none worked.
I've also tried many ways, copying entries from descr_battle.txt (like it says you should), the sample use given by CA, and even entries from descr_strat. Of course none worked.
Well, I am interested in the possibilities of scripting from the start of this research, although I am a complete ignorant about all the relative to this aspect.
Following the advice of Epistolary Richard and with the invaluable help of our moderator, Myrddraal, I've been trying to explore the use of a continuous script.
My first idea was to simulate the senate missions, either in campaigns where the senate is not present or for factions different from romans (many people claims that Carthage had also a senate and that this faction could also be splited into two).
This is my first (partial) success:
This script is completed with three advices in export_descr_advice, corresponding to the communication of the mission, the success message and the fail message.Code:;Senate Missions Emulator, by Monkwarrior Beta Version 0.1 script ;set up counters declare_counter SenateMission ;used to know which mission is currently assigned declare_counter loop ;start of the first mission advance_advice_thread Senate_Mission_M01_Thread ;communication to the player set_counter SenateMission 1 ;success in mission monitor_event GeneralCaptureSettlement FactionType romans_julii and SettlementName Segesta if I_TurnNumber < 10 advance_advice_thread Senate_Mission_Success1_Thread ;message of success console_command add_money 3000 ;this is the reward inc_counter SenateMission 1 ;pass to the next mission end_if terminate_monitor end_monitor ;mission failed monitor_conditions I_TurnNumber = 10 and I_CompareCounter SenateMission = 1 advance_advice_thread Senate_Mission_Failed1_Thread ;time for mission is over console_command add_money -1000 ;penalty inc_counter SenateMission 1 ;pass to the next mission terminate_monitor end_monitor while I_CompareCounter loop = 0 end_while terminate_script
I have checked this script in my Iberia:TotalWar campaign and it works (thanks to the "loop" idea of Myrddraal).
Why must it be considered a partial success? The advices appear only once. If I start again the campaign, they do not appear again and I must modify the advice name in all the related files. To be useful, the advices should appear only once in a campaign, but in every campaign.
Does anybody know how to repeat an advice?
Does anybody know what is this command used for?:
Code:suspend_unscripted_advice false
Token is their name for words the scripting engine recognises. The problem with the spawn_army as the sample is written is that the game doesn't recognise 'unit' as an command - either because it never did or because it's been deactivated.Originally Posted by Monkwarrior
I don't quite understand this, when you say start again the campaign do you mean that you are starting a new campaign or that you are reloading one that you have previously saved?Why must it be considered a partial success? The advices appear only once. If I start again the campaign, they do not appear again and I must modify the advice name in all the related files. To be useful, the advices should appear only once in a campaign, but in every campaign.
Does anybody know how to repeat an advice?
suspend_unscripted_advice false
This command means that no advice will appear unless the thread is advanced as part of the script or the player has requested a piece of advice from a help button.
Updates
The top posts have also been updated. Console commands clear_messages and test_message both work. As Myrddraal already noted, spawn_character works to some extent as well. I expanded the testing to agents and found it works fine for them - see the sample use for the command line I used.
Last edited by Epistolary Richard; 05-23-2005 at 12:00.
Epistolary Richard's modding Rules of CoolCool modders make their mods with the :mod command line switch
If they don't, then Cool mod-users use the Mod Enabler (JSGME)
Cool modders use show_err
Cool modders use the tutorials database
Cool modders check out the Welcome to the Modding Forums! thread
Cool modders keep backups
Cool modders help each other out
I'm having the same problem as Monkwarrior. I am trying to set up scripts for modified victory conditions, so I only want the advice thread to trigger once per campaign. My scripts work fine, except that they either trigger just once, or they trigger every turn after the victory conditions are met. I can't get them to trigger once per campaign.
Have you considered using a counter as a conditional (eg, if victory_counter = 0) then set the counter to 1 when the victory conditions are fulfilled, so that they won't be fulfilled in future turns?
Epistolary Richard's modding Rules of CoolCool modders make their mods with the :mod command line switch
If they don't, then Cool mod-users use the Mod Enabler (JSGME)
Cool modders use show_err
Cool modders use the tutorials database
Cool modders check out the Welcome to the Modding Forums! thread
Cool modders keep backups
Cool modders help each other out
That would work for a continuously running script, but because of the problems with continuous scripts (like not being able to save) I was planning to just use incidental scripts.Originally Posted by Epistolary Richard
One solution is to tell users to delete preferences\advice before they start a new campaign. That has the effect of seting all the advice thread counts back to zero. But I was hoping to come up with something that would "just work" without users actually having to read the readme.![]()
Well that's the same problem I had with Civ2 even scripting long time ago.
There is a good reason why normal descr_start.txt script doesn't allow saving, so workarounds like F1 - advice need to be used.
And it's inability to save inscript variables.
So things like once per campaing are impossible, only once per session is possible.
That's for example why you can't save several first turns in prologue. It would completly mess the script if you do (no variables saved).
BUG-FIXER, an unofficial patch for both Rome: Total War and its expansion pack
Ah, sorry I was assuming you were using a background script like Monkwarrior. I don't understand what you mean when you say that they trigger just once, but they don't trigger once per campaign. Could you explain it further?Originally Posted by DimeBagHo
Epistolary Richard's modding Rules of CoolCool modders make their mods with the :mod command line switch
If they don't, then Cool mod-users use the Mod Enabler (JSGME)
Cool modders use show_err
Cool modders use the tutorials database
Cool modders check out the Welcome to the Modding Forums! thread
Cool modders keep backups
Cool modders help each other out
Scripting with duplicate character names
If there are multiple characters with duplicate names then the engine organises them at the start of the turn based on their coordinates. The order of checking goes like: check first top row from left right, then second row from left to right. It only checks the first character that it meets. So if you wish to check in script wether Captain Barrivendos has a specific trait then the command will turn out false if the first character doesn't have it, even when the second one in line does.
How to move an army into a settlement
Use the move command:
Note that the characther must have enough movement points.Code:move Captain Barrivendos, 250, 62
I tried this to use this to see if I could make a banner take a settlement. Does this work for that or does it only work if the banner and the settlement belong to the same faction?Originally Posted by Duke John
Epistolary Richard's modding Rules of CoolCool modders make their mods with the :mod command line switch
If they don't, then Cool mod-users use the Mod Enabler (JSGME)
Cool modders use show_err
Cool modders use the tutorials database
Cool modders check out the Welcome to the Modding Forums! thread
Cool modders keep backups
Cool modders help each other out
I have yet to test that. I am trying to clean up the map by moving all AI captains to a nearby settlement. It worked for the player faction, all of them moved and merged into the settlement. But when I use the move commmand for the AI the armies refuse to move. The command should work as it was used for the prologue. Do you know how to move AI armies?
Edit: discovered that AI armies cannot merge into a settlement in the player's turn. They can still be moved to other tiles though.
Last edited by Duke John; 08-31-2005 at 13:07.
Short of the move_character console command, no. And you can't use that to move armies into settlements, they don't appear in them properly.Originally Posted by Duke John
Last edited by Epistolary Richard; 08-31-2005 at 16:09.
Epistolary Richard's modding Rules of CoolCool modders make their mods with the :mod command line switch
If they don't, then Cool mod-users use the Mod Enabler (JSGME)
Cool modders use show_err
Cool modders use the tutorials database
Cool modders check out the Welcome to the Modding Forums! thread
Cool modders keep backups
Cool modders help each other out
I posted something about giving money and settlements to factions here:
https://forums.totalwar.org/vb/showthread.php?t=53365
not sure if it was the right forum since it's about Scripting, but it is a sort of tutorial
Member of The Lordz Games Studio:
A new game development studio focusing on historical RTS games of the sword & musket era
http://www.thelordzgamesstudio.com
Member of The Lordz Modding Collective:
Creators of Napoleonic Total War I & II
http://www.thelordz.co.uk
...
Last edited by Duke John; 08-31-2005 at 11:22. Reason: double post
Bookmarks