User avatar
Jarkko
Colonel
Posts: 365
Joined: Sat Oct 25, 2008 2:34 pm
Location: Finland

Event: Confederate incursion!

Sat Nov 08, 2008 1:44 pm

Background: I am total idiot regarding programing. I was happy with Commodore 64 when I learned to do a "program" that asked your name (IIRC INPUT "What is your name" $name) and then typed on screen "Hello name" (which was IIRC PRINT "Hello " $name). That is about as advanced as I ever got with programming anything.

Now, looking at the AACW events, I see lots of $ signs, which brought back those happy days of of C-64. And also reminded of how little I understand of computers and progtaming.

Nevertheless, I suppose it doesn't hurt anything (except my brain, but there is so little to start with, so no worries) if I'll *try* to understand the event system...



So, I would want to create an event that is possible to launch only in April 1861 to June 1861. I'd like the game to check if CSA has attacked any city Iowa, Wisconsin, Illinois, Indiana, Michigan, Ohio, Pennsylvania, New Jersey or New York.

Looking at the events I found the Kentucky events to have some resemblance to what I am aiming at. For example:

Code: Select all

SelectFaction = $CSA

SelectFaction = $CSA
StartEvent = evt_nam_CSA_ClosetoKentucky|1|0|NULL|NULL|NULL|NULL

Conditions
  CountUnits = $area_CSA_KY_Border;0;$CSA;-1;>=;35

Actions

EndEvent


Now, I wonder if it is possible to create such an area (as $area-CSA_KY_Border, but called for example $area_CSA_incursion), or if it is in-built in the game system?

Also, do I understand the event right, it never fires if CSA has in the area -1 or less units, and always fires if 35 or more units (and if between 0 to 35 units the event has a chance to fire)? Is a "unit" one element (ie if changing 35 to 1, would a single regiment in the area cause the event to always fire?).


Any help will be appreciated :)
There are three kinds of people: Those who can can count and those who can't.

User avatar
lodilefty
Posts: 7616
Joined: Sat Aug 11, 2007 3:27 pm
Location: Finger Lakes, NY GMT -5 US Eastern

Sat Nov 08, 2008 2:06 pm

Countunits parameters are described in the AACW modding Wiki [as are many other commands]: :D
http://ageod.nsen.ch/aacwwiki/Modding_events

You must define the area you want for your event, by editing Areas.ini [found in \Gamedata] and MetaAreas_Aliases.ini [found in \Aliases]
Follow the syntax closely in the Areas and alias files. Be sure you get the 'next' UID number for yours...

If you don't get a CTD from UID conflict, you're better than I was! :blink:

Good luck! :thumbsup:
Always ask yourself: "Am I part of the Solution?" If you aren't, then you are part of the Problem!
[CENTER][/CENTER]
[CENTER]Visit AGEWiki - your increasingly comprehensive source for information about AGE games[/CENTER]

[CENTER]Rules for new members[/CENTER]
[CENTER]Forum Rules[/CENTER]

[CENTER]Help desk: support@slitherine.co.uk[/CENTER]

User avatar
Jarkko
Colonel
Posts: 365
Joined: Sat Oct 25, 2008 2:34 pm
Location: Finland

Sat Nov 08, 2008 3:12 pm

Thanks for the tips :)

I read the Wiki article on events a few times, but I am still quit wizzy trying to comprehend what I read. I think I'll dive in and create an event and wonder afterwards what the heck went wrong :D
There are three kinds of people: Those who can can count and those who can't.

Return to “AACW Mods”

Who is online

Users browsing this forum: No registered users and 5 guests