View Issue Details

IDProjectCategoryView StatusLast Update
0003304The Dark ModScript/Defpublic13.07.2014 16:43
ReporterObsttorte Assigned ToSteveL  
PrioritynormalSeverityfeatureReproducibilityalways
Status resolvedResolutionfixed 
Product VersionTDM 1.08 
Target VersionTDM 2.02Fixed in VersionTDM 2.02 
Summary0003304: add scripting events to get mission statistics
DescriptionIt would be nice to have script functions which allows you to get specific mission statistics, for example the number of already KOed or killed guards, how many guards you have alerted and so one.
TagsNo tags attached.
Attached Files
t.script (1,880 bytes)

Activities

Zbyl

Zbyl

09.02.2013 23:40

reporter   ~0005059

Proposed patch posted on the forums:
http://forums.thedarkmod.com/topic/14499-2-bugs-and-a-patch-for-0003304-add-scripting-events-to-get-mission-statistics/page__view__findpost__p__305282
SteveL

SteveL

05.04.2014 17:53

reporter   ~0006498

Changes in the patch:

script_thread.h, script_thread.cpp:
- adds 2 script events
- - GetDifficultyName
- - GetMissionStatistic

MissionStatistics.h:
- 2 constants redefined to reference their enums.

MissionData.h:
- New accessor functions declared.
- Declares new function SStat* GetStat( EComponentType CompType, int AlertLevel = 0 ); to abstract some logic that was repeated in the four existing stat getter functions and that's needed in the new ones.

MissionData.cpp:
- Reordered and refactored a bit.
- New accessors defined.
- Member functions that access private data directly changed to use existing and new accessor functions.
- Code for calculating stealth scores moved from UpdateStatiticsGUI() to separate functions, so that the new accessors can use it too.
- Existing accessors changed to use the new GetStat function.
SteveL

SteveL

05.04.2014 17:56

reporter   ~0006499

Test script attached. It shows the stats exposed by the new script events in a table in the console, updated every 3 seconds.
SteveL

SteveL

08.04.2014 19:31

reporter   ~0006515

Committed in revision 5950

Issue History

Date Modified Username Field Change
26.01.2013 16:58 Obsttorte New Issue
09.02.2013 23:40 Zbyl Note Added: 0005059
05.08.2013 21:24 grayman Assigned To => grayman
05.08.2013 21:24 grayman Status new => assigned
05.08.2013 21:24 grayman Target Version => TDM 2.01
23.11.2013 16:30 grayman Target Version TDM 2.01 => TDM 2.02
29.03.2014 16:58 SteveL Assigned To grayman => SteveL
05.04.2014 17:53 SteveL Note Added: 0006498
05.04.2014 17:54 SteveL File Added: t.script
05.04.2014 17:56 SteveL Note Added: 0006499
08.04.2014 19:31 SteveL Note Added: 0006515
08.04.2014 19:32 SteveL Status assigned => resolved
08.04.2014 19:32 SteveL Fixed in Version => TDM 2.02
08.04.2014 19:32 SteveL Resolution open => fixed