Matrix Games Forums

Forums  Register  Login  Photo Gallery  Member List  Search  Calendars  FAQ 

My Profile  Inbox  Address Book  My Subscription  My Forums  Log Out

Tutorial: Making action cards

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [New Releases from Matrix Games] >> Advanced Tactics Series >> Mods and Scenarios >> Tutorial: Making action cards Page: [1]
Login
Message << Older Topic   Newer Topic >>
Tutorial: Making action cards - 11/23/2007 4:54:52 PM   
tweber

 

Posts: 1411
Joined: 6/27/2007
Status: offline
This tutorial will describe how the action cards for purchasing units are were done in the Europe 1939 scenario.

1. Planning. You have to decide what units are purchased and where they arrive. If you have 6 arrival locations and 10 units that could be purchased, you would have to write 60 action cards (e.g., send infantry to Berlin). However, if you separate the unit from the location, you only have to write 16 action cards (send units to Berlin, send infantry unit).

2. Prep.

a. Go into the editor and build you pre-defined units. I’ll assume you already know how to make units. It is a good idea to write down the unit number. In the picture below, you see that the garrison unit is number 0.





Attachment (1)
Post #: 1
RE: Tutorial: Making action cards - 11/23/2007 4:55:45 PM   
tweber

 

Posts: 1411
Joined: 6/27/2007
Status: offline
b.  Enable action cards.  Rule 502 (editor – settings – rule vars) disables action cards for standard masterfiles.  The first line below will enable them.  (you can ignore the rest of the event).




Attachment (1)

(in reply to tweber)
Post #: 2
RE: Tutorial: Making action cards - 11/23/2007 4:56:49 PM   
tweber

 

Posts: 1411
Joined: 6/27/2007
Status: offline
c.  Figure out your unit arrival locations.  I define a game variable called German x and German y.  This will be the x and y coordinates where the unit arrives.  As a default, this is set to the x and y coordinates of Berlin (I have to look at my map to get those).




Attachment (1)

(in reply to tweber)
Post #: 3
RE: Tutorial: Making action cards - 11/23/2007 4:57:55 PM   
tweber

 

Posts: 1411
Joined: 6/27/2007
Status: offline
3.  Build the 'arrival' action card.
 
We now make the arrival action cards.  The action card is the player interface.  The event does the actual work.  There are a couple of tasks:
 
-          Title and text are self explanatory.  You want to be explicit both here and in the scenario description so players know what to do.
-          PP cost is the cost to play the card.  A regime can only play if it has enough pp.  I make the arrival cards free but the unit cards will cost the same in production as if the play built the units in a production center (e.g., 5 rifle = 1 pp, 1 lt tank = 4 pp)
-          Execute event is the event that is executed when the action card is called.  These are normally 'no check' events.  When the button is hit, a screen pops up offering events.  Note that you have to write the event first (or do this part later).
-          Picture is the picture on the card.  Go to editor – settings – event pictures to set up the pictures that the event will use.
-          Color Scheme.  There are 5 border colors that you can use.  I try to group cards into colors to make it easier for the player.  This is especially important if the player will have lots of action cards in his hand.




Attachment (1)

< Message edited by tweber -- 11/23/2007 5:01:10 PM >

(in reply to tweber)
Post #: 4
RE: Tutorial: Making action cards - 11/23/2007 5:01:58 PM   
tweber

 

Posts: 1411
Joined: 6/27/2007
Status: offline
Here is the screen that ties action cards to events.




Attachment (1)

< Message edited by tweber -- 11/23/2007 5:02:04 PM >

(in reply to tweber)
Post #: 5
RE: Tutorial: Making action cards - 11/23/2007 5:04:30 PM   
tweber

 

Posts: 1411
Joined: 6/27/2007
Status: offline
4.  Write the event to ‘deal the action card’.
 
See some of the code from event 12:
 
 LOOPER: TempVar0 FROM 0 TO 3
3)      SETVAR: TempVar1 = TempVar0
4)      SETVAR: TempVar1 + 4
5)      SETVAR: TempVar2 = TempVar0
6)      SETVAR: TempVar2 + 8
7)      EXECUTE: ExecRemoveActionCard(TempVar0, 0)
8)      EXECUTE: ExecRemoveActionCard(TempVar1, 1)
9)      EXECUTE: ExecRemoveActionCard(TempVar2, 2)
10)   END LOOPER
11)   EXECUTE: ExecGiveActionCard(0, 0)
12)   CHECK: CheckHexOwner(36, 38) == 0
13)     EXECUTE: ExecGiveActionCard(3, 0) 
14)   END CHECK
 
First, I run a loop that clears all arrival action cards.  I do not know if an arrival hex was lost the previous turn (lines 7-9 remove cards for Germany, the West, and the Soviets respectively).  Then, I give back the action card only if the regime controls the arrival hex (lines 11-13 give the card to Germany for control of Berlin).  Note that the player will never get a card if it is not ‘dealt’ through an event.  
 
5.  Write an event to execute the action card.  
 
0)    EXECUTE: ExecMessage(0, -1, -1, -1)
1)    SETVAR: Gameslot_German X(#0) = 39
2)    SETVAR: Gameslot_German Y(#1) = 17
3)    EXECUTE: ExecGiveActionCard(0, 0)
 
This event set the arrival of German units to Berlin.  I post a message to the German player so that he has a record in the log that can be checked.  I also deal a card at the end.  The card is used when played and must be re-dealt at some point if you want to allow the player to play the card more than once.  We will allow Germany to set arrival hexes as often as desired.  Here is the execute event for the German ‘blitz’ on  the Soviet Union.  Note that we don’t re-deal the card so the German can only play this card once.
 
0)    EXECUTE: ExecReduceReadiness(2, 0, 50, 100)
1)    EXECUTE: ExecMessage(0, 2, -1, -1)
 
5.  Write, deal, and then execute the unit purchase cards.
 
Here is the code for the card.  Note that to minimize the number of cards I have to create, I do not know which player played the card.  So the first thing to do is to check the turn.  Depending on the turn – 0 = German, 1=West, 2 = Soviets, I now give the predefined unit (number 0) to the right regime and at the right location.
 
Note in lines 2-6, I also give the Germans some pp back later in the war if they are losing (due to mass conscription)
 
0)    CHECK: CheckTurn == 0
1)      EXECUTE: ExecAddUnit(0, Gameslot_German X(#0), Gameslot_German Y(#1), 0)
2)      CHECK: CheckYear > 1941
3)        CHECK: Gameslot_German Victory Cities(#37) < 3
4)          EXECUTE: ExecGiveRegimePP(0, 10)
5)        END CHECK
6)      END CHECK
7)    END CHECK
8)    CHECK: CheckTurn == 1
9)      EXECUTE: ExecAddUnit(0, Gameslot_Western X(#2), Gameslot_Western Y(#3), 1)
10)   END CHECK
11)   CHECK: CheckTurn == 2
12)     EXECUTE: ExecAddUnit(0, Gameslot_SU X(#4), Gameslot_SU Y(#5), 2)
13)     CHECK: Gameslot_Cheap Soviet Infantry(#59) == 1
14)       EXECUTE: ExecGiveRegimePP(2, 5)
15)     END CHECK
16)   END CHECK
17)   SETVAR: TempVar0 = CheckTurn
18)   EXECUTE: ExecGiveActionCard(12, TempVar0)
19)   EXECUTE: ExecMessage(TempVar0, -1, -1, -1)
 
That’s it.  I find action cards to be very flexible.  Uses include:
 
-          Special declarations of war
-          Diplomacy (transfer pp, war material, even territory if combined with slots)
-          Purchase pre-defined units
-          Abstract warfare (uboats and dd escorts in ww2)
 
I am sure creative designers will come up with even more uses over time. 
 
Finally, note that you can also play action cards through events.  This allows you to play cards if a player is run by the AI.  The AI will not play an action card.

(in reply to tweber)
Post #: 6
RE: Tutorial: Making action cards - 11/23/2007 5:25:00 PM   
PDiFolco

 

Posts: 1200
Joined: 10/11/2004
Status: offline
Great, I'm every day more amazed with the editor !

The method you show here seems perfect to make "boardgame-like" deployment systems (ie player gets so much units and can place them in several locations more or less at will or with constraints).

I also have a question : can delayed deployment be done using the event engine ? For example I would like Infantry to enter play immediately when "bought", but have Battleships bought on turn X deployed on turn X+n. I suspect that this Action card method plus some more events to countdown unit appearance turn could be mde but it's still fuzzy in my mind...


(in reply to tweber)
Post #: 7
RE: Tutorial: Making action cards - 11/23/2007 6:31:17 PM   
tweber

 

Posts: 1411
Joined: 6/27/2007
Status: offline
You could have an action card trigger a counter that produces a ship unit after the right ammount of turns.  So yes, this is possible.

(in reply to PDiFolco)
Post #: 8
RE: Tutorial: Making action cards - 11/24/2007 12:27:05 AM   
PDiFolco

 

Posts: 1200
Joined: 10/11/2004
Status: offline
Great, the possibilities are endless ... really impressive !
BTW having build time for some units (ships mostly) would be a great plus in the historical "strategic level" scenarios (the other usually having no real build, only some reinforcements).

(in reply to tweber)
Post #: 9
RE: Tutorial: Making action cards - 12/25/2015 10:50:53 PM   
gazfun


Posts: 1046
Joined: 7/1/2004
From: Australia
Status: offline
Im Trying to learn how to make cards and events, I cant see the 1939 Scenario anywhere is there a more updated one I can use?

_____________________________


(in reply to PDiFolco)
Post #: 10
RE: Tutorial: Making action cards - 12/25/2015 10:57:06 PM   
ernieschwitz

 

Posts: 3893
Joined: 9/15/2009
From: Denmark
Status: offline
I think, though not sure, that he is refering to a scenario found in the Scenarios section of the AT:WWII part of the game. In ATGold that would be in a different folder than you are used to I think.

In any case, while this is a somewhat dated tutorial, it still gives the basics.

(in reply to gazfun)
Post #: 11
RE: Tutorial: Making action cards - 12/25/2015 10:59:35 PM   
ernieschwitz

 

Posts: 3893
Joined: 9/15/2009
From: Denmark
Status: offline
Found it:

Located in your atgoldscenarios/CLASSIC_WW2/HUMANONLY

Named Europe1939f.at2

(in reply to ernieschwitz)
Post #: 12
RE: Tutorial: Making action cards - 12/25/2015 11:34:27 PM   
gazfun


Posts: 1046
Joined: 7/1/2004
From: Australia
Status: offline
Thanks mate

_____________________________


(in reply to ernieschwitz)
Post #: 13
Page:   [1]
All Forums >> [New Releases from Matrix Games] >> Advanced Tactics Series >> Mods and Scenarios >> Tutorial: Making action cards Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

1.234