Indie Dev

Hello Guest!. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, sell your games, upload content, as well as connect with other members through your own private inbox!

How can I build some code for java...

Ok so here is what I need to structure how to make the code for a plugin in java. I want to use a different system for combat as I want a 1v1 of a pokemon style.

So here are the elements I need help with. simply because I want to learn how to build a combat plugin. I want to use different stats than what rpg maker gives me.

Now here are the features.

-ui setup
-2 status windows for the monster and the champion(ie the team member that fights)
-3 sprites( I mostly need tips on location and animation blocs)1 enemy, 1 mc and 1 teammate unless mc is fighting.
-Transitions
-background encouragement from the trainer.(popping conversational text)
- adding commands and changing commands.
- and lastly adding events to my combat system.

This is what I want to learn the structure for. hopefully someone could share some advice with me... I would like to get the combat done.

I don't like java but I have this book on java with me..."Graphic java 1.2 mastering the jfc 3rd edition.

So I would like to learn it and having people who know how to script in java would help me pick it up faster.
 

Jason Brady

Villager
Xy$
0.00
Well, you are going to run into problems if you are using Java references for JavaScript. They sound the same, but are very, very different. Most of the challenge in creating plugins comes not so much from writing the script to make things happen as figuring out where/how to integrate it into RPG Maker's engine. I am still learning that aspect, so I won't be too helpful there, but if you give me some ideas of specifics, I can help you find a place to start on the unique mechanics. For example, if you want the trainer's encouragement to buff the champion in different ways based on the different phrases used, you would probably start by creating an object for the champion that can hold the buffs you want. So you could create the champion object like so

var champion = {};

and then if you wanted to use the phrase 'Go get em!' to increase their attack, you might do something like

champion.buffs = {attack: 0, defense:0, evasion 0};
champion.goGetEm = function() {champion.buffs.attack = champion.buffs.attack + 10};

So then you would simply use the in-game engine to create your dialogue as an event when the skill is used and them immediately follow it with a script that calls champion.goGetEm();

I don't know if that helps, but its far easier to use the built-in systems for RPG Maker and only use scripting for the things that you are entirely adding to the game rather than trying to build it all from scratch.
 
I'm trying to learn that in my programming.

Basically, all I need are 2 character variables, commander variable(trainer) and the champion variable (monster).
we can use that as a common logic that the trainer tells the monster what to do. while the commander cant switch out.
the champion can be swapped out.

when there is only the commander the bottom right textbox shows his health and energy and resolve.
When a monster is swapped in the commander image goes to the left and the monster's image goes to the center and the textbox swapped the commanders information for the monster.(what I'm thinking here is a perfect window overlay the main character can't ne attacked or affected in anyway as long as a monster is out of its sphere. so his window is behind and hidden by the champion's window.) when the monster is gone from the field the commander slides back to the center and his information is once again where it should be. he is then no longer invulnerable and there fore can be attacked.

The only difference between commander and champion is the command screen, command execution and who gets in the fight and who gets out. when the monster is active, the trainer barks a command of encouragement. when the trainer is active the starter bark encouragement. but you won't see the starter on the screen.

I hope that's enough detail...
 

Jason Brady

Villager
Xy$
0.00
Well, for the UI stuff, I am out of my league. I have only begun playing around with the UI and graphical stuff, but I can provide some suggestions for the behind-the-scenes stuff. The first thing I think of is that it will be far easier to have only one object with several other objects as properties, since you only need to have one set of stats available at a time anyway. For example:

var battleCommander = {};
battleCommander.Joe= {type: "Trainer", maxHealth:100, maxEnergy:100, MaxResolve:100, currHealth:100, currEnergy:100, currResolve:100};
battleCommander.RumbleTummy = {type: "Giant Pig", maxHealth:100, maxEnergy:100, MaxResolve:100, currHealth:100, currEnergy:100, currResolve:100};
battleCommander.active = {};
battleCommander.swap = function(name){
battleCommander.active = battleCommander[name];
};

At the start of the fight, you would call:

battleCommander.swap("Joe");

And then upon using the command to call your pet, you would simply use

battleCommander.swap("RumbleTummy");

To add new champions to your battleCommander object, you would simply add them by name in the interaction. So if your event had a choice in dialogue, like "Add HootNanny to your party?" with yes/no options. If they choose yes, you would simply run battleCommander.HootNanny = objHootNanny (assuming you defined them all with the necessary stats ahead of time).

Then when the current character was being attacked, the damage would always be handled as

battleCommander.active.currHealth -= damageDealt;

This example obviously offers no real integration into the RPG Maker software. You would probably have to dig into the game's JS files to find where the damage dealt functions are and such.

I am by no means telling you not to do this, but you do have to understand that a complete overhaul of the battle system is hundreds of hours of coding and research to make happen. I hope it works out for you!
 
we could use champion object for monsters. I don't want to swap out the commander, since the commander shouldn't be able to leave can we use something similar to a row? just curious....
 
Top