HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Dynamic Item Creation.... Is it possible?

04-05-2005, 02:12 AM#1
gxslim
What I mean is would it be possible to create an object at run time, rather than at compile time? For example, I want to create items at random based on prefixes and suffixes a la Diablo / WoW. Would this be possible with the WE, or would I have to manually create all the items before hand?
04-05-2005, 02:17 AM#2
Zandose
No. Item's are preset and cant be changed after the game starts.
04-09-2005, 11:32 PM#3
gxslim
Quote:
Originally Posted by Zandose
No. Item's are preset and cant be changed after the game starts.

in that case, as we say in computer science, since we can't do it, how well can we fake it?

I could of course create the entire item list beforehand and have them drop at random. However I imagine this would make the map quite large and perhaps slow loading.

Perhaps it could be done through stat gains and item name changes? For example, pick a random suffix, take a default item, change the name of the item, and increase the stats of the hero, and when that item is removed, reduce them by the same ammount. Hrmm perhaps this idea could be explored. Any thoughts?
04-13-2005, 11:51 AM#4
qwertyui
Technically its possible. Problems are as follows:

You won't be able to create an item which uses an ability when clicked on, unless the base item does this already, because you are adding abilities not to the item, but to the hero.

I am not sure, but there may be a hard limitation on how many abilities a unit may have, which can interfere with the amount of abilities, granted by items.

You will have to keep a database of what type of item adds what ability and update that database as necessary.

---

How do you change the name of item? If you can change the name of item, can you change the tooltip as well?

---

There is a thing called "Return Bug", which apparently allows to typecast Units and Items into Integers. I wonder, can it be used to write an Item2Unit and Unit2Item - kind triggers, which allow to do this:

set itemWithNewAbility = call Unit2Item(UnitAddAbility( call Item2Unit( itemToAddAbility2), Ability ))