Jump to content
Sign in to follow this  
madrussian

Adding extra text (or stats) to the Debriefing

Recommended Posts

I'd like to add some extra text to the Debriefing.

 

Bit of background.  When playing my dynamic co-op mission, at the end we like to count our kills on the Debriefing Statistics page and compare to each other.  Often I get 30-40 kills and my dad (for instance) gets 2-3 kills.  But that is showing only the units we personally killed.  In my mission, a number of supports (like Mortars, Artillery, Bombers, etc) are awarded to each player and players call these in and end up killing a ton of "extra" enemies that way, which of course aren't included in the final Debriefing Statistics page.  Basically I want to give players (especially my poor dad) credit for all their kills.

 

I would like to tally and display these "Support kills", if you will.  So, the tallying is trivial, but getting them to display on Debriefing page is more of a challenge.  Here are the methods I can think of (so far) to accomplish this:

 

1. Display extra kills info on Debriefing Page 1

This should, in theory, work via setDebriefingText, but unfortunately this command is listed as broken (and quick testing appears to confirm is indeed broken)

 

2. Display extra kills info on Debriefing Page 2 (Statistics section)

First off, this seems to be a good place for extra kill info.

 

Could work in the following manner:  Every time a player's support kills a unit (via killed EH), I can immediately create an identical unit off the middle of no-where, somehow name it appropriately to identify is as killed by a support (<- need help with this part), then create a projectile and use setShotParents to set the instigator as the player.  Then send the projectile into the dummy unit to kill it, allowing the player to get credit for his support killing the unit (and then delete dummy).

 

The part I need help with here is the "somehow name it appropriately to identify it as killed by a support".  Seems that normally when player kills a unit, it is listed by it's displayName in the config.  For instance if player killed a "B_Soldier_F", on Debriefing Page 2 (Statistics section) it gets displayed as "Rifleman".  I need it to say something custom like "Rifleman (killed by Bombers)".

 

Any ideas on how to correctly name/identify units (prior to killing them) in this case?

 

3. Display extra kills info on Debriefing Page 2 (Tasks section)

Prior to ending the mission, I could always create a dummy task and add to the end of the normally displayed tasks.  Task could say something like "Your supports killed 23 men and knocked out 2 vehicles."

 

The advantage of this method is I'm confident I can pull it off.

 

4. Create a dialog and overlay it on top of Debriefing

Talley the kills, and show it in a simple window.  The big hitch here is I would need to display the dialog after the mission is technically complete.  Is this even possible with mission code?  Perhaps, I'd simply spawn a script in UI namespace which would persist beyond the end of mission, popping up the dialog?  Anyone have any related knowledge/experience?

 

 

So what do you all think?  Which is the best method for displaying support kill info in the Debriefing?

 

I welcome any and all help, even simple things I may have missed.  Thanks!

Share this post


Link to post
Share on other sites

You could go with a custom debriefing section https://community.bistudio.com/wiki/Debriefing#Custom_Sections . I have used this to show lots of miscellaneous information, like distance travelled on foot, or in vehicle, amount of time spent talking on task force radio, etc.. But I would try this first addPlayerScores if you can settle with just fixing the kill statistics.

  • Like 1

Share this post


Link to post
Share on other sites
16 hours ago, Muzzleflash said:

I would try this first addPlayerScores if you can settle with just fixing the kill statistics.

Neat command, learning something new every day around here.  I think I really want to tally the kills and compare against the engine's tallying though, as I have a custom Group-Respawn style system running, and it's not 100% clear the engine is counting normal kills correctly on client machines, considering the player's are controlling different unit upon death, etc.  Anyhow, my dad claims it's not counting all his kills, and now he'll have a chance to substantiate this. :z:

 

16 hours ago, Muzzleflash said:

You could go with a custom debriefing section https://community.bistudio.com/wiki/Debriefing#Custom_Sections . I have used this to show lots of miscellaneous information, like distance travelled on foot, or in vehicle, amount of time spent talking on task force radio, etc..

That looks like just the ticket!


Thought more about the methods I was considering:

 

1. Display extra kills info on Debriefing Page 1 -> Wouldn't have worked anyhow due to that error.

2. Display extra kills info on Debriefing Page 2 (Statistics section) -> Would have negative performance impact (creating all those dummy guys in the middle of no-where just to be killed.  Plus players would have to count their support kills at the end, etc.  This was probably the worst option now that I think this through.

3. Display extra kills info on Debriefing Page 2 (Tasks section) -> Did some quick experiments and using tasks actually looks pretty good.  Created two extra tasks (both task type "target", which looks like a bulls-eye) just prior to ending mission [one for player kills, one for support kills, each breaking down the type of vehicle kills (in my case fighting vehicles & transports), plus whether they were destroyed vs simply knocked out)].  Advantage here over "custom debriefing section" would be players can see everything all on one page (vs having to flip page to see custom kill summary).

4. Create a dialog and overlay it on top of Debriefing -> That would have been a royal pain, if it's even possible!

 

So sounds like it's down to "custom debriefing section" vs Tasks, both which should work well.  Will experiment to see which one looks better / has better feel.

 

Thanks for the help!

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×