Ariaka

o_o
Veteran
Joined
Mar 31, 2014
Messages
40
Reaction score
8
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
273
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

I've been working on plugins to make it easier to incorporate Persona 3's Once More batsys into MV games. One makes it so you can have states automatically applied to the target and/or user when their hit crits or targets a weakness... I could use testers for it, though. Maybe I'll make a thread in the JS Plugins In Development board about it?
Whenever I'm feeling down I like to watch Bardic Inspiration by Deerstalker Pictures
on youtube. Because 'my mockery is Vicious.' It's funny and catchy like the flu.
Knew this hurricane was coming for me, because it got my name on it! See you humans and non-humans in a few days if not a few weeks. Now go work on yo games!
ScreenShot_9_27_2022_6_54_39.png
New enemy finished today... Century Owl.
bandicam 2022-09-27 22-40-47-956.png

Forum statistics

Threads
125,604
Messages
1,172,242
Members
164,716
Latest member
Scorpion0
Top