1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. We have recently started the 16th edition of the Mini Mapping Contest. The theme is mini RPG. Do check it out and have fun.
    Dismiss Notice
  4. Dismiss Notice
  5. Choose your ride to damnation in the 5th Special Effect Contest Poll.
    Dismiss Notice
  6. The winners of the 13th Techtree Contest have been announced!
    Dismiss Notice
  7. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Game cache not working in new editor?

Discussion in 'World Editor Help Zone' started by Voljin, Sep 22, 2019.

  1. Voljin

    Voljin

    Joined:
    Apr 3, 2019
    Messages:
    48
    Resources:
    0
    Resources:
    0
    Hello Hive,

    I like to consider myself a fairly decent map editor in GUI, and I have worked with Game Caches extensively in the past, but for the life of me, I cannot get this one working and I'm starting to think its the new editor and not me. Hopefully, I'm wrong. Please look at my triggers and tell me I made a mistake somewhere though, cause I simply can't. I've checked the spelling on both maps 100 times. Both maps are in the same campaign and have buttons, transitioning from one to the other works perfectly fine, but the game cache data isn't loading. I added in the Store Integer Player 1's Gold and typed in "keysersoze" at the beginning of map 1 just to check to make sure it was the game cache, and it is DEFINITELY the game cache based on all the tests I've ran. Under the current triggers, I can have 500g and a hero in map 1, but nothing in map 2.

    Oddly, and I'm not sure if this is related or not, but sometimes when I enter the campaign via custom campaigns (I only have a visible button for map 1) I will get immediately sent to map 2 for some reason.

    I've tried playing on old campaigns where I used the EXACT same triggers for GUI (In fact I believe I copied them to this map and just changed the name of the game caches), and they work fine when I play them in campaign mode. Is this all the new editor's fault? And, if so, how can I fix it? Thanks!

    Map 1 triggers

    • GC Initialization
      • Events
        • Time - Elapsed game time is 0.00 seconds
      • Conditions
      • Actions
        • Game - Set the time of day to 6.00
        • Game - Turn the day/night cycle Off
        • Game Cache - Create a game cache from MegCache.w3v
        • Set GameCache = (Last created game cache)
        • Game Cache - Clear GameCache
        • Trigger - Turn off (This trigger)


    • Go to map 2
      • Events
      • Conditions
      • Actions
        • Unit - Pause all units
        • Sound - Play SoulPreservation <gen>
        • Cinematic - Fade out over 2.00 seconds using texture White Mask and color (0.00%, 0.00%, 0.00%) with 0.00% transparency
        • Set LeftFrom = 1
        • Game Cache - Clear GameCache
        • Game Cache - Store Hero as Hero of Units in GameCache
        • Game Cache - Store LeftFrom as LeftFrom of Variables in GameCache
        • Game Cache - Store (In-game time of day) as Time of Variables in GameCache
        • Game Cache - Store (Life of Hero) as LifeHero of Units in GameCache
        • Game Cache - Store (Mana of Hero) as ManaHero of Units in GameCache
        • Game Cache - Store (Player 1 (Red) Current gold) as Gold of Variables in GameCache
        • Game Cache - Save GameCache
        • Unit - Unpause all units
        • Unit - Remove Hero from the game
        • Wait for SoulPreservation <gen> to be 0.00 seconds from finished playing
        • Game - Save game as <Empty String> and change level to MMap2.w3x (Skip scores)




    Map 2 Triggers


    • GC Initialization
      • Events
        • Time - Elapsed game time is 0.00 seconds
      • Conditions
      • Actions
        • Visibility - Create an initially Enabled visibility modifier for Player 1 (Red) emitting Visibility across (Playable map area)
        • Set LoadingFrom[1] = Load from Map1 <gen>
        • Set LoadingFrom[3] = Load from Manor <gen>
        • Set LoadingFrom[31] = Load from Map31 <gen>
        • Game Cache - Create a game cache from MegCache.w3v
        • Set GameCache = (Last created game cache)
        • Trigger - Run It works <gen> (ignoring conditions)
        • Trigger - Run Load <gen> (ignoring conditions)


    • Load
      • Events
      • Conditions
      • Actions
        • Cinematic - Fade in over 2.00 seconds using texture White Mask and color (0.00%, 0.00%, 0.00%) with 0.00% transparency
        • Game Cache - Reload all game cache data from disk
        • Set LeftFrom = (Load LeftFrom of Variables from GameCache)
        • Set Explored2 = True
        • Game - Set the time of day to (Load Time of Variables from GameCache)
        • Set ManualLoad = True
        • Player - Set Player 1 (Red) Current gold to (Load Gold of Variables from GameCache)
        • Game Cache - Restore Hero of Units from GameCache for Player 1 (Red) at (Center of LoadingFrom[LeftFrom]) facing 0.00
        • Hero - Set Name of (Last restored unit) to (Name of Player 1 (Red))
        • Unit - Set life of (Last restored unit) to (Load LifeHero of Units from GameCache)
        • Unit - Set mana of (Last restored unit) to (Load ManaHero of Units from GameCache)
        • Set Hero = (Last restored unit)
        • Camera - Pan camera for Player 1 (Red) to (Center of Load from Map1 <gen>) over 0.00 seconds
     
    Last edited: Sep 22, 2019
  2. Pyrogasm

    Pyrogasm

    Joined:
    Feb 27, 2007
    Messages:
    3,666
    Resources:
    1
    Spells:
    1
    Resources:
    1
  3. Voljin

    Voljin

    Joined:
    Apr 3, 2019
    Messages:
    48
    Resources:
    0
    Resources:
    0
    Thank you Pryo!

    I literally tried doing that like 9 times, but could not remember how!
     
  4. Wrda

    Wrda

    Joined:
    Nov 18, 2012
    Messages:
    1,231
    Resources:
    3
    Maps:
    1
    Spells:
    2
    Resources:
    3
    I don't recall needing to reload game cache data from disk for it to work.
    Apart from that, I can't find anything that would make game cache not work, on a quick glance.
     
  5. Voljin

    Voljin

    Joined:
    Apr 3, 2019
    Messages:
    48
    Resources:
    0
    Resources:
    0
    Right!? I'm losing my mind here! Could it be something else not associated with the triggers? The entire games been acting strange since I downloaded patch. I tried playing Rexxar campaign and many of the units had their names crossed out and replaced with letter "p" or something. I'm wondering if the patch jacked up editor too.
     
  6. JsonDalao

    JsonDalao

    Joined:
    Aug 6, 2019
    Messages:
    66
    Resources:
    0
    Resources:
    0
    Long ago, HT replaced GC, and 1.29 did not have GC at all
     
  7. Wrda

    Wrda

    Joined:
    Nov 18, 2012
    Messages:
    1,231
    Resources:
    3
    Maps:
    1
    Spells:
    2
    Resources:
    3
    What? GC = Game Cache?
    Game Caches exist since Wc3 TFT, at least since 1.24, that's when I'm sure I used them.
    Hashtables can't do what Game Caches can at a higher level.
     
  8. JsonDalao

    JsonDalao

    Joined:
    Aug 6, 2019
    Messages:
    66
    Resources:
    0
    Resources:
    0
    But blizzard banned it
     
  9. Voljin

    Voljin

    Joined:
    Apr 3, 2019
    Messages:
    48
    Resources:
    0
    Resources:
    0
    Wait, are you saying game caches have been banned since 1.29? Do they not work at all now or what?

    Also, I tried using handles before but couldn't make them work right. Idk, maybe the new editor changed some things there too. I thought they could only be used within a single map and not between campaign ones?
     
  10. JsonDalao

    JsonDalao

    Joined:
    Aug 6, 2019
    Messages:
    66
    Resources:
    0
    Resources:
    0
    Yes, 1.29 is already banned for GC and RB
     
  11. IcemanBo

    IcemanBo

    Joined:
    Sep 6, 2013
    Messages:
    6,231
    Resources:
    22
    Maps:
    3
    Spells:
    11
    Template:
    1
    Tutorials:
    4
    JASS:
    3
    Resources:
    22
    @JsonDalao you're statetemnts seem confusing. Can you explain in what form game cache is banned? It can be still normally used. And what is even RB?
     
  12. JsonDalao

    JsonDalao

    Joined:
    Aug 6, 2019
    Messages:
    66
    Resources:
    0
    Resources:
    0
    Oh, I'm sorry, I just tested GC and it does work. Maybe I did something wrong, but HT is still more efficient than GC.
    RB is "return bug".It's like "GetHandId", But it's much more powerful than "GetHandleId"
     
  13. Daffa

    Daffa

    Joined:
    Jan 30, 2013
    Messages:
    7,835
    Resources:
    28
    Packs:
    1
    Maps:
    8
    Spells:
    17
    Tutorials:
    2
    Resources:
    28
    Game Cache works normally, I have no idea where such statements of Game Cache removed from use ever stated by any of the company employees. Heck, that broke entire campaign they have if they did.

    Show me the trigger invoking the save cache. My campaign (build on 1.31) works properly with caches. I suggest running debug messages across all game cache actions and see where it fails.

    EDIT:
    Reload data from disk before creating the cache should resolve the issue, if memory preserves.

    EDIT 2:
    @JsonDalao Only Return Bug is removed due to security issue it generates.
     
  14. JsonDalao

    JsonDalao

    Joined:
    Aug 6, 2019
    Messages:
    66
    Resources:
    0
    Resources:
    0
    I'm sorry,It's my fault, maybe I haven't used Game Chche for too long.Because in my country is through the server archive implementation of national player data storage:peasant-bowing:
     
  15. Voljin

    Voljin

    Joined:
    Apr 3, 2019
    Messages:
    48
    Resources:
    0
    Resources:
    0
    Well, I ended up just downgrading from 1.31 and now everything seems to be working again. Must have just been the fact that they were old maps or something? Idk...