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.
 

Latest Threads

Latest Posts

Latest Profile Posts

some test stuff. Empty for now. My other project (this project) needs more attention. The lagging really kicks up when I try to capture gameplay. ✨
Real-Time Battles, Pixel Filter, Animate Cursor & Menus & Windows | RPG Maker News #114

When your side job becomes more interesting than your dayjob and you think "do I quit again or finally actually do the same thing for more than five consecutive years..." I don't think I'll ever be able to say that though, I just cannot stick with one thing like you're 'supposed to'.
Does the word "research" imply that you're searching for something that had been found before?
So Dad broke the blinds two days ago and he finally decided to try to fix them. I doubt he'll do very well without some help. And I can't help him myself--I don't know how the stink to fix those blinds. My knowledge is just plushies, mascots, computers, animation, and video game design. And also, I've had to stop family and friends from downloading viruses too many times to count.

Forum statistics

Threads
113,878
Messages
1,078,147
Members
147,967
Latest member
cyanfoxxx32
Top