|
Post by mercenaryx on Jul 21, 2008 12:41:26 GMT -5
ok so now im getting to the part where i actually have to put in some work into my coding. i have avoided it for long enough, this game obviously needs battles in it so as soon as the player solves the first dungeon they receive a weapon, after that i need to test my ideas for a battle engine by forcing a boss battle for the player to get a chance at trying their hand at using it as soon as they get the sword.
so, my question to you guys, i have an idea as to how i want my battle engine to work, but the question is, how do i go about scripting it?
i'm not going to ask for specifics because explaining the mathmatics behind what i plan to do are way too lengthy for me to go through.
but for instance, when any battle starts the first thing (after the battle screen transition is over) that happens is that (instead of asking for each party members attack/move then going into a battle mode) it checks who goes first by seeing who has the highest AGI. (agility) if 2 people have the same agility, then its decided by luck (which i've affectionately renamed dextarity or DEX)
the player or enemy with the highest agi selects their attack/move, then they execute it, then the battle engine moves to the next person down with the 2nd highest agi.
this is just a small example, but how would i go about doing this? can someone give me an example or something to go on?
also i'd like to know how i'd get the battle to start?
sorry if im so clueless, i have dealt with nothing but events that happen outside of battle until now.
|
|
|
Post by Dungeon Warden on Jul 21, 2008 21:45:10 GMT -5
Are you sure you're ready to make your own battle script? I mean this is really something you need to work on after you understand the scripting system well enough that you don't need to ask anyone how to do it. I don't mind helping with specific problems, but your questions are too general to really answer. My advice is to study the preset battle scripts and figure out how they work. Your basic system isn't too different from the existing battle scripts so you should start by modifying them to fit into your concept. That said, I recently said much the same thing to a newcomer to the Pavilion (another RPG Maker website) when he asked how he could go about making a tactical battle system. He really surprised me (and everyone else) by actually succeeding. Check out his video here. I look forward to seeing what you can do.
|
|
|
Post by dailycolbert on Jul 22, 2008 12:17:38 GMT -5
The default system is whoever has the highest AGI goes first, and if there's a tie it goes to the first party member on the list. This way's nice because people can strategically put certain characters in the front of the party. I forget, but if an enemy and party member are tied, I think it goes to the enemy.
My point is that the default system is just a tiny bit different than what you said, and with RPGM2 you really have to ask yourself "Is it worth it?" before doing something.
Also, a modified Default Battle System can kick butt too, yet is much easier to do.
edit: Oh, and it's also good to ask "How will this improve the game?" before doing something too. Hence why I think it's not worth it to do your turn order formula. I'd say, come up with one cool addition to the battle system and just add that one thing. Perhaps moves like in Legend of Dragoon, Mario RPG, and Shadow Hearts or double-team moves like in Chrono Trigger and the Suikodens. It could also be something easier/simpler like Limit Breaks, a Row System, or MP regeneration.
gl
|
|
|
Post by mercenaryx on Jul 22, 2008 15:24:27 GMT -5
i did ask something specific, i asked about turn order.
and i already asked myself that question, and its been my experience's that the most entertaining and best selling menu based rpg's have a very fast turn flow, in which usually as soon as the attack is chosen, its executed, then it prompts the next fastest player in line.
think about it.... most of the WORST rpg's tend to have a very SLOW flow of game play when in battle. Hell, inuyasha had fricken 6 party members you had to choose your attacks from, THEN they'd all attack, (making huge hesitations before actually using their attacks) then the attack usually takes between 3-15 seconds, (pulling out all the drama) and then thats not even including the cutscene attacks or the amount of time the enemies take to attack.
in that game there could be up to fricken like 6 additional people/monsters on the enemy side, so before its all said and done, you have 6 people to choose attacks for, then huge hesitations are thrown in, then you got to wait for all SIX of your characters to take their turns AND for all 6 ENEMIES to take their turns before you even get to interact with your game again.
final fantasy kept it nice and quick, even though usually all the attacks (in most of their older games) were chosen first before the results of the selections were shown for all 4 members of your team, they kept the flow of battle pretty swift. the attacks were usually executed from start to finish within 1/2 to 1 second of the battle phase's start. they became very popular! (Especially final fantasy 10, which used their attacks as soon as you chose them, but it was still turn based. that game's battle engine should be a role model for all rpg makers everywhere)
so now you know, this is the reason why i chose to do it this way: so the player doesnt get bored out of his/her mind after the first 10 battles realising that they're in the battle mode more than their actually moving their character around.
i looked at the preset games scripts for the battle engine, (even though im not sure if i saw them ALL since they're not labled, can you BELIEVE they had like 10 scripts in there that were simply blank!?) but i still couldn't make heads from tails.
so i'll ask again, please help me! thanks! ^^
|
|
|
Post by dailycolbert on Jul 23, 2008 3:28:31 GMT -5
I think what Dungeon Warden means by asking something specific is, for example, posting a script you made and asking what's wrong with it (thus showing you've made some progress yourself). As far as the turn order, that's one area of the Default Battle System I had trouble with and didn't mess with. Also, are you thinking of doing a Modified Default Battle System or a Custom Battle System?
|
|
|
Post by Dungeon Warden on Jul 23, 2008 13:43:18 GMT -5
If you just want to change the battle system so that you attack as soon as you select a command, that's a whole different thing.
What I did was put the battle commands in the Trait script for each character. Then a battle menu would open up on their turn instead of at the beginning of the round.
Look at the trait flag and Action variables in my FAQ for more details of how to do something like this.
|
|
|
Post by mercenaryx on Jul 24, 2008 15:10:44 GMT -5
well, i did manage to completely recreate a script for a custom turn engine, but its still in beta testing.
all it basically does is decide ahead of time what order each person in the battle takes their turn. (or thats what its supposed to do) the one i currently have successfully tested works like a charm.
the input is each of the 1-4 party members AGI value, and depending on how high the agi is, the output is put into 1-4 separate variables, each one having a number between 0-3 representing the maximum of 4 members your party is allowed to have.
the variable names are:
[fastestMember#] [2ndFastest] [3rdFastest] [4thFastest]
when the AGI of all the party members is fed into this script, (the script attains them on its own, it only needs to be called) the 4 variables above show what member goes in what turn order.
for instance:
member 1's agility - 10 member 2's agility - 7 member 3's agility - 11 [member 4 does not exist]
the output would be as follows:
[FastestMember#]=2 [2ndFastest]=0 [3rdFastest]=1
as an added note, i also resolved the issue about in the case that 2 agi's are equal. i wanted to make it depend on DEX next (luck) but then if THEY were equal, ugh... don't even want to THINK about how much more scripting i'd have to go through. So i kept it simple, and just made it so that if 2 agi's are equal, the member with the lowest number value (numbered from 0-3 from left to right on the battle screen) goes before the other one.
in any case, yes my script works perfectly (though it took me a long time) but its finished and perfected, but now i dont even know where to put it XD.
All the script does is give me a way to know which of the four members in the party can go next, but it doesnt execute anything on the players screen thats visable, or any animations, or encounters or attacks or menu pop ups or anything of the sort, hell i also still got to worry about how i'm going to get the script to read in all the enemies' speed values.
(i.e. yes im asking a question: what would i do to get the values of an enemies' attributes?)
i've been in hard mode ever since i started editing this game... so i dont even have much default stuff to work with.
so if any of you could help me, where would i: 1.) put the script for my agi checker 2.) how would i also make it check enemy agi 3.) is there a place/drop down menu where i can just select a script for the game to use as its default battle system? because if i can make it that simple all i'd have to do is create a bunch of scripts to do separate calculations, and get their results all into one main script where it would call all the other ones. (the main script actually being the battle system itself)
as you can see, after getting this far with my battle engine has proven that i at least know what im doing somewhat, and i think if i could get some answers i think i could get the hang of this just like i did with all the events outside of battle.
|
|
raithwall
RPGM2 Helper
The World I know
Posts: 222
|
Post by raithwall on Jul 24, 2008 21:05:15 GMT -5
(Edit)
Attention everyone, I have changed sides in this thread! I have found a way for the underdog to put all us scoffers in our places, myself included.
A battle system where only 1 member and enemy are active at any one time, and the member gets to attack right after choosing his command! Check my last post:
1) The battle system already decides the turn order based on agility and theres no good place to call "the agility checker" anyway. Even if you call it after every turn you cant just decide who goes first and next. You can only switch the current target and the last target back and forth. I know that hard mode has you doing pretty much everything from scratch, but you have done something thats actually already done for you here.
2) Enemy stats are loaded when the enemy is either the attacker or defender (you can switch) you make him the instigator, use battle: substitute attribute for variable to load them and substitute variable for attribute to change them.
3) As far as battle scripts go you have battle enter and battle exit. Battle enter is for changing the battle music, saving the world music, anything out of the ordinary like teleporting when a certain unit number comes up. Battle exit scripts are for changing the screen colors and turning off flags and variables that need to be reset after battle. You can probably get away with just using 1 enter and 1 exit, although theres like 5 of each of these. And the place you put these scripts is in Game Settings.
|
|
|
Post by Dungeon Warden on Jul 25, 2008 23:24:48 GMT -5
mercenaryx, I really don't understand what you are trying to prove. If you want to make your own battle system then just do it. Why are you asking other people how to do it? No one knows how because it's your battle system.
You can use the default battle system as a frame for your own game. All the scripts dealing with characters is in the character data base. Everything dealing with enemies is in the enemy database, and the rest of the scripts are in game settings (all under the ADV tabs).
Making your own battle system is a long difficult process, so unless you really understand what you are doing (and your questions suggest you don't) then don't even bother. Just make your game as interesting and fun to play as possible and don't worry about the battle system.
|
|
|
Post by dailycolbert on Jul 26, 2008 12:33:49 GMT -5
I'm not sure about the other ones, but:
"3.) is there a place/drop down menu where i can just select a script for the game to use as its default battle system? because if i can make it that simple all i'd have to do is create a bunch of scripts to do separate calculations, and get their results all into one main script where it would call all the other ones. (the main script actually being the battle system itself)"
Sorry, but no. Like raithwall said, you'd have to script it all yourself, which if you're also looking to make your game customizable or have lots of items/abilities, would be a nightmare.
You could also just make shorter vfx and messages to speed up the battle system. Plus, when the player feels ready, they can speed up the messages too. And you could have fewer than four party members or opt out for always having individual enemy groups (which limits the max number of enemies to four and is no big deal because the size of enemies will usually limit you to four enemies anyways).
|
|
raithwall
RPGM2 Helper
The World I know
Posts: 222
|
Post by raithwall on Jul 27, 2008 3:44:39 GMT -5
mercenaryx, I really don't understand what you are trying to prove. If you want to make your own battle system then just do it. Why are you asking other people how to do it? No one knows how because it's your battle system. I think he might be getting like me, and starting to enjoy the challenge of accomplishing something unique and unorthodox with the rpgm2 scripting system. A word of warning if you go that route: this hobby will last a very long time and you will wind up designing a game that is years in the making. But hey you're one designer doing the job of hundreds, like the long list of credits after a movie, but with one name. Nevertheless, I support your enthusiasm. Diving into the complexity to carve a unique touch is nothing to be embarassed about, its quite admirable. Just keep in mind it does no good to have complexity just for the sake of being complex.
|
|
raithwall
RPGM2 Helper
The World I know
Posts: 222
|
Post by raithwall on Jul 27, 2008 4:17:38 GMT -5
I'm not sure about the other ones, but: "You could also just make shorter vfx and messages to speed up the battle system. The size of enemies will usually limit you to four enemies anyways). Ironically, sometimes the older rpgs are more advanced. In Paladins Quest and Phantasy Star 3 you could have small flying enemies at the top of the screen and small ground enemies at the bottom. The way we fit enemies into the screen is pretty limited by comparison. I would've just let the player design his units by moving around the enemies wherever he wants them on the screen. A few things I did to touch up the old battle system: 1) Cast magic: I just have the ability name appear for 12 frames. No xx begins casting, performing, creating, using, etc. I had a lot of different abilities and it was becoming a linguistic nightmare. I like this system a lot better too. I still have xx begins to attack though. 2) enemy appear: When the enemy first appears I generate random names by combining a list of random prefix and suffix. Like Poly and Phon... Polyphon the griffin appears, but hes just griffin from that point on. Depending on the type of enemy I use male names, female names, and monster names. I also use these random names for random villagers. 3) Level up: I edited this to appear on a single paragraph. Character gains a level! Agility +3 Life +3 Strength +3 Defense +3 Mana +3 Intellect +3 Spirit +3 4) Unique ability: 2 of them actually, one that is skill and one that is magic so that enemies that only use their attack A or Attack B have something that utilizes their other attack animation. This ability has a different name for every monster by using their battle input and is merely a physical attack with a chance to cause random status. 5) Combine Magics: Now here is a challenge. My way lets the mage or wizard combine two of his basic spells. Combine with wind for more targets, with its own element for extra damage, the others offer other augments. Another idea was first seen in Phantasy Star 4 where if two people are casting certain spells that round sometimes both of their turns will be spent doing a combined spell instead. This could probably be done by checking for the spells in turn start or turn end, then applying the treatment when the first of them is going to come up, changing the spell except for the target range (unless you started with multi) then causing the second characters turn to fail to create the illusion of double action. Other then that you can change the battle sounds for damage, critical, dodge, etc. One annoying thing to keep in mind is that you can never work backwords. Script is always the last place you go.
|
|
raithwall
RPGM2 Helper
The World I know
Posts: 222
|
Post by raithwall on Jul 28, 2008 3:43:34 GMT -5
IVE GOT IT!
A WAY TO DESIGN A BATTLE SYSTEM WHERE YOU ATTACK IMMEDIATELY AFTER GIVING A COMMAND. Well in theory anyway. I haven't actually tested any of this. It can definitely be done, but im not sure if it will work with a non sequential turn order.
In this battle system only one character and one enemy are active at any given time. Basically you incapacitate all but 1 member and cause all attacks of all but 1 enemy to fail each round. You make scripts that deal with changing these variables and deal with removing and applying the action status and deciding the turn order.
1) First you need to put all but 1 party member in an action status at the beginning of the battle. The system won't let you choose turns for incapacitated members so you only work with one person. Script in enter battle or each members enter script. Use member order 1-3 and apply the status, leaving member 0, the leader, unaffected.
2) The enemy doesn't need to be in action status. Make a variable that starts equal to the first enemy in the enemy battle order variable and increase it by 1 after his turn or back to 0 when it hits the max number of enemies. If the enemy taking action isn't the one that equals this variable force the script to end for every action he tries to take. Put the following script in check start of every direct effect an enemy can choose to do anything with:
battle: substitute attribute for variable (to load enemy info) condition: side is enemy taking action (I think flag is on) condition: turn variable is different then enemy battle order no instigator action on force script end. condition end condition end
if you use a check fail message, you will have to make a branch to end the script before the message appears so that there is no text.
3) When a party member finishes his turn change back target and apply the action status to put him back to sleep.
4) Now you need to remove the action status from the next party member. The hard part is finding out where to work. The following script after last member takes action should be modified to accomodate the kind of turn order you want, either in order, random, or via agility. What will actually happen is one enemy and one member are being freed, whichever of them has the higher agility will go first.
member order = member order +1 conditon: member order is same or higher then total members member order = 0 conditon end (or temp variable = member order.) repeat while member order = temp variable) member order = 0 ? total members) (or member order = variable determined by turn sequence) use member order member info load confirm real action statuses (numb, sleep etc) if flag 170 is off target: action status remove (might also need make active target, change back target, attribute for variable, variable for attribute, or member info save somewhere)
If the script didnt end, continue member order +1 until you come to someone who isnt dead, sleeping or numb. You might need a branch to end the cycle if everyone is sleeping or numb.
5) Manipulating the Turn Order - The easy way
make everyone stunned the very first round of battle, then unlock the first enemy and the first member probably by scripting in custom indirect effects that are constantly on. This method utilizes the default turn order of the battle system which is based on Agility. For enemies make sure to set the turn variable to his enemybattleorder number. Instead of the above script you could try removing the action status when the condition or custom indirect effect triggers which would make it very easy to free whichever member the system has chosen next. Im not sure if that will apply to the first round though.
5) Manipulating the Turn order - the hard way
Members: at the beginning of the battle cycle member order for each member, load stats, find the highest value, free that person alone from the action status. This will begin the cycle.
Enemies: Check the enemy stats on his enter battle script. Make about 10 variables or so that can be used to store the enemy stat values. Now compare them and set the enemy battle order to the one thats the highest. This is a pretty complex script and some complex mathematics.
* In the above scripts check total members and confirm that the enemy battle order is changing. If there is only 1 enemy or 1 member have your scripts bypass the entire treatment as it is obviously useless and uncalled for.
* what seems like one round is now becoming many. Keep this mind when considering your turn count for poison, number, lose turn count, and similar effects. 1 turn has now become 1 round. Members with poison or regen will be affected up to 4 times per round.
|
|