Aller au contenu

Photo

Loot question.


  • Veuillez vous connecter pour répondre
12 réponses à ce sujet

#1
Rio420

Rio420
  • Members
  • 63 messages
So, I'm supplying my npcs/creatures with items, avoiding checking the dropable check box, the items are still dropping and I guess I'm wondering if there is a mechanic here I'm not understanding?

 

#2
MagicalMaster

MagicalMaster
  • Members
  • 2 003 messages
The items you're supplying them with are dropping or random items are dropping from the NPCs, period?

#3
Rio420

Rio420
  • Members
  • 63 messages
It was both, I set the variable in OnModuleLoad however, so it's no longer dropping random loot. At this point I'm just trying to understand how the loot system works in this module, if I check the dropable option, will it drop every time all the time? If I don't check it, shouldn't it not drop it at all? Or does it give it a percentage chance to drop instead?

#4
MagicalMaster

MagicalMaster
  • Members
  • 2 003 messages
If you check the droppable option, yes, it should drop every time. And if you don't select droppable, it should never drop.

#5
Rio420

Rio420
  • Members
  • 63 messages
I wonder if a system exists or the scripts exists out there to handle how I want special boss loot to be handled..

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
ffbj

ffbj
  • Members
  • 593 messages
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.

#7
MagicalMaster

MagicalMaster
  • Members
  • 2 003 messages
Yeah, that's pretty simple to do.

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
Rio420

Rio420
  • Members
  • 63 messages

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
Rio420

Rio420
  • Members
  • 63 messages
Re: MagicalMaster,

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
MagicalMaster

MagicalMaster
  • Members
  • 2 003 messages
You could put something like the following in your OnDeath script...

    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
Rio420

Rio420
  • Members
  • 63 messages
Hmmm, I'll try that one out, I have something similar to that already but it didn't work the way it was supposed to. It's quite a learning curve going from CircleMUD coding back to Neverwinter Nights in some aspects. Interesting. Thanks for the nudge in the right direction. :)

#12
MagicalMaster

MagicalMaster
  • Members
  • 2 003 messages
Well, I went and tested that code before I posted it - when the creature dies, one of those two items is randomly on the remains.

So that specific code works, I promise :)

Modifié par MagicalMaster, 07 septembre 2013 - 02:37 .


#13
Rio420

Rio420
  • Members
  • 63 messages
Thanks, yeah it worked like a charm.. Strangely, in order to get the change to work I had to do a module build, it just wouldn't take for some reason. Thank you for your help, it was an overjoyous moment to see the boss dropping the defined items instead of just handing over the same old thing time after time after time. :)