Tutorial: Making action cards

Discuss and post your mods and scenarios here for others to download.

Moderator: Vic

Post Reply
tweber
Posts: 1411
Joined: Wed Jun 27, 2007 1:32 pm

Tutorial: Making action cards

Post by tweber »

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.


Image
Attachments
1amakingpredefined.jpg
1amakingpredefined.jpg (47.06 KiB) Viewed 693 times
tweber
Posts: 1411
Joined: Wed Jun 27, 2007 1:32 pm

RE: Tutorial: Making action cards

Post by tweber »

[font="times new roman"]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).[/font]

Image
Attachments
1b enable ..on cards.jpg
1b enable ..on cards.jpg (63.64 KiB) Viewed 694 times
tweber
Posts: 1411
Joined: Wed Jun 27, 2007 1:32 pm

RE: Tutorial: Making action cards

Post by tweber »

[font="times new roman"]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).[/font]

Image
Attachments
1c picking locations.jpg
1c picking locations.jpg (55.98 KiB) Viewed 693 times
tweber
Posts: 1411
Joined: Wed Jun 27, 2007 1:32 pm

RE: Tutorial: Making action cards

Post by tweber »

[font="times new roman"]3.  Build the 'arrival' action card.[/font]
[font="times new roman"] [/font]
[font="times new roman"]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:[/font]
[font="times new roman"] [/font]
[font="times new roman"]-          Title and text are self explanatory.  You want to be explicit both here and in the scenario description so players know what to do.[/font]
[font="times new roman"]-          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)[/font]
[font="times new roman"]-          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).[/font]
[font="times new roman"]-          Picture is the picture on the card.  Go to editor – settings – event pictures to set up the pictures that the event will use.[/font]
[font="times new roman"]-          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.[/font]

Image
Attachments
2 arrival ..on cards.jpg
2 arrival ..on cards.jpg (123.6 KiB) Viewed 693 times
tweber
Posts: 1411
Joined: Wed Jun 27, 2007 1:32 pm

RE: Tutorial: Making action cards

Post by tweber »

Here is the screen that ties action cards to events.

Image
Attachments
2a arrival..on cards.jpg
2a arrival..on cards.jpg (98.91 KiB) Viewed 693 times
tweber
Posts: 1411
Joined: Wed Jun 27, 2007 1:32 pm

RE: Tutorial: Making action cards

Post by tweber »

[font="times new roman"]4.  Write the event to ‘deal the action card’.[/font]
[font="times new roman"] [/font]
[font="times new roman"]See some of the code from event 12:[/font]
[font="times new roman"] [/font]
[font="times new roman"] LOOPER: TempVar0 FROM 0 TO 3[/font]
[font="times new roman"]3)      SETVAR: TempVar1 = TempVar0[/font]
[font="times new roman"]4)      SETVAR: TempVar1 + 4[/font]
[font="times new roman"]5)      SETVAR: TempVar2 = TempVar0[/font]
[font="times new roman"]6)      SETVAR: TempVar2 + 8[/font]
[font="times new roman"]7)      EXECUTE: ExecRemoveActionCard(TempVar0, 0)[/font]
[font="times new roman"]8)      EXECUTE: ExecRemoveActionCard(TempVar1, 1)[/font]
[font="times new roman"]9)      EXECUTE: ExecRemoveActionCard(TempVar2, 2)[/font]
[font="times new roman"]10)   END LOOPER[/font]
[font="times new roman"]11)   EXECUTE: ExecGiveActionCard(0, 0)[/font]
[font="times new roman"]12)   CHECK: CheckHexOwner(36, 38) == 0[/font]
[font="times new roman"]13)     EXECUTE: ExecGiveActionCard(3, 0)  [/font]
[font="times new roman"]14)   END CHECK[/font]
[font="times new roman"] [/font]
[font="times new roman"]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.  [/font]
[font="times new roman"] [/font]
[font="times new roman"]5.  Write an event to execute the action card.  [/font]
[font="times new roman"] [/font]
[font="times new roman"]0)    EXECUTE: ExecMessage(0, -1, -1, -1)[/font]
[font="times new roman"]1)    SETVAR: Gameslot_German X(#0) = 39[/font]
[font="times new roman"]2)    SETVAR: Gameslot_German Y(#1) = 17[/font]
[font="times new roman"]3)    EXECUTE: ExecGiveActionCard(0, 0)[/font]
[font="times new roman"] [/font]
[font="times new roman"]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.[/font]
[font="times new roman"] [/font]
[font="times new roman"]0)    EXECUTE: ExecReduceReadiness(2, 0, 50, 100)[/font]
[font="times new roman"]1)    EXECUTE: ExecMessage(0, 2, -1, -1)[/font]
[font="times new roman"] [/font]
[font="times new roman"]5.  Write, deal, and then execute the unit purchase cards.[/font]
[font="times new roman"] [/font]
[font="times new roman"]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.[/font]
[font="times new roman"] [/font]
[font="times new roman"]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)[/font]
[font="times new roman"] [/font]
[font="times new roman"]0)    CHECK: CheckTurn == 0[/font]
[font="times new roman"]1)      EXECUTE: ExecAddUnit(0, Gameslot_German X(#0), Gameslot_German Y(#1), 0)[/font]
[font="times new roman"]2)      CHECK: CheckYear > 1941[/font]
[font="times new roman"]3)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CHECK: Gameslot_German Victory Cities(#37) < 3[/font]
[font="times new roman"]4)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; EXECUTE: ExecGiveRegimePP(0, 10)[/font]
[font="times new roman"]5)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; END CHECK[/font]
[font="times new roman"]6)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; END CHECK[/font]
[font="times new roman"]7)&nbsp;&nbsp;&nbsp; END CHECK[/font]
[font="times new roman"]8)&nbsp;&nbsp;&nbsp; CHECK: CheckTurn == 1[/font]
[font="times new roman"]9)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; EXECUTE: ExecAddUnit(0, Gameslot_Western X(#2), Gameslot_Western Y(#3), 1)[/font]
[font="times new roman"]10)&nbsp;&nbsp; END CHECK[/font]
[font="times new roman"]11)&nbsp;&nbsp; CHECK: CheckTurn == 2[/font]
[font="times new roman"]12)&nbsp;&nbsp;&nbsp;&nbsp; EXECUTE: ExecAddUnit(0, Gameslot_SU X(#4), Gameslot_SU Y(#5), 2)[/font]
[font="times new roman"]13)&nbsp;&nbsp;&nbsp;&nbsp; CHECK: Gameslot_Cheap Soviet Infantry(#59) == 1[/font]
[font="times new roman"]14)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; EXECUTE: ExecGiveRegimePP(2, 5)[/font]
[font="times new roman"]15)&nbsp;&nbsp;&nbsp;&nbsp; END CHECK[/font]
[font="times new roman"]16)&nbsp;&nbsp; END CHECK[/font]
[font="times new roman"]17)&nbsp;&nbsp; SETVAR: TempVar0 = CheckTurn[/font]
[font="times new roman"]18)&nbsp;&nbsp; EXECUTE: ExecGiveActionCard(12, TempVar0)[/font]
[font="times new roman"]19)&nbsp;&nbsp; EXECUTE: ExecMessage(TempVar0, -1, -1, -1)[/font]
[font="times new roman"]&nbsp;[/font]
[font="times new roman"]That’s it.&nbsp; I find action cards to be very flexible. &nbsp;Uses include:[/font]
[font="times new roman"]&nbsp;[/font]
[font="times new roman"]-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Special declarations of war[/font]
[font="times new roman"]-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Diplomacy (transfer pp, war material, even territory if combined with slots)[/font]
[font="times new roman"]-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Purchase pre-defined units[/font]
[font="times new roman"]-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Abstract warfare (uboats and dd escorts in ww2)[/font]
[font="times new roman"]&nbsp;[/font]
[font="times new roman"]I am sure creative designers will come up with even more uses over time.&nbsp; [/font]
[font="times new roman"][/font]&nbsp;
[font="times new roman"]Finally, note that you can also play action cards through events.&nbsp; This allows you to play cards if a player is run by the AI. &nbsp;The AI will not play an action card.[/font]
&nbsp;
PDiFolco
Posts: 1195
Joined: Mon Oct 11, 2004 8:14 am

RE: Tutorial: Making action cards

Post by PDiFolco »

Great, I'm every day more amazed with the editor !
&nbsp;
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).
&nbsp;
I also have a question : can delayed deployment be done using the event engine ? For example I would like&nbsp;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...
&nbsp;
&nbsp;
PDF
tweber
Posts: 1411
Joined: Wed Jun 27, 2007 1:32 pm

RE: Tutorial: Making action cards

Post by tweber »

You could have an action card trigger a counter that produces a ship unit after the right ammount of turns.&nbsp; So yes, this is possible.
PDiFolco
Posts: 1195
Joined: Mon Oct 11, 2004 8:14 am

RE: Tutorial: Making action cards

Post by PDiFolco »

Great, the possibilities are endless ... really impressive ! [&o]
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).
PDF
User avatar
gazfun
Posts: 734
Joined: Wed Jun 30, 2004 9:59 pm
Location: Australia

RE: Tutorial: Making action cards

Post by gazfun »

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?
User avatar
ernieschwitz
Posts: 4245
Joined: Tue Sep 15, 2009 3:46 pm
Location: Denmark

RE: Tutorial: Making action cards

Post by ernieschwitz »

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.
Creator of High Quality Scenarios for:
  • Advanced Tactics Gold
    DC: Warsaw to Paris
    DC: Community Project.
Try this Global WW2 Scenario: https://www.vrdesigns.net/scenario.php?nr=280
User avatar
ernieschwitz
Posts: 4245
Joined: Tue Sep 15, 2009 3:46 pm
Location: Denmark

RE: Tutorial: Making action cards

Post by ernieschwitz »

Found it:

Located in your atgoldscenarios/CLASSIC_WW2/HUMANONLY

Named Europe1939f.at2
Creator of High Quality Scenarios for:
  • Advanced Tactics Gold
    DC: Warsaw to Paris
    DC: Community Project.
Try this Global WW2 Scenario: https://www.vrdesigns.net/scenario.php?nr=280
User avatar
gazfun
Posts: 734
Joined: Wed Jun 30, 2004 9:59 pm
Location: Australia

RE: Tutorial: Making action cards

Post by gazfun »

Thanks mate
Post Reply

Return to “Mods and Scenarios”