Save system is not saving certain things

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Azola21
Posts: 14
Joined: Fri Nov 06, 2015 5:48 am

Save system is not saving certain things

Post by Azola21 »

The save system at the moment only save the guns I have and the position my character is currently in. I need it to save the ammo i have in my weapons and the quest progress. It is showing my quest in the save game data down the bottom but it is not actually saving the quest progress in game. Also the main menu you provided does not load my save game.


Also not as important but I would like help making the save system save the time of day. I am using Instant Good Day which functions perfectly well but I am sure that anyone who plays survival games wants the game to save the time of day rather than it restarting every time they load their save. However none of this matters if I cant get the quests and ammunition to save.



Load Game Data: Variable["Alert"]=""; Variable["Zombies_Killed"]=0; Variable["Actor"]="FPS Main 2 Cameras"; Variable["Conversant"]="Sad Robot Meme"; Variable["!Unarmed"]=false; Variable["!Unarmed_Ammo"]=0; Variable["Template_Knife"]=false; Variable["Template_Knife_Ammo"]=0; Variable["Template_1911"]=false; Variable["Template_1911_Ammo"]=111; Variable["Template_Shotgun"]=false; Variable["Template_Shotgun_Ammo"]=0; Variable["Template_MP5"]=false; Variable["Template_MP5_Ammo"]=0; Variable["Template_Ak47"]=false; Variable["Template_Ak47_Ammo"]=0; Variable["Template_M4"]=false; Variable["Template_M4_Ammo"]=0; Variable["Template_Sniper"]=false; Variable["Template_Sniper_Ammo"]=0; Variable["Template_Katana"]=false; Variable["Template_Katana_Ammo"]=0; Variable["M4A1"]=true; Variable["M4A1_Ammo"]=0; Variable["Desert_Eagle"]=false; Variable["Desert_Eagle_Ammo"]=0; Variable["G36K"]=false; Variable["G36K_Ammo"]=0; Variable["Beretta_87"]=true; Variable["Beretta_87_Ammo"]=999; Variable["M9"]=true; Variable["M9_Ammo"]=999; Item["Shotgun_for_Sad_Robot"]={Status="", Name="Shotgun for Sad Robot", Description="You've agreed to get the sad robot a shotgun.", Success_Description="You gave the sad robot a shotgun.", Failure_Description="", State="unassigned", }; Item["Kill_4_Zombies"]={Status="", Name="Kill 4 Zombies", Description="This is a test kill quest. Only the zombies in the house will count.", Success_Description="You killed 4 zombies around the house.", Failure_Description="", State="unassigned", }; Item["Welcome_to_the_Nymihl_Archipelago!"]={Status="", Name="Welcome to the Nymihl Archipelago!", Pictures="[]", Description="Welcome to the Nymihl Archipelago!", Success_Description="Quest Complete.", Failure_Description="Quest Failed.", State="active", Is_Item=false, Abandonable=true, Trackable=true, Track=true, Entry_Count=5, Entry_1_State="active", Entry_1="I have to search the area for clues as to how I got here.", Entry_2_State="active", Entry_2="There could be something useful in this house.", Entry_3_State="unassigned", Entry_3="I have to find a way out of here.", Entry_4_State="unassigned", Entry_4="I have to find a way out of here.", Entry_5_State="unassigned", Entry_5="I have to find a way out of here.", }; Actor["FPS_Main_2_Cameras"]={Status="", Name="FPS Main 2 Cameras", Pictures="[]", Description="", IsPlayer=true, }; Actor["Sad_Robot_Meme"]={Status="", Name="Sad Robot Meme", Pictures="[]", Description="", IsPlayer=false, }; Actor["Sad_Robot"]={Status="", Name="Sad Robot", Pictures="[]", Description="This robot gives the player a quest to get him a shotgun.", IsPlayer=false, }; Actor["Happy_Robot"]={Status="", Name="Happy Robot", Pictures="[]", Description="This robot tests the Lua bridge.", IsPlayer=false, }; Actor["FPS_Player"]={hitPoints=100, maximumHitPoints=200, hungerPoints=0, thirstPoints=0, currentWeaponIndex=9, Position_terrain="-90.74662,61.10732,-380.615,0,0.1208679,0,0.9926686,terrain", }; Actor["Player"]={SmoothMouseRotationX=12.615, SmoothMouseRotationY=-7.004998, }; StatusTable = ""; RelationshipTable = "";
UnityEngine.Debug:Log(Object)
PixelCrushers.DialogueSystem.RealisticFPSPrefab.ExampleGameplayMenu:LoadGame() (at Assets/Dialogue System/Third Party Support/Realistic FPS Prefab/Example/Multiple Scene Example/ExampleGameplayMenu.cs:98)
PixelCrushers.DialogueSystem.RealisticFPSPrefab.ExampleGameplayMenu:WindowFunction(Int32) (at Assets/Dialogue System/Third Party Support/Realistic FPS Prefab/Example/Multiple Scene Example/ExampleGameplayMenu.cs:57)
UnityEngine.GUI:CallWindowDelegate(WindowFunction, Int32, GUISkin, Int32, Single, Single, GUIStyle)
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: Save system is not saving certain things

Post by Tony Li »

Hi,

I'll check the integration package regarding the ammo count.

If you play the RFPS Support folder's example scene, does it correctly save and load quests?

When happens when you use the example menu script to load your saved game? Does it report anything in the Console view?

You may want to use the Dialogue System Menu Template on the Dialogue System Extras page. The example menu script is really just meant to drive the example scene. The Dialogue System Menu Template is designed for real projects.

I believe I removed the Multiple Scene Example from the RFPS Support package when Azuline released RFPS 1.23. Have you imported the latest version of the RFPS Support package?

Please also feel free to send a reproduction project to tony (at) pixelcrushers. I'll be happy to take a look.

Once we get these issues ironed out, I'll post a persistent data script for Instant Good Day.
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: Save system is not saving certain things

Post by Tony Li »

The Dialogue System Extras page has an updated RFPS Support package that now also saves the bullets left in each weapon's clip.

I double-checked saving and loading quest states in the example scene, and it seems to work fine. When you get a chance, please let me know any details you can provide on your quest setup and/or any Console messages you see.
Azola21
Posts: 14
Joined: Fri Nov 06, 2015 5:48 am

Re: Save system is not saving certain things

Post by Azola21 »

Alright so the ammunition is now saving thanks to the updated support thingo. I have sort of been rather skeptical about updating assets because last time I did that on one of my projects it completely corrupted it so it sort of puts me off a bit. But anyway thanks for that.'

I have tested the example scene and that does in fact save my quest progress. I think I might have set something up incorrectly on my modified RFPS character.

Here is the save data:

Load Game Data: Variable["Alert"]=""; Variable["Zombies_Killed"]=0; Variable["Actor"]="FPS Player"; Variable["Conversant"]="Sad Robot"; Variable["!Unarmed"]=false; Variable["!Unarmed_Ammo"]=1; Variable["Knife"]=false; Variable["Knife_Ammo"]=0; Variable["M1911"]=false; Variable["M1911_Ammo"]=0; Variable["Shotgun"]=false; Variable["Shotgun_Ammo"]=0; Variable["MP5"]=false; Variable["MP5_Ammo"]=0; Variable["AK47"]=false; Variable["AK47_Ammo"]=0; Variable["M4"]=false; Variable["M4_Ammo"]=0; Variable["Sniper"]=false; Variable["Sniper_Ammo"]=0; Variable["Katana"]=false; Variable["Katana_Ammo"]=0; Item["Shotgun_for_Sad_Robot"].State="success"; Item["Kill_4_Zombies"].State="unassigned"; Actor["Player"]={Status="", Name="Player", Pictures="[]", Description="The player character.", IsPlayer=true, hitPoints=100, maximumHitPoints=200, hungerPoints=4, thirstPoints=5, currentWeaponIndex=0, SmoothMouseRotationX=-321.1497, SmoothMouseRotationY=-29.29999, }; Actor["Sad_Robot"]={Status="", Name="Sad Robot", Pictures="[]", Description="This robot gives the player a quest to get him a shotgun.", IsPlayer=false, }; Actor["Happy_Robot"]={Status="", Name="Happy Robot", Pictures="[]", Description="This robot tests the Lua bridge.", IsPlayer=false, }; Actor["FPS_Player"]={Position_Realistic_FPS_Prefab_Example="10.03021,16.10183,-34.38842,0,0.9931046,0,-0.1172317,Realistic FPS Prefab Example", }; StatusTable = ""; RelationshipTable = "";
UnityEngine.Debug:Log(Object)
PixelCrushers.DialogueSystem.Examples.FeatureDemo:LoadGame() (at Assets/Dialogue System/Examples/Feature Demo/FeatureDemo.cs:95)
PixelCrushers.DialogueSystem.Examples.FeatureDemo:WindowFunction(Int32) (at Assets/Dialogue System/Examples/Feature Demo/FeatureDemo.cs:58)
UnityEngine.GUI:CallWindowDelegate(WindowFunction, Int32, GUISkin, Int32, Single, Single, GUIStyle)


As for how my quests are setup. I have pretty much copied and pasted the example quests and just changed the text. I did that to ensure I did not screw anything up but apparently I still managed to.

On my RFPS character I have a selector on my main camera, which works fine.
I have show cursor on conversation on my main camera.
On my FPS camera I have persistent smooth mouse look which also works fine and saves.
On my FPS Player I have, Persistent Position data which saves, set active on dialogue event that disables weapons (works), I have Set Enabled On Dialogue Event that turns on and off my characters components as expected, I have stop conversation if too far and I also have FPS LUA Bridge.

In my world I have dialogue system manager that is linked to my database. It has include sim status un ticked, it has preload resources ticked, it has dont destroy on load ticked and allow only one instance ticked with debug warning set as "warning".

I then have gameplay menu. It has the game saver on that. It is set to save to player prefs key SavedGame0 and in save slot 1. It has apply game state when loading ticked, include all item data ticked and include sim status ticked as well as dont destroy on load ticked. With the starting level as "terrain" because that is what I have called my scene.

If you need anything else just notify me and I will happily provide it. I still stand strong that this was my greatest purchase and this probably has the best customer support I have ever experienced in both commercial businesses and indie company's.
Azola21
Posts: 14
Joined: Fri Nov 06, 2015 5:48 am

Re: Save system is not saving certain things

Post by Azola21 »

I have been going through the example scene and there doesn't seem to be a gameplay menu. Where about's is the game saver located in the example scene. I cant seem to locate it so that I can see its settings.
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: Save system is not saving certain things

Post by Tony Li »

Hi,

It sounds like your player is set up just fine.

Do you have an updated capture of your save data? It should now also contain variables for bulletsLeft, for example Variable["Shotgun_BulletsLeft"]=3.

I don't see any new quests in there either. Is the right dialogue database assigned to your Dialogue Manager? If you temporarily set the Dialogue Manager's Debug Level to Info, then when you play it will log everything that it's loading from the dialogue database into the runtime environment. You might find this helpful to get some insight of what's going on under the hood.

I see you saved using FeatureDemo, whereas before you used ExampleMainMenu. Either is fine. FeatureDemo doesn't use a GameSaver. Instead, it saves the games directly to PlayerPrefs with a line of code.

Would it be possible for you to either send me a copy of the project (all customer files are treated confidentially) or set Debug Level to Info, play the game, save and then load, and finally email me the Editor.log file (http://docs.unity3d.com/Manual/LogFiles.html) ?
Azola21
Posts: 14
Joined: Fri Nov 06, 2015 5:48 am

Re: Save system is not saving certain things

Post by Azola21 »

Due to the speeds of my internet I am not able to upload anything, i struggle to load this page. I will attempt to upload log file. I also thing I posted the example scene save data rather than my save data.
Azola21
Posts: 14
Joined: Fri Nov 06, 2015 5:48 am

Re: Save system is not saving certain things

Post by Azola21 »

I have emailed you the log files using my email aaronjansenau@gmail.com
Azola21
Posts: 14
Joined: Fri Nov 06, 2015 5:48 am

Re: Save system is not saving certain things

Post by Azola21 »

Thankyou so much for your help. While I was waiting for your response I kept looking over everything, then I decided to make a new database. On creation of a new database I thought nothing happend as the quest tracker at the top right did not update but then I checked the quest log and it was in fact saving quest progress. I think I should have tried making a completely new database before wasting your precious time.

Thank you so much for a great product!
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: Save system is not saving certain things

Post by Tony Li »

Hi,

Thanks! I'm glad you got it working. If any other issues come up, please feel free to post or email me any time. I'm always happy to help.

BTW, if you want the quest tracker HUD to show a quest as soon as it becomes active, inspect the quest in the Dialogue Editor and tick Trackable and Track On Start.
Post Reply