• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

2 Qs: Creep lvl over 100 & reducing lagg

Status
Not open for further replies.
Level 3
Joined
Mar 30, 2011
Messages
36
So I need help :D I have 2 Qs:

1. How to make Creeps have lvl over 100.. in gameplay constants maxium you can get is 100, but I've seen maps that have like 9999 lvl creeps... I need it to get higher lvl creeps for my rpg ^^

2. How to reduce lagg you get from item drops i.e tomes? Custom script?

PLEASE HELP MEE!! :DD
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
2) Yes, with custom script.
Creating things (units, items, destructibles, ...) creates memory leaks.
This is not because of the items/units/... themselves, but because of the location. Every time you use a location, it creates a memory leak, too much of those will result in slower performance.

So you need to create a point location (I usually call it "tempLoc") and do this:
  • Set tempLoc = {Your Location} // example: Center of {Region}
  • Unit - create unit at tempLoc facing 0.00 degrees
  • Custom script: call RemoveLocation(udg_tempLoc)
When you use "point with polar offset", you leak 2 locations: the base point, and the offset-point.
So you need to set tempLoc1 to Center of Region, and tempLoc2 to tempLoc1 offset of 800. towards 0.00 degrees (for example).

It's not only with locations: unit groups, player groups (aside from "All Players") and special effects also leak (these 4 are the most common).
 
Level 3
Joined
Mar 30, 2011
Messages
36
2) Yes, with custom script.
Creating things (units, items, destructibles, ...) creates memory leaks.
This is not because of the items/units/... themselves, but because of the location. Every time you use a location, it creates a memory leak, too much of those will result in slower performance.

So you need to create a point location (I usually call it "tempLoc") and do this:
  • Set tempLoc = {Your Location} // example: Center of {Region}
  • Unit - create unit at tempLoc facing 0.00 degrees
  • Custom script: call RemoveLocation(udg_tempLoc)
When you use "point with polar offset", you leak 2 locations: the base point, and the offset-point.
So you need to set tempLoc1 to Center of Region, and tempLoc2 to tempLoc1 offset of 800. towards 0.00 degrees (for example).

It's not only with locations: unit groups, player groups (aside from "All Players") and special effects also leak (these 4 are the most common).

Ok.. my item drop triggers are like this..
Unit dies
Triggering unit equal to [unit]
set (name of variable) = (Random integer between 1 and 100
if (name of variable) equal to 1 ( item - create 1 tome of knoweledge at (position of dying unit))) else do nothing.

So I have 28 triggers like that.. =D
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,255
1. Hold shift when opening the field to extend the number range that can be entered.

2. Tomes leak. That is the problem with them. When used, the item never gets removed and persists on the ground (just the death animation ran so it is less visible).
In time and after hundreds of tomes are used you can overload the graphics engine for WC3 causing poor performance when viewing certain areas of the map. Additionally the large number of item objects existing slows some internal systems down decreasing the performance of certain game mechanics.

Same happens if you kill an item, it does not actually get removed and just the death animation plays. This is probably because it happens to all widgets (same behaviour is seen with destructables). Units are special in that they do get removed on death except heroes which also exibit this behaviour.

If you made a trigger that removes the tome item after it is used, it will eithor crash (which would be prety stupid for it to do) or it will not leak / leak a lot less. Only way to find out is trying it I guess.
 
Level 3
Joined
Mar 30, 2011
Messages
36
1. Hold shift when opening the field to extend the number range that can be entered.

2. Tomes leak. That is the problem with them. When used, the item never gets removed and persists on the ground (just the death animation ran so it is less visible).
In time and after hundreds of tomes are used you can overload the graphics engine for WC3 causing poor performance when viewing certain areas of the map. Additionally the large number of item objects existing slows some internal systems down decreasing the performance of certain game mechanics.

Same happens if you kill an item, it does not actually get removed and just the death animation plays. This is probably because it happens to all widgets (same behaviour is seen with destructables). Units are special in that they do get removed on death except heroes which also exibit this behaviour.

If you made a trigger that removes the tome item after it is used, it will eithor crash (which would be prety stupid for it to do) or it will not leak / leak a lot less. Only way to find out is trying it I guess.

Yes.. I have a trigger that removes all items in playable area every 30 minutes.. should it be changed to 10/15/20 minutes? OR?
 
Level 8
Joined
Mar 22, 2008
Messages
422
I believe you should change the trigger to.

Unit -A unit Acquires an item

Conditions

Actions
If then else
If item = to Tome of strength
then
irem- remove Tome of Strength
Add 2 strength to herop manipulating item

Also change all your tomes to actualy items not tomes.
 
Level 10
Joined
Apr 25, 2009
Messages
296
I believe you should change the trigger to.

Unit -A unit Acquires an item

Conditions

Actions
If then else
If item = to Tome of strength
then
irem- remove Tome of Strength
Add 2 strength to herop manipulating item

Also change all your tomes to actualy items not tomes.
I personally tested it and it does work, it still provides the wanted effect with all power-up items, including tomes, lumber bonus, runes, etc, while removing the leak. Also, it does not require the massing of if/then/else, just specify that an item is a power up and you're good to go.
 
Status
Not open for further replies.
Top