Starting small, best way to define a species

Ariaka

o_o
Veteran
Joined
Mar 31, 2014
Messages
39
Reaction score
6
First Language
English
I decided to learn Javascript to make a plug-in for a breeding game. Jeremy Cannady did a wonderful job making a basic breeding plugin when I made a request, but it simply did not do what I was looking for. (http://forums.rpgmakerweb.com/index.php?/topic/51624-monster-breeding-system/#comment-510369) One of the problems is I want to define my own species with unique statistics (And without using actors).

Right now I've grasped the basics of arrays and objects. I figured the first step to making my plug-in should be defining the various races that could be encountered and raised in the game. Each species has eight different stages, including it's infant/egg stage, with different stat values.


I) Is there a better way, than the following, to group the species data:

Code:
var orc = {
	"egg":{
		"hatchSteps":50
	},
	"hatchling":{
		"str":5,
		"agi":2,
		"wil":5,
		"int":1,
		"wis":2,
		"moral":"Evil",
		"greed":50,
		"canBreed":false,
	},
	"juvenile": {
		"str":9,
		"agi":6,
		"wil":11,
		"int":3,
		"wis":8,
		"moral":"Evil",
		"greed":50,
		"canBreed":false,	
	},
};
 

Jeremy Cannady

Coldfire
Veteran
Joined
Oct 25, 2015
Messages
449
Reaction score
268
First Language
English
Using an object is a good way to define an individual species. The example you showed is probably what I would use. You would have to type out all the stats that way for each of the 8 levels. You could use an loop to do this if there was some math behind it.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,863
Messages
1,017,053
Members
137,571
Latest member
grr
Top