PDA

View Full Version : Srcipting question: can it be done?



Laridus Konivaich
04-22-2005, 20:16
Hi everyone,

I just have a quick question:

for the Age of Hellas mod, we are considereing setting the start date to 480BC, and making Thermopylae the start of the campaign, what I want to know is, is it possible to script it to happen this way:

The persians have a huge army in greece, just north of thermopylae; the senate faction is represented by Leonidas, who starts with nothing but a small, elite army, just south of thermopylae. both armies are moved forward, and engage. If you are playing as certain factions (for example, sparta or athens), then you take control of the senate (leonidas') army for the battle of thermopylae, if you are the persians, you command the persian army, and if you are anyone else, the battle is not fought, but Leonidas is destroyed, and the persian invading persian army loses certain units, after this the script should end.

//

Now tell me if this can be scripted, or if not, what has to be changed for it to work.

Thanks.

Epistolary Richard
04-22-2005, 21:12
Most of this sounds possible, but I have one area of concern - the obvious one - being able to take different sides in the battle or avoid it entirely. What you want is essentially a campaign script that goes IF you are the Spartans then spawn this battle, IF you are the Persians then spawn this different battle and IF you are anyone else don't spawn any battle.

Myrddraal will have a better idea of whether all this is possible within the same script. If it isn't though, then one way you can achieve it is by having different campaigns for the three different factions (Spartan, Persian, other) - this means you can run different starting campaign scripts and the rest of it is straightforward.

Having different campaigns would also allow you to slightly alter the descr_strat so as to weight it for or against the player, for example if player takes the Persians it may be more of a challenge if he has slightly less troops at Thermopylae as he'll no doubt use them more effectly than the AI.

Laridus Konivaich
04-23-2005, 18:47
Myrddraal, you seem to know a lot of scripting, what do you think about this?

Myrddraal
04-24-2005, 22:02
It should all be possible using if statements

Apart from one point
I'm a bit concerned about several factions controlling one army. Think it may not be a problem if you use the control console command, but it may be a bit messy.

As ER said, if necessary make several versions of the same campaign.

Sorry about the brevity of this post, if you need more info I'll give it :smile: