PDA

View Full Version : Some BASIC script help?



Dearmad
05-17-2005, 17:31
Can't find tutorials on the basic part, so:

Well, Ok, then since this: https://forums.totalwar.org/vb/showthread.php?t=47797 thread has no one helping out, maybe someone who can script can help me out:

I'm trying to mod the basic campaign into monitoring the following:

--
monitor_conditions I_NumberOfSettlements romans_julii = 2 ;eventually will be >30
;and RandomPercent > 10 ;eventually I'll add in this line once I know I can get it to work.

;console_command
SenateOutlawsFaction romans_julii

end_monitor

terminate_script
--

I ALSO added:
script myscript.txt

to the end of the campaign description txt file, so it should be running.

Anyway, this is a TEST script to trigger it when the campaign starts... but it's not working not working. I can't find any tutorials on the making scripts run, even though I'm somewhat expereinced in programming; I can't figure out if my script is working or not. I've tried the outlawsfaction part both as console command and not. is the problem that this script runs only once and then doesn't continue in the campaign?

H E L P !

Dearmad
05-17-2005, 18:12
Well, I figured it out... now I can finally work on my MOD to FIX the senate so they get pissed at you a lot earlier than v1.2 allows... bwahaha! This will make the game a LOT more fun for me...

player1
05-23-2005, 12:33
Plese post this script when it gets final.

DimeBagHo
05-23-2005, 13:32
There is a problem with using this kind of script. While the script is running the player cannot load or save, and once the script halts it will not start up again. It will only be run once when the campaign first starts.

Scripts that get started with descr_strat.txt can really only be used to set things up in the first turn, or maybe to control things in the very early game.

You can start up scripts durring the campaign by using the advice system, but that requires intervention by the player.

Epistolary Richard
05-23-2005, 14:42
Plese post this script when it gets final.
Judging from his first post I imagine he's using this script:

monitor_conditions I_NumberOfSettlements romans_julii > 30
and RandomPercent < 10

console_command diplomatic_stance romans_julii romans_senate war

terminate_monitor
end_monitor
terminate_script

There is a problem with using this kind of script. While the script is running the player cannot load or save, and once the script halts it will not start up again. It will only be run once when the campaign first starts.
All very true, the alternatives are to either do it as a background script in which case you have to manually reactivate it each time you reload before it happens, or as an event script where the advisor would pop up to tell you you'd been outlawed, but unless you pressed the show me how button it wouldn't take effect.