Save/Load Code

Discussion in 'Tutorial Repository' started by Effane, Aug 4, 2006.

  1. Jonhpath

    Jonhpath New Member

    +2 / 0 / -0
    Effane, can you add a function to your save/load please, i need it realy... and i bet lot of people do also. The function you need to add have to save ability (spell or skill, call it what you wan) that you buy during game. i explain:

    When you play, there's a shop with tomes. Tomes give you a spell like blizzard or something but when you use the book, it destroy it (the item) and add the spell to your comand box (where attack, defence, patrol and all theyse things are).

    it would by verry nice if you can add it because its now like 3 day am looking for one but... you, aceharth, neostorm, mr.maestro and all other that i tryed, dont work or dont have it.

    P.S. Sry for my english...
  2. DaChOseNone1

    DaChOseNone1 New Member

    +0 / 0 / -0
    One question

    Thanks so much Effane your name is on the credits with huge thanks :D , but one question. How do I configure the save/load trigger to make it save abilities?
  3. Chocobo

    Chocobo White-Flower

    +410 / 0 / -0
    It isn't made for.
  4. icearrow

    icearrow Guest

    +0 / 0 / -0
    Ya Effane's trigger isn't meant for advanced save/load codes, it is for teaching you how they work and to successfully create them (which is awesome since no other comprehensive save/load tutorials exist). I think Effane's does an excellent job in showing how save/load works the way it does AND demonstrating it. Once you know how it works, all you have to do is encrypt anything else you want into the data.

    For me, I simply added something that saves to the users player name in my RPG to prevent code stealing. While I could have never done this before, Effane's tutorial teaches how to encrypt data and then unencrypt it. Once you learn this you can encrypt anything you want.

    So my short answer to that question is, you simply have to encrypt the abilities learned (if you dont know how to encrypt look over effane's tutorial again or another one on data encryption). Then that way you can make a trigger as part of your load code that adds abilities.
  5. DaChOseNone1

    DaChOseNone1 New Member

    +0 / 0 / -0
    Well yea i know how to put it into the initialization database, but how do I save it? I know that you have to make it search through the abilities with Integer A, but all that other math stuff seems complicated. Do I basically have to do the same thing except make it save the ability? Meaning make a slot variable for abilities (SaveLoadAbilitySlots), and then save it through all that stuff?
  6. goon94

    goon94 Guest

    +0 / 0 / -0
    More Varriables

    Ive been trying to add more integer varriables to your save/load and ive been trying to change everything to fit in. insted of saving 151 strength it saved 10368 and i dont get it! please help me or show me what all i need to do to add more varriables. heres what the outcome looks like:


    Removed: some insanely long trigger mess.
    Nothing can be expected from there.

    Fortunately, the problem seems to be solved.
  7. goon94

    goon94 Guest

    +0 / 0 / -0
    I went wrong!!

    i had all the numbers and functions right... but!!! their allignment in the trigger was screwed up!!! thats why i was getting some obseen agi/str/int levels. thank you effane for your code... it tought me alot!
  8. The Helper

    The Helper Administrator Staff Member

    +1,213 / 2 / -1
    5 Star Bump
  9. PeppeJ

    PeppeJ Guest

    +0 / 0 / -0
    World Editor Disabling your triggers

    Hi i did copy your triggers and i checked them they all ware correct it said no errors or anything. But when i want to test them my World Editor Say Error !!
    And disable them.....:nuts: WHY ?!?!? I cheked all Variables and even read trough your notes but still it disable them:banghead:
  10. Effane

    Effane Save/Load Code Tutorial

    +51 / 0 / -0
    Did you use the automatic variable creation?

    Somethings were disabled in the code from the beginning though, like the in game messages that were used for debugging. If the entire code is disabled then I suspect you have some other issue. Try bringing it over again into your map.
  11. Flame_Emblem

    Flame_Emblem Guest

    +0 / 0 / -0
    So Im Guessing Theres No Way That Can Simply Be Put In a Map For Most Anyone To Understand With Directions On How To Modify It For Rpg Maps Purposes On Saving-Loading Characters Items And Money :banghead:
    Why Cant I Find Something Similiar To MasterCrafters Save-Load But with Gold and Lumber!I know why Because I Cant Understand This!I found a Tutorial which i understand but it is for saving and loading while in game and not to start wherer you left off on a rpg :(
  12. Ghan

    Ghan Administrator - Servers are fun Staff Member

    +773 / 0 / -0
  13. muddy19

    muddy19 New Member

    +1 / 0 / -0

    Can someone help me. When i try to save in my map it sais (null). It hates me. Can someone help?:banghead:
  14. Zaifix

    Zaifix Guest

    +0 / 0 / -0
    Wow?! :s

    i cant understand all that text..:eek: do you got a Tuturial game you could send me?:confused: cause im making an RPG... and i really need a save/load code..:D plzz write back. if you want you can email me at
    15 hours! long time!! still dont get how peaple can get the idea of creating things like that :banghead:
  15. MicroXen

    MicroXen Guest

    +0 / 0 / -0
    When i save a hero i get a bunch of 00's on the side and 3 36 long codes for my hero. And the load code wont work.
  16. Tiber

    Tiber Member

    +4 / 0 / -0
    I'm trying to learn this system for an upcoming ORPG. While reading I noticed an error.

    During the second part, at "4. Setting up a Save Code Trigger", you mentioned a variable, "SaveLoadPlayerHeroSingle", which is a Unit-Type variable I'm guessing. You didn't mention it in the first part and it needs to be declared, and I don't know where.

    Also, you should have declared all variables before starting the trigger, a list of all the variables we are using. An explanation of every variable would be great too. I'm having a slightly hard time figuring out what type of variable is each.

    Needs a wee bit polishing, but otherwise your guide has been very helpful.
  17. 1337moo

    1337moo New Member

    +0 / 0 / -0

    Yo, for the list of variables, you should point out that the variable array called "SaveLoadHeroesStored" is a Unit-Type array and not a Unit array. :p The way the list sets it up is confusing. NOW TIME TO ACTUALLY LOOK INTO THE TUTORIAL IN-DEPTH! :V

    EDIT: The variable for SaveLoadItemsStored is also missing.

    EDIT 2: If you were to make a game that has more than four people, I would think variables that are arrays are the only ones you would change, correct? That would be these:

    -String types: SaveLoadCharacterNumbers[100], SaveLoadEncryptionNumbers[100], SaveLoadEncryptionSet[10], SaveLoadTempStrings[100]
    -Integer Type: SaveLoadVariablesStored[24]
    -Unit Types: SaveLoadHeroesStored[100], SaveLoadHeroSingle[4]
    -Region Type: Regions[9]
    -Boolean Type: SaveLoadHasLoaded[4]

    Of them, you would only need to change SaveLoadHeroSingle and SaveLoadHasLoaded to the number of players, right? Just a check.

    EDIT 3: Wow, so many edits. Anyways, I was wondering that if you simply changed the placement of the variables in SaveLoadVariablesStored, would it be enough to re-arrange the code?

    Also, what's the purpose of the Regions variable?

    EDIT 4: Okay, everytime I load, nothing happens. >_>
  18. 1337moo

    1337moo New Member

    +0 / 0 / -0
    Bump :(
  19. Helium6234

    Helium6234 Guest

    +0 / 0 / -0
    Im using this trigger in my map, and its working great, thanks alot Effane. Im wondering about something tho. Im not really that good at this save/load triggers yet and i want to add to my map that it saves the hero's abilities aswell. Each ability has 3 levels and i would like to it save it so, that when u load u, for an example have (x) in lvl 3 and (y) in lvl 2. Can anyone experienced help me on how to get it in with the triggers Effane made? I appreciate any help.
  20. Googlieeyes

    Googlieeyes Guest

    +0 / 0 / -0
    i've tired this and i don't understand where i need to add
    Set SaveLoadHasLoaded[(Player number of (Triggering player))] = True
            Unit - Create 1 SaveLoadHeroesStored[(Random integer number between 1 and SaveLoadMaxHeroesStored)] for (Triggering player) at (Center of Regions[(Random integer number between 1 and 9)]) facing Default building facing degrees
            Set SaveLoadPlayerHeroSingle[(Player number of (Triggering player))] = (Last created unit)
    into or which trigger to make it with and besides that i love this save/load it's really nice and my heros are from a tavern with a trigger making them go to th center of region (1) yeah could use som help

Share This Page