HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Identifying items

12-01-2003, 05:21 AM#1
Garu
I need a bit of a break from my current map, so I'm thinking of whipping up an item forging system. It's easy to store lots of values in arrays for units, thanks to their custom values, but it may be a tad trickier for items. The method I have in mind requires that I use dummy items, with their properties stored away in arrays. Anyways, since there's no custom value availible for items, I was thinking about using item life. Before I do though, when is this value used? If I reserve it for an item ID, will it cause problems, or does this value only come into play when accessed by triggers? Thanks in advance.

PS Has anyone else developed an item forging system where you can dynamically combine items to create new ones? I'm not talking about simple ones where every time you bring items A and B to a place, they disappear and item C appears. Rather, I'm talking about a system whereby you combine any two items and get a brand new unique item created on the fly by the map, that may or may not be the same as the last time you combined those items. If someone already developed this I'll stop now.
12-01-2003, 05:24 AM#2
Hunter0000
1. heath is how many swings it takes...

2. rendering items on the fly is impossible I belive...
12-01-2003, 05:38 AM#3
Hivemind
We have something close to what you are talking about in Hive's Nexus. When you pick up item A and have Item B in your inventory they disappear and you get item C. We used a system of nested loops and arrays to make the system very dynamic. I.e. Item A+B=C, item A+D=F, item B+G=H and so forth. Hundreds of items could be added to the system and combined in almost any way simply by changing the arrays and a couple values in the triggers.

To do what you are talking about would require the addition of a large number of items and a huge array from which combined items are randomly (or semi-randomly) chosen.

You may use item life as a custom variable without any problems. We use it ourselves for a number of things. The only way we can think of using it to change the abilities of the item would be to have completely trigger based abilities. It could be done but wouldn't be easy.

Word to the wise Hunter.....NOTHING is impossible. ;)
12-01-2003, 05:48 AM#4
Garu
1. Are you sure you're not confusing health with charges? I'm quite aware that for charged items every time you use them charge goes down. I don't, however, know when item health comes into play. What do you mean by "swings."

2. Not quite, so long as I have a means to ID the item. My method would have a slew of dummy items on the map that don't actually have any abilities. So long as I can ID each individual item, though, I can store each item's characteristics in arrays. When the item is equipped, it'll be a simple matter to apply those abilities and an equally simple matter to remove those items when unequipped. Then, it would be a somewhat complicated but quite feasible matter to combine these various factors when creating a "new" item. Sure, they're not actually new items, but they'll seem new. All I need is an effective way to ID each item.

Thanks, Hivemind. That's exactly the information I needed. If an item has a zero value for it's life, does it just disappear? I don't think it would ever come up, but it would be nice to know.

Compared to what I'm messing around with in my my current map, (damn you, you unoptimized triggers, damn you to hell! why must you lag up my beautiful map?!?!) this shouldn't be too hard. Assuming everything goes right that is, but what are the odds of that happening?Hopefully I can make it flexible enough to be imported into anyone's map
12-01-2003, 05:49 AM#5
Hivemind
Think we posted at the same time. Yes we are sure you can use item health as a custom variable. By swings he ment how much damage a unequiped item can take before it is destroyed.

Edit: Yes items at 0 life go poof. We also have a warning for you. The system we used was not as simple as it would first seem. Took a lot to get it working and we are a trigger expert. It also caused server split untill we modified it greatly.
12-01-2003, 05:53 AM#6
FF_Behemoth
a bit off topic, is it possible to retreive the item names???? and nice to see you back again Hive
12-01-2003, 06:07 AM#7
Hivemind
Ty FF. Just stopped by to anounce production on Hive's Revenge II.

Not sure if you can get names or not. It might be possable to get it the same way you do for units since items are simply units that are treated special by the WC3 engine. Thats why there is a Item player slot.
12-01-2003, 06:10 AM#8
Garu
You may be trigger experts, but I'm a rash, inexperienced newbie that is unwilling and unable to accept the common knowledge! My mind is like wet clay being used as a hammer on the nail that is world edit. Regardless, I think I have a pretty coherent vision of how to make this work. It will just have several "slots" for abilities stored for each item. When the player combines two items, it will randomly choose abilities from each item and create a new item. After I get that working, then I can throw in those litte details to make it worthwhile.

By unequipped you mean the item is just lying on the ground, right? Hum, I wasn't even aware that items could even take damage in those circumstances. (I guess I never thought to try, not useful very often in games) Is there a simple way to shield those items from all damage, or am I going to have to do a roundabout method? For my method, items clearly cannot take ANY damage, or the entire system will fail.


Edit: God, I have a nasty habit of forgetting what I meant to ask. Is there a list of variables that can be called up in tooltip displays? I know that for quite a few abilities, the tooltip references item values (duration, for example) so that the tooltip will automatically change when you change the duration. If I can call up strings in tooltips, that would go a long way to making this whole system look pretty. Rough edges are bad.
12-01-2003, 06:23 AM#9
Hivemind
You can make items invulnerable. Not sure about using strings in tool tips. Try finding the data you want and copying how Blizzard did it.