RPG - Droprates and Monster/Character Values

Exportforce

  • *
  • Posts: 90
Hello,

I am atm struggling with 2 big problems.

The first one is the creation of enemies and characters and their corresponding values.
For small stuff a few lists with matching ids are enough. But when you are starting a bigger project, this way is totally inacceptable.
So how could I create e.g. an enemy with multiple values, without having to create each single value of each single enemy as a single variable ?

More or less the same with droprates. How could I add a droprate value to an item in a usefull way, so I can realize droprates ranging from 100% to droprates like 1:1000000  ?

thanks in advance!

t4u

  • Posts: 418
First problem.

 I don't see why keeping some attributes in lsit is so bad. As far I udnerstand you handle enemies from scene behavior level. Try to using more actor behavior for storing attributes. With scene behavior aksing actors when it needs something.

"So how could I create e.g. an enemy with multiple values, without having to create each single value of each single enemy as a single variable ?" - you answered yourself, use lists


Problem two

Test will I get the item?
if  random integer 1 to 100000 (maixmum numbe r here corresponds to how many decimal numbers do you need in drop rate) < get_item_chance

get_item_chance = 1 ==> This item is legendary and really difficult to obtain
get_item_chance = 100000 ==> This item is trash and  easy to obtain


In future use pics for posts.
USE PICTURES WHEN YOU ASK SOMETHING!
If I helped you be sure to mention it in your game.

Tutorials + downloads:
http://t4upl.blogspot.com/