[request] passenger location + name/number export

    Diese Seite verwendet Cookies. Durch die Nutzung unserer Seite erklären Sie sich damit einverstanden, dass wir Cookies setzen. Weitere Informationen

    • Just extend the "PassengerDatabase" class and access the _passengersCache protected field, which happens to be a Dictionary with it's key being the passenger ID and the value the Passenger object itself, which has a _name public field.

      To make proper use of it you would want to overwrite the "OnEnable" method and call it's base method first, then access the above mentioned _passengersCache field. An example would be to loop over them and output them via the logging method of your choice.
    • Here is an example code for you

      C-Quellcode: PassengerDatabaseEx.cs

      1. using TheForest.Player;
      2. namespace PassengerDumper
      3. {
      4. public class PassengerDatabaseEx : PassengerDatabase
      5. {
      6. public override void OnEnable()
      7. {
      8. base.OnEnable();
      9. ModAPI.Log.Write("------------ Dumping all passengers ------------");
      10. var number = 1;
      11. foreach (var passenger in _passengersCache)
      12. {
      13. ModAPI.Log.Write($"[{number++}] Passenger {passenger.Value._name}\r\n - ID: {passenger.Key}\r\n - Path: {passenger.Value._path}\r\n - ZoneID: {passenger.Value._zoneId}");
      14. }
      15. ModAPI.Log.Write("------------ Dump complete! ------------");
      16. }
      17. }
      18. }
      Alles anzeigen



      And this is the result
      Spoiler anzeigen

      Brainfuck-Quellcode

      1. [2017-05-23 22:20] ------------ Dumping all passengers ------------
      2. [2017-05-23 22:20] [1] Passenger Anna Falcone
      3. - ID: 1
      4. - Path: Assets/Scenes/Cave9_Main_Lighting11.unity//C9.C9_Props.C9_Room04.Greeble_Dynamic_WomanAlt
      5. - ZoneID: 18
      6. [2017-05-23 22:20] [2] Passenger Mike Terekhova
      7. - ID: 2
      8. - Path: Assets/Scenes/Cave5_Main_Lighting17.unity//Cave_05.C5_Props.C5_Room01.Greeble_HangingBodies
      9. - ZoneID: 19
      10. [2017-05-23 22:20] [3] Passenger Anna Terekhova
      11. - ID: 3
      12. - Path: Assets/Scenes/Cave5_Main_Lighting17.unity//Cave_05.C5_Props.C5_Room01.Greeble_HangingBodies
      13. - ZoneID: 21
      14. [2017-05-23 22:20] [4] Passenger Mike Terekhova
      15. - ID: 4
      16. - Path: Assets/Scenes/Cave1_PropsAndLightingv17.unity//Cave1.C1_PROPS.C1_Entrance_Room.Greeble_Dynamic_touristMan
      17. - ZoneID: 23
      18. [2017-05-23 22:20] [5] Passenger Ben Mellor
      19. - ID: 5
      20. - Path: Assets/Scenes/Cave2_Main_Lighting21.unity//C2.C2_Props.C2_Prop_Room01_babyHole.Greeble_HangingBodies
      21. - ZoneID: 25
      22. [2017-05-23 22:20] [6] Passenger Anna Falcone
      23. - ID: 6
      24. - Path: Assets/Scenes/Cave6_Main_Lighting10.unity//C6.C6_Props.C6_mainCavern.Greeble_HangingBodies (1)
      25. - ZoneID: 27
      26. [2017-05-23 22:20] [7] Passenger Ben Falcone
      27. - ID: 7
      28. - Path: Assets/Scenes/Cave6_Main_Lighting10.unity//C6.C6_Props.C6_mainCavern.Greeble_HangingBodies (1)
      29. - ZoneID: 27
      30. [2017-05-23 22:20] [8] Passenger Ben Mellor
      31. - ID: 8
      32. - Path: Assets/Scenes/Cave7_Lighting7.unity//C7.C7_Props.C7_Entrance.Greeble_Dynamic_touristMan
      33. - ZoneID: 29
      34. [2017-05-23 22:20] [9] Passenger Anna Falcone
      35. - ID: 9
      36. - Path: Assets/Scenes/Cave7_Lighting7.unity//C7.C7_Props.C7_Entrance.Greeble_Dynamic_Woman
      37. - ZoneID: 31
      38. [2017-05-23 22:20] [10] Passenger Ben Terekhova
      39. - ID: 10
      40. - Path: Assets/Scenes/Cave7_Lighting7.unity//C7.C7_Props.C7_Entrance.Greeble_Dynamic_Woman
      41. - ZoneID: 31
      42. [2017-05-23 22:20] [11] Passenger Ben Falcone
      43. - ID: 11
      44. - Path: Assets/Scenes/Cave7_Lighting7.unity//C7.C7_Props.C7_Entrance.Greeble_Dynamic_Woman (2)
      45. - ZoneID: 33
      46. [2017-05-23 22:20] [12] Passenger Mike Terekhova
      47. - ID: 12
      48. - Path: Assets/Scenes/Cave7_Lighting7.unity//C7.C7_Props.C7_Entrance.Greeble_Dynamic_WomanAlt
      49. - ZoneID: 35
      50. [2017-05-23 22:20] [13] Passenger Anna Mellor
      51. - ID: 13
      52. - Path: Assets/Scenes/Cave7_Lighting7.unity//C7.C7_Props.C7_Entrance.Greeble_Dynamic_WomanAltBloody
      53. - ZoneID: 37
      54. [2017-05-23 22:20] [14] Passenger Ben Falcone
      55. - ID: 14
      56. - Path: Assets/Scenes/Cave9_Main_Lighting09.unity//C9.C9_Props.C9_Room04.Greeble_HangingBodies
      57. - ZoneID: 39
      58. [2017-05-23 22:20] [15] Passenger Mike Falcone
      59. - ID: 15
      60. - Path: Assets/Scenes/Cave9_Main_Lighting11.unity//C9.C9_Props.C9_Room05.Greeble_Dynamic_touristMan
      61. - ZoneID: 46
      62. [2017-05-23 22:20] [16] Passenger Mike Mellor
      63. - ID: 16
      64. - Path: Assets/Scenes/Cave9_Main_Lighting11.unity//C9.C9_Props.C9_Room04.Greeble_Dynamic_WomanAlt
      65. - ZoneID: 49
      66. [2017-05-23 22:20] [17] Passenger Ben Mellor
      67. - ID: 17
      68. - Path: Assets/Scenes/Cave1_PropsAndLightingv21.unity//Cave1.C1_PROPS.C1_Dead_Room.japan_2
      69. - ZoneID: -42
      70. [2017-05-23 22:20] [18] Passenger Mike Terekhova
      71. - ID: 18
      72. - Path: Assets/Scenes/Cave1_PropsAndLightingv21.unity//Cave1.C1_PROPS.C1_Dead_Room.japan_2.polySurface63
      73. - ZoneID: -42
      74. [2017-05-23 22:20] [19] Passenger Anna Falcone
      75. - ID: 19
      76. - Path: Assets/Scenes/Cave1_PropsAndLightingv21.unity//Cave1.C1_PROPS.C1_Dead_Room.japan_1.polySurface9
      77. - ZoneID: -42
      78. [2017-05-23 22:20] [20] Passenger Mike Falcone
      79. - ID: 20
      80. - Path: Assets/Scenes/Cave1_PropsAndLightingv21.unity//Cave1.C1_PROPS.C1_Dead_Room.half_cut.half_cut:half_cut:polySurface7
      81. - ZoneID: -42
      82. [2017-05-23 22:20] [21] Passenger Mike Falcone
      83. - ID: 21
      84. - Path: Assets/Scenes/Cave1_PropsAndLightingv21.unity//Cave1.C1_PROPS.C1_Big_Room.japan_3 (1).XXX1:Group63950_sss2
      85. - ZoneID: -42
      86. [2017-05-23 22:20] [22] Passenger Mike Terekhova
      87. - ID: 22
      88. - Path: Assets/Scenes/Cave7_Lighting9.unity//C7.C7_Props.C7_Room03.Tennis01.tennis_01_High
      89. - ZoneID: -42
      90. [2017-05-23 22:20] [23] Passenger Mike Terekhova
      91. - ID: 23
      92. - Path: Assets/Scenes/Cave7_Lighting9.unity//C7.C7_Props.C7_Room03.Tennis02.tennis_02_high
      93. - ZoneID: -42
      94. [2017-05-23 22:20] [24] Passenger Anna Falcone
      95. - ID: 24
      96. - Path: Assets/Scenes/Cave7_Lighting9.unity//C7.C7_Props.C7_Room03.Tennis02 (1).tennis_02_high
      97. - ZoneID: -42
      98. [2017-05-23 22:20] [25] Passenger Mike Terekhova
      99. - ID: 25
      100. - Path: Assets/Scenes/Cave7_Lighting9.unity//C7.C7_Props.C7_Room03.Tennish03.tennis_03_High
      101. - ZoneID: -42
      102. [2017-05-23 22:20] [26] Passenger Anna Terekhova
      103. - ID: 28
      104. - Path: Assets/Scenes/Cave6_Main_Lighting12.unity//C6.C6_Props.C6_secretRoom03.Lawyer_Body (1)
      105. - ZoneID: -42
      106. [2017-05-23 22:20] [27] Passenger Ben Falcone
      107. - ID: 29
      108. - Path: Assets/Scenes/Cave6_Main_Lighting12.unity//C6.C6_Props.C6_secretRoom03.Lawyer_Body (2)
      109. - ZoneID: -42
      110. [2017-05-23 22:20] [28] Passenger Anna Mellor
      111. - ID: 30
      112. - Path: Assets/Scenes/Cave2_Main_Lighting27.unity//C2.C2_Props.C2_Prop_Corridor07_tocave1.Hanging_Body_Cut_DYNAMIC
      113. - ZoneID: -42
      114. [2017-05-23 22:20] [29] Passenger Ben Terekhova
      115. - ID: 31
      116. - Path: Assets/Scenes/Cave2_Main_Lighting27.unity//C2.C2_Props.C2_Prop_Corridor07_tocave1.tourist_woman_hanging_DYNAMIC_Blonde
      117. - ZoneID: -42
      118. [2017-05-23 22:20] [30] Passenger Anna Terekhova
      119. - ID: 32
      120. - Path: Assets/Scenes/Cave2_Main_Lighting27.unity//C2.C2_Props.C2_Prop_Corridor07_tocave1.Tourist_Woman
      121. - ZoneID: -42
      122. [2017-05-23 22:20] [31] Passenger Anna Terekhova
      123. - ID: 33
      124. - Path: Assets/Scenes/Cave3_Main_Lighting_16.unity//tourist_woman_hanging_DYNAMIC_Bloody
      125. - ZoneID: -42
      126. [2017-05-23 22:20] [32] Passenger Mike Terekhova
      127. - ID: 34
      128. - Path: Assets/Scenes/Cave3_Main_Lighting_16.unity//tourist_woman_hanging_DYNAMIC_Blonde
      129. - ZoneID: -42
      130. [2017-05-23 22:20] [33] Passenger Ben Falcone
      131. - ID: 35
      132. - Path: Assets/Scenes/Cave3_Main_Lighting_16.unity//tourist_man_hanging_DYNAMIC
      133. - ZoneID: -42
      134. [2017-05-23 22:20] ------------ Dump complete! ------------
      Alles anzeigen

      As you can see, _id != number, which basically means that there are some passengers not yet added to the game as, for example, passenger number 33 has an _id value of 35
    • What. The. FFFFF! Absolutely enjoyed reading the posts here, thanks a lot both of you :)))


      ID/Name mismatches were mentioned while id 33 refers to Ben Falcone who is Endnight's lead developer. On the other hand I see his name popping up quite often in the list, furthermore revealing there aren't any other names besides his, his wife's or daughter's probably and other Endnight team members (eg Anna is the one posting patchnotes on their website). Sure those names were matched/fetched correctly or is more work required to also get the correct names? <- Silly me ^^
      Von mir verfasste Beiträge befinden sich unter der Creative Commons Lizenz 3.0
      •[ Profil im The Forest Forum & Profil im Stranded Deep Forum ]•

      Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von DieAxtimWalde ()