Seemingly broke a game save.

Started by Vertu, February 03, 2022, 06:23:16 PM

Previous topic - Next topic

Vertu

I.... As someone getting involved with coding.. I am beyond awe struck at how this could of happened.
I somehow via unknown means in a very specific instance SPECIFICLY deleted 99% of the units in the map on Gameload. The surviving units very closely resemble positions of all units in my first save of the map EXCEPT THE TERRAIN IS THE SAME AS FROM MY LATEST SAVE. At first this made me think I somehow loaded my first save of the map without having any save file not up-to-date until I saw the terrain, unit properties, and CPacks all perfectly up-to-date.

Mean while the save's icon picture is identical to my last save and shows over 2,000 units (estimate, there are over 1,250 units as that is the last UID I was using before this mess happened), CPacks are perfectly up to date (although the only V-Shield that wasn't deleted has one of it's objects offset by exactly 2 cells upwards). Yet on loading in, is almost empty of units and is nothing like the save image.

The only instance of any instability was some kind of invisible crazonium that didn't exist yet was still blocking connections in a very specific location. Ever since the map got nearly cleansed of it's units, this invisible crazonium is also missing though I think a reload would of removed it too. (This all happened after making a save then loading it shortly after making that save which then brought me to this, it was a long session but I have done longer).

Where once there was over 2,000 units there are now exactly 35 with a UID no larger than 59 (except a random V-Rod with a UID of 827 which I tried looking into to see if any of my scripts caused this.. Can't find any and I recompiled the scripts NUMEROUS TIMES BEFORE THIS HAPPENED. No Script updates happened before a recompile. They were all perfectly up-to-date and have ran at least once before saving and reloading, this is what I meant by "in a very specific instance").

The most unusual part of all of this is how seemingly EVERYTHING was deleted EXCEPT very specific units all of which are in familiar positions I recall being the unit positions saved in the first save of the map. The only unit that I believe to not be included in this is the random V-Rod with a UID of 827 and all units with a UID<60 that are missing. Also this is general, they aren't exactly in the same position but are only off by less than 3 cells in any vector at most.


Notes:
Spoiler


  • All extra factories deleted. The original/first created factory wasn't deleted. (UID:33)
  • The first ever placed V-Shield wasn't deleted, all other V-Shields were and this single V-Shield has one of it's object parts with a new local Y-position of 2. All newly placed V-Shields do not encounter this change in object position. (UID:47).
  • Surviving units (except V-Rod UID:827) in locations of units in the first save of the map.
  • Terrain perfectly up-to-date.
  • CPacks perfectly up-to-date.
  • All scripts have been recompiled and have ran at least once before making the latest save and then loading it. Only to be welcomed to this.
  • Rift Lab not deleted and retains edited ammo capacity (really cool how CW4 perfectly handles it, will be making a capacitor structure in the future) and retained it's User-I state. (UID:20)
  • All terrain specials preserved.
  • V-Rod with a UID of 827 is the latest ever placed unit that wasn't deleted. 2nd latest is a Blaster with a UID of 59.
  • I have full confidence that all vanilla STRUC units were deleted except for STRUC units that were placed before the first ever save of the map.
  • Map save image still resembles the latest main save of the map. So theoretically the units are being deleted on Gameload or from a Pre-running script with while-paused enabled.
  • No evidence of a wild do-loop that would delete over 2,000 units in any scripts.
  • Was editing a global script that would run while unpaused but never finished the editing to then save the changes to then recompile. This script also has no evidence of a wild do-loop and has been recompiled and ran more than once while containing DestroyUnit in the past without causing issues. Have also commented latest code that called DestroyUnit in case upon loading, the "latest edit" of the script is loaded/compiled and run. No changes (unless this only happens on save and not load, then the script/CPack will need to be removed via it's file from the map).
  • Too fearful to remove the CPack containing the script behaviors above manually within files in fear of causing unreversable damage.
  • Steam cloud has been experiencing problems but have not been an issue and multiple saves and loads have been successful with this context.
  • I have used multiple factories before with success. Doubt the use of multiple factories has any involvement.
  • Game time seemingly incorrect. I believe it was 20.00.0+, not under 7.00.0
  • I have increased the Rift Lab's ammo capacity early on in the map's creation and have let it run with no issues. Doubt it has involvement.
[close]


I can provide files and images (though I don't know how to do images here) if desired.
Any advice would be heavily appreciated and I apologize if this problem really is one of my scripts going crazy. I did my best to find out myself and it seems heavily unlikely.

Also for anyone who plays my VPAC maps, the next VPAC map has been delayed because that VPAC map is this very save.
Life isn't fair because we say it isn't. Not because it is unfair. In fact, it is so fair we want to say it isn't and do.

Karsten75

#1
Unfortunately, a corrupted save will not divulge much information other than that it is corrupted.

If you still have the log file, that might give us some insight as to whether the game had an issue, If the log file is clean, it most likkly can be attributed to the wide and undefined category of "user error". Unfortunately, every time the game starts, the log file is cycled and overwritten. So the log file will only be relevant for the previous and current invocation of the game.

The log files can be found using the instructions here: https://knucklecracker.com/forums/index.php?topic=34722.0

and are titled, respectively,

player.log and
player-prev.log.


However, it appears on my system that player-prev.log is not current, so it may not hold true that you will have a record of any but the most recent invocation of the game.

Edit:

It is for this reason (the importance and transient nature of the log files) that I have written a batch front-end to start the game. In this batch front-end, I cycle the log file over many more iterations.



@Echo OFF 
pushd %appdata%
CD ..\LocalLow\Knuckle Cracker\Creeper World 4
IF EXIST "Player10.log" ERASE  "Player10.log"
IF EXIST "Player09.log" RENAME "Player09.log" "Player10.log"
IF EXIST "Player08.log" RENAME "Player08.log" "Player09.log"
IF EXIST "Player07.log" RENAME "Player07.log" "Player08.log"
IF EXIST "Player06.log" RENAME "Player06.log" "Player07.log"
IF EXIST "Player05.log" RENAME "Player05.log" "Player06.log"
IF EXIST "Player04.log" RENAME "Player04.log" "Player05.log"
IF EXIST "Player03.log" RENAME "Player03.log" "Player04.log"
IF EXIST "Player02.log" RENAME "Player02.log" "Player03.log"
IF EXIST "Player01.log" RENAME "Player01.log" "Player02.log"
IF EXIST "Player.log"   RENAME "Player.log"   "Player01.log"
popd
start steam://rungameid/848480
EXIT /B





knucracker

Yep, the log file might show an exception.  If it does, that would say what happened.  Other than that, there isn't a whole lot that can be done.  I can say that if the unit ID's 'reset' that would have been a problem really early in the save for some reason.  That value is saved and loaded really early so for the 'current' unit uid to not get saved would require some sort of very fundamental issue during the save.

The best advice I can offer is to save backup copies of any complex map (use the slots, or do an occasion finalize).  I do this before any sort of 'large' map edits.  That way if there is a problem, or I goof something up, or I overwrite a save, etc... I can get back to something earlier.  That said, I've not had or know of any issues in the current version of the game during save.  But... who knows...  especially with complex maps with scripts, etc.

Vertu

I followed the paths provided and copy and pasted the player log and output log. Hope it's what you need.
If an "easy" solution or cause can't be found I will start removing CPacks via-files.
Also fun fact, removed CPacks removed via the CPack manager in-level don't actually remove them from the level's file. They remain in the file of the map. I have a CPack in the files that isn't in the CPack manager of the level and explains why I need to override CPacks even when I removed their outdated version in the CPack manager of the map.

Player log:
Spoiler
Loading player data from C:/Users/justd_000/New folder/Steam/steamapps/common/Creeper World 4/CW4_Data/data.unity3d
Initialize engine version: 2019.4.23f1 (3f4e01f1a5ec)
[Subsystems] Discovering subsystems at path C:/Users/justd_000/New folder/Steam/steamapps/common/Creeper World 4/CW4_Data/UnitySubsystems
GfxDevice: creating device client; threaded=1
Direct3D:
    Version:  Direct3D 11.0 [level 11.1]
    Renderer: Intel(R) HD Graphics 4600 (ID=0x412)
    Vendor:   
    VRAM:     2048 MB
    Driver:   20.19.15.4531
D3D11 device created for Microsoft Media Foundation video decoding.
<RI> Initializing input.

<RI> Input initialized.

<RI> Initialized touch support.

UnloadTime: 0.643000 ms
--InitGame.Init--
Game Version = 2.2.9
Unity Version = 2019.4.23f1
Command Line = ["C:\Users\justd_000\New folder\Steam\steamapps\common\Creeper World 4\CW4.exe"]
Data Loc = [C:\Users\Eryk\Documents/My Games/creeperworld4/]
Time Since Game Start = [0.1210838]
----------------------------------------------------------------------------------------------
OS = Windows 10  (10.0.19043) 64bit
System Memory = 8108
MP4 Supported = true
----------------------------------------------------------------------------------------------
Processor Type = Intel(R) Core(TM) i5-4460 CPU @ 3.20GHz
Processor Count = 4
Processor Frequency = 3193
----------------------------------------------------------------------------------------------
Graphic Device Name = Intel(R) HD Graphics 4600
Graphic Device Version = Direct3D 11.0 [level 11.1]
Graphic Memory Size = 2048
Graphic Shader Level = 50
----------------------------------------------------------------------------------------------
Game Dimensions = 1920 x 1080
Resolution = 1920 x 1080 @ 60Hz
Displays = Display (0) Sys=[1920 x 1080] Rend=[1920 x 1080] ACTIVE 
DPI = 96
UI Scale = 1
Target Frame Rate = 30
----------------------------------------------------------------------------------------------
Settings: AA = 0
Settings: FPS = 0
Settings: SHADOWS = False
Settings: BLOOM = True
Settings: TERRAIN = False
----------------------------------------------------------------------------------------------
Device Type = Desktop
Language = English
Supports Audio = True
----------------------------------------------------------------------------------------------
Max Texture Size = 16384
Max Cubemap Texture Size = 16384
Support Shadow = True
NPOT Support = Full
Support Render TargetCount = 8
Support 3D Texture = True
Support Compute Shader = True
Graphics Multithreaded = False
Supported Render Target Count = 8
Supports 2D Array Textures = True
Supports 32 bit Index Buffer = True
Supports Image effects = True
Supports GPU Draw Call Instancing = True
Uses Reversed Z Buffer = True
Supports Sparse Textures = False
Quality Level = 3
Gen = True [Can Confirm: False]

--GameLoad.Awake--
Checking Steam...
Steam is Running.
Mirror: adding Network[Early/Late]Update to Unity...
***SteamManager Awake***
Setting up callback
Setting up callback complete: Steamworks.Callback`1[Steamworks.GameRichPresenceJoinRequested_t]
GetLaunchCommandLine:
Steam User ID: 76561198292862264
Setting up 2 worker threads for Enlighten.
  Thread -> id: 11a8 -> priority: 1
  Thread -> id: cd4 -> priority: 1
Unloading 6 Unused Serialized files (Serialized files now loaded: 0)
UnloadTime: 0.720800 ms
CMDLINE: [C:\Users\justd_000\New folder\Steam\steamapps\common\Creeper World 4\CW4.exe]
CMDLINE: [C:\Users\justd_000\New folder\Steam\steamapps\common\Creeper World 4\CW4.exe]
--InitGame.Init--
Checking Steam...
Steam is Running.
MVerseManager.Awake
SteamStatsAndAchievements Enabled for AppID: 848480
Steam User ID: 76561198292862264

Unloading 11 unused Assets to reduce memory usage. Loaded Objects now: 29790.
Total: 53.389800 ms (FindLiveObjects: 3.415800 ms CreateObjectMapping: 2.668700 ms MarkObjects: 47.199000 ms  DeleteObjects: 0.105700 ms)

Unloading 0 Unused Serialized files (Serialized files now loaded: 0)
Received stats and achievements from Steam

STEAM STATS
------------------------------------------------------------
SteamStat: STAT_STORYMISSIONSCOMPLETED = 20
------------------------------------------------------------
Storing Steam Stats

Unloading 0 unused Assets to reduce memory usage. Loaded Objects now: 29791.
Total: 49.791100 ms (FindLiveObjects: 2.164200 ms CreateObjectMapping: 2.468500 ms MarkObjects: 45.083000 ms  DeleteObjects: 0.075000 ms)

StoreStats - success

[close]

Output log:
Spoiler
Initialize engine version: 2018.4.28f1 (a2d4f71491a4)
GfxDevice: creating device client; threaded=1
Direct3D:
    Version:  Direct3D 11.0 [level 11.1]
    Renderer: Intel(R) HD Graphics 4600 (ID=0x412)
    Vendor:   
    VRAM:     1136 MB
    Driver:   20.19.15.4531
<RI> Initializing input.

<RI> Input initialized.

<RI> Initialized touch support.

UnloadTime: 0.340900 ms
--InitGame.Init--
Game Version = 1.0.0
Unity Version = 2018.4.28f1
Command Line = ["C:\Users\justd_000\New folder\Steam\steamapps\common\Creeper World 4\CW4.exe"]
Time Since Game Start = [0.181689]
----------------------------------------------------------------------------------------------
OS = Windows 10  (10.0.0) 64bit
System Memory = 8108
MP4 Supported = true
----------------------------------------------------------------------------------------------
Processor Type = Intel(R) Core(TM) i5-4460 CPU @ 3.20GHz
Processor Count = 4
Processor Frequency = 3193
----------------------------------------------------------------------------------------------
Graphic Device Name = Intel(R) HD Graphics 4600
Graphic Device Version = Direct3D 11.0 [level 11.1]
Graphic Memory Size = 1136
Graphic Shader Level = 50
----------------------------------------------------------------------------------------------
Game Dimensions = 1920 x 1080
Resolution = 1920 x 1080 @ 60Hz
Displays = Display (0) Sys=[1920 x 1080] Rend=[1920 x 1080] ACTIVE 
DPI = 96
UI Scale = 1
Target Frame Rate = 30
----------------------------------------------------------------------------------------------
Settings: AA = 0
Settings: FPS = 0
Settings: SHADOWS = False
Settings: BLOOM = False
Settings: TERRAIN = False
----------------------------------------------------------------------------------------------
Device Type = Desktop
Language = English
Supports Audio = True
----------------------------------------------------------------------------------------------
Max Texture Size = 16384
Max Cubemap Texture Size = 16384
Support Shadow = True
NPOT Support = Full
Support Render TargetCount = 8
Support 3D Texture = True
Support Compute Shader = True
Graphics Multithreaded = False
Supported Render Target Count = 8
Supports 2D Array Textures = True
Supports 32 bit Index Buffer = True
Supports Image effects = True
Supports GPU Draw Call Instancing = True
Uses Reversed Z Buffer = True
Supports Sparse Textures = False
Quality Level = 3
Gen = True [Can Confirm: False]

--GameLoad.Awake--
Checking Steam...
Steam is Running.
***SteamManager Awake***
Steam User ID: 76561198292862264
Setting up 2 worker threads for Enlighten.
  Thread -> id: 1034 -> priority: 1
  Thread -> id: 14d0 -> priority: 1
Unloading 6 Unused Serialized files (Serialized files now loaded: 0)
UnloadTime: 1.588300 ms
--InitGame.Init--
Checking Steam...
Steam is Running.
SteamStatsAndAchievements Enabled for AppID: 848480
Steam User ID: 76561198292862264

Unloading 11 unused Assets to reduce memory usage. Loaded Objects now: 26843.
Total: 104.679900 ms (FindLiveObjects: 3.611600 ms CreateObjectMapping: 1.586300 ms MarkObjects: 99.390300 ms  DeleteObjects: 0.091000 ms)

Unloading 0 Unused Serialized files (Serialized files now loaded: 0)
Received stats and achievements from Steam

STEAM STATS
------------------------------------------------------------
SteamStat: STAT_STORYMISSIONSCOMPLETED = 20
------------------------------------------------------------
Storing Steam Stats

Unloading 0 unused Assets to reduce memory usage. Loaded Objects now: 26845.
Total: 79.385000 ms (FindLiveObjects: 2.388300 ms CreateObjectMapping: 1.857700 ms MarkObjects: 75.068900 ms  DeleteObjects: 0.069500 ms)

StoreStats - success
--Launch Mission: [demobonus]--
Unloading 1 Unused Serialized files (Serialized files now loaded: 0)

Unloading 26 unused Assets to reduce memory usage. Loaded Objects now: 27361.
Total: 119.936700 ms (FindLiveObjects: 3.317400 ms CreateObjectMapping: 1.563500 ms MarkObjects: 114.994200 ms  DeleteObjects: 0.061100 ms)

Unloading 4 Unused Serialized files (Serialized files now loaded: 0)
UnloadTime: 20.652900 ms

Unloading 1704 unused Assets to reduce memory usage. Loaded Objects now: 4169.
Total: 4.786100 ms (FindLiveObjects: 0.386800 ms CreateObjectMapping: 0.144300 ms MarkObjects: 2.121200 ms  DeleteObjects: 2.133500 ms)

Unloading 7 Unused Serialized files (Serialized files now loaded: 0)
UnloadTime: 0.483100 ms
--InitGame.Init--
Create World Threads: 4
Unpersist time: 256

Unloading 32 unused Assets to reduce memory usage. Loaded Objects now: 57391.
Total: 135.853900 ms (FindLiveObjects: 3.577900 ms CreateObjectMapping: 3.323300 ms MarkObjects: 128.714900 ms  DeleteObjects: 0.237500 ms)

Persist Time: 162
Zip Compression time: 73
Unloading 5 Unused Serialized files (Serialized files now loaded: 0)
-- GameSpace Destroyed --
UnloadTime: 77.725200 ms
--InitGame.Init--

Unloading 3561 unused Assets to reduce memory usage. Loaded Objects now: 34616.
Total: 116.120500 ms (FindLiveObjects: 2.354100 ms CreateObjectMapping: 1.183000 ms MarkObjects: 79.678700 ms  DeleteObjects: 32.904200 ms)

Unloading 0 Unused Serialized files (Serialized files now loaded: 0)

Unloading 0 unused Assets to reduce memory usage. Loaded Objects now: 34616.
Total: 86.128500 ms (FindLiveObjects: 5.001900 ms CreateObjectMapping: 1.298500 ms MarkObjects: 79.750600 ms  DeleteObjects: 0.077100 ms)

Unloading 0 Unused Serialized files (Serialized files now loaded: 0)

Unloading 0 unused Assets to reduce memory usage. Loaded Objects now: 34616.
Total: 82.833000 ms (FindLiveObjects: 2.392200 ms CreateObjectMapping: 1.208300 ms MarkObjects: 79.161700 ms  DeleteObjects: 0.070300 ms)

Checking Steam...
Steam is Running.
Steam User ID: 76561198292862264
HTTPManager.OnQuit
[close]
Life isn't fair because we say it isn't. Not because it is unfair. In fact, it is so fair we want to say it isn't and do.

knucracker

#4
Do you still have the player-prev.log?  That's the one that is likely to contain the error (if either does, depending on how often you have restarted  the map since the error with the map).  The output.log is just an old file from the original version of the game.  Unity switched from output.log to player.log in an updated version I switched to over the last year.

Vertu

Player-prev.log:
Spoiler
Loading player data from C:/Users/justd_000/New folder/Steam/steamapps/common/Creeper World 4/CW4_Data/data.unity3d
Initialize engine version: 2019.4.23f1 (3f4e01f1a5ec)
[Subsystems] Discovering subsystems at path C:/Users/justd_000/New folder/Steam/steamapps/common/Creeper World 4/CW4_Data/UnitySubsystems
GfxDevice: creating device client; threaded=1
Direct3D:
    Version:  Direct3D 11.0 [level 11.1]
    Renderer: Intel(R) HD Graphics 4600 (ID=0x412)
    Vendor:   
    VRAM:     2048 MB
    Driver:   20.19.15.4531
D3D11 device created for Microsoft Media Foundation video decoding.
<RI> Initializing input.

<RI> Input initialized.

<RI> Initialized touch support.

UnloadTime: 0.643000 ms
--InitGame.Init--
Game Version = 2.2.9
Unity Version = 2019.4.23f1
Command Line = ["C:\Users\justd_000\New folder\Steam\steamapps\common\Creeper World 4\CW4.exe"]
Data Loc = [C:\Users\Eryk\Documents/My Games/creeperworld4/]
Time Since Game Start = [0.1210838]
----------------------------------------------------------------------------------------------
OS = Windows 10  (10.0.19043) 64bit
System Memory = 8108
MP4 Supported = true
----------------------------------------------------------------------------------------------
Processor Type = Intel(R) Core(TM) i5-4460 CPU @ 3.20GHz
Processor Count = 4
Processor Frequency = 3193
----------------------------------------------------------------------------------------------
Graphic Device Name = Intel(R) HD Graphics 4600
Graphic Device Version = Direct3D 11.0 [level 11.1]
Graphic Memory Size = 2048
Graphic Shader Level = 50
----------------------------------------------------------------------------------------------
Game Dimensions = 1920 x 1080
Resolution = 1920 x 1080 @ 60Hz
Displays = Display (0) Sys=[1920 x 1080] Rend=[1920 x 1080] ACTIVE 
DPI = 96
UI Scale = 1
Target Frame Rate = 30
----------------------------------------------------------------------------------------------
Settings: AA = 0
Settings: FPS = 0
Settings: SHADOWS = False
Settings: BLOOM = True
Settings: TERRAIN = False
----------------------------------------------------------------------------------------------
Device Type = Desktop
Language = English
Supports Audio = True
----------------------------------------------------------------------------------------------
Max Texture Size = 16384
Max Cubemap Texture Size = 16384
Support Shadow = True
NPOT Support = Full
Support Render TargetCount = 8
Support 3D Texture = True
Support Compute Shader = True
Graphics Multithreaded = False
Supported Render Target Count = 8
Supports 2D Array Textures = True
Supports 32 bit Index Buffer = True
Supports Image effects = True
Supports GPU Draw Call Instancing = True
Uses Reversed Z Buffer = True
Supports Sparse Textures = False
Quality Level = 3
Gen = True [Can Confirm: False]

--GameLoad.Awake--
Checking Steam...
Steam is Running.
Mirror: adding Network[Early/Late]Update to Unity...
***SteamManager Awake***
Setting up callback
Setting up callback complete: Steamworks.Callback`1[Steamworks.GameRichPresenceJoinRequested_t]
GetLaunchCommandLine:
Steam User ID: 76561198292862264
Setting up 2 worker threads for Enlighten.
  Thread -> id: 11a8 -> priority: 1
  Thread -> id: cd4 -> priority: 1
Unloading 6 Unused Serialized files (Serialized files now loaded: 0)
UnloadTime: 0.720800 ms
CMDLINE: [C:\Users\justd_000\New folder\Steam\steamapps\common\Creeper World 4\CW4.exe]
CMDLINE: [C:\Users\justd_000\New folder\Steam\steamapps\common\Creeper World 4\CW4.exe]
--InitGame.Init--
Checking Steam...
Steam is Running.
MVerseManager.Awake
SteamStatsAndAchievements Enabled for AppID: 848480
Steam User ID: 76561198292862264

Unloading 11 unused Assets to reduce memory usage. Loaded Objects now: 29790.
Total: 53.389800 ms (FindLiveObjects: 3.415800 ms CreateObjectMapping: 2.668700 ms MarkObjects: 47.199000 ms  DeleteObjects: 0.105700 ms)

Unloading 0 Unused Serialized files (Serialized files now loaded: 0)
Received stats and achievements from Steam

STEAM STATS
------------------------------------------------------------
SteamStat: STAT_STORYMISSIONSCOMPLETED = 20
------------------------------------------------------------
Storing Steam Stats

Unloading 0 unused Assets to reduce memory usage. Loaded Objects now: 29791.
Total: 49.791100 ms (FindLiveObjects: 2.164200 ms CreateObjectMapping: 2.468500 ms MarkObjects: 45.083000 ms  DeleteObjects: 0.075000 ms)

StoreStats - success
[close]
Life isn't fair because we say it isn't. Not because it is unfair. In fact, it is so fair we want to say it isn't and do.

knucracker

That's what I was afraid of.  It's basically empty too.  You've probably restarted more than once since the problem, so the exceptions (if any) are lost to the great bit bucket in the sky.
The only thing left to try is to try loading the problematic save, then take a look at the player.log to see if it has a problem on load.  It's possible the error is during the load, not the save.  If so, there would be an exception in the log right after you try to load the saved game

Karsten75

Quote from: Vertu on February 04, 2022, 10:06:22 AM

Also fun fact, removed CPacks removed via the CPack manager in-level don't actually remove them from the level's file. They remain in the file of the map. I have a CPack in the files that isn't in the CPack manager of the level and explains why I need to override CPacks even when I removed their outdated version in the CPack manager of the map.

Please, next time you attach a log file, use the "Attachments and other options" drop-down below the text input window.

And this may serve to clear some of your confusion around where a CPACK and the associated scripts reside on disk during various phases of map development: https://knucklecracker.com/wiki/doku.php?id=4rpl:overview#working_with_cpacks

Vertu

Here you go, I noticed how now it has "unloaded unused assets" at the end compared to 0 unused assets.
Life isn't fair because we say it isn't. Not because it is unfair. In fact, it is so fair we want to say it isn't and do.

Karsten75

Quote from: Vertu on February 04, 2022, 01:45:23 PM
Here you go, I noticed how now it has "unloaded unused assets" at the end compared to 0 unused assets.

Now upload the save file for the game you were playing as well.

Vertu

This should be the main save. I do make backups but since nothing went wrong at the end of the editing session I updated the backups.
Life isn't fair because we say it isn't. Not because it is unfair. In fact, it is so fair we want to say it isn't and do.

knucracker

Ok, there is an exception during load.  When I take a look, the exception is coming when trying to load units that have been saved with one set of children than differs from the 'definition' of the unit.  Something like this could maybe happen when there are instances of a cmod unit on the map, then the unit definition is changed, or a different cpack is loaded, then the game is saved before any of the existing units on the map are 'updated' to match the new cmod definition.

I've added some code into the game to protect against throwing the exception (for a future beta build).  I've then taken your save and re-saved it so the units match their definitions.  That save is attached and should load for you.  That may get some of your work back. 

Now, there were several problematic units in the save and I don't know if they are loaded totally correctly or not.  It looks like the definition of the units were changed to have extra children components, but the saved versions didn't have those extra (1 or more) children.

Vertu

#12
Quote from: knucracker on February 04, 2022, 03:40:17 PM
Ok, there is an exception during load.  When I take a look, the exception is coming when trying to load units that have been saved with one set of children than differs from the 'definition' of the unit.  Something like this could maybe happen when there are instances of a cmod unit on the map, then the unit definition is changed, or a different cpack is loaded, then the game is saved before any of the existing units on the map are 'updated' to match the new cmod definition.

I've added some code into the game to protect against throwing the exception (for a future beta build).  I've then taken your save and re-saved it so the units match their definitions.  That save is attached and should load for you.  That may get some of your work back. 

Now, there were several problematic units in the save and I don't know if they are loaded totally correctly or not.  It looks like the definition of the units were changed to have extra children components, but the saved versions didn't have those extra (1 or more) children.
Then I believe what caused this was, I found a trash object for my V-Shields that was doing nothing but increasing the amount of objects needing to be loaded. I changed this before saving by mistake and then save to then update unit instances because that button can cause some disruption.. Which it did.
Thank you very much I will be sure to be more careful when editing objects in units and be sure to save BEFORE doing such edits. Never knew this could happen to such a degree.
Thank you for your time.

-Edit-
I was perfectly able to load the save after updating to the file provided.
Also after taking a very close look at the V-Shield units, they all no longer have that object.
Life isn't fair because we say it isn't. Not because it is unfair. In fact, it is so fair we want to say it isn't and do.