aliens

Author Topic: [STAT TRACKING] Soldier Diaries 1.0  (Read 544925 times)

Offline FudgeDragon

  • Captain
  • ***
  • Posts: 54
    • View Profile
Re: [STAT TRACKING] Soldier Diaries
« Reply #120 on: May 12, 2014, 08:13:21 pm »
Hey Shoes,

Built your mod from your GitHub source today but at first it refused to compile. It seems you were calling textList->setScroll(0) (which doesn't exist) once in SoldierDiaryOverviewState and nine times in SoldierDiaryPerformanceState. I think the method you wanted was scrollTo(0). Other than that, love the mod.

Offline Shoes

  • Commander
  • *****
  • Posts: 502
    • View Profile
Re: [STAT TRACKING] Soldier Diaries
« Reply #121 on: May 12, 2014, 08:27:37 pm »
That darned SupSuper and making UI changes. Glad to hear you like it! Always looks for feedback :3

Offline FudgeDragon

  • Captain
  • ***
  • Posts: 54
    • View Profile
Re: [STAT TRACKING] Soldier Diaries
« Reply #122 on: May 15, 2014, 09:04:18 am »
Hi Shoes,

I've been having a crash attempting to look at a particular dead soldiers mission details. The message I get is invalid vector<T> subscript.

I can't post the save as one its ironman and therefore difficult to test, and running a couple of personal ruleset tweaks (although nothing that would affect missions in any way, it adds extra tanks.

However if it helps, I've attatched the relevent sections of my savegame.

The trouble soldier:
Code: [Select]
  - id: 7
    name: Klaus Mueller
    initialStats:
      tu: 54
      stamina: 50
      health: 37
      bravery: 50
      reactions: 54
      firing: 53
      throwing: 68
      strength: 32
      psiStrength: 56
      psiSkill: 0
      melee: 36
    currentStats:
      tu: 64
      stamina: 59
      health: 47
      bravery: 50
      reactions: 56
      firing: 57
      throwing: 70
      strength: 49
      psiStrength: 56
      psiSkill: 0
      melee: 36
    rank: 4
    gender: 0
    look: 1
    missions: 18
    kills: 5
    armor: STR_PERSONAL_ARMOR_UC
    improvement: 0
    death:
      time:
        second: 25
        minute: 15
        hour: 14
        weekday: 5
        day: 6
        month: 5
        year: 1999
    diary:
      commendations:
        - commendationName: STR_MEDAL_MILITARY_CROSS_NAME
          decorationLevel: 3
        - commendationName: STR_MEDAL_ORDER_OF_EARTH_NAME
          decorationLevel: 3
        - commendationName: STR_MEDAL_HONOR_CROSS_NAME
          decorationLevel: 0
        - commendationName: STR_MEDAL_SERVICE_MEDAL_NAME
          decorationLevel: 0
        - commendationName: STR_MEDAL_MERIT_STAR_NAME
          decorationLevel: 0
        - commendationName: STR_MEDAL_CAMPAIGN_RIBBON_NAME
          noun: STR_SIBERIA
          decorationLevel: 0
      killList:
        - rank: STR_LIVE_SOLDIER
          race: STR_SECTOID
          weapon: STR_RIFLE
          weaponAmmo: STR_RIFLE_CLIP
          status: 6
          faction: 1
          mission: 0
          turn: 12
        - rank: STR_LIVE_SOLDIER
          race: STR_FLOATER
          weapon: STR_LASER_PISTOL
          weaponAmmo: STR_LASER_PISTOL
          status: 6
          faction: 1
          mission: 1
          turn: 315
        - rank: STR_LIVE_ENGINEER
          race: STR_SECTOID
          weapon: STR_GRENADE
          weaponAmmo: STR_GRENADE
          status: 6
          faction: 1
          mission: 2
          turn: 621
        - rank: STR_LIVE_ENGINEER
          race: STR_FLOATER
          weapon: STR_HEAVY_LASER
          weaponAmmo: STR_HEAVY_LASER
          status: 6
          faction: 1
          mission: 6
          turn: 1839
        - rank: STR_LIVE_SOLDIER
          race: STR_FLOATER
          weapon: STR_HEAVY_LASER
          weaponAmmo: STR_HEAVY_LASER
          status: 6
          faction: 1
          mission: 10
          turn: 3018
      missionIdList:
        - 0
        - 1
        - 2
        - 3
        - 4
        - 5
        - 6
        - 7
        - 8
        - 9
        - 10
        - 12
        - 13
        - 14
        - 15
        - 16
        - 18
        - 19
      alienRankTotal:
        STR_LIVE_ENGINEER: 2
        STR_LIVE_SOLDIER: 3
      alienRaceTotal:
        STR_FLOATER: 3
        STR_SECTOID: 2
      weaponTotal:
        STR_GRENADE: 1
        STR_HEAVY_LASER: 2
        STR_LASER_PISTOL: 1
        STR_RIFLE: 1
      weaponAmmoTotal:
        STR_GRENADE: 1
        STR_HEAVY_LASER: 2
        STR_LASER_PISTOL: 1
        STR_RIFLE_CLIP: 1
      regionTotal:
        STR_AUSTRALASIA: 1
        STR_CENTRAL_ASIA: 1
        STR_EUROPE: 4
        STR_NORTH_AMERICA: 3
        STR_SIBERIA: 5
        STR_SOUTH_AMERICA: 3
        STR_SOUTH_EAST_ASIA: 1
      countryTotal:
        STR_AUSTRALIA: 1
        STR_BRAZIL: 1
        STR_CANADA: 1
        STR_FRANCE: 1
        STR_RUSSIA: 5
        STR_UK: 1
        STR_UNKNOWN: 6
        STR_USA: 2
      typeTotal:
        STR_ALIEN_BASE_ASSAULT_LC: 2
        STR_TERROR_MISSION_LC: 3
        STR_UFO_CRASH_RECOVERY_LC: 13
      UFOTotal:
        NO_UFO: 5
        STR_LARGE_SCOUT: 6
        STR_MEDIUM_SCOUT: 7
      scoreTotal: 4514
      killTotal: 5
      missionTotal: 18
      winTotal: 17
      totalShotFriendlyCounter: 1
      terrorMissionTotal: 3
      nightMissionTotal: 5
      monthsService: 4
      importantMissionTotal: 17
      longDistanceHitCounterTotal: 1
and the missions:
Code: [Select]
missionStatistics:
  - id: 0
    country: STR_UK
    time:
      weekday: 4
      second: 45
      minute: 35
      hour: 14
      day: 13
      month: 1
      year: 1999
    region: STR_EUROPE
    type: STR_UFO_CRASH_RECOVERY
    ufo: STR_MEDIUM_SCOUT
    success: true
    score: 105
    rating: STR_RATING_OK
    alienRace: STR_SECTOID
    daylight: 0
    injuryList:
      6: 0
      1: 0
      2: 0
      3: 0
      4: 0
      5: 0
      7: 0
      8: 0
  - id: 1
    region: STR_SOUTH_EAST_ASIA
    country: STR_UNKNOWN
    type: STR_TERROR_MISSION
    ufo: NO_UFO
    time:
      minute: 52
      second: 5
      hour: 22
      weekday: 1
      day: 17
      month: 1
      year: 1999
    success: true
    score: 369
    rating: STR_RATING_GOOD
    alienRace: STR_FLOATER
    daylight: 0
    injuryList:
      2: 0
      3: 0
      4: 0
      5: 0
      7: 0
      8: 0
      9: 0
      10: 0
  - id: 2
    region: STR_EUROPE
    country: STR_FRANCE
    type: STR_UFO_CRASH_RECOVERY
    ufo: STR_LARGE_SCOUT
    time:
      minute: 34
      second: 5
      hour: 7
      weekday: 7
      day: 30
      month: 1
      year: 1999
    success: true
    score: 226
    rating: STR_RATING_GOOD
    alienRace: STR_SECTOID
    daylight: 1
    injuryList:
      2: 0
      3: 0
      4: 0
      7: 0
      8: 19
      9: 0
      10: 0
      11: 0
      12: 0
      13: 0
  - id: 3
    region: STR_SOUTH_AMERICA
    country: STR_UNKNOWN
    type: STR_UFO_CRASH_RECOVERY
    ufo: STR_LARGE_SCOUT
    time:
      minute: 43
      second: 15
      hour: 19
      weekday: 1
      day: 7
      month: 2
      year: 1999
    success: true
    score: 196
    rating: STR_RATING_OK
    alienRace: STR_SECTOID
    daylight: 0
    injuryList:
      2: 0
      3: 0
      4: 0
      7: 0
      9: 0
      10: 0
      11: 0
      12: 0
      13: 0
      14: 0
  - id: 4
    region: STR_EUROPE
    country: STR_UNKNOWN
    type: STR_UFO_CRASH_RECOVERY
    ufo: STR_LARGE_SCOUT
    time:
      minute: 47
      second: 25
      hour: 6
      weekday: 7
      day: 13
      month: 2
      year: 1999
    success: true
    score: 160
    rating: STR_RATING_OK
    alienRace: STR_SECTOID
    daylight: 0
    injuryList:
      4: 0
      7: 0
      9: 0
      10: 0
      11: 0
      13: 0
      14: 0
      15: 0
      16: 0
      17: 0
  - ufo: NO_UFO
    time:
      minute: 53
      second: 20
      hour: 14
      weekday: 3
      day: 2
      month: 3
      year: 1999
    injuryList:
      13: 0
      4: 0
      7: 0
      9: 0
      10: 0
      11: 0
      14: 0
      15: 0
      16: 0
      17: 0
    success: true
    score: 265
    rating: STR_RATING_GOOD
    alienRace: STR_SECTOID
    daylight: 0
    id: 5
    region: STR_SOUTH_AMERICA
    country: STR_BRAZIL
    type: STR_TERROR_MISSION
  - country: STR_USA
    type: STR_UFO_CRASH_RECOVERY
    ufo: STR_LARGE_SCOUT
    success: true
    score: 178
    rating: STR_RATING_OK
    alienRace: STR_FLOATER
    daylight: 0
    injuryList:
      2: 40
      3: 0
      4: 0
      7: 0
      8: 0
      9: 0
      11: 18
      12: 0
      15: 0
    region: STR_NORTH_AMERICA
    id: 6
    time:
      minute: 44
      hour: 16
      weekday: 4
      day: 3
      second: 35
      year: 1999
      month: 3
  - id: 7
    region: STR_AUSTRALASIA
    country: STR_AUSTRALIA
    type: STR_TERROR_MISSION
    ufo: NO_UFO
    time:
      second: 40
      minute: 25
      hour: 1
      weekday: 3
      day: 23
      month: 3
      year: 1999
    success: true
    score: 140
    rating: STR_RATING_OK
    alienRace: STR_FLOATER
    daylight: 0
    injuryList:
      3: 20
      4: 0
      7: 0
      8: 0
      11: 0
      12: 0
      15: 0
      18: 0
      19: 0
      20: 0
      21: 0
      22: 0
      23: 0
  - id: 8
    region: STR_SOUTH_AMERICA
    country: STR_UNKNOWN
    type: STR_UFO_CRASH_RECOVERY
    ufo: STR_LARGE_SCOUT
    time:
      second: 5
      minute: 10
      hour: 15
      weekday: 6
      day: 26
      month: 3
      year: 1999
    success: true
    score: 265
    rating: STR_RATING_GOOD
    alienRace: STR_FLOATER
    daylight: 0
    injuryList:
      4: 0
      7: 0
      8: 0
      12: 0
      15: 16
      19: 0
      20: 0
      21: 0
      22: 0
      23: 0
  - id: 9
    region: STR_SIBERIA
    country: STR_RUSSIA
    type: STR_UFO_CRASH_RECOVERY
    ufo: STR_MEDIUM_SCOUT
    time:
      minute: 2
      second: 35
      hour: 13
      weekday: 5
      day: 1
      month: 4
      year: 1999
    success: true
    score: 152
    rating: STR_RATING_OK
    alienRace: STR_SNAKEMAN
    daylight: 14
    injuryList:
      4: 0
      7: 0
      8: 0
      12: 12
      19: 0
      20: 0
      21: 0
      22: 0
      23: 0
  - id: 10
    region: STR_NORTH_AMERICA
    country: STR_CANADA
    type: STR_ALIEN_BASE_ASSAULT
    ufo: NO_UFO
    time:
      minute: 25
      second: 30
      hour: 9
      weekday: 2
      day: 5
      month: 4
      year: 1999
    success: true
    score: 1629
    rating: STR_RATING_EXCELLENT
    alienRace: STR_FLOATER
    daylight: 15
    injuryList:
      4: 0
      7: 0
      8: 0
      19: 0
      21: 0
      22: 0
      23: 0
      24: 0
      25: 0
      26: 0
      27: 0
      28: 0
      29: 0
      30: 0
  - id: 11
    region: STR_SIBERIA
    country: STR_RUSSIA
    type: STR_UFO_CRASH_RECOVERY
    ufo: STR_LARGE_SCOUT
    time:
      minute: 32
      second: 35
      hour: 4
      weekday: 2
      day: 19
      month: 4
      year: 1999
    success: true
    score: 206
    rating: STR_RATING_GOOD
    alienRace: STR_SNAKEMAN
    daylight: 0
    injuryList:
      19: 0
      22: 0
      23: 0
      24: 0
      25: 18
      26: 0
      27: 0
      30: 0
      31: 0
      32: 0
  - id: 12
    region: STR_NORTH_AMERICA
    country: STR_USA
    type: STR_UFO_CRASH_RECOVERY
    ufo: STR_MEDIUM_SCOUT
    time:
      minute: 51
      second: 45
      hour: 17
      weekday: 4
      day: 21
      month: 4
      year: 1999
    success: true
    score: 159
    rating: STR_RATING_OK
    alienRace: STR_FLOATER
    daylight: 0
    injuryList:
      7: 0
      19: 0
      21: 0
      22: 0
      23: 0
      24: 0
      26: 0
      30: 0
      31: 0
      32: 0
  - id: 13
    region: STR_CENTRAL_ASIA
    country: STR_UNKNOWN
    type: STR_UFO_CRASH_RECOVERY
    ufo: STR_MEDIUM_SCOUT
    time:
      minute: 59
      second: 55
      hour: 6
      weekday: 7
      day: 1
      month: 5
      year: 1999
    success: true
    score: 186
    rating: STR_RATING_OK
    alienRace: STR_SNAKEMAN
    daylight: 0
    injuryList:
      7: 0
      19: 0
      21: 0
      22: 0
      23: 0
      24: 0
      26: 0
      30: 0
      31: 1
      32: 0
  - id: 14
    region: STR_SIBERIA
    country: STR_RUSSIA
    type: STR_UFO_CRASH_RECOVERY
    ufo: STR_MEDIUM_SCOUT
    time:
      minute: 14
      second: 50
      hour: 0
      weekday: 1
      day: 2
      month: 5
      year: 1999
    success: true
    score: 157
    rating: STR_RATING_OK
    alienRace: STR_SNAKEMAN
    daylight: 0
    injuryList:
      7: 0
      15: 0
      19: 0
      21: 0
      22: 0
      23: 0
      24: 0
      26: 0
      30: 0
      32: 0
  - id: 15
    country: STR_RUSSIA
    region: STR_SIBERIA
    type: STR_UFO_CRASH_RECOVERY
    ufo: STR_MEDIUM_SCOUT
    time:
      second: 5
      minute: 14
      hour: 10
      weekday: 1
      day: 2
      month: 5
      year: 1999
    success: true
    score: 125
    rating: STR_RATING_OK
    alienRace: STR_SNAKEMAN
    daylight: 0
    injuryList:
      7: 0
      15: 0
      19: 0
      21: 0
      22: 0
      23: 0
      24: 0
      26: 0
      30: 0
      32: 0
  - id: 16
    region: STR_SIBERIA
    country: STR_RUSSIA
    type: STR_UFO_CRASH_RECOVERY
    ufo: STR_LARGE_SCOUT
    time:
      minute: 53
      second: 35
      hour: 22
      weekday: 1
      day: 2
      month: 5
      year: 1999
    success: true
    score: 322
    rating: STR_RATING_GOOD
    alienRace: STR_SNAKEMAN
    daylight: 0
    injuryList:
      7: 0
      15: 0
      19: 0
      21: 0
      23: 0
      24: 0
      26: 0
      30: 0
      32: 0
      33: 36
  - id: 17
    region: STR_NORTH_AMERICA
    country: STR_USA
    type: STR_UFO_CRASH_RECOVERY
    ufo: STR_MEDIUM_SCOUT
    time:
      minute: 47
      second: 40
      hour: 18
      weekday: 4
      day: 5
      month: 5
      year: 1999
    success: true
    score: 127
    rating: STR_RATING_OK
    alienRace: STR_FLOATER
    daylight: 0
    injuryList:
      3: 0
      4: 0
      8: 0
      12: 0
      34: 0
      35: 0
      36: 0
      37: 0
      38: 0
      39: 0
  - id: 18
    region: STR_EUROPE
    country: STR_UNKNOWN
    type: STR_UFO_CRASH_RECOVERY
    ufo: STR_MEDIUM_SCOUT
    time:
      minute: 53
      second: 0
      hour: 4
      weekday: 5
      day: 6
      month: 5
      year: 1999
    success: true
    score: 9
    rating: STR_RATING_OK
    alienRace: STR_SNAKEMAN
    daylight: 2
    injuryList:
      7: 0
      15: 0
      19: 0
      21: 0
      22: 0
      23: 0
      26: 0
      30: 0
      31: 0
      32: 0
  - id: 19
    region: STR_SIBERIA
    country: STR_RUSSIA
    type: STR_ALIEN_BASE_ASSAULT
    ufo: NO_UFO
    time:
      minute: 15
      second: 25
      hour: 14
      weekday: 5
      day: 6
      month: 5
      year: 1999
    success: false
    score: -129
    rating: STR_RATING_POOR
    alienRace: STR_SNAKEMAN
    daylight: 15
    injuryList:
      7: 0
      15: 0
      19: 0
      21: 0
      22: 0
      23: 0
      26: 0
      30: 0
      31: 0
      32: 0
  - id: 20
    region: STR_SIBERIA
    country: STR_RUSSIA
    type: STR_UFO_CRASH_RECOVERY
    ufo: STR_MEDIUM_SCOUT
    time:
      minute: 55
      second: 40
      hour: 5
      weekday: 4
      day: 12
      month: 5
      year: 1999
    success: true
    score: 177
    rating: STR_RATING_OK
    alienRace: STR_SNAKEMAN
    daylight: 0
    injuryList:
      2: 0
      19: 0
      22: 0
      26: 0
      30: 0
      44: 0
      45: 0
      46: 0
      47: 0
      48: 0
  - id: 21
    region: STR_CENTRAL_ASIA
    country: STR_UNKNOWN
    type: STR_UFO_CRASH_RECOVERY
    ufo: STR_LARGE_SCOUT
    time:
      minute: 45
      second: 25
      hour: 12
      weekday: 6
      day: 14
      month: 5
      year: 1999
    success: true
    score: 249
    rating: STR_RATING_GOOD
    alienRace: STR_SNAKEMAN
    daylight: 0
    injuryList:
      2: 0
      19: 0
      22: 0
      26: 0
      30: 0
      44: 0
      45: 0
      46: 0
      47: 0
      48: 0
  - id: 22
    region: STR_EUROPE
    country: STR_UNKNOWN
    type: STR_UFO_CRASH_RECOVERY
    ufo: STR_LARGE_SCOUT
    time:
      minute: 0
      second: 55
      hour: 10
      weekday: 3
      day: 18
      month: 5
      year: 1999
    success: true
    score: 276
    rating: STR_RATING_GOOD
    alienRace: STR_SNAKEMAN
    daylight: 0
    injuryList:
      2: 0
      19: 0
      22: 0
      26: 0
      30: 0
      44: 0
      45: 0
      46: 0
      47: 0
      48: 0
  - alienRace: STR_FLOATER
    daylight: 0
    injuryList:
      3: 0
      4: 0
      8: 0
      12: 0
      35: 0
      36: 0
      37: 0
      38: 0
      39: 0
      34: 0
    id: 23
    region: STR_NORTH_AMERICA
    country: STR_USA
    type: STR_UFO_CRASH_RECOVERY
    ufo: STR_LARGE_SCOUT
    time:
      minute: 23
      second: 10
      hour: 14
      weekday: 3
      day: 18
      month: 5
      year: 1999
    success: true
    score: 306
    rating: STR_RATING_GOOD
  - id: 24
    region: STR_SOUTH_AMERICA
    country: STR_UNKNOWN
    type: STR_UFO_GROUND_ASSAULT
    ufo: STR_SUPPLY_SHIP
    time:
      second: 10
      minute: 17
      hour: 7
      weekday: 5
      day: 20
      month: 5
      year: 1999
    success: true
    score: 658
    rating: STR_RATING_EXCELLENT
    alienRace: STR_FLOATER
    daylight: 15
    injuryList:
      3: 26
      4: 0
      8: 22
      12: 6
      34: 0
      35: 0
      36: 0
      37: 0
      38: 0
      39: 0

If this helps, great. If not I'll try to reproduce it in a more isolated environment (and not ironman).

Offline Shoes

  • Commander
  • *****
  • Posts: 502
    • View Profile
Re: [STAT TRACKING] Soldier Diaries
« Reply #123 on: May 15, 2014, 01:06:55 pm »
Do other dead soldiers cause a crash? Are you playing the most recent version of my mod (May 13th)? If you did, did you continue your save or start a new game?

With your help, I'll get that memorial sorted!

Offline FudgeDragon

  • Captain
  • ***
  • Posts: 54
    • View Profile
Re: [STAT TRACKING] Soldier Diaries
« Reply #124 on: May 15, 2014, 03:59:41 pm »
I running your most recent code, although I may have started the game on the previous version.

Ok, I think I've worked out what causes it. Klaus was my longest serving soldier (the last of my starting 8 to die.) As a result one of only three soldiers,  dead or alive with a scrollbar on his missions screen. These are the only soldiers that crash, and only when selecting a mission that was below the starting 15. I hadn't noticed with the live ones because, well they seem less interesting. If any of them die I'm sure I'd head straight to the memorial to pay my respects.

Attempting to select one of those three missions throws a invalid vector<T> subscript which is a std::out_of_range

As I am running my own build of your code, I changed by build profile to debug and had a dig for you.
The error is thrown on the execution of this line:
Code: [Select]
SoldierDiaryMissionState.cpp Line 100: int missionId = _soldier->getDiary()->getMissionIdList().at(_rowEntry);
Experementing a little it seems _rowEntry gets more and more inaccurate the further you scroll down.
Looking at
Code: [Select]
SoldierDiaryOverviewState.cpp Line 312: int absoluteRowEntry = _lstDiary->getSelectedRow() + _lstDiary->getScroll();I find that
Code: [Select]
_lstDiary->getSelectedRow() already seems to be respecting scrollbar position. So every time we moved the scrollbar down all our missions would become offset by 1, eventually you moved off the bottom of the array :)

Change that row to
Code: [Select]
int absoluteRowEntry = _lstDiary->getSelectedRow() and everything seems to clear up the problem.

I've included a patch file of the fix in case it makes it easier for you. Scratch the patch file, it wouldn't apply, I was working on a branch with some of my own changes too.

One thing to note, debugging this has drawn attention to the fact that the textList returns to the top after viewing each mission. Any chance of getting it to remember where it was so I don't have to scroll back down to view the next mission?



« Last Edit: May 15, 2014, 08:20:57 pm by FudgeDragon »

Offline Shoes

  • Commander
  • *****
  • Posts: 502
    • View Profile
Re: [STAT TRACKING] Soldier Diaries
« Reply #125 on: May 15, 2014, 04:43:59 pm »
Awesome work! The help is greatly appreciated.

Quote
One thing to note, debugging this has drawn attention to the fact that the textList returns to the top after viewing each mission. Any chance of getting it to remember where it was so I don't have to scroll back down to view the next mission?

The reason this happens is lines 170, 171 in SoldierDiaryOverviewState::init() : the _lstDiary is cleared and set to 0. I would have to be at my home computer to see how the logic flows, but when you popState in SoldierDiaryMissionState, it might run through the SoldierDiaryOverviewState constructor again. If that's the case, a bit of creative coding would need to be done to fix the scroll/reset thing. If the constructor is not called, then the _lstDiary clearing and setting could be moved to the constructor and copied in the next/prev buttons too. This way it won't get called every time init() is called. I'll give this a try at home; I agree that it is a nuisance.

Offline FudgeDragon

  • Captain
  • ***
  • Posts: 54
    • View Profile
Re: [STAT TRACKING] Soldier Diaries
« Reply #126 on: May 15, 2014, 08:24:34 pm »
Got carried away and made the missions page stay put after looking at one too. Was fairly simple after I had a look at SoldiersInfo.cpp as I realised that it sould have the same problem and didn't. Turns out you don't have to reset the scroll position straight away. Instead wait a until the list is repopulated, then check if you need to, i.e. outside new bounds.

I submitted a pull request to github with the code for you.

EDIT:
Apologies for spamming your git with pull requests. When I initially did the fixes I had trouble creating the pull request, I didn't realise I could only do pull requests from remote branches. Thinking I could only do it with branches based on my master (which was up to date with SupSupers) I create a branch off of that and merged everything in. Once I realised what was going on I created another branch off of yours this time. Then I created the new pull request and closed the wrong one!

Oh well, Its there now if you want it.
« Last Edit: May 15, 2014, 08:58:58 pm by FudgeDragon »

Offline Shoes

  • Commander
  • *****
  • Posts: 502
    • View Profile
Re: [STAT TRACKING] Soldier Diaries
« Reply #127 on: May 16, 2014, 12:31:40 am »
Awesome, a collaborator :3 my very first! I am new to being on the recieving end of a PR, but I think you will need to do your PR again.

Pull my alpha_branch into a new branch, cherry-pick the 2 commits that you're adding from your old branch, and then PR the resulting new branch. The branch you PR with should be identical to the branch you are PRing into, except for the changes you are making. I know it would be easy for me to take your code and commit it under my name, but then I have no evidence of collaboration :3

Offline FudgeDragon

  • Captain
  • ***
  • Posts: 54
    • View Profile
Re: [STAT TRACKING] Soldier Diaries
« Reply #128 on: May 16, 2014, 08:04:32 am »
Heh, no problem, I'm new to pull requests too. Actually I'm new to git on the whole, its a miracle its working as well as it is.

EDIT: Right, I know that ones good! New PR up on github.

EDIT2: Just got the email notification that you did the merge. We got there in the end! I'll keep playing with the mod and let you know if I run into any further problems.
« Last Edit: May 16, 2014, 02:00:49 pm by FudgeDragon »

Offline Shoes

  • Commander
  • *****
  • Posts: 502
    • View Profile
Re: [STAT TRACKING] Soldier Diaries
« Reply #129 on: May 16, 2014, 02:09:25 pm »
Merged! Nice having a playtester who also bug fixes :3

The next thing I am working on is redoing the super ugly post-battle commendations screen.

Offline ceilingrat

  • Sergeant
  • **
  • Posts: 23
    • View Profile
Re: [STAT TRACKING] Soldier Diaries
« Reply #130 on: May 16, 2014, 04:46:59 pm »
Shoes,


Congrats on your first coder person helping! I helped, but Fudgedragon can do so much more than I can. The whole understanding code thing.


Wish I had time (and patience) to actually playtest things atm.




ceilingrat

Offline Shoes

  • Commander
  • *****
  • Posts: 502
    • View Profile
Re: [STAT TRACKING] Soldier Diaries
« Reply #131 on: May 18, 2014, 12:35:47 am »
Ya I am pretty happy to have FudgeDragon lend a hand! All playtesters are appreciated too :3

Here is the new post-mission commendations screen!


Offline Souljah1214

  • Sergeant
  • **
  • Posts: 26
    • View Profile
Re: [STAT TRACKING] Soldier Diaries
« Reply #132 on: June 15, 2014, 01:19:53 pm »
Hi! I think this is one of the greatest addition (as for immersion) to OXC! I tried to mod the freshly installed 1.0 with this, but unfortunatly i was unsuccesful... I started the game as i have downloaded (1.0) and in the mainmenu it showed the correct version number... when i added this (installed correctly before on the lates nightly version with no problems) to the 1.0 version it reduced the number back to 0.9... does this mean that this mod is currently incompatible with 1.0 or we are just waiting for an updated version?

I like this mod cause it gives more personality for a soldier... which could be used to write some cool fanfictions...

Offline Shoes

  • Commander
  • *****
  • Posts: 502
    • View Profile
Re: [STAT TRACKING] Soldier Diaries
« Reply #133 on: June 15, 2014, 03:05:31 pm »
Because this is a source mod, I have to manually update my mod when the game updates. I should probably do that, on the account of 1.0 being released! I will try to get that done before the end of the day.

:D

Offline animal310

  • Captain
  • ***
  • Posts: 54
    • View Profile
Re: [STAT TRACKING] Soldier Diaries
« Reply #134 on: June 15, 2014, 03:19:03 pm »
That's great news shoes. Thanks for all your work on it, its a great mod.