Making action Cards to remove units
Moderator: Vic
Making action Cards to remove units
Hi
Ive just started Moding a Game for play with our group, and some of the combats I would like to do by 3rd Paty Combat system. At the moment, we identfy the friendly and enemy units of my opponent. Then we use the stats of these armies in a 3rd Party Battle. The casualties are transferred to a "Casualties unit" which is labeled in the game and are moved away, from the area.
I have been investigating the using Action Cards to remove these units off the map Have been attepting to use the ExecRemoveUnits but cant get it to work
Anyone with any help would be appreciated
Ive just started Moding a Game for play with our group, and some of the combats I would like to do by 3rd Paty Combat system. At the moment, we identfy the friendly and enemy units of my opponent. Then we use the stats of these armies in a 3rd Party Battle. The casualties are transferred to a "Casualties unit" which is labeled in the game and are moved away, from the area.
I have been investigating the using Action Cards to remove these units off the map Have been attepting to use the ExecRemoveUnits but cant get it to work
Anyone with any help would be appreciated
- ernieschwitz
- Posts: 4719
- Joined: Tue Sep 15, 2009 3:46 pm
- Location: Denmark
RE: Making action Cards to remove units
Exec RemoveTroops might be something you want to look into 
Creator of High Quality Scenarios for:
- Advanced Tactics Gold
DC: Warsaw to Paris
DC: Community Project.
- ernieschwitz
- Posts: 4719
- Joined: Tue Sep 15, 2009 3:46 pm
- Location: Denmark
RE: Making action Cards to remove units
Although I have never used it myself... I imagine that getting the X Y from a select unit cardcommand, and letting it be value -1 for SFT type (asumming that -1 = all), and then letting percentage be 100 would do it.
Creator of High Quality Scenarios for:
- Advanced Tactics Gold
DC: Warsaw to Paris
DC: Community Project.
RE: Making action Cards to remove units
Wow thanks for responding, I thought I had 2 heads or something.
Yes I was looking at ExecRemoveUnits where its asking for a regime# which is from 0 to 13 then it asks for Regime Variable.
ExecuteRemoveTroops I havent seen
I can see the dots but dont understand how to put them together. I didnt make this scenario from scratch and I have added extra units and graphics to it, it all works fine.
Yes I was looking at ExecRemoveUnits where its asking for a regime# which is from 0 to 13 then it asks for Regime Variable.
ExecuteRemoveTroops I havent seen
I can see the dots but dont understand how to put them together. I didnt make this scenario from scratch and I have added extra units and graphics to it, it all works fine.
- ernieschwitz
- Posts: 4719
- Joined: Tue Sep 15, 2009 3:46 pm
- Location: Denmark
RE: Making action Cards to remove units
I think ExecRemoveUnits removes ALL units from a specific regime...
Not exactly what you are looking for.
Not exactly what you are looking for.
Creator of High Quality Scenarios for:
- Advanced Tactics Gold
DC: Warsaw to Paris
DC: Community Project.
RE: Making action Cards to remove units
Ive looked at this and it seems to be the one. the X Y from a select unit card Command that is like calling the Card "Third Party Casaulty Card" is that what you mean?ORIGINAL: ernieschwitz
Although I have never used it myself... I imagine that getting the X Y from a select unit cardcommand, and letting it be value -1 for SFT type (asumming that -1 = all), and then letting percentage be 100 would do it.
- ernieschwitz
- Posts: 4719
- Joined: Tue Sep 15, 2009 3:46 pm
- Location: Denmark
RE: Making action Cards to remove units
As for cards - there is a tutorial stickied, and although old, it gives a good introduction to some of the principles to makeing cards.
Here is a refresher course, and a bit of an extension to the tutorial.
Title: The name the action card will get, automatically set to Empty Historical in the editor followed by the cards number in (# )
Text: Whatever you want the card to say. However don´t go overboard, as there is a limited amount of space on the visual of the card itself.
PPCost: The price of the card. Always paid in Political Points. (can be set to 0)
ExecuteEvent: Defaults to -1, that is none. The effect of the card is determined by the event you program. Set it to the event you wish, a list will pop up for you to select from.
EventPicNr. Defaults to -1, which is none. However you can set it to any picture you have defined in the Setng section, where you can select Event pictures. Notice, you have to remember which nr. it is, no list pops up.
ColorScheme: Defaults to 0, and you can set it to 1, 2, 3 or 4, besides 0. These colors i can´t remember, hey, maybe someone else can
?
TempVar0: allows you to set a TempVar (0) to any value you like. Useful for instance if you want to transfer a predetermined map x-coordinate via card. Defaults to -1.
TempVar1: allows you to set a TempVar (1) to any value you like. Useful for instance if you want to transfer a predetermined map y-coordinate via card. Defaults to -1.
AreaSlot: allows you to make an area slot to the area that can be selected two coordinates from. These will be passed on as TempVar2 (x), and TempVar3 (y) to the event you are running, in ExecuteEvent. AreaSlots are numbered from 0 to 9, and it will use that one.
AreaValue: allows you to use the areaslot value for the areaslot you have defined in the previous as selection areavalue. For instance AreaSlot was chosen to 9, and the AreaValue you want people to choose a hex from is those marked 1. Default is -1.
PreExecuteEvent: Executes an event before the player gets to choose a hex, for instance. The event can be used for instance to define an AreaSlot and an AreaValue for that card. Default is -1. A list will pop up for you to choose an event from.
SelectUnit: Default is false. I am guessing, but have never tried it, that the SelectUnit will give a popup that selects a unit for the event to use. What data is transfered I am unsure of, perhaps TempVar0, and TempVar1. Vic will most likely know.

Here is a refresher course, and a bit of an extension to the tutorial.
Title: The name the action card will get, automatically set to Empty Historical in the editor followed by the cards number in (# )
Text: Whatever you want the card to say. However don´t go overboard, as there is a limited amount of space on the visual of the card itself.
PPCost: The price of the card. Always paid in Political Points. (can be set to 0)
ExecuteEvent: Defaults to -1, that is none. The effect of the card is determined by the event you program. Set it to the event you wish, a list will pop up for you to select from.
EventPicNr. Defaults to -1, which is none. However you can set it to any picture you have defined in the Setng section, where you can select Event pictures. Notice, you have to remember which nr. it is, no list pops up.
ColorScheme: Defaults to 0, and you can set it to 1, 2, 3 or 4, besides 0. These colors i can´t remember, hey, maybe someone else can
TempVar0: allows you to set a TempVar (0) to any value you like. Useful for instance if you want to transfer a predetermined map x-coordinate via card. Defaults to -1.
TempVar1: allows you to set a TempVar (1) to any value you like. Useful for instance if you want to transfer a predetermined map y-coordinate via card. Defaults to -1.
AreaSlot: allows you to make an area slot to the area that can be selected two coordinates from. These will be passed on as TempVar2 (x), and TempVar3 (y) to the event you are running, in ExecuteEvent. AreaSlots are numbered from 0 to 9, and it will use that one.
AreaValue: allows you to use the areaslot value for the areaslot you have defined in the previous as selection areavalue. For instance AreaSlot was chosen to 9, and the AreaValue you want people to choose a hex from is those marked 1. Default is -1.
PreExecuteEvent: Executes an event before the player gets to choose a hex, for instance. The event can be used for instance to define an AreaSlot and an AreaValue for that card. Default is -1. A list will pop up for you to choose an event from.
SelectUnit: Default is false. I am guessing, but have never tried it, that the SelectUnit will give a popup that selects a unit for the event to use. What data is transfered I am unsure of, perhaps TempVar0, and TempVar1. Vic will most likely know.

- Attachments
-
- Cards.jpg (29.12 KiB) Viewed 463 times
Creator of High Quality Scenarios for:
- Advanced Tactics Gold
DC: Warsaw to Paris
DC: Community Project.
RE: Making action Cards to remove units
Yes I understand a lot of it, but when goin into Variables TempVar I start running into trouble a bit
Thanks for your help
Thanks for your help
- Attachments
-
- Friday, De..02 11.51.jpg (52.75 KiB) Viewed 463 times
- ernieschwitz
- Posts: 4719
- Joined: Tue Sep 15, 2009 3:46 pm
- Location: Denmark
RE: Making action Cards to remove units
It seems like it is TempVar4 that is being transfered from the SelectUnit function. TempVar4 seems to be the historical unit number. That is the number the game uses to identify the unit.
Creator of High Quality Scenarios for:
- Advanced Tactics Gold
DC: Warsaw to Paris
DC: Community Project.
- ernieschwitz
- Posts: 4719
- Joined: Tue Sep 15, 2009 3:46 pm
- Location: Denmark
RE: Making action Cards to remove units
ORIGINAL: gazfun
Yes I understand a lot of it, but when goin into Variables TempVar I start running into trouble a bit
Thanks for your help
How do you mean you go into variables TempVar?
Creator of High Quality Scenarios for:
- Advanced Tactics Gold
DC: Warsaw to Paris
DC: Community Project.
RE: Making action Cards to remove units
Its just the meaning of them etc I think that the problem
RE: Making action Cards to remove units
I see about the Card now, But then the coding is the next problem


- Attachments
-
- Friday, De..02 11.51.jpg (52.75 KiB) Viewed 463 times
RE: Making action Cards to remove units
i got the card made up so far like this


- Attachments
-
- FridayDe..0312.12.jpg (94.13 KiB) Viewed 463 times
- ernieschwitz
- Posts: 4719
- Joined: Tue Sep 15, 2009 3:46 pm
- Location: Denmark
RE: Making action Cards to remove units
The first line is not something you need. Unless you want to execute the card, when the event is run.
The second line should read ExecRemoveTroops(tempvar2, tempvar3, -1, 100)
I am guessing tempvar2 and tempvar3 are transfered with the card command.
The second line should read ExecRemoveTroops(tempvar2, tempvar3, -1, 100)
I am guessing tempvar2 and tempvar3 are transfered with the card command.
Creator of High Quality Scenarios for:
- Advanced Tactics Gold
DC: Warsaw to Paris
DC: Community Project.
- ernieschwitz
- Posts: 4719
- Joined: Tue Sep 15, 2009 3:46 pm
- Location: Denmark
RE: Making action Cards to remove units
Ok, that card looks nice.
What you need is to add a line of code to deal the card (and remove it if unused so they don´t get loads and loads of the card)...
Most likely you will need to make an event. Something like.
Event Name: Add new card, execute: Early turn check
0). TempVar0 = CheckTurn
1). ExecRemoveActionCard (relevant data using tempvar0 as regime)
2). ExecAddActionCard (relevant data using tempvar0 as regime)
What you need is to add a line of code to deal the card (and remove it if unused so they don´t get loads and loads of the card)...
Most likely you will need to make an event. Something like.
Event Name: Add new card, execute: Early turn check
0). TempVar0 = CheckTurn
1). ExecRemoveActionCard (relevant data using tempvar0 as regime)
2). ExecAddActionCard (relevant data using tempvar0 as regime)
Creator of High Quality Scenarios for:
- Advanced Tactics Gold
DC: Warsaw to Paris
DC: Community Project.
RE: Making action Cards to remove units
Is that all I need in the coding?
Ok i will do this, have to be off to the dentist now, [X(]
Ok i will do this, have to be off to the dentist now, [X(]
- ernieschwitz
- Posts: 4719
- Joined: Tue Sep 15, 2009 3:46 pm
- Location: Denmark
RE: Making action Cards to remove units
I would think so....
Of course any unit selected would vanish. This card would be available to all players too
Of course any unit selected would vanish. This card would be available to all players too
Creator of High Quality Scenarios for:
- Advanced Tactics Gold
DC: Warsaw to Paris
DC: Community Project.
- ernieschwitz
- Posts: 4719
- Joined: Tue Sep 15, 2009 3:46 pm
- Location: Denmark
RE: Making action Cards to remove units
Do tell me if it is working 
If not then we probably need to find some way of transfering the coordinates from the unit to the event.
If not then we probably need to find some way of transfering the coordinates from the unit to the event.
Creator of High Quality Scenarios for:
- Advanced Tactics Gold
DC: Warsaw to Paris
DC: Community Project.
RE: Making action Cards to remove units
Oh good, Ill post here if Im having anymore hassles, thanks heaps mate, much appreciated
RE: Making action Cards to remove units
Hi ernieschwitzORIGINAL: ernieschwitz
Do tell me if it is working
If not then we probably need to find some way of transfering the coordinates from the unit to the event.
I couldnt find the ExecAddActionCard
And I looked elsewhere maybe Im going blind [:)]
Your post 13 and 14 is the same Card? If so there would be 4 lines of code right? thats confusing me at the moment
Also I would like the engine to announce to other player what player X removed if possible, so the removal is transparent to all players.
So could you get me the revised code for that please?
This is Great

- Attachments
-
- FridayDe..0114.45.jpg (69.05 KiB) Viewed 463 times
