Tray

Regular
Regular
Joined
Sep 7, 2018
Messages
50
Reaction score
10
First Language
English
Primarily Uses
RMMV
ok sooo ive been looking around to more or less no avail no one seems to of bothered making this or at least posting it for use at least i didnt find any. So im trying to replicate the tame/charm function from Final Fanatasy 11 where you use a skill "Tame" on a monster and have it fight along side the player for that battle.

I have got somewhat functional but it has to have a diffrent command for eahc and every tamable monster. I "tryed" lol being key word tryed to make it so any enemy defined in the parameters could be tamed and done the same and let the plugin handle the work fully instead of passing plugin commands to change the enemy and its image which just isnt a good way when theres around 30 tamable enemies lol.

My issue is i cant get this to pass the parameters to the plugin manager in Maker MV to allow adding and removing of enemy IDs that would then allow them to be tamed or not tamed depending on if there listed in this list or not

(function() { // Plugin Parameters var parameters = PluginManager.parameters('TamableMonstersPlugin'); var tamableMonsters = JSON.parse(parameters['Tamable Monsters']); // Game_Enemy Modifications Game_Enemy.prototype.isTameable = function() { var enemyId = this.enemyId(); return tamableMonsters[enemyId] !== undefined; }; // Game_Action Modifications Game_Action.prototype.applyTame = function(target) { var enemyId = target.enemyId(); var image = tamableMonsters[enemyId]; if (image) { var actor = new Game_Actor(target.enemyId()); actor.setBattlerImage(image); $gameParty.addActor(actor.actorId()); $gameTroop.removeEnemy(target.index()); } else { $gameMessage.add("This monster cannot be tamed."); } }; // Plugin Command Modifications var _Game_Interpreter_pluginCommand = Game_Interpreter.prototype.pluginCommand; Game_Interpreter.prototype.pluginCommand = function(command, args) { _Game_Interpreter_pluginCommand.call(this, command, args); if (command === 'Tame') { var enemyId = parseInt(args[0]); var image = args[1]; var target = $gameTroop.members()[enemyId - 1]; if (target) { this.subject().addAction(new Game_Action(this.subject(), true)); this.subject().currentAction().setTame(enemyId, image); } } }; // Tame Monster Function function tameMonster(enemyId, battlerImage) { var monster = $dataEnemies[enemyId]; // Check if the monster is tamable if (monster.isTameable) { // Create a new Game_Actor instance for the tamed monster var tamedMonster = new Game_Actor(monster.actorId); // Set the static battler image var image = 'img/sv_actors/' + battlerImage + '.png'; tamedMonster.setBattlerImage(image, true); // Flip the image horizontally // Add the tamed monster to the temporary party in row 1 $gameTemp.pushTempActor(tamedMonster.actorId(), 0); // 0 represents row 1 // Refresh the party to update the member list and formations $gameParty.refresh(); } else { $gameMessage.add('This is not a Tamable Monster'); } } })();

is what i got the above code did work till i started trying to pass it through the parameters in the Plugin Manager with in Maker MV. before i had it as Plugin Command: <enemyID> <image>

but as stated this wasnt a good way to handle a large amount of tamable monsters atleast not to me now its set up to just use

tameMonster($gameTroop.members()[targetIndex()]) as a plugin command to pass the argument to the function of the plugin which then if i can figure out what i did wrong xD if someone be kind enough should then go by the parameters of the plugin

i dont care if other use it if/when its functioning correctly just give creddit

the above code before i broke it with the parameters lol. does remove the monster the tame skill is used on and then flips the image of the tamed monster so its showing in the proper direction and then adds the monster as a temp member to the party and then sets it to row 1 (im using yanfly party manager and row formation) it then runs its normal skill list. The above also handles the fact tis a still image being added and not a spritesheet so no other plugin would of been needed aswell
 
Last edited:

SpyroFan67

Regular
Regular
Joined
Apr 27, 2023
Messages
969
Reaction score
592
First Language
English
Primarily Uses
RMMV
I don't know how to help you because I don't know anything about coding but there are a lot of people on here who do and I'm sure they will help you. :smile:

Seriously, though, when it comes to coding in RPG Maker MV I am BIG DUMB! :hswt:
 

Tray

Regular
Regular
Joined
Sep 7, 2018
Messages
50
Reaction score
10
First Language
English
Primarily Uses
RMMV
I don't know how to help you because I don't know anything about coding but there are a lot of people on here who do and I'm sure they will help you. :smile:

Seriously, though, when it comes to coding in RPG Maker MV I am BIG DUMB! :hswt:
haha yeah im still learning myself

i know a few ways to do this just was hopeing to get this working as to cut the terminduse amount of work needed to do it another way by simply eventing the full procsses via commen events and events through battle procsses XD
 

ATT_Turan

Forewarner of the Black Wind
Regular
Joined
Jul 2, 2014
Messages
11,198
Reaction score
9,156
First Language
English
Primarily Uses
RMMV
I don't know how to help you...
So, like, you do you, but what's the point in writing a reply just to say you can't help? :stickytongue:

I have got somewhat functional but it has to have a diffrent command for eahc and every tamable monster.
Why? I'm trying to think through how this would work and I don't understand this assumption.

I would use Yanfly's Skill Core notetags to run code on the target of the skill that removes the enemy from the troop, adds the corresponding actor to the party, and puts a state on them.

Then you just check at the end of battle for anyone that has your Tamed-Enemy state and removes them from the party again.

It might be even easier if you combine it with SRD's Summon Core to automatically handle the party size and leaving the party at the end.

All that aside...
function tameMonster(enemyId, battlerImage) {

tameMonster($gameTroop.members()[targetIndex()]) as a plugin command to pass the argument to the function of the plugin which then if i can figure out what i did wrong xD
Well, you defined tameMonster() to take two arguments, and you're using both of them in the code, but you're only calling it with one. I would expect the game to crash when you try to set the battler image.
 

Tray

Regular
Regular
Joined
Sep 7, 2018
Messages
50
Reaction score
10
First Language
English
Primarily Uses
RMMV
@ATT_Turan

you are correct lol it did crash after doing that.

again thank you i didnt think about trying to use yanflys skill core functions to handle the add/removal of the monster. I did think of just making them an actor in general that is called on. Also thanks for the mention of SRD summon core i forgot he even had that. That also works with just making them an actor in general and add an image to the actor using note tags with his add on plugin to the summon core

ill play around with this and see if i can just get it close to what i was trying for. Again Thanks Turan

also to answear your semi question on why eachhaving there own call. Before i started trying to add the whole procsses to the plugin where each tamable monster would be defined by the parameters section in the plugin. what was tamable was defined via a plugin call using <enemyID> then having a function in the notes section to find the image attached to that ID in the SV_Enemy folder then flip it.

but doing it that way i had to have diffrent skills each with the diffrent enemyID. This did mostly work but i didnt want to have 30 skills just for this lol then when i tryed to make the plugin more complicated to handle everything in it thats when i started getting tons of issues and crashing and came here xD
 

AquaEcho

Script Kitty
Regular
Joined
Sep 20, 2021
Messages
1,708
Reaction score
1,172
First Language
English
Primarily Uses
RMMV
So, like, you do you, but what's the point in writing a reply just to say you can't help? :stickytongue:
It serves the purpose of bumping the thread so the OP doesn't have to and maybe bring more attention to it... Sometimes I'll give an incomplete answer that doesn't fully solve the problem just to give the OP some lead to go on if no one else has answered. I saw this thread earlier but found the description too confusing to know what advice to give.
 

ATT_Turan

Forewarner of the Black Wind
Regular
Joined
Jul 2, 2014
Messages
11,198
Reaction score
9,156
First Language
English
Primarily Uses
RMMV
It serves the purpose of bumping the thread so the OP doesn't have to and maybe bring more attention to it...
If you say so? I don't know that everyone does what I do, but I look at the listing of New Posts when I come to the site. That makes me I see everything I haven't already read, and it's typically only, like, two pages or so over a day. So I don't really see the point of "bumping" within that bucket of stuff.

(also, the reply was only two hours after the initial post, so I think there's even less accomplished by bumping at that time :stickytongue:)

I wasn't calling Spyro out as being disruptive or anything, I just found it kind of odd to reply to a question with "I don't know." :guffaw:
 

Tray

Regular
Regular
Joined
Sep 7, 2018
Messages
50
Reaction score
10
First Language
English
Primarily Uses
RMMV
lol

well i did get it working with the suggestion Turan made. By just removing the monster from the enemy side with the skill then placing the state tame on a summoned actor which displays the image of the monster tamed using SRD plugins

atm now im just trying to get the release command to work as intended - SRD summon doesnt have a way to manualy remove the summon. So i thought of using the Knockout command in the skill since it auto removes the summon if they die. This basicly simulates releasing it since its instant lol. But problem is trying to get it to only target the summon so no one clicks on a party member by mistake

But again thanks Turan with the combinition of yanfly and SRD plugins and some small javascript commands its doing what exactly i was looking for. Also with this was able to make 3 other classes work as i wnated. SUmmoner, Dragoon, Puppetmaster
 
Last edited:

Latest Threads

Latest Posts

Latest Profile Posts


Those scarecrows are lonely, they want more friends. They just want to murder you and turn you into one of them. :kaojoy:
Whelp. That was a long day yesterday. How much coffee do I need? The answer is, “Yes.”
Everyone's probably skeptical about my battlers here's a quick look with them in action :D
Chasing a mosquito up to near bed time when one needs to get up earlier the next day is stressful. This would be a great theme for a game that caters to masochistic players.
Made a tutorial on how to make a portal gun, since people liked it!
Edit: Link Portal Gun Tutorial

Forum statistics

Threads
134,965
Messages
1,252,394
Members
177,830
Latest member
inwydix
Top