HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Item Classification System

02-22-2004, 05:31 AM#1
pappi.chullo
Ok, this is another request I am making, and this one is not an ability :gsmile:

This is basically making an item classification system. Example: <Class1> can only be carried in slot 1. if there is another <Class1> item in slot1, drop the item being attemped to pick up.

(Slots)
[1][2]
[3][4]
[5][6]

(Classes)
1-Helment
2-Amulet
3-Armor
4-Ring
5-Weapon
6-Shield


this is for a diablo game, and Im trying to make it as good as possible.


please help, thanks :D
02-22-2004, 08:33 AM#2
sgtteflon
there are many ways to do this. the easiest way is via assigning your item a custom point value, but really you can use whatever you want. for uber complicated, but allowing the most permutations, add all your items to an array. or use hit points, custom level, etc.

for a very detailed tutorial, look in the (ta da) tutorials section. i believe vexorian did a good one, and there are lots of others. but i will give you a rough idea.

event - unit aquires an item

condition - item level == 1

actions
if item in slot 1 level = 1
---drop item in "your hero" slot 1
---add aquired item type to "your hero" slot 1
---remove aquired item
else
---add aquired item type to "your hero" slot 1
---remove aquired item

this is psuedo code, of course, but that should show you what you have to do. its actually fairly simple. the difficulty comes in when you want to add more permutations. for instance, do you want item type, hero class, and hero level restrictions? then you have to run three loops checking all three possibilities. basically, its not hard to do, its just alot of trigger work.
02-22-2004, 08:24 PM#3
pappi.chullo
thanks =D

[edit] - I forgot to add, any variables?

ugh. I tried to test the map, but I ended up with 2 script errors :(
02-22-2004, 08:43 PM#4
weaaddar
Try DT4a its much better then any of these messy workarounds which force you to only have one item of the type. DT4a allows you to hold as many items of that type, but only equip one of them at a time.
You can find it in the repository of the link in my signature. (not the backpack one).
02-22-2004, 08:49 PM#5
LegolasArcher
Make a variable "i" in the variable editor, and reference it with udg_i in the trigger.
02-22-2004, 09:04 PM#6
pappi.chullo
now I come up with 1 error. its about the "set i = GetNumItemClass("purchasable", GetManipulatingUnit(), 6)"


that is a custom script correct?
02-22-2004, 09:10 PM#7
weaaddar
Eh DT4a implementation main difficult comes in the implementation of bonusMod. It is just a big copy and paste otherwise and then just calling one line of custom script for every hero you add.
02-22-2004, 09:54 PM#8
Vexorian
I made an Item Classification system, and you most likely can just change the values of some variables (in GUI) to configure it, find it in my signature. ( You can make items with multiple classes, and classes with different restrictions.)
02-22-2004, 10:29 PM#9
pappi.chullo
I may use that system, except I need more classes. I want 6, but you only have 4. (only 2 are good for my map:() I need all 6 classes to be like armor or artifact, so you can only have one of each. and I dont know how to modify the triggers that well -.-
02-22-2004, 10:30 PM#10
Vexorian
You can increase the number of classes too.
02-22-2004, 10:37 PM#11
pappi.chullo
hmm, I guess Ill try, it seems difficult though

to make a new class, i would have to make a new set of items with HP right?

like helms have 22 hp?


and does it matter what the hp of an item is?
02-22-2004, 10:40 PM#12
pappi.chullo
oh. i never thought of attacking it :o
02-22-2004, 10:40 PM#13
Vexorian
Quote:
Originally posted by Esoteric Potentate
If you mess with HP, make it low. Some people attack items to change their class.


I use HP but have a way to get the item's maximum HP, so there is no possible abuse there.
02-22-2004, 10:42 PM#14
Vexorian
Yeah, I invented that
02-22-2004, 10:54 PM#15
pappi.chullo
right now, im trying out Esoteric Potentate's system, and I keep getting errors :WD:


please try to figure out whats wrong :(