The Daily Click ::. Forums ::. Klik Coding Help ::. Random Weapons (eg Diablo)
 

Post Reply  Post Oekaki 
 

Posted By Message

Tim*



Registered
  26/01/2005
Points
  77
1st October, 2005 at 01:21:19 -

Could you help me make random weapons/armour/items, like in diablo, or almost any other (usually mmo) RPG.
I mean where you pick up a sword for example and it could be "+1 attack" or "+2 magic" and named differently, and this is all randomised with different name combinations and stat bonuses. That would be good because I'm thinking of making an RPG where the weapon possibilities are (almost) endless...

 
I have the ENTIRE C&C: Tiberian Dawn soundtrack. Extracted from the original game, in all it's succulent beauty. Oh baby, it's true. PM me for details on how to get it if you want.

Dave Matthew (Jester Gaming)



Registered
  09/07/2004
Points
  148
1st October, 2005 at 06:11:52 -

quote:
" 10/1/2005 lol, no one replied to that guy. Tim* "

you could just make the weapon an active object and use its alterable values? let alterable value a stand for "magic" for example. then just set alterable value A to random(5)?

 
n/a

Radix

hot for teacher

Registered
  01/10/2003
Points
  3139

Has Donated, Thank You!VIP MemberGOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!
1st October, 2005 at 08:41:00 -

Well, Diablo and others tend to use a system sorta like this:

[Fluff name][Prefix1][Prefix2][Weapontype][Suffix][Modifier]

Where the fluff name has no effect, the first prefix has to do with durability, the second an elemental effect, the weapontype is the class of weapon, the suffix a magic effect, and the modifer the + attribute.

You could simply have a system where each name segment has a corresponding value, for example a weapon with a durability of 3 might have the prefix1 of "fine" and anything with a value of zero simply being "". Apart from the weapon class, obviously.
So something with the attributes, respectively
[0][1][0][Axe][0][2]
Is rendered as:
""+"Dull "+""+"Axe "+""+"/+ 2"
or
"Dull Axe +2".

Or for example [12][5][3][Ninja Stars][7][4] would be
"Phil Collins' Sharp Ice Ninja Stars of Draining +4".


 
n/a

Windybeard Games



Registered
  14/04/2005
Points
  219

You've Been Circy'd!VIP MemberCandy Cane
1st October, 2005 at 08:43:47 -

"Phil Collins' Sharp Ice Ninja Stars of Draining +4"

That is some seriously funny shit, thats just made my day Radix, i thank you deeply!

 
n/a

EleXor



Registered
  21/01/2003
Points
  269
1st October, 2005 at 11:57:06 -

You could do this:
Item drop is called:
-set 'type' counter to random (2)
-set 'item' counter to random (1)


type counter:
0 - normal (no prefix / suffix)
1 - magical (prefix or suffix or prefix + suffix)

item counter:
0 - body armor
1 - shield
2 - weapon

-item is NORMAL
-item is BODY ARMOR
-> set BODY ARMOR counter to random (3)
BODY ARMOR counter = 0 = item is leather tunic
1 = studdedleather armor
2 = ringmail
3 = hauberk

Really simple (maybe horribly explained) but you should random things in this order:
1. type1 (armour / weapon)
2. type2 (normal / only prefix / only suffix / both prefix and suffix)
3. type3 (a special item from current type1 group)

This way it's easy to AVOID having such items like CRUEL hauberk of SLAYING
(so you have different prefixes & suffixes for all groups)

I can make an example for you if you're too stupid to figure out this yourself.



Image Edited by the Author.

 
n/a
   

Post Reply



 



Advertisement

Worth A Click