1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Question about the character saving function

Discussion in 'Help' started by OmenNemo, Dec 7, 2013.

  1. OmenNemo

    OmenNemo Potential Patron

    Joined:
    Dec 7, 2013
    Messages:
    8
    Likes Received:
    0
    Hello,​

    I just discovered SDT (which is awesome by the way), so for the moment, I am not using any mod.
    My question is: how does the integrated character saving function work ? From what I saw, it seems like it works by path, and if you change the game's location, the character won't appear anymore.
    Anybody can confirm me this please ? The researches I did in the forum weren't very conclusive.

    Thanks.​
     
  2. AaRL

    AaRL Swell Supporter

    Joined:
    Feb 17, 2011
    Messages:
    824
    Likes Received:
    0
    Try keeping your SDT files in one folder along with the game. When you save a character, whatever mod is loaded, I think it saves the file path from which it loaded... meaning if you were to move that file or rename its parent folder, SDT wont load it properly.

    Basically what Im trying to say is this:

    C:\SDT Keep every thing you load in this folder along with the game
    C:\SDT\Hair Keep hairs here
    C:\SDT\BGs Keep BGs here
    C:\SDT\Other Keep what ever other goodies you have here

    and so on... Those file paths are just examples. Just make sure you load every thing in your character from ONE folder. (Remember, you cant rename or move this folder once a character is saved) Yes, it creates duplicates of most of your files, but it keeps it nice and organized.
     
  3. OmenNemo

    OmenNemo Potential Patron

    Joined:
    Dec 7, 2013
    Messages:
    8
    Likes Received:
    0
    Thanks for the answer. It makes things clearer regarding mods.

    But my question was regarding the function in the basic game (without loader or mods). I apparently won't need it when I will use mods, but I would like to understand how the game stores the characters.
     
  4. ModGuy

    ModGuy Club Regular Content Creator

    Joined:
    Feb 17, 2011
    Messages:
    1,754
    Likes Received:
    22
    It stores data as serialised objects, not something you should attempt to read outside of Flash. You could probably write a reader for the format.
    The object in question stores the character name, code, dialogue and thumbnail.
    The code contains paths which refer to external components such as backgrounds or SWF files, as such SDT implements a path resolution system to find them.
    It does this by adding folders to the search path and then using them with the path provided in code when loading it.
    If the file cannot be found, you end up with an error and cannot save.

    Now something you might actually want to know:

    Because Flash uses a all encompassing save format called SharedObject, all requests to save/load data normally boil down to this.
    SharedObject is very sensitive to changes, renaming the SWF or moving it to another folder will cause it to stop working. (I might actually look in to fixing that.)
     
  5. OmenNemo

    OmenNemo Potential Patron

    Joined:
    Dec 7, 2013
    Messages:
    8
    Likes Received:
    0
    Thanks a lot for the answer. It made things clearer.

    But then, these serialised objects, are they files stored in a folder of the computer ? If it is the case, in which folder are they stored ?
     
  6. ModGuy

    ModGuy Club Regular Content Creator

    Joined:
    Feb 17, 2011
    Messages:
    1,754
    Likes Received:
    22
    http://help.adobe.com/en_US/as3/dev/WS5b3ccc516d4fbf351e63e3d118a9b90204-7d80.html

    [table]

    [tr][td]Windows 95/98/ME/2000/XP* [/td]
    [td]C:/Documents and Settings/username/Application Data/Macromedia/Flash Player/#SharedObjects[/td][/tr]

    [tr][td]Windows Vista/Windows 7*[/td]
    [td]C:/Users/username/AppData/Roaming/Macromedia/Flash Player/#SharedObjects[/td][/tr]

    [tr][td]Macintosh OS X[/td]
    [td]/Users/username/Library/Preferences/Macromedia/Flash Player/#SharedObjects[/td][/tr]

    [tr][td]Linux/Unix[/td]
    [td]/home/username/.macromedia/Flash_Player/#SharedObjects[/td][/tr]

    [/table]

    *Where C: is the system drive.
     
  7. Crusader41821

    Crusader41821 Potential Patron

    Joined:
    Aug 21, 2013
    Messages:
    5
    Likes Received:
    0
    ah ha! No wonder all my characters went away when i moved the folder. granted it only happened once, and i was only moving it because i was planning a system format.....
     
  8. OmenNemo

    OmenNemo Potential Patron

    Joined:
    Dec 7, 2013
    Messages:
    8
    Likes Received:
    0
    Thanks for the link; I found what I was looking for :).

    Now, I installed the loader, and I have to change the saving method. So, if I understood correctly, all custom characters are saved within the mods folder. But, after reading the saving guide included with the loader, I didn't understand how to concretely save a custom character. Let's say I made a custom character within the game; how do I save her in the mods folder ?

    Thanks for answering my question, which is probably very silly.
     
  9. ModGuy

    ModGuy Club Regular Content Creator

    Joined:
    Feb 17, 2011
    Messages:
    1,754
    Likes Received:
    22
    If you're changing settings within the game, you can generate a code from that. Take that code and save it in Code.txt within a character folder.
    All other elements like hair, dialogue, mods, etc. have names associated with them in the provided saving guide.
    Example characters have been provided to demonstrate numerous elements loading, have a look at them.
     
  10. OmenNemo

    OmenNemo Potential Patron

    Joined:
    Dec 7, 2013
    Messages:
    8
    Likes Received:
    0
    Thanks a lot. I think I did find it; in the modding panel, it is the function "Custom save data," right ?