Saving

Lmfaocj

Active Member
Reaction score
1
I made a game that when you get to a high level you can choose to become level 1 with 3ed of your stats, but I am having trouble saving the ability's.
 

Lmfaocj

Active Member
Reaction score
1
:confused:
what do you mean by "saving the ability's." ??

Lol, you know how when you reset the level all your ability's reset I don't want it to reset, because it's annoying having to keep re-adding your ability's.
 

tooltiperror

Super Moderator
Reaction score
231
Are you going to have your map available to play online, or are you only playing offline?

It is slightly easier to work offline.
 

Lmfaocj

Active Member
Reaction score
1
Are you going to have your map available to play online, or are you only playing offline?

It is slightly easier to work offline.
Online

Edit: I am making a rpg map.
i am going to sleep now i will be back tomorrow for more ANSWERS ...... lol
 

XeNiM666

I lurk for pizza
Reaction score
138
are you trying to achieve like when i reached a certain level, ill can morph into another hero with more stats?
How about just using another unit (x-unit) with the same abilities and set the level of the abilities(x-unit) by the level of the previous one.
 

tooltiperror

Super Moderator
Reaction score
231
XeNi, he is talking about saving heroes between instances of maps. Which is a pain in the arse, because it requires generating and/or parsing text, or using the gamecache, but he wants it to be online.
 

XeNiM666

I lurk for pizza
Reaction score
138
i see.
this made me curious. Save load codes allows us to save things right? like integers?
So it's possible to save ability codes by integers and their levels?
sorry if my answer is a bit.. strange... I have no experience with save loads, gamecache and the like...
 

tooltiperror

Super Moderator
Reaction score
231
Well the entire premise of save and load codes is to take a string and change it to an integer, or effect, or unit rawcode, or whatever. They can get quite complicated, and usually not user friendly if you don't know JASS.
 

Accname

2D-Graphics enthusiast
Reaction score
1,463
I made a game that when you get to a high level you can choose to become level 1 with 3ed of your stats, but I am having trouble saving the ability's.

actually i believe all he wants is to, when, lets say his paladin reaches lvl 99 he can choose to become lvl 1 again but with thrice as many attribute points, like in RagnarokOnline.
do the heroes have fixed abilities for their class? or can the players choose which abilities they want to learn at some kind of shop?
for the first case, check which class that hero is and check the level of the abilitys for the hero one by one saving the values in some integer array. if the hero doesnt have that ability the function "Level of Ability for (Unit)" returns 0.
now you can easily re-add the abilities (or if you use the standard wc3 learning system) you can increase his skill points and make the hero learn the abilities the common way depending on the levels saved in the integer variable array.

if you have problems or dont understand something ask again, i could write you that trigger.
 

Lmfaocj

Active Member
Reaction score
1
Yeah, can you please write a trigger I tried readding the skills but for some reason it does not work.
 

Accname

2D-Graphics enthusiast
Reaction score
1,463
here is a simple trigger, you have to choose the event yourself though:
Trigger:
  • SomeTrigger
    • Events
      • (Enter some event here)
    • Conditions
    • Actions
      • Set TempUnit = (Enter some unit in here, like for example (Triggering Unit))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of TempUnit) Equal to Paladin
        • Then - Actions
          • Set Ability[0] = Holy Light
          • Set Ability[1] = Divine Shield
          • Set Ability[2] = Devotion Aura
          • Set Ability[3] = Resurrection
          • Set Ability[4] = Attribute-Bonus
        • Else - Actions
      • For each (Integer A) from 0 to 4, do (Actions)
        • Loop - Actions
          • Set AbilityLevel[(Integer A)] = (Level of Ability[(Integer A)] for TempUnit)
      • Set TempPoint = (Enter some location the hero should be revived at here) example: ((Owner of TempUnit) start location)
      • Unit - Create 1 (Unit-type of TempUnit) for (Owner of TempUnit) at TempPoint facing Default building facing (270.0) degrees
      • For each (Integer A) from 0 to 4, do (Actions)
        • Loop - Actions
          • For each (Integer B) from 1 to AbilityLevel[(Integer A)], do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Level of Ability[(Integer A)] for (Last created unit)) Equal to 0
                • Then - Actions
                  • Unit - Add Ability[(Integer A)] to (Last created unit)
                • Else - Actions
                  • Unit - Increase level of Ability[(Integer A)] for (Last created unit)
      • Unit - Remove TempUnit from the game
      • custom script: call RemoveLocation (udg_TempPoint)

Variables:
TempUnit = Some unit variable, the unit which shall be removed and re-created.
TempPoint = A point variable where the hero shall be re-created.
Ability[] = An array of abilities, set it proper to the abilities the hero shall have.
AbilityLevel[] = An array of integers, here are the levels of the abilities in the Ability[] array saved.
 

Lmfaocj

Active Member
Reaction score
1
Thank you for the trigger but do i have to make a If (All Conditions are True) then do (Then Actions) else do (Else Actions) for every hero?

Edit: never mind I found away to add it with my trigger
Trigger:
  • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (Hero level of (Triggering unit)) Greater than or equal to (>=) 350
      • (Owner of (Triggering unit)) Not equal to (!=) Neutral Hostile
      • (Owner of (Triggering unit)) Not equal to (!=) Neutral Passive
    • Then - Actions
      • Set RebirthInteger[1] = (Strength of (Triggering unit) (Exclude bonuses))
      • Set RebirthInteger[2] = (Agility of (Triggering unit) (Exclude bonuses))
      • Set RebirthInteger[3] = (Intelligence of (Triggering unit) (Exclude bonuses))
      • For each (Integer A) from 1 to 6, do (Set Item_RB[(Integer A)] = (Item carried by (Triggering unit) in slot (Integer A)))
      • For each (Integer A) from (Point-value of (Triggering unit)) to ((Point-value of (Triggering unit)) + 3), do (Set test[(Integer A)] = (Level of Ability[(Integer A)] for (Triggering unit)))
      • Unit - Create 1 (Unit-type of (Triggering unit)) for (Owner of (Triggering unit)) at RespawnPoint[(Player number of (Owner of (Triggering unit)))] facing (Random angle) degrees
      • Unit - Remove (Triggering unit) from the game
      • For each (Integer A) from 1 to 6, do (Hero - Create (Item-type of Item_RB[(Integer A)]) and give it to (Last created unit))
      • For each (Integer A) from (Point-value of (Last created unit)) to ((Point-value of (Last created unit)) + 3), do ( Do ActionFor each (Integer B) from 1 to test[(Integer A)], do (If ((Level of Ability[(Integer A)] for (Last created unit)) Equal to (==) 0) then do (Unit - Add Ability[(Integer A)] to (Last created unit)) else do (Unit - Increase level of Ability[(Integer A
      • Hero - Modify Strength of (Last created unit): Set to (RebirthInteger[1] / 3)
      • Hero - Modify Agility of (Last created unit): Set to (RebirthInteger[2] / 3)
      • Hero - Modify Intelligence of (Last created unit): Set to (RebirthInteger[3] / 3)
      • Player - Add 1 to (Owner of (Last created unit)) Current lumber
      • Set Yourunit[(Player number of (Owner of (Last created unit)))] = (Last created unit)
      • Set RebirthCount[(Player number of (Owner of (Last created unit)))] = (RebirthCount[(Player number of (Owner of (Last created unit)))] + 1)
    • Else - Actions
 
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

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top