Scripting an invasion by Ceasar's legions

Discussion and help with using the in-game editor
Hieronymus
Posts: 537
Joined: Fri Dec 08, 2006 9:10 am
Location: Londinium, with the insane parakeets

Scripting an invasion by Ceasar's legions

Postby Hieronymus » Sat Oct 06, 2007 5:34 pm

I think I may have discovered how to script an invasion from Caesar's legions. The details are in the edit to this post. This should work anywhere you have to set up an invasion.

I say think because I've only been able to test their appearance on the map. I've no idea (yet) how they will behave once they have appeared. Watch this space...

EDIT: Yup, it works. The legions came along and trashed the villa!
Last edited by Hieronymus on Sat Oct 06, 2007 5:47 pm, edited 1 time in total.

Romaq
Posts: 576
Joined: Thu Jun 07, 2007 1:04 pm
Contact:

Postby Romaq » Mon Oct 15, 2007 6:48 am

Now all we need is someone brave enough to attempt the following:

1) Gaul skirmishers enter point A and attack something
2) After two weeks (is that a reasonable gap?) from the start of attack, a Roman cav unit appears at point A
3) The moment the cav unit appears, all units are told to run. Both units exit at point B which is directly opposite the map point A
4) From the point of view of the person watching (and of course from how the 'warning' messages are coached) it LOOKS like the Gaul units appear, raise hell, a Roman cohort that happened to be nearby comes to save the day. The Roman unit APPEARS to chase off the enemy unit.

NOTE: It doesn't matter that this is ACTUALLY what happens. What matters is that the person playing the game sees ONLY AND EXCACTLY what the script author INTENDS for the game player to see.

Would anyone be in the position of scripting this out as a 'test game' and posting it just for giggles, so we can all see if it works as such? I'll get around to doing so if needed, but it'll likely be towards the end of the year. I'm busy juggling flaming kittens yet. The cats are not amused.

--Romaq

Hieronymus
Posts: 537
Joined: Fri Dec 08, 2006 9:10 am
Location: Londinium, with the insane parakeets

Postby Hieronymus » Thu Oct 18, 2007 7:21 am

I may be able to find time this weekend to do something with this (currently busy developing a Lindum scenario with aramann, which has its own scripting challenges!). I'll just use one of the sandbox scenarios so all I have to focus on is the script and XML. People are then welcome to play around themselves with timings, invasion points, army compsition etc.

Romaq
Posts: 576
Joined: Thu Jun 07, 2007 1:04 pm
Contact:

Proof of Concept

Postby Romaq » Thu Oct 18, 2007 2:47 pm

Thank you! Yes, I was hoping for something that would be as simple as possible as a proof of concept that worked right away to show the effect (or could be very easily built in time) without distractions. Then I could dissect it with a hack saw and use the remains to torment my cats! Er... sorry. I got carried away.

--Romaq

Hieronymus
Posts: 537
Joined: Fri Dec 08, 2006 9:10 am
Location: Londinium, with the insane parakeets

Postby Hieronymus » Thu Oct 18, 2007 6:00 pm

Last time I posted a proof of concept someone mistook it for a real scenario

...and that's how I ended up becoming a scenario designer... :rolleyes:

Hieronymus
Posts: 537
Joined: Fri Dec 08, 2006 9:10 am
Location: Londinium, with the insane parakeets

Postby Hieronymus » Sun Oct 21, 2007 1:54 pm

OK, here'e the proof of concept, which I've called Corduba Revisited for sentimental reasons :rolleyes:

The attack by the Gauls should turn up after about a month, with the Roman "relief force" about a week later. Then the Gauls should turn tail and run, pursued shortly afterwards by the Romans (who move pretty damn quick, it has to be said).

I'll leave it as an exercise for the reader if they want to play around with the invasion waypoints or the composition of the armies in the script or timings of invasions... :D
You do not have the required permissions to view the files attached to this post.

Romaq
Posts: 576
Joined: Thu Jun 07, 2007 1:04 pm
Contact:

Postby Romaq » Tue Oct 23, 2007 11:53 pm

Excellent! Thank you. I'll see how to work this up into a very interesting military scenario.

--Romaq

Gordon Farrell
Posts: 203
Joined: Mon Jul 26, 2004 4:19 pm

Postby Gordon Farrell » Tue Mar 18, 2008 4:47 am

"Hieronymus" wrote:I think I may have discovered how to script an invasion from Caesar's legions. The details are in the edit to this post. This should work anywhere you have to set up an invasion.

I say think because I've only been able to test their appearance on the map. I've no idea (yet) how they will behave once they have appeared. Watch this space...

EDIT: Yup, it works. The legions came along and trashed the villa!



Hieronymus - Thanks a million for this neat discovery! I'm putting it to work in my first C4 mod. This solved a major problem for me. Again, thanks!

Hieronymus
Posts: 537
Joined: Fri Dec 08, 2006 9:10 am
Location: Londinium, with the insane parakeets

Postby Hieronymus » Tue Mar 18, 2008 7:52 pm

You're welcome Gordon! Glad you found it useful :D

aramann
Posts: 472
Joined: Mon May 21, 2007 1:49 pm
Location: Ohio, where all is strange and vague
Contact:

Postby aramann » Thu Mar 20, 2008 5:23 pm

Gordon, not to EVER, EVER undermine the Great Hieronymus (I wouldn't dare!) but there is a lovely tutorial on HeavenGames here: http://caesar4.heavengames.com/gameinfo/editor
That while more basic, covers things for those of us without the magnitude of The Great Hieronymus' scripting skills.
I can't wait to see what you can come up with, I hope you'll post it!

Hieronymus
Posts: 537
Joined: Fri Dec 08, 2006 9:10 am
Location: Londinium, with the insane parakeets

Postby Hieronymus » Sat Mar 22, 2008 11:24 pm

"aramann" wrote:Gordon, not to EVER, EVER undermine the Great Hieronymus (I wouldn't dare!)

To gain the respect and admiration of the completely insane is such a humbling experience... :p

Gordon Farrell
Posts: 203
Joined: Mon Jul 26, 2004 4:19 pm

Postby Gordon Farrell » Sun Mar 23, 2008 4:28 pm

"aramann" wrote:Gordon, not to EVER, EVER undermine the Great Hieronymus (I wouldn't dare!) but there is a lovely tutorial on HeavenGames here: http://caesar4.heavengames.com/gameinfo/editor
That while more basic, covers things for those of us without the magnitude of The Great Hieronymus' scripting skills.
I can't wait to see what you can come up with, I hope you'll post it!


Oh my god I am already SO USING Pecunia's brilliant tutorial!!! Pecunia's analysis of the editting tools, combined with Hieronymus' breakdown of the c# scripting, is a CB Modder's dream come true!

And yeah, I am most certainly planning on uploading my work. I hope I'll have something cool and different to share with the community. (Fingers crossed!!)

Pecunia
Posts: 317
Joined: Tue May 04, 2004 4:00 pm
Location: The Netherlands
Contact:

Postby Pecunia » Mon Mar 24, 2008 8:05 am

"Gordon Farrell" wrote:Oh my god I am already SO USING Pecunia's brilliant tutorial!!! Pecunia's analysis of the editting tools, combined with Hieronymus' breakdown of the c# scripting, is a CB Modder's dream come true!


I'm glad you like the tutorial, despite the fact that I don't have the creativity to create a scenario myself ;)

By the way, I just completed a new part for the tutorial, on scripting :)

Gordon Farrell
Posts: 203
Joined: Mon Jul 26, 2004 4:19 pm

Postby Gordon Farrell » Wed Apr 09, 2008 7:40 pm

Hey Pecunia, don't know if I told you but your script tutorial is terrific --- it provides a great foundation for those of us trying to teach themselves this stuff from scratch. Thanks a million!
Last edited by Gordon Farrell on Wed Apr 09, 2008 7:44 pm, edited 1 time in total.

Gordon Farrell
Posts: 203
Joined: Mon Jul 26, 2004 4:19 pm

Postby Gordon Farrell » Wed Apr 09, 2008 7:51 pm

Hieronymus, when adding catapults to the Enemy Roman invasion, how do you set up the string line? If

String sRomans = "ENEMY_ROMAN";

is for a Roman cohort, surely I can't just duplicate "String sRomans" and add "= "ENEMY_ROMAN_CATAPULT" " to it?

Thanks in advance!

Hieronymus
Posts: 537
Joined: Fri Dec 08, 2006 9:10 am
Location: Londinium, with the insane parakeets

Postby Hieronymus » Wed Apr 09, 2008 8:55 pm

Actually Gordon the simplest way is not to bother with the strings at all, but input them directly.

For example when setting up an invasion:

mInvasions[0].AddCohort("ENEMY_ROMAN", 3, 3, 3);
mInvasions[0].AddCohort("ENEMY_ROMAN_CATAPULT", 2, 3, 3);


We're finding these Roman legions pretty tough customers - they literally do fight to the last man.

You can even use them in setting up a military request (as we are doing in the forthcoming ARamann-Goonsquad-Hieronymus production Iceni Queen):

request.AddCohort("ENEMY_ROMAN", 4);

Currently as a background project I'm writing an expanded and updated scripting reference, which will hopefully appear as an Annex to Pecunia's Editor tutorial at C4 Heaven :)

Gordon Farrell
Posts: 203
Joined: Mon Jul 26, 2004 4:19 pm

Postby Gordon Farrell » Sat Apr 12, 2008 8:22 am

Awesome! It works great. Yeah, you're right... those Romans are TOUGH! I don't suppose there's anyway to call up Roman enemy LIGHT infantry?

Hieronymus
Posts: 537
Joined: Fri Dec 08, 2006 9:10 am
Location: Londinium, with the insane parakeets

Postby Hieronymus » Sat Apr 12, 2008 1:12 pm

One thing that working with the amazing aramann over the past 6 or 7 months has taught me is this: Never Say Never Ever.

So, after a bit more digging, and with a suitable health warning: try "ENEMY_ROMAN_SOLO_RAZE" (obvious isn't it? :rolleyes :) . Health warning being a) I've not tested their behaviour, so don't know how they will shape up during an invasion or military request; b) as you can see with this screenie, their use does create an interesting effect on the minimap...

Good luck!
You do not have the required permissions to view the files attached to this post.

Gordon Farrell
Posts: 203
Joined: Mon Jul 26, 2004 4:19 pm

Postby Gordon Farrell » Sat Apr 12, 2008 3:42 pm

Fascinating to say the least! Who ARE those dudes? Think I'm going to plug this into my scen pronto and see what happens...

Gordon Farrell
Posts: 203
Joined: Mon Jul 26, 2004 4:19 pm

Postby Gordon Farrell » Sat Apr 12, 2008 9:47 pm

"ENEMY_ROMAN_SOLO_RAZE" works great. I didn't get any little faces on the mini-map, though, so I don't know what's up with that.

Anyway, these Roman Light Infantry start to waver after 12 casualties, and stop fighting after 17.

This is great stuff you guys keep unlocking! Awwwesome!


Return to “Editing”

Who is online

Users browsing this forum: No registered users and 1 guest