HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Range Dilemma

06-13-2004, 03:49 PM#1
R3N3G4D3
I need to be able to boost attack speed, damage, and range for each unit individually during the game, currently I already set up the first 2 through ability editor, my only problem is range. I can't seem to find any ability that even remotely influences the unit's range, and upgrade won't do because it effects all units of a given unit-type as opposed to a specific unit. I'm wondering what I can do about this, thanks.
06-13-2004, 04:23 PM#2
th15
My only suggestion is to try setting the unit's base acquisiton range to something LOWER than its attack's max range.

Each time you want to increase its attack range, increase its acquisition range (it available in an action under the unit catergory).

I'm not sure if this will work, what I do know that if you have a unit's max range set to 1200 and its acquisition range set to 700, it will only have a range of 700 in game. I don't know if this can be changed on the fly. Sorry, but it's all i have for you.
06-13-2004, 05:33 PM#3
Anitarf
I have done some research on this a while back and came to the conclusion that it cannot be done. The only solution that logic would suggest, tinkering with the acquisition range, didn't work either, because the acquisition range set in the object editor appeared to be something different than the acquisition range modified with triggers. The later is something like the creep enemy detection range thingy, while the first is something much more limiting that seems the same as attack range. Wierd...

Anyway, in my experience, it cannot be done. Unless you switch units...
06-13-2004, 08:10 PM#4
Dragon
How many units do you need to have individually upgraded? If its only a few, you could use different versions of Improved Bows, otherwise, I have no idea.
06-14-2004, 03:04 AM#5
R3N3G4D3
Well the problem of improved bows is that it would affect all units of a particular unit-type since there is no trigger command to just make the upgrade apply for 1 specific unit. I guess I'll have to drop range out of upgradable stats for the unit then. Thanks guys.
06-14-2004, 04:59 AM#6
R3N3G4D3
Ok, maybe I'll use my old way of doing this, having new unit for each upgrade, which will cause the game to have a total of 541 units. This is not a problem for map size, since I checked that each new unit-type only adds 66 bytes to the size of the map, meaning that this solution will increase the map size by 14,256 bytes (slightly less than 14 kb, maps are usually 500 to 1000 kb, so adding 14 kb wont hurt it much). My main concern in to not cause longer loading times or lag, in theory this shouldn't cause it, right? Because loading time is only affected by the units preplaced on the map, right? And lag is caused by units being used by the game, so if the unit is part of the map but isn't placed on the map at the time it shouldn't affect the game at all, right? Please respond with what you think.
06-14-2004, 05:21 AM#7
Bulletcatcher
I hear having large amounts of abilities with extreme amounts of levels do increase loading time quite a bit, but I'm not sure if this applies to large amounts of units as well.
06-14-2004, 11:45 AM#8
th15
It won't affect loading times, what it may do instead is cause a little run-time lag.

A unit's data is loaded when the first unit of the type is in the map. If it is a preplaced unit, the unit will load during the loading period.

Some people have experiences lag when creating many units of a new unit type in-game. This is because the game has to load that unit's stats on the fly.

So the conclusion is that, no, adding that many unit types will not increase load times. If only a few upgrade at a time, then it will not cause any noticeable lag.
06-14-2004, 06:07 PM#9
R3N3G4D3
Usually there will only be 1 upgrade at a time, so the loading lag shouldn't be a problem, thanks.
06-16-2004, 11:30 PM#10
Ragn0r
WE Unlimited has a function that you can use to add range to a unit.
06-17-2004, 02:51 AM#11
Panto
I'd recommend that, instead of doing a new unit for each upgrade, you just make one of each unit for each level of the range upgrade. Make the units entirely identical in other respects, but track how much damage or other upgrades are given to the unit either through an integer array or the custom value (which can be used for more than one using division and modulo). Then have a Chaos ability to switch each level of unit to the next level. Add the Chaos ability when it gets a range upgrade.

It's possible that Chaos will keep the other upgrades intact on the new unit, but if not, you just re-add them using the value of each upgrade that you stored to the custom value.

At any rate, this brings your number of units down to (# of unit types) x (# of range upgrades).
06-17-2004, 03:50 PM#12
R3N3G4D3
The range upgrade happens every level, so this wouldn't reduce the number of units as I already have a new unit for each level.
06-17-2004, 05:44 PM#13
Panto
The range upgrade happens with other upgrades? I'm not entirely sure what you mean. I thought it was an independent upgrade.
06-17-2004, 08:38 PM#14
R3N3G4D3
Basicly each unit can level up, when it levels up its damage, attack rate, and range are increased, I need to increase these stats for a particular unit, without affecting other units of the same unit-type. This is why I wanted range increase to only affect 1 specific unit. I decided to use a new unit for each level instead, which is what I mentioned above.