PDA

View Full Version : Spawning armies



Celtic_Punk
06-09-2009, 16:08
Is it possible to spawn a specific general, with a specific name and traits, with a chosen army? and is it possible for said army to spawn under your own faction?

Vasiliyi
06-09-2009, 16:11
It is possible, but it requires you to have some really good understanding in scripting. Check out the scriptorion in the rtw section of the forums. I would have no idea how to do it myself.

Celtic_Punk
06-09-2009, 16:58
so it is possible to edit the EB script to add in a historical army of some sort, like Hannibal's invasion of Italy?

MarcusAureliusAntoninus
06-09-2009, 20:12
There was a minimod posted a while back that spawned Hannibal's army. Check out the unofficial modding subforum.

Maion Maroneios
06-12-2009, 09:28
Short answer: Yes, it's possible. By writing a script and enabling it by the same means as the EBBS script, you can spawn armies of your choise. And there is a mini-mod which spawns Hannibas, I wanted to try it a long time ago but decided against it.

Maion

Aemilius Paulus
06-12-2009, 22:59
Pfft, scripting is too difficult. Just open up console, teleport an enemy general and use the create unit cheat. Same result (albeit the name of the general) but infinitely easier. You can also use the console to add or remove traits. And considering this is alternate history, the name part should not be as much as of a worry since different history would most likely equal different characters rising to renown.

Celtic_Punk
06-13-2009, 21:38
yeeeah but, I do kinda want to see Ventorix make a daring sally break ceaser's line and forge a new Celtic golden age. Seeing the traits and what not, of a man who did exist gives the campaign a certain zesty feeling lol

Aemilius Paulus
06-13-2009, 21:55
yeeeah but, I do kinda want to see Ventorix make a daring sally break ceaser's line and forge a new Celtic golden age. Seeing the traits and what not, of a man who did exist gives the campaign a certain zesty feeling lol
If that is so, then good luck. I would recommend you to download the mod though, the one that enables Hannibal. That is who you have in mind, is it not?

Celtic_Punk
06-14-2009, 00:11
a few generals. Can anyone give me a script template i could use? and a template for making my own general with starting traits? that way i could add hannibal and Verty in. those are the dudes I want. I envision a huge conflict between the two after hannibal successfully destroys the romans.

Watchman
06-14-2009, 01:11
:inquisitive: ...didn't they live like well over a century apart...?

Maion Maroneios
06-14-2009, 10:40
I'm afraid you're asking for too much CP. I don't believe there are many people here who can or are in the mood of writing a script for you. That's point one. Two, you'll need to think of a good unit roster for them, traits etc. Even though that is the "easy" part. Three, you need to specify the coordinates were you want the army to be spawned. When all this is ok, you'll run the script and get your general.

But the most important thing, something you seem to utterly neglect, is that giving a stack to the AI will almost surely either result in the army wondering aimlessly without doing anything, or simply sit there eternally until someone decides to take him out of the way. Say you enable Hannibal. Big deal, you think he'll actually go and kick Roman ass? Highly unlikely, if you ask me. He'll probably either sit there, or try and walk back (in reverse Hannibal style) to Africa through northern Italy and Spain.

My suggestion: Keep things as they are, don't try to re-create history but create your own. Don't bother with too much scripting and messing around, because this causes weird problems which can result in CTDs in the worst case. Plus, "gifting" a full-stack, several thousand mnai worth an upkeep army to the AI is probably going plunge them into bankrupty.

Maion

Xurr
06-16-2009, 00:14
Granted the AI control of a newly spawned army will be haphazard at best, however you can help it along a bit. You could script in Hannibal's movement by teleporting that army to specific places over a period of turns. This would simulate his progression into Italy and can actually give you a feel of Hannibal being sly and unstoppable, since you simply cant just block the path.

TruePraetorian
06-16-2009, 02:31
Just so everyone knows you don't need to edit the EBBS script. There is a placeholder script called genericscript.txt. It serves no real purpose and you can manually activate it.

K-Dogs
06-16-2009, 22:35
There's the issue of food as well, I've never kept an army out of territory too long, but you'd need to account somehow for the fact that the spawned general is gonna be spending a lot of time out of supply range, so the bottomed out morale and tiny movement points mean the army would probably get crushed by Romani spamstacks.
If it's possible to make the general exempt from all of these things (morale bonuses, the teleportation thing you were talking about), then I guess there's some working space.

Also scripting events for the faction will mess up certain areas of the whole game badly unless lots of other things are scripted or hardcoded as well. For instance, sending a rogue Hannibal into Italy implies that the two factions are already at war. If they aren't, it might mean that either one could get crushed way too quickly from fighting too many fronts at once, when if they were at peace, the factions would progress more naturally.

I suppose it wouldn't bee too hard to arrange it so that the character only appears after certain conditions are met (most noteably war), but from that an innumerable amount of further problems come up.

To be honest, scripting characters like this removes the "what if" factor from the game; in order for everything to work smoothly you'll have to make set actions for every possibility, otherwise you'll end up with Hannibal in Northern Gaul or something ridiculous like that. at a guess it's too late to be able to edit the EB files to make it happen, you should have a go at EBII instead :)

Ambakaro
06-16-2009, 22:59
Is the AI even affected by the morale penalties (the 'starving' line of traits) associated with supplies?

Xurr
06-16-2009, 23:55
I suppose it wouldn't bee too hard to arrange it so that the character only appears after certain conditions are met (most noteably war), but from that an innumerable amount of further problems come up.

To be honest, scripting characters like this removes the "what if" factor from the game; in order for everything to work smoothly you'll have to make set actions for every possibility, otherwise you'll end up with Hannibal in Northern Gaul or something ridiculous like that. at a guess it's too late to be able to edit the EB files to make it happen, you should have a go at EBII instead :)

Actually editing the eb script isn't that bad. You can simply use and existing event to spawn the army. For example you can use the vanilla marian reform trigger and place some code that looks like this. Granted the units and x,y coordinates would need to be different but it wouldn't be all that hard.

spawn_army
faction slave
character Hannibal, named character, command 10, influence 10, management 0, subterfuge 0, age 30, , x 34, y 133
unit iberian cavalry light curisii, exp 2 armour 0 weapon_lvl 0
unit iberian cavalry light curisii, exp 2 armour 0 weapon_lvl 0
unit iberian skirmisher celtiberian, exp 1 armour 0 weapon_lvl 0
unit iberian skirmisher celtiberian, exp 1 armour 0 weapon_lvl 0
unit iberian skirmisher celtiberian, exp 1 armour 0 weapon_lvl 0
unit iberian skirmisher celtiberian, exp 1 armour 0 weapon_lvl 0
unit iberian infantry light caetratii, exp 2 armour 0 weapon_lvl 0
unit iberian infantry light caetratii, exp 2 armour 0 weapon_lvl 0
unit iberian infantry light caetratii, exp 2 armour 0 weapon_lvl 0
unit iberian infantry light caetratii, exp 2 armour 0 weapon_lvl 0
unit iberian infantry loricatii caetratii, exp 3 armour 0 weapon_lvl 0
unit iberian infantry loricatii caetratii, exp 3 armour 0 weapon_lvl 0
unit iberian infantry loricatii caetratii, exp 3 armour 0 weapon_lvl 0
unit iberian infantry loricatii caetratii, exp 3 armour 0 weapon_lvl 0
unit iberian infantry dunaminaca, exp 2 armour 0 weapon_lvl 0
unit iberian infantry dunaminaca, exp 2 armour 0 weapon_lvl 0
unit iberian infantry dunaminaca, exp 2 armour 0 weapon_lvl 0
unit iberian infantry dunaminaca, exp 2 armour 0 weapon_lvl 0
unit iberian skirmisher cavalry equites caetratii, exp 1 armour 0 weapon_lvl 0
unit iberian skirmisher cavalry equites caetratii, exp 1 armour 0 weapon_lvl 0
end
console_command give_trait Hannibal AIGeneral 2

Celtic_Punk
06-19-2009, 10:28
:inquisitive: ...didn't they live like well over a century apart...?

I know this. Quit being a smart ass. I meant Hannibal's successors to the new empire he'd have forged with smacking the romans upside the head.


and thanks for that Xurr. Where would i find the script to edit it?

and he wouldnt be slave faction right? it'd be carthage? (or whatever faction they use as carthage)
and as for traits i'd just give them to him in game correct?

Maion Maroneios
06-19-2009, 11:13
That would be "numidia" IIRC. Please bear what I said in mind, you'll see that spawning Hannibal in Megale Hellas won't do a thing.

Maion

Celtic_Punk
06-20-2009, 08:33
yeah the AI needs to be a bit more aggressive. I wish aggressive traits affected how the general acted. Perhaps for a new Rome game... Rome 2 total war!