Page 1 of 1

Weapon Types

Posted: Sun Jan 13, 2013 10:41 pm
by Kaaurk
Is is possible to make the RMI table give out more weapon types. It is pretty frustrating to always get pretty much the same four or five weapons.

Re: Weapon Types

Posted: Sun Jan 13, 2013 10:45 pm
by Algon
I could not agree more. I would love to see some more interesting weapons be given out. Magical bows and crossbows would be amazing too :D

Re: Weapon Types

Posted: Sun Jan 13, 2013 10:47 pm
by Theolund
I concur! I have rarely seen anything outside of battle/great(axes) and longswords and some daggers. I would love to see some single edged ones pop up!

Re: Weapon Types

Posted: Mon Jan 14, 2013 2:06 am
by Casamir
If the coding is set to random, how would you make it more random? It would be a set hard code algorithm, no? Its not the coding then that makes great axes and such common, but the something in the random algorithm. Which then comes down to how such works, whether additional uses of randomization in the sequence to pick your loot, or changing the numerical values used in the randomization will affect better results. If it picks random details from a table, you can either have it randomly pick what it cant be and then pick again (so if great axe is picked first it will rarely be a great axe), or you could have each entry on the table listed twice changing the odds. Theoretically it would make no difference, but as we can all see there is some sort of probability in the algorithm towards somethings over others Or could we just change the order of things on the table?

Re: Weapon Types

Posted: Mon Jan 14, 2013 2:34 am
by Ceir
If the rand() (or whatever function used) implementation provided by the compiler provides particularly bad distribution or if it is repeatedly seeded with the same starting seed, yeah, you'll see behavior like this.

You could try replacing your RNG with a Mersenne Twister, which has almost uniform distribution, and see what happens. If that doesn't help, it's almost assuredly due to improper seeding or some mistake in how the randomly generated numbers are used.

Re: Weapon Types

Posted: Mon Jan 14, 2013 4:55 am
by Tyeslan
I understand that it is "random" but why is it that we get so many axes, greataxes, wands, and the like compared to say a really awesome scimitar, or a nice looking bow, or even a great looking *insert something that isn't axe, or bastard sword*?

I've noticed this with armor too. You get lots of one thing, but never see any of another thing. There has to be a reason why it's getting spit out like it is.

I agree with seeing more random items, more weapons that aren't the same.

Re: Weapon Types

Posted: Mon Jan 14, 2013 7:31 am
by Ceir
Tylesan: there are multiple conceivable reasons, and it's impossible to say which without looking at the code. "Replace your rng with a mersenne twister and see if the odd behavior persists" is the lazy sort of general solution you try when you're not sure what's going wrong with a psuedo-random algorithm. And I do think this is a problem with the algorithm, not the intent of the code's author. You see magical sai, nunchaku, and other odd weapons on occasion. It's not as if greataxes are exclusive, they're just unexpectedly frequent.

I'd guess that the problem is a little more complex than a lousy rng distribution. It might be an improperly set up outcome array, it might be bad seeding (which is a surprisingly difficult problem, and one that almost certainly is NOT addressed), it might be that some scripts aren't set up properly for all we know.