Resetting KIAs counter - How?

Download scenarios and talk about scenario design.

Moderators: Slitherine Core, BA Moderators

Post Reply
GottaLove88s
Lieutenant-General - Do 217E
Lieutenant-General - Do 217E
Posts: 3151
Joined: Fri Apr 06, 2012 6:18 pm
Location: Palau

Resetting KIAs counter - How?

Post by GottaLove88s »

Does anybody know how to zero the killed in action (KIA) counters?
They list all of the killed units on the KIA summary screen.

I want to kill a few units at the beginning of a battle, to create some extra eye candy for a map.
(Excellent method courtesy of Amaris, merci monsieur, hère -> viewtopic.php?f=105&t=39046)
I suspect that BA will "count" these in its KIAs. Is there any way to zero that counter?

It would only happen once, in PreBattleSetup, right at the start...

Thanks guys! :-)
SCENARIO LINKS
Seelow'45 -> www.slitherine.com/forum/viewtopic.php?f=313&t=55132
Normandy'44 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42094
Dieppe'42 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42347
Amaris
Captain - Heavy Cruiser
Captain - Heavy Cruiser
Posts: 929
Joined: Fri Jul 23, 2010 11:08 am
Location: France
Contact:

Re: Resetting KIAs counter - How?

Post by Amaris »

I'm afraid that 's impossible.

In any case I do not see how. :o

By cons it seems that Pip had spoken to add a function to revive units. With this function, it will be possible at the end of the game, to revive the destroyed units at the beginning of the game so they will not be counted. :P
“Take care, my friend; watch your six, and do one more roll… just for me.”
GottaLove88s
Lieutenant-General - Do 217E
Lieutenant-General - Do 217E
Posts: 3151
Joined: Fri Apr 06, 2012 6:18 pm
Location: Palau

Re: Resetting KIAs counter - How?

Post by GottaLove88s »

Hmmm, that's intriguing...

What if the destroyed unit was armour, say a Sherman, and during the game the wreck of that destroyed Sherman was "cleared" by another unit. Can I still revive it? Even tho there is no evidence that it was ever there?

Just checking, but overall, I love the idea of being able to destroy units before the game, to create wrecks for the map, and reviving them at the end, so that they don't affect the KIAs... I guess this explains your question on "PostBattle"? I wonder, if there's a way to do this at say, "Turns Remaining 2"?

Merci encore Monsieur!
:-)
SCENARIO LINKS
Seelow'45 -> www.slitherine.com/forum/viewtopic.php?f=313&t=55132
Normandy'44 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42094
Dieppe'42 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42347
Amaris
Captain - Heavy Cruiser
Captain - Heavy Cruiser
Posts: 929
Joined: Fri Jul 23, 2010 11:08 am
Location: France
Contact:

Re: Resetting KIAs counter - How?

Post by Amaris »

GottaLove88s wrote:Hmmm, that's intriguing...

What if the destroyed unit was armour, say a Sherman, and during the game the wreck of that destroyed Sherman was "cleared" by another unit. Can I still revive it? Even tho there is no evidence that it was ever there?

Just checking, but overall, I love the idea of being able to destroy units before the game, to create wrecks for the map, and reviving them at the end, so that they don't affect the KIAs... I guess this explains your question on "PostBattle"? I wonder, if there's a way to do this at say, "Turns Remaining 2"?

Merci encore Monsieur!
:-)
No idea : this function doesn't exist now...
Must memorize every unit destroyed, like this:

Code: Select all

FUNCTION PreBattleSetup()
{
...
int id;
int countid;

   id = GetUnitOnTile(TILEX, TILEY); //Remplace Tilex and Tiley by the coordinates of the tile.
   countid = -1;
   
   if (id != -1)
   {
		DestroyUnit(id, 255) ; 
		countid++;
		SetArray(countid, id, 1);
   }
   SetGlobal ("MaxUnitDestroyed", countid) ;
...
To recover them at the end of the battle:

Code: Select all

FUNCTION VictoryConditions()
{
...
int id;
int countid;

	for (countid = 0 ; countid < MaxUnitDestroyed + 1 ; countid++)
	{
		REVIVEUNIT(GetArray(countid, 1));
	}

...

	EndBattle(0);
...
}
That it lacks the function REVIVEUNIT. :wink:
We have already a ReviveUnit(id, mask) FUNCTION but: //resurrect the denoted men in a unit. This will remove any dead bodies, will appear in place on the unit tile. WILL NOT work on dead units.

My question about the script end tower has nothing to do with it. :wink: I try extreme changes. :twisted:
“Take care, my friend; watch your six, and do one more roll… just for me.”
pipfromslitherine
Site Admin
Site Admin
Posts: 9863
Joined: Wed Mar 23, 2005 10:35 pm

Re: Resetting KIAs counter - How?

Post by pipfromslitherine »

There isn't a way to tinker with the kills, no. It's something which has come up before. I have adding an ability in the editor to place dead versions of units on my wishlist, but it's more fiddly than it first appeared, so not sure if it will make it onto the actual todo list :)

Might be simpler to add a new command to mark a unit as not counting for kills.

P.S. You can't revive units which are all dead, or single units, IIRC.

Cheers

Pip
GottaLove88s
Lieutenant-General - Do 217E
Lieutenant-General - Do 217E
Posts: 3151
Joined: Fri Apr 06, 2012 6:18 pm
Location: Palau

Re: Resetting KIAs counter - How?

Post by GottaLove88s »

pipfromslitherine wrote:Might be simpler to add a new command to mark a unit as not counting for kills.
Pip
Thanks Pip!

That would work. Using that method, we could...

1. Add the "to be destroyed" unit on the map, using the Editor as normal
2. Mark it "does not count towards kills" in a PreBattleSetup script (or via the Editor, if you're feeling generous? ;-))
3. Then destroy it using Amaris' PreBattleSetup script

Voila, we have one dead unit, that will interract with map traffic, and no KIA count.

How can I do that?
:mrgreen:
SCENARIO LINKS
Seelow'45 -> www.slitherine.com/forum/viewtopic.php?f=313&t=55132
Normandy'44 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42094
Dieppe'42 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42347
pipfromslitherine
Site Admin
Site Admin
Posts: 9863
Joined: Wed Mar 23, 2005 10:35 pm

Re: Resetting KIAs counter - How?

Post by pipfromslitherine »

It's not possible until the next update, but I will add it to the list.

Cheers

Pip
GottaLove88s
Lieutenant-General - Do 217E
Lieutenant-General - Do 217E
Posts: 3151
Joined: Fri Apr 06, 2012 6:18 pm
Location: Palau

Re: Resetting KIAs counter - How?

Post by GottaLove88s »

Thanks Pip, I promise to wait... with my usual patience... :P
SCENARIO LINKS
Seelow'45 -> www.slitherine.com/forum/viewtopic.php?f=313&t=55132
Normandy'44 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42094
Dieppe'42 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42347
Post Reply

Return to “Battle Academy : Scenario Design”