RPG Enemy Variables ?

Exportforce

  • *
  • Posts: 90
Hello,

I am sitting on a new game. One part is enemies and those need multiple variables like HP, STR, DEX, INT, Level and a few more.
I could create 10 quadzillion of lists and set the variables for one enemy each line, but that would be ugly as hell and updating would be a pain in the rear. What is a good approach to store infos like that ?

thx!

Mineat

  • Posts: 325
Create an actor behavior with a map attribute as a game attribute and the values  of the map keys as local attributes. The behavior should link to a scene behavior managing collisions and other actor values, but keep that behavior as being multi-part as less as possible.

 Another idea is to get or program a separate stat generator that can export it as a simple .txt file that can be encrypted or loaded in any way possible. Search engines are your best bet for this idea.

tomiello

  • Posts: 3
I think I would build a randomization program that would auto-roll-up your enemies as they are created. This program
would load its random values, such as, str, int, wis, dex, char, con., on to a list you have set up to recieve them. You can
always have a special list for special enemies.  This would be fun to program too.

Bombini

  • *
  • Posts: 1317
You can also come up with a formula which calculates the values out of a base number which might be even the level of the enemy (if level 3 set strength to level x 1.5 (or whatever). You can include random variables as well. I would sort the enemies into groups though (soldier, mage or whatever) and have a formula for each group.

Exportforce

  • *
  • Posts: 90
But for what I want to build I can't use random stuff. Everything has its own values :/
I will never understand why we don't have arrays, they'd make everything so much easier.

CmdrWhitey13

  • Posts: 503
For Programmers: Lists are mutable lists. They are equivalent ArrayLists, Vectors, NSMutableArray or whatever you like to call them.

As you'd expect, lists are best used to store collections of things. You can use lists for things like:

Inventory
Character stats
Status effects
Selecting random monsters to spawn

http://www.stencyl.com/help/view/lists/

Lists may be the best answer in this. As for updating the values, you can loop through the list .

Hope it helps.


Exportforce

  • *
  • Posts: 90
As you'd expect, lists are best used to store collections of things. You can use lists for things like:

http://www.stencyl.com/help/view/lists/

Lists may be the best answer in this. As for updating the values, you can loop through the list .

The problem is, that Lists are one dimensional and so I would need to create one list for each stat and each line in all lists have to be setup. So if I would have 15 stats I would need 15 lists... That to manage is more then a problem :/

What kind of rpg is it?

It will be a clicker RPG, but with more depth.