[RMMV] CALLING ENEMY PARAMETERS TO SET TO VARIABLE

Posts

Pages: 1
I am not using battle processing at all. I am not using the battle system or any other battle system. I understand that it's (stupidly) designed to only use the enemy data through the troops stuff. However, I do need to access those parameters from the Enemies Database and I am not entering into battle processing to magically allow those variable to pop up..


I've tried my hand at scripting something, but it doesn't want to work...
Something like this: $gameVariables.setValue(62, $dataEnemies.params);

I need a solution to this.
And while you are at it, I also need to call equipment parameters...

And to call the item menu.

Apparently they made this all too difficult in MV.
Marrend
Guardian of the Description Thread
21781
$dataEnemies, itself, is an array. So, you'd also need to pass the ID/position of the enemy you want to capture data for. So, as a quick example...

$gameVariables.setValue(62, $dataEnemies[1].params[0]);

...this will get the MHP for whatever enemy is in ID/position 1 in your database, and throw that value into $gameVariables[62]. Fetching equipment stat bonuses would probably be fairly similar in this regard.

$gameVariables.setValue(62, $dataWeapons[3].params[3]);  // <- grabs the ATK of the weapon in position 3 of the database, throws it into $gameVariables[62]
$gameVariables.setValue(63, $dataArmors[7].params[4]); // <- grabs the DEF of the armor in position 7 of the database, throws it into $gameVariables[63]

As for calling the item menu, I think that would be...

SceneManager.push(Scene_Item);

...something like that?

*Edit: For full disclosure, I'm using MZ resources/references. While I doubt there's too much difference between MZ and MV in regards to this issue, I thought it prudent to note.
author=Marrend
$dataEnemies, itself, is an array. So, you'd also need to pass the ID/position of the enemy you want to capture data for. So, as a quick example...

$gameVariables.setValue(62, $dataEnemies[1].params[0]);


...this will get the MHP for whatever enemy is in ID/position 1 in your database, and throw that value into $gameVariables[62]. Fetching equipment stat bonuses would probably be fairly similar in this regard.

$gameVariables.setValue(62, $dataWeapons[3].params[3]);  // <- grabs the ATK of the weapon in position 3 of the database, throws it into $gameVariables[62]
$gameVariables.setValue(63, $dataArmors[7].params[4]); // <- grabs the DEF of the armor in position 7 of the database, throws it into $gameVariables[63]


As for calling the item menu, I think that would be...

SceneManager.push(Scene_Item);


...something like that?

*Edit: For full disclosure, I'm using MZ resources/references. While I doubt there's too much difference between MZ and MV in regards to this issue, I thought it prudent to note.


Thank you so much. I was having such a hassle trying to get the syntax right. I've been able to implement what I was struggling with last night... and as a result, I've got the main calculations for my battle system done.
author=Marrend
$dataEnemies, itself, is an array. So, you'd also need to pass the ID/position of the enemy you want to capture data for. So, as a quick example...

$gameVariables.setValue(62, $dataEnemies[1].params[0]);


...this will get the MHP for whatever enemy is in ID/position 1 in your database, and throw that value into $gameVariables[62]. Fetching equipment stat bonuses would probably be fairly similar in this regard.

$gameVariables.setValue(62, $dataWeapons[3].params[3]);  // <- grabs the ATK of the weapon in position 3 of the database, throws it into $gameVariables[62]
$gameVariables.setValue(63, $dataArmors[7].params[4]); // <- grabs the DEF of the armor in position 7 of the database, throws it into $gameVariables[63]


As for calling the item menu, I think that would be...

SceneManager.push(Scene_Item);


...something like that?

*Edit: For full disclosure, I'm using MZ resources/references. While I doubt there's too much difference between MZ and MV in regards to this issue, I thought it prudent to note.


Now, thanks to you, this is where things are at... a fully, err... mostly functional battle system. All that's left is a way to handle player skills



Marrend
Guardian of the Description Thread
21781
Pages: 1