Save\load help..

werasd

New Member
Reaction score
14
Reply...

Chocobo i did the InitializeItems Trigger, but the item, i copied from ur save/load map and paste... cause i dont understand the item... why is necessary item??

---And yes i did the initialize items, and also i put a paladin in my map to test, but i receive the same error... Hero Not Found...(the paladin is for player 1 red, the player of the test)


---well i forgot... i also use your save/load map to test, and nothing different... i put a paladin in the map and i tested... (the paladin is for player 1 red, the player of the test)

--- lol i forgot another thing... u asked if Does Hero[Player number of (Triggering Player)] returns YOUR HERO?

^ i dont understand... that Hero[Player number of (Triggering Player)], the "Hero" is the variable eh? i dont understand the "returns your hero"...


Hey... that item u said is a require to save??
 

werasd

New Member
Reaction score
14
YAHHHH I FIXED!!

But now i can save... buutt... when i load with my code it load a footman... and not my paladin... and usually when i save is the same code...

How can i fix??
 

werasd

New Member
Reaction score
14
Yeah...

The first i tried: apaawaeaeaeaeaeae


The Second i tried: aeaawaeaeaeaeae


They only load footmans...
 
X

xflip04

Guest
omg this is confusing, can someone send me a map with this so i can understand it better?
 

Chocobo

White-Flower
Reaction score
409
Hey... that item u said is a require to save??
Not really, it is only for hackers.

6 digit codes.. Encryption.

Code:
Save Char (Add This to the regular code. Backup Trigger recommanded)
Actions
\\ TO BE WRITTEN BEFORE ANY OTHER ACTIONS
Set gold = 0
Set goldcode = 0
local string udg_Gold
local string udg_goldcode
\\ TO BE WRITTEN BEFORE Set FinalCode =...
Set gold = (Integer(Current gold of (Triggering Player)))
If Gold lesser than 10 Then Set Gold = 00000 + (Gold)
If Gold lesser than 100 Then Set Gold = 0000 + (Gold)
If Gold lesser than 1000 Then Set Gold = 000 + (Gold)
If Gold lesser than 10000 Then Set Gold = 00 + (Gold)
If Gold lesser than 100000 Then Set Gold = 0 + (Gold)
For Each Integer A from 1 to 6, Do Actions
     If (Substring, (Gold), (Integer A), (Integer A)) Equal to 0
     Then Set goldcode = (goldcode + a)
     Else If (Substring, (Gold), (Integer A), (Integer A)) Equal to 1
           Then Set goldcode = (goldcode + c)
           Else If (Substring, (Gold), (Integer A), (Integer A)) Equal to 2
                 Then Set goldcode = (goldcode + e)
                 Else If (Substring, (Gold), (Integer A), (Integer A)) Equal to 3
                       Then Set goldcode = (goldcode + i)
                       Else If (Substring, (Gold), (Integer A), (Integer A)) Equal to 4
                             Then Set goldcode = (goldcode + j)
                             Else If (Substring, (Gold), (Integer A), (Integer A)) Equal to 5
                                   Then Set goldcode = (goldcode + m)
                                   Else If (Substring, (Gold), (Integer A), (Integer A)) Equal to 6
                                         Then Set goldcode = (goldcode + n)
                                         Else If (Substring, (Gold), (Integer A), (Integer A)) Equal to 7
                                               Then Set goldcode = (goldcode + o)
                                               Else If (Substring, (Gold), (Integer A), (Integer A)) Equal to 8
                                                     Then Set goldcode = (goldcode + r)
                                                     Else If (Substring, (Gold), (Integer A), (Integer A)) Equal to 9
                                                           Then Set goldcode = (goldcode + v)
                                                           Else
Set FinalCode = ((((SaveCode[0] + SaveCode[1]) + (SaveCode[2] + SaveCode[3])) + ((SaveCode[4] + SaveCode[5]) + (SaveCode[6] + SaveCode[7]) + (goldcode)))

Code:
Load Char
    Events
        Player - Player 1 (Red) types a chat message containing -load as A substring
        Player - Player 2 (Blue) types a chat message containing -load as A substring
        Player - Player 3 (Teal) types a chat message containing -load as A substring
        Player - Player 4 (Purple) types a chat message containing -load as A substring
        Player - Player 5 (Yellow) types a chat message containing -load as A substring
        Player - Player 6 (Orange) types a chat message containing -load as A substring
        Player - Player 7 (Green) types a chat message containing -load as A substring
        Player - Player 8 (Pink) types a chat message containing -load as A substring
        Player - Player 9 (Gray) types a chat message containing -load as A substring
        Player - Player 10 (Light Blue) types a chat message containing -load as A substring
        Player - Player 11 (Dark Green) types a chat message containing -load as A substring
    Conditions
        (Substring((Entered chat string), 1, 5)) Equal to -load
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Length of (Entered chat string)) Not equal to [COLOR=Red]29[/COLOR]
            Then - Actions
                Game - Display to (Player group((Triggering player))) the text: ERROR: Code Length ...
                Skip remaining actions
            Else - Actions
        Trigger - Turn off (This trigger)
        Set Playername = (Name of (Triggering player))
        Set LoadString = (abcde + (Entered chat string))
        Trigger - Run Randomize <gen> (ignoring conditions)
        Set Base32Input = (a + (Substring(LoadString, 12, 13)))
        Trigger - Run Base32 to Base10 <gen> (ignoring conditions)
        Set UnitNumber = (Base10Output / RandomizeCode)
        Set Base32Input = (Substring(LoadString, 14, 16))
        Trigger - Run Base32 to Base10 <gen> (ignoring conditions)
        Set LoadLevel = (Base10Output / (RandomizeCode x ((UnitNumber mod 9) + 1)))
        [COLOR=Red]Set goldcode = (Substring(Entered Chat String), 24, 29))
        Set Gold = 0[/COLOR]
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                Or - Any (Conditions) are true
                    Conditions
                        UnitNumber Greater than MaxSavableHeroes
                        UnitNumber Less than 1
                        LoadLevel Greater than MaxLevel
                        LoadLevel Less than 0
            Then - Actions
                Game - Display to (Player group((Triggering player))) the text: ERROR: Error Loadin...
                Trigger - Turn on (This trigger)
                Skip remaining actions
            Else - Actions
                Do nothing
        For each (Integer A) from 1 to MaxSavableHeroes, do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        UnitNumber Equal to (Integer A)
                    Then - Actions
                        Unit - Create 1 HeroType[UnitNumber] for (Triggering player) at (Center of (Playable map area)) facing 0.00 degrees
                    Else - Actions
        Hero - Set (Last created unit) Hero-level to LoadLevel, Show level-up graphics
        For each (Integer A) from 1 to 6, do (Actions)
            Loop - Actions
                Hero - Drop the item from slot (Integer A) of (Last created unit)
                Item - Remove (Last dropped item)
        For each (Integer B) from 0 to 5, do (Actions)
            Loop - Actions
                Set Base32Input = (a + (Substring(LoadString, (17 + ((Integer B) x 2)), (18 + ((Integer B) x 2)))))
                Trigger - Run Base32 to Base10 <gen> (ignoring conditions)
                Set ItemNumber = ((Base10Output - (UnitNumber + (Integer B))) / ((RandomizeCode mod 2) + 1))
                Set ItemNumber = (ItemNumber + 100)
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        Or - Any (Conditions) are true
                            Conditions
                                (ItemNumber Less than 100) or (ItemNumber Greater than 499)
                                InitializeItems[ItemNumber] Equal to Unknown Item
                    Then - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                ItemNumber Equal to 500
                            Then - Actions
                                Do nothing
                            Else - Actions
                                Game - Display to (Player group((Triggering player))) the text: ((|c00ff0000ERROR:Code Error Bit |r + (String(((Integer B) + 3)))) +  Continuing Load...)
                    Else - Actions
                        Hero - Create InitializeItems[ItemNumber] and give it to (Last created unit) aceijmnorv
[COLOR=Red]For Each Integer A from 1 to 6, Do Actions
     If (Substring, (goldcode), (Integer A), (Integer A)) Equal to a
     Then Set Gold = (Gold + 0)
     Else If (Substring, (goldcode), (Integer A), (Integer A)) Equal to c
           Then Set Gold = (Gold + 1)
           Else If (Substring, (goldcode), (Integer A), (Integer A)) Equal to e
                 Then Set Gold = (Gold + 2)
                 Else If (Substring, (goldcode), (Integer A), (Integer A)) Equal to i
                       Then Set Gold = (Gold + 3)
                       Else If (Substring, (goldcode), (Integer A), (Integer A)) Equal to j
                             Then Set Gold = (Gold + 4)
                             Else If (Substring, (goldcode), (Integer A), (Integer A)) Equal to m
                                   Then Set Gold = (Gold + 5)
                                   Else If (Substring, (goldcode), (Integer A), (Integer A)) Equal to n
                                         Then Set Gold = (Gold + 6)
                                         Else If (Substring, (goldcode), (Integer A), (Integer A)) Equal to o
                                               Then Set Gold = (Gold + 7)
                                               Else If (Substring, (goldcode), (Integer A), (Integer A)) Equal to r
                                                     Then Set Gold = (Gold + 8)
                                                     Else If (Substring, (goldcode), (Integer A), (Integer A)) Equal to v
                                                           Then Set Gold = (Gold + 9)
                                                           Else
Player - Set (Triggering Player)'s current gold to (Gold)[/COLOR]
        Trigger - Turn on (This trigger)
 
X

xflip04

Guest
choco where can i download a working save/load code to help me understand this?

thanks
 
S

Shinyblade

Guest
1 more question:

How do you do the local string thing?

I can't figure out how lol.

☺§Shinyblade§☺
 

Saiza

New Member
Reaction score
10
Hey, Hey :) That save thingy seems very complicated, Cant you do it for me on my map? :) I would love you, if you did <3
 
X

xflip04

Guest
if he could just send us a map with the triggers on it would help :D
 

Chocobo

White-Flower
Reaction score
409
Chocobo and what about my error?
The first i tried: apaawaeaeaeaeaeae


The Second i tried: aeaawaeaeaeaeae


They only load footmans...

Ok I think I found the problem. There is a conflict in the Variable HeroType, Unit-Type (Array), and also with this trigger :
Code:
Detect Hero
    Events
        Unit - A unit enters (Playable map area)
    Conditions
        ((Triggering unit) is A Hero) Equal to True
    Actions
        Set Hero[(Player number of (Owner of (Triggering unit)))] = (Triggering unit)

Or, there is an another way (Save Char Trigger) :
Code:
If ((Unit Type of (Hero[Player number of (Triggering Player)]) Equal to (HeroType[1]) then Set Part1 = 01
If ((Unit Type of (Hero[Player number of (Triggering Player)]) Equal to (HeroType[2]) then Set Part1 = 02
If ((Unit Type of (Hero[Player number of (Triggering Player)]) Equal to (HeroType[3]) then Set Part1 = 03
If ((Unit Type of (Hero[Player number of (Triggering Player)]) Equal to (HeroType[4]) then Set Part1 = 04
If ((Unit Type of (Hero[Player number of (Triggering Player)]) Equal to (HeroType[5]) then Set Part1 = 05
If ((Unit Type of (Hero[Player number of (Triggering Player)]) Equal to (HeroType[6]) then Set Part1 = 06
If ((Unit Type of (Hero[Player number of (Triggering Player)]) Equal to (HeroType[7]) then Set Part1 = 07
If ((Unit Type of (Hero[Player number of (Triggering Player)]) Equal to (HeroType[8]) then Set Part1 = 08
If ((Unit Type of (Hero[Player number of (Triggering Player)]) Equal to (HeroType[9]) then Set Part1 = 09
If ((Unit Type of (Hero[Player number of (Triggering Player)]) Equal to (HeroType[10]) then Set Part1 = 10
If ((Unit Type of (Hero[Player number of (Triggering Player)]) Equal to (HeroType[11]) then Set Part1 = 11

It looks repetitive and has been replaced by For Each Integer A in old code, you must do this to get no error.

This can also confuse the trigger :
Code:
        For each (Integer A) from 1 to MaxSavableHeroes, do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        UnitNumber Equal to (Integer A)
                    Then - Actions
                        Unit - Create 1 HeroType[UnitNumber] for (Triggering player) at (Center of (Playable map area)) facing 0.00 degrees
                    Else - Actions

It is INTEGER A and does not return 01. I am creating a new demo-map I will post there in which there will be no error problem.



P.S : I wonder if Save Load Code v0.13f was better than this new. It contains 2 less letters and can be understand easily. If someone has the map, please post it.
 

Chocobo

White-Flower
Reaction score
409
There are small bugs in that map :
- It won't support the setting of Hero[X] when hero is loaded. Add it manually to the trigger.
- There is a small chance to get a weird hero level, around 1 to 10 difference of level.

This Map is now a demo map in which it has now some possibilities. Also shows how to use locals in GUI and how to make a look of overlapping 522 max speed limit but still 522 speed -> Just reduce size of all things in your map.
 

werasd

New Member
Reaction score
14
Chocobo

Chocobo what trigger can i use to, when i load my char the other char continue in the map... how can i remove him from the game?? and a nearby praton that need to train the hero (tavern), how can i remove the whisp?
 
S

Shinyblade

Guest
Thanks! This trigger helped me tons!

And in case someone doesn't know how to add the loading thing, The easiest way I found was putting this at end of load trigger:

Else:
Hero - Create InitializeItems[ItemNumber] and give it to (Last Created Unit)
Set Hero[(Play number of (triggering player))] = Last created unit
Turn on (this trigger)
 
S

Shinyblade

Guest
And two question: (Lol, Yep i'm still having trouble.)

How do you do the first 6 triggers in the gold one. I can't get it to be (interger(Current Gold of (Triggering Player)))

And how do you make intergers on #'s 2-6 more than one zero?
 

Chocobo

White-Flower
Reaction score
409
How do you do the first 6 triggers in the gold one. I can't get it to be (interger(Current Gold of (Triggering Player)))

And how do you make intergers on #'s 2-6 more than one zero?
Reply With Quote

What do you suppose?


Set Hero[(Play number of (triggering player))] = Last created unit

I forget to add it because the old trigger uses an external trigger to set the Hero as the value needed. (Generic unit enters playable map area)
 

Chocobo

White-Flower
Reaction score
409
werasd said:
Chocobo what trigger can i use to, when i load my char the other char continue in the map... how can i remove him from the game?? and a nearby praton that need to train the hero (tavern), how can i remove the whisp?

Ok I forget werasd, the Function Unit - Remove Unit exists.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top