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 haven't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. Ride into the sunset with the 32nd Modeling Contest. The contest is optionally paired. Best of luck, people!
    Dismiss Notice
  4. This adventure has come to an end. Congratulate our heroes in the 16th Mini Mapping Contest Results.
    Dismiss Notice
  5. From the gates of hell, the 5th Special Effect Contest Results have emerged.
    Dismiss Notice
  6. Race against the odds and Reforge, Don't Refund. The 14th Techtree Contest has begun!
    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.

Abilites causing lag?

Discussion in 'World Editor Help Zone' started by vexoh, Oct 24, 2012.

  1. vexoh

    vexoh

    Joined:
    Oct 1, 2012
    Messages:
    26
    Resources:
    0
    Resources:
    0
    I have been working on WCIII RPG for some time now. I had just finished making a custom unit, and thought i would test his animations when casting spells, when i was testing, all the spells i cast would lag the game for about 1 second(Freezing the screen for 1 second every time an ability is cast)
    I then began to wonder is it only this custom unit that will lag the game? And so i tested them on some pre-made units in the WE, yet the problem continued no matter what unit is casting the spells it would still lag and freeze for 1 second.

    I don't know what the problem is.. but i think it could be one of these
    1. Do i have too many custom models in my map?
    2. do i have too many doodads in my map? (40,000)

    I also have a second question.

    I have about 100 custom models in the import manager
    when placing about 30 of the SAME custom model the file size would be ridiculously big (770mb) but then when i delete just a few, 4-5 the map size drops to 7.60mb?
    Keeping in the mind that its the SAME custom model the SAME size the SAME everything, yet deleting only 3-4 out of 30 from my map, makes the file size smaller as if i had deleted 400...

    Any help on these 2 problems would be much appreciated, Thanks..
    Vex.
     
  2. rulerofiron99

    rulerofiron99

    Joined:
    Jul 10, 2006
    Messages:
    3,129
    Resources:
    14
    Maps:
    4
    Spells:
    9
    Tutorials:
    1
    Resources:
    14
    Is it a custom spell?
     
  3. shadowvzs

    shadowvzs

    Joined:
    Nov 13, 2006
    Messages:
    1,803
    Resources:
    2
    Spells:
    2
    Resources:
    2
    too many animated doodass could make it slower but dont make lagg spikes...

    not preloaded custom abilities could make serious freeze at 1st cast
     
  4. defskull

    defskull

    Joined:
    Mar 27, 2008
    Messages:
    7,979
    Resources:
    17
    Spells:
    17
    Resources:
    17
    You need to preload that abiliti(es) if that ability consist of 4 levels and higher.
    How to preload ?
    Simple:
    1. Create dummy unit (anywhere on the map)
    2. Add all abilities that associated with that unit to that dummy unit
    3. Remove the dummy unit

    Ta-da you have successfully preloaded abilities - which will lag upon preloading, but won't lag for first cast and later.

    If you play DotA, you would realize that it will lag when you pick a Hero, right ?
    It actually preloads all abilities associated with that unit when you pick it, so it will lag when preloading, but won't lag for first cast and later.
     
  5. Spartipilo

    Spartipilo

    Joined:
    Jul 14, 2011
    Messages:
    3,190
    Resources:
    0
    Resources:
    0
    Hmmm.. If the ability is based on FireStrike or ShadowStrike or some other abilities and you gave "0" values to them, they could freesze the entire game every time you cast them, or even crash Wc3.

    If it's triggered, probably the triggers are too heavy for the game to handle everything fast enough.

    Else, if it's not preloaded, maybe preloading it as defskull suggested would fix it.

    Question: Why would you import the same model more than once? ;)
     
  6. TwoVenomous

    TwoVenomous

    Joined:
    Sep 11, 2011
    Messages:
    1,174
    Resources:
    1
    Skins:
    1
    Resources:
    1
    i think he meant placing the same model on the editor.
     
  7. vexoh

    vexoh

    Joined:
    Oct 1, 2012
    Messages:
    26
    Resources:
    0
    Resources:
    0
    the spells where normal hero spells like:
    Thunder clap
    War stomp
    Shockwave
    etc etc

    and sorry but i don't quite understand preloading
    if someone could give a link to a tutorial on it, that would be great.
    also, its not just the first time the ability is cast, its every time its cast..
     
  8. Spartipilo

    Spartipilo

    Joined:
    Jul 14, 2011
    Messages:
    3,190
    Resources:
    0
    Resources:
    0
    If it's every time you cast it it's because you set Damage or Duration or Distance to 0 on the ability fields in the Object Editor. Change it to 0.1 and you'll see it works.

    Forget about preloading, it's not a Preload issue.

    You can also post the map here (Advanced -> Manage Attachments) so we can give a look at it.
     
  9. defskull

    defskull

    Joined:
    Mar 27, 2008
    Messages:
    7,979
    Resources:
    17
    Spells:
    17
    Resources:
    17
    Yeah, the preloading should only apply when you have issues like "lag on first cast, but won't lag anymore for later cast".

    If judging by your statement, you said every time you cast it, it will lag, well, it's not something to do with preloading at all.