|
Post by thetruecoolness on Jun 17, 2005 17:52:06 GMT -5
I'm trying to figure out how to make a person be able to attack twice on their turn in my battle system. Right now I have their turn all in a trait script so I can do a custom battle menu, but the problem is they can only do one action in that script, since the action set up with battle action only happens once the trait script finishes. I haven't look into this too far but right now I think the best way may be to edit the Act x2 script that the Angelic Spear uses. This would kind of do what I want as I can check SP (Stamina Points similar to AP in other games) to see if they are able to use the same attack again, but I would like to be able to mix and match attacks. So I was wondering if anyone has tried this or has any suggestions on what I should look at? Explanation of battle system: Basically everyone has a standard attack that takes 3SP, a secondary attack that takes 4SP, and Magic that takes 3SP a picture of the battle menu is here. Every turn they gain 3SP, and can have a maximum of 8 SP. So with the Act x2 I can have then use any of those three twice, but I would like for them to be able to use any one of those with any other one. The secondary attack I have set up as a skill that checks to see if they have the appropriate item on them to be able to use it, so it uses the rate in direct effect to check for critical, and the cost of the skill for damage. Magic is just a magic ability and standard attack is just a weapon.
|
|
|
Post by Dungeon Warden on Jun 17, 2005 19:35:16 GMT -5
You can only use one direct effect per round and can therefore only attack one target (or unit) per round.
However, you can get around the limitation of only being able to use one kind of attack by using scripts similar to Add Thunder. Basically you need to set up a custom script (in the custom slot of your direct effect) that allows the player to add an effect to the current attack. To be able to mix and match attacks, every attack will need to call the same custom script so you can add the same, or another attack.
Death is not calculated until all attacks are finished, so even if you should kill a target with the first attack any added attacks will be wasted on the same target. There is no way to change targets in the middle of a turn.
Actually, that's not true. You can use Check Who Goes First and Check Who Goes Next to change the current active character at anytime. You can't target this way, but you can remove HP. It's not a great solution, but it should work. Make use you use Change Back Active Character afterwords to reset the pointer back to the instigator.
You must be pretty good with scripting to get this far. I look forward to playing your game when you get a demo ready.
|
|
|
Post by thetruecoolness on Jun 17, 2005 19:58:10 GMT -5
Yeah I'm kind of learning as I go. Of course without knowing about these boards, and having the Advanced FAQ handy it would have taken me a lot longer to get to this point, and would have been a lot more frustrating.
Of course for the death I could probably just check their HP on the second "attack" and if it is less than or = to 0 choose the next target. I might have them be able to choose a target in the middle, but I think it might be best just to have them choose both attacks before doing damage. But I'll play around with the custom success slot, and the turn end to see which one works better.
So after this I just have to work on a enemy targeting system, which shouldn't be too bad. And then figure out a way to scroll through the item, and magic lists I am making which will take some though, and probably a lot of variables.
I hope to have the battle system done and tested by the end of the month, and hopefully the first town set up. Still got a ways to go with the story, since right now I've been working on some things that will be persistent throughout the game, and looking over the default scripts to see how they can be improved, and just stepping through them to see how they work. I have the basic story, but many details are still lacking.
|
|
|
Post by Dungeon Warden on Jun 17, 2005 20:11:14 GMT -5
Yeah, I've been through all that. Now I'm just prettying up the battle system to make all the actions and visual effects look good.
I'm glad my Advanced FAQ is helping you out. I know how difficult the battle system can be to work with and want to help others make a better battle system. The default system isn't great and the more people that modify the system the better. Keep up the good work.
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Jun 17, 2005 21:30:46 GMT -5
Perhaps it might be easier to do something like this:
1 round - everyone goes 2 round - only members and enemies that get to go twice go repeat
"you could turn a new flag On when the "Unable to flee." message goes in the Error Messages Script and alter the Check conditions of every ability, Attack, and Defend (note that the enemies need their own copies for every ability if you do this) to make the move fail if that flag is On, then through a constant Custom Indirect Effect or script in the battling that goes at the end of each round turn the flag back Off."
"Actually, that's not a bad idea. What would be even easier if you give all players custom conditions that check that flag at the start of each turn (Indirect Effect/ Adv / Flow 2/ Turn Start) and have it give the characters a one turn action condition (Incapacitate) so they can't do anything for that round."
That's about what you'd have to do for it, I think.
On a side note, how do you do this for enemies (DBS)?
|
|
|
Post by thetruecoolness on Jun 18, 2005 21:19:03 GMT -5
Actually I have found a way to target without a direct effect using a button selection list of all the enemies I'll post the scripts below.
Right now I am using them for the selection of my attack and then setting Action:Enemy to Insti Enemy after this selection is called, and then setting Insti Member back to the original by keeping the original one and cycling back through the order using the Check First and Check Next commands.
Actually I thought of two ways, the first would set up an enemy to be damaged, using Substitute Target Attrib for Var, and then saving using Sub Target Var for Attrib. Neither one checks for dead enemies, though if a dead enemy is selected the next alive one is hit.
Using Battle Order.
Script Enemy Selection
Text: Clear Message Data: Var [Temp Var0] = 0 + 0 Battle: Check Who Goes First Script Branch: Repeat: Flag [Member Check] Off - Script Branch: Condition: Flag [Instigator Side] On -- Script Call: [Button Display] // Just prints the buttons to press for each choice in a list -- Text: Message: ' - ' -- Script: Call [Instigator Name] // premade script -- Text: Message ' | ' -- Data: [Temp Var1] = [Temp Var0] % 2 -- Script Branch: Condition: Var[Temp Var 1] = 1 --- Text: Message: '<return>' // Just to seperate, since it lists two enemies per line -- Script: Condition End -- Data: Var: [Temp Var0] = [Temp Var0] + 1 - Script: Condition End - Battle: Check Who Goes Next Script: Branch End
Input Buttons: Constant Wait Battle: Check Who Goes First Script Branch: Sort: Var [User Button] - Script Branch: Apply If: Num is 10 // L1 -- Script Branch: Condition: Var [Temp Var0] > 4 --- Battle: Check Who Goes Next --- Script Branch: Repeat: Flag[Instigator Side] Off ---- Battle: Check Who Goes Next --- Script: Branch End -- Script: Condition End - Script Branch: Apply If: Num is 13 // R1 -- Script Branch: Condition: Var [Temp Var0] > 3 --- Battle: Check Who Goes Next --- Script Branch: Repeat: Flag[Instigator Side] Off ---- Battle: Check Who Goes Next --- Script: Branch End -- Script: Condition End - Script Branch: Apply If: Num is 7 // X -- Script Branch: Condition: Var [Temp Var0] > 2 --- Battle: Check Who Goes Next --- Script Branch: Repeat: Flag[Instigator Side] Off ---- Battle: Check Who Goes Next --- Script: Branch End -- Script: Condition End - Script Branch: Apply If: Num is 6 // [] -- Script Branch: Condition: Var [Temp Var0] > 1 --- Battle: Check Who Goes Next --- Script Branch: Repeat: Flag[Instigator Side] Off ---- Battle: Check Who Goes Next --- Script: Branch End -- Script: Condition End - Script Branch: Apply If: Num is 4 // /_\ -- Battle: Check Who Goes Next -- Script Branch: Repeat: Flag[Instigator Side] Off --- Battle: Check Who Goes Next -- Script: Branch End - Script Branch: To End Script: Branch End
I'll leave the other way for people to figure out as it's basically the same but without the need for the Check order functions. So after this you can make enemies take damage, and if you store the enemy chosen here to a variable as well, you can easily figure out the target and the member from the other variable stored.
|
|
|
Post by Dungeon Warden on Jun 19, 2005 12:57:55 GMT -5
That's a pretty interesting script. Very well thought out.
Might I suggest you put Change Back Active Member at the end so that the original instigator will be restored. Strange things can happen if you don't do this.
If I could use more then one kind of enemy in battle, I might use this script; however, I think I'll just stick to the one I have instead.
|
|
|
Post by thetruecoolness on Jun 19, 2005 14:18:27 GMT -5
Yeah I had a more complicated script to figure out who's turn it was again, but Change Back Active Character is a lot simpler, and takes up less memory. Yeah I realized if you don't do this the enemy you wanted to attack gets your turn and attacks you, so that was not good.
I would have tried the two turn thing, but that would have felt out of place for the user and probably been harder than digging a little further into how setting up instigators works, since you would have to choose fight again. I really wish they would have named all the commands with Target in them to Instigator, since that is what they all dealt with. I know this confused me for a while as it said you can only change the instigator side but all the commands have target in their name, but instead use the instigator data. Looks like that one got past testing.
So now all I should have left is choosing spells, and items, and seeing how all and group attacks work, though I may not even have group attacks. Also figuring out how to get run away to work if I can, though I might just take it out and let them choose flee from the turn menu. Of course I still need to write the scripts for the second attack but that shouldn't be too hard, with my new discovery, and the help of others discoveries.
|
|
|
Post by Dungeon Warden on Jun 19, 2005 18:10:05 GMT -5
I don't think anything was miss labeled. The problem is that Instigator and Target are relative terms for the most part. The problem is that only one character can be active at a time and many battle commands affect the active character, whether that character is the instigator or the target. In many cases Target refers to the target of the command not the target of the instigator. I know it's a bit confusing, but I wouldn't call it a mistake as much as a problem with semantics. When it says you can only change the instigator side, what it really means is you can only change the active character. Change Active Member allows you to switch back and forth between the instigator and battle target so that the proper battle member can be selected and targeted by target commands. I hope that makes sense to you.
|
|