Save/Load Code

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...
 
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?
 
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.
 
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?
 
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:

---


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

Fortunately, the problem seems to be solved.
 
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!
 
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:
 
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.
 
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 :(
 
(null)

Can someone help me. When i try to save in my map it sais (null). It hates me. Can someone help?:banghead:
 
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 [email protected]
15 hours! long time!! still dont get how peaple can get the idea of creating things like that :banghead:
 
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.
 
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.
 
Variables

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. >_>
 
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.
 
Sorry for the few day responce. I dont work in the same town as my wife and son live in, I take off weekends for time with them and I dont touch the computer during that.

-------------------------------------------------------------

Okay, going to add this to the FAQs, but I will explain it here. Alot of people are stuck on this one thing, and I assumed it was obvious. When you get that many PMs, its definetly not obvious. :p

Code:
CreateSingleStuff
    Events
        Player - Player 1 (Red) types a chat message containing -Random as An exact match
        Player - Player 2 (Blue) types a chat message containing -Random as An exact match
        Player - Player 3 (Teal) types a chat message containing -Random as An exact match
        Player - Player 4 (Purple) types a chat message containing -Random as An exact match
    Conditions
    Actions
        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)
        Hero - Set SaveLoadPlayerHeroSingle[(Player number of (Triggering player))] Hero-level to (Random integer number between 1 and 10), Hide level-up graphics
        Set IntegerC = (Random integer number between 2 and 6)
        For each (Integer A) from 1 to IntegerC, do (Actions)
            Loop - Actions
                Hero - Create SaveLoadItemsStored[(Random integer number between 1 and SaveLoadMaxItemsStored)] and give it to SaveLoadPlayerHeroSingle[(Player number of (Triggering player))]
        Player - Set (Triggering player) Current gold to (Random integer number between 100000 and 1000000)
        Player - Set (Triggering player) Current lumber to (Random integer number between 100000 and 1000000)

This is a code example from the Demo Map. Now, here is how the map "Remembers" which player has which hero. Tracking variables are very powerful and I recommend everyone use them. They also kill leaks. This following section is the heart of this problem.

Code:
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)

Whats happening here is first it sets the SaveLoadHasLoaded, this is to stop people from loading over and over, that would be bad. Then you are creating a hero. That we all should have mastered by now, if your map starts with a hero on it, then instead assign all player heroes to a tempUnitGroup and then use pick all in group and perform multiple actions.

Now, each hero needs to be put into another variable to track them. This is a powerful and fast way to get them without any craziness later.

Notice the following.
Code:
        Set SaveLoadPlayerHeroSingle[(Player number of (Triggering player))] = (Last created unit)

This basically grabs the last created unit, the hero. And then finds out what hero it is and assigns that hero to a unit array with the index (spot its stored in) as the player number.

Then to retrieve that hero all you do is access the Array with the player number and viola, you got your hero without using pick/unitgroups and all the leaks/processor cycles.


So to wrap this up, make sure you assign any heroes created to the correct array slot, that shoudl fix most of your issues with the 3-AAAA... ... ...

-------------------------------------------------------------------

Now the issue with getting 3-AAAA-AAAA-AAAA-AAAA-AAAJ-AAAH-T or something like that. Its an easy answer and its not a terribly unsecure result.
The first set of 4 chars is the hero level and hero type. You will need to refer to above answer for that fix.


The 3 middle sets of 4 chars are the items slots. The above issue will cause this, or you probly dont have anything in them at the time of saving. Looking at your result I suspect its the first problem.

Now if its the empty item slot issue, then thats normal results. They are just encrypted versions of the number 0. Now this isnt a encryption security issue for the most part. Why? Because we dont really care if they can make 0s, they still will not know how to create items, and also they still have to get around the checksum. Both will be a total nightmare for the novice to crack from the outside.

i've tired this and i don't understand where i need to add
Code:
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
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Varine Varine:
    We have some elderly guests that regularly come hang out at the bar at the end of the night, and every once in a while we don't see someone for a few weeks and then someone shows up with their obituary.
  • Varine Varine:
    We usually let them do their memorials there in the morning if they want to and I'll make them some snacks and drinks. There was one guy named Tom that came in like every night and would sit by himself and get a bunch of soup and a glass of wine. idk why but he LOVED our fucking soup, like he would order a fucking quart of it at a time and would always get so sad when we stop doing it for the summer.
    +1
  • Varine Varine:
    But he also loved our calamari, which is another thing I hate but it sells super well so I can't change it. There was one day he came in and was asking me how to make it, because he tried to at home once in the off season when we stop running it and he really wanted it lol
  • Varine Varine:
    I think he's one of the only people I've made recipes for for free because he really wanted a broccoli cheddar, and it was like dude I don't have a recipe, it's just whatever I have, but here, this is how you do it
  • Varine Varine:
    I don't think he ever figured out how to do the calamari in a pan though, like idk how to do that either. He was afraid of the at home deep fryers though and it's like yeah, that's fair, I am too
  • Varine Varine:
    He was just such a sweet old man, we had two servers pregnant and they held a baby shower together, he was soooooo fucking excited to get to see a baby. Unfortunately he died a month or so before they were born
  • The Helper The Helper:
    So I decided to Google some people that I had not seen or heard from in a while and sure enough one of my old best friends, we had a falling out years ago but whatever, find out he died of Pancreatic Cancer in January. I have also lost a few of my closer acquaintances from growing up the last year. Getting old - people die - I kinda thought it was going to be this way a few years ago....
    +2
  • The Helper The Helper:
    Forum running super slow again
  • Ghan Ghan:
    Not really clear from the stats as to what is causing the slowness.
  • Ghan Ghan:
    We get a lot of guest traffic so it may just be the load is getting too high and not from any particular source.
  • Ghan Ghan:
    Looks like the server is maxed out on CPU.
  • Ghan Ghan:
    Oh it looks like a lot of the traffic is Silkroad Forums. That domain isn't protected by Cloudflare.
  • Ghan Ghan:
    But the old Silkroad site is still on its own server. I just had a test site set up on this server for it.
  • Ghan Ghan:
    I just disabled that test site. Let's see if that helps the load.
  • Ghan Ghan:
    Looks much better already.
  • The Helper The Helper:
    I had actually forgot about the Silkroad site. I had asked
  • The Helper The Helper:
    SD Ryoko about it and he said the couple of people left on there really like it, that was a few years ago, maybe I should check back
  • jonas jonas:
    I guess when you're getting old, and the last day of soup season draws near, you start wondering
  • jonas jonas:
    will I make it to the start of the next season? or was this the last time I'll ever have my favorite dish?
  • The Helper The Helper:
    I am doing my first Vibe Coding project. In installed the environment and tools according to instructions but it is all chat doing this for me at my direction. It is fun really and holy shit I might finish in 2 hours what it would have taken a day to in my Access and this would be an electron app complete new
  • Ghan Ghan:
    Good stuff.
  • Ghan Ghan:
    Just make sure it is secure. :)
    +1
  • The Helper The Helper:
    It will only be on internal network
  • jonas jonas:
    Man the AI is good about gaslighting about security though. I've had several times where I pointed out security problems and it tried to convince me that with a tiny tweak it suddenly becomes secure
  • jonas jonas:
    Like using a distrobox as a "secure" container, and when I point out that's not secure at all, it claimed that specifying home will make it secure

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials
      Top