Loot question.
#1
Posté 06 septembre 2013 - 06:08
#2
Posté 06 septembre 2013 - 07:29
#3
Posté 06 septembre 2013 - 03:54
#4
Posté 06 septembre 2013 - 04:18
#5
Posté 06 septembre 2013 - 11:15
I could probably try and write something up for this but basically what I want it to do is to (onDeath) fire the script, look through a coded list of possible loot items then randomly determine what is going to drop from that list. Right now, it's more or less, if you place a sword on the boss as dropable, the sword is gonna drop.. period.. But what if there's a mage in the party helping? Or a cleric healing? I'd rather everyone get a fair shot at an item/upgrade.
#6
Posté 06 septembre 2013 - 11:36
What I do is give various % chance the boss will drop something from one or more of their equipment slots. In this way you will actually get something the boss had, not just some random loot from a table. This method can also be used on lesser creatures, where maybe you only check armor slot, left hand, right hand. Another thing I do for lesser creatures is:on spawn run through their equipment and have a % chance they drop something that is slotted. Mark it as droppable. Of course this assumes their stuff is not already so marked.
#7
Posté 06 septembre 2013 - 11:40
The "hard" part is actually writing the list (unless it's a very limited number of items).
If you give me the blueprints for some items and the percent chance for each of them I could show you an example.
#8
Posté 06 septembre 2013 - 11:47
ffbj wrote...
There are all sorts of ways to random loot drops from a boss. There are some on the vault.
What I do is give various % chance the boss will drop something from one or more of their equipment slots. In this way you will actually get something the boss had, not just some random loot from a table. This method can also be used on lesser creatures, where maybe you only check armor slot, left hand, right hand. Another thing I do for lesser creatures is:on spawn run through their equipment and have a % chance they drop something that is slotted. Mark it as droppable. Of course this assumes their stuff is not already so marked.
Wouldn't you have trouble getting people class related items from bosses if you did that though? If the boss is a level 40 fighter in full plate, wielding a massive sword and using melee damage based gear, how do you handle having drops happen for say a mage who may happen to be there killing the boss with the others?
I was thinking I'd put a name_boss script in the onDeath that does a random roll 1d5, get the integer result, use a case block, then put the appropriate function call to load the item that way. I had trouble with this a few nights ago though so I'm a bit leary attempting it, it wasn't the loot issue, it was trying to spawn a portal onDeath at a WP marker. But it just wouldn't spawn anything. I couldn't even get a debugging message I threw in there to work lol.
#9
Posté 06 septembre 2013 - 11:53
Only have 2 items made for him at the moment and they are:
The Principal's Ruler (Tag=ThePrincipalsRuler)(Blueprint=theprincruler)
The Principal's Belt (Tag=ThePrincipalsBelt)(Blueprint=theprincbelt)
20% drop rate since each boss will have a potential to drop any (1) item out of (5) possible.
#10
Posté 07 septembre 2013 - 01:31
string sTag = GetTag(OBJECT_SELF);
int nRandom;
if (sTag == "mynpctag")
{
nRandom = Random(5)+1;
if (nRandom < 3)
{
CreateItemOnObject("theprincruler");
}
else
{
CreateItemOnObject("theprincbelt");
}
}
Suitably modified, of course - that's a 40% chance for the ruler to drop and a 60% chance for the belt to drop and you'd need to insert the NPC's tag.
Modifié par MagicalMaster, 07 septembre 2013 - 01:32 .
#11
Posté 07 septembre 2013 - 01:37
#12
Posté 07 septembre 2013 - 02:37
So that specific code works, I promise
Modifié par MagicalMaster, 07 septembre 2013 - 02:37 .
#13
Posté 08 septembre 2013 - 06:22





Retour en haut






