Save Map room memory by deleting defaults

Discussion in 'Starcraft 2 (SC2) Editor Help' started by GFreak45, Jun 26, 2012.

  1. GFreak45

    GFreak45 I didnt slap you, i high 5'd your face.

    Ratings:
    +132 / 0 / -0
    Is it possible to delete all the unit/ability/behavior/effect game data that is in there from the melee game to save on memory a ton? (all the melee game units and behaviors they use etc)
    I mean, this could save like half the map's size if im correct
     
  2. Siretu

    Siretu Starcraft 2 Editor Moderator Staff Member

    Ratings:
    +295 / 0 / -0
    Although I'm not 100% sure, I think that's why the mods are so great. You know when you modify a unit in the data editor and it goes green and the source changes to the local path to your map? That means it'll get the information about the unit from your map instead of the public blizzard mod with all the information.

    The Blizzard mods are already published and ready so you don't need to publish all that information along with your map.

    Now this can be very valuable. You can create your own mods. And if I remember correctly, you can add them as dependencies if you have them published(You can only use your own mods and Blizzard's). If you have a lot of art assets and custom sounds and such, you can publish it separately in a mod. When a player first downloads the map, it'll automatically download the mod as well. The next time you patch your map(and not the mod), he will only have to download the map.
     
    • Like Like x 1
  3. Dave312

    Dave312 Censored for your safe viewing

    Ratings:
    +269 / 0 / -0
    Siretu is correct. The only information that is saved in your map is the changes you make to the mods your map has as a dependency (the LibertyCampaignMod for example). As such, deleting unused stuff will not make any change to your map size.

    One good thing to note is that say you want to create a Marine unit that is exactly the same as the SC2 Marine but with extra life or something simple like that, you could actually create a marine but set the Based On value to the SC2 Marine and then increase the units life. What the game does is that it says that your new marine unit is based on the SC2 Marine but you have changed the life. So the only data that it needs to save into your map is the change to the units life. Every other value that is set for your marine is retrieved from the dependency where the SC2 Marine unit is saved. To make this a bit clearer, try use the XML view in the data editor. It has tabs across the top which represent every dependency in the your map and it will only show the data for your selected object that comes from that dependency. So the the only data saved into your map is in the tab with your map name on it.
     
    • Like Like x 1
  4. GFreak45

    GFreak45 I didnt slap you, i high 5'd your face.

    Ratings:
    +132 / 0 / -0
    wow thanks for the help guys, thats a huge jump from what I was doing, so basically I can put all my map's data like spells, imports, and units into a mod so it will take up no memory in the actual game, that will drastically change the way I make my map

    Also, @Dave312 are you sure units/abilities/etc based off another one from a dependency do this? or is this a theory? not being condescending actually want to know.

    Can mods require other mods? (can i make all the spells their own mod so i can modify it without modifying the entire map or 1 large mod)
     
  5. s3rius

    s3rius Linux is only free if your time is worthless.

    Ratings:
    +128 / 0 / -0
    You will still require memory space for every entry that you don't leave on default.
    It's only a way of reducing wasted space by removing data redundancy, not magic that makes information not take up any space.

    Correct me if I'm wrong, but I was under the impression that the amount of data doesn't really matter. Is there an upper limit of how much stuff you can add?
    (I remember in good old Wc3.. it wouldn't complain about a thousand or so custom spells/units.)
     
    • Like Like x 1
  6. X-maul

    X-maul AKA: Demtrod

    Ratings:
    +200 / 0 / -0
    As far as I know (correct me if I'm wrong), there is no upper limit, but a huge size is not very popular.
    In the 'good' old Wc3 you could not have a size with a filesize over 4mb? But a lot of units did not take up a much of space, as there wasnt that many different options to modify.
     
  7. Dave312

    Dave312 Censored for your safe viewing

    Ratings:
    +269 / 0 / -0
    I am correct. You can test it out yourself if you want to by using the XML view with the example I posted previously.

    Yes they can. A good example of this is the Liberty (Campaign) Mod which requires the Liberty (Mod)
     
  8. GFreak45

    GFreak45 I didnt slap you, i high 5'd your face.

    Ratings:
    +132 / 0 / -0
    There is a limit in SC2 but i believe it was about 3x what the limit for wc3 was, if i remember correctly, and yes i know information will take up memory space, but I was wondering exactly how it worked, for instance, if i create my own mod with all the spells for the map, and dont modify them when i use them in my map, just add a dependency for the mod, will that leave room open for some cool custom models?
     
  9. Dave312

    Dave312 Censored for your safe viewing

    Ratings:
    +269 / 0 / -0
    You would need to add your custom models to your Mod if the objects that use them are made in the mod.

    Objects from the data editor doesn't really take up that much space. In my current map I have nearly 1400 game data objects and it only takes up 220kB (compressed). I would be aiming at just adding custom models/textures to a mod rather than data editor objects.
     
    • Like Like x 1
  10. MissKerrigan

    MissKerrigan Active Member

    Ratings:
    +23 / 0 / -0
    1. what's the difference between a map and a mod?

    2. why is my map 17 MB if I only used the standard starcraft 2 files?

    3. I think my editor would be a lot faster if all default things were not there
     
  11. GFreak45

    GFreak45 I didnt slap you, i high 5'd your face.

    Ratings:
    +132 / 0 / -0
    1. a mod is not played, it provides all those defaults that are in the normal editor, but you can make your own with your own units/abilities/etc

    2. Your map still has information in it, any units you make, the terrain, the triggering, etc

    3. Probably, i noticed load times are pretty terrible for simple info on the data editor when there are large dependancies
     
  12. Siretu

    Siretu Starcraft 2 Editor Moderator Staff Member

    Ratings:
    +295 / 0 / -0
    You can have a maximum of 20 maps published on your account. Each with a maximum size of 20 MB. In total, you can have up to 105MB of maps on your account.

    When it comes to the editor being slow(especially the data editor), I try to sort stuff first. Like if you have data source set to (All) and you go to actors with an empty search field, it'll fill the entire list of actors(A LOT).

    So I try to keep the data source at my own map most of the time and if not, I search for the actor first before I switch.

    Edit: @MissKerrigan: The reason your map is 17MB is most likely those 1275 triggers you have. I use 200 triggers and 200 custom actions for Cruiser Command and that alone takes up 9MB(1.34MB compressed). You could probably reduce those triggers down to 10-20 triggers and bring the file size down to less than 5MB.
     
  13. MissKerrigan

    MissKerrigan Active Member

    Ratings:
    +23 / 0 / -0
    (siretu) 'You could probably reduce those triggers down to 10-20 triggers and bring the file size down to less than 5MB.'

    if I know how to do all of this, yes
     
  14. GFreak45

    GFreak45 I didnt slap you, i high 5'd your face.

    Ratings:
    +132 / 0 / -0
    there is such thing as the "quote" tags, click the reply button on his post and chop out the parts you dont want
     
  15. Siretu

    Siretu Starcraft 2 Editor Moderator Staff Member

    Ratings:
    +295 / 0 / -0
    You should start with fixing the spawn system. I didn't look through it thoroughly, but it seems like you have 3-4 trigger for every player's level(up to 200). That's a lot of triggers. You can probably make a spawning system with all levels for all players in 1-3 triggers.

    I don't know if I have linked this before, but Onetwosc has some good video tutorials that you should look through. He has a lot of stuff on his channel, but some of it is extra useful to you, like the tower defense tutorials. He also has some more advanced tower defense videos as well.

    Last time I checked, you also have some triggers that do EXACTLY the same thing. You can take those triggers and just put all the events in the same trigger. So if you have these triggers:

    Events:
    A
    Actions:
    Do X

    Events:
    B
    Actions:
    Do X

    Events:
    C
    Actions:
    Do X

    You could compress that into one trigger that looks like this:

    Events:
    A
    B
    C
    Actions:
    Do X
     

Share This Page