HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

A small tip I thought I'd share with mapmakers about inventory.

01-23-2010, 05:55 PM#1
Matarael
I have an AOS map that I'm constantly updating, and for the past few versions I've included "tent" units at the base for the players to store items when they're off hunting or fighting. A problem occurred when I attempt to place items which uses the "Engineering Upgrade" ability on these tents. Whenever I drop them on the unit's inventory, the game crashes.

It turns out:

It will crash if you give the unit (which aren't Hero units) the HERO INVENTORY ability. It will be ok if you give it the PACK MULE ability (which is basically the same ability, only that the if the unit dies the items fall on the ground... You can adjust the number of item slots in the Object Editor).

Now, I don't know if this is common knowledge, but as far as I remember, I tried asking these forums for an answer as to why this happens and the common answer had been "yes it crashes if you give such items to non-hero units". Which is not correct.

So if you plan on having "helper" units to carry your Engineering Upgrade items, make sure you use the right ability or it will crash.
I hope this helps.
01-23-2010, 06:26 PM#2
Anitarf
Engineering upgrade abilities will always crash the game when they are added to non-hero units. The trick here is that if a unit has a non-hero inventory, the items that the unit picks up will not apply their abilities on the unit, therefore the unit will not receive the engineering upgrade ability from the item and so the game won't crash.
01-23-2010, 08:30 PM#3
67chrome
Quote:
Originally Posted by Anitarf
Engineering upgrade abilities will always crash the game when they are added to non-hero units.

It doesn't always cause the game to crash, sometimes it just causes the unit that picked it up to die, though the % of times it causes it to crash is enough to avoid doing it. Same thing happens with tomes that effect agility, strength, and intellect. (tomes that increase health still works fine on non-hero units though ;)
01-24-2010, 08:52 AM#4
Matarael
Thanks for confirming the exact mechanics of what's causing the crash. I suppose my post/tip is just the practical application of what you guys are saying. It's easily missed and can cause a shit ton of frustration (as it did me, knowing that "normal" units cant have the skill but never actually realize that this error can be "circumcised" by using the Pack Mule ability instead).
01-24-2010, 01:21 PM#5
Panto
So does this mean if a normal unit has the Hero Inventory with only items in it that don't cause crashes, like maybe damage bonus, they will apply to the unit's stats?
01-24-2010, 04:03 PM#6
Archmage Owenalacaster
Of course. It's pretty neat, and I often try to implement item-using units in my projects. It can make upgrading units unit-specific, with equipment and non-stackable aura-based bonuses.