Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Dec 20, 2004 1:05:40 GMT -5
I was gonna get started on making my battle formulas today, but thought I'd make sure I knew what I was doing first. This is for the DBS. Any help is greatly appreciated. The questions are at the bottom.
_____________________________
From another topic: (skip down to line to skip intro info.)
Okay, I'm gonna try to get it set up so if someone had the same value for each stat (completely all-around), these would be the proportions...
Normal Attack and Physical Skill Attack Power:
16/26 STR* 4/26 CHA 2/26 AGI 2/26 INT 2/26 DEF
Magical Skill Attack Power:
16/26 INT* 4/26 CHA 2/26 AGI 2/26 STR 2/26 DEF
Normal Attack and Physical Skill Defense Power:
(all divided by 2 at the end) 16/26 DEF* 4/26 CHA 2/26 AGI 2/26 STR 2/26 INT
Magical Skill Defense Power:
(all divided by 2 at the end) 16/26 INT* 4/26 DEF 2/26 CHA 2/26 AGI 2/26 STR
Normal Attack, Physical Skill, and Magical Skill Accuracy:
11/26 AGI* 9/26 CHA* 2/26 STR 2/26 INT 2/26 DEF
Normal Attack, Physical Skill, and Magical Skill Evasion:
11/26 AGI* 9/26 CHA* 2/26 DEF 2/26 INT 2/26 STR
Action Speed:
Poll: What do you guys think it should be based on? (STR, INT, AGI, DEF, CHA) (This is essentially turn order)
Little 0-10 damage on everything is randomly added at the end.
The normal attacks etc. will all also have different base damages for each spell, which I'm thinking I'll have to add at the end of all the other damage by sorting the ability number variable and making lots of results in the battle formula script since I've already set-up the rate for % STR/INT damage, etc., which is how I set it up, then after that I start doing the proportional stuff above.
For Rates of Critical Attacks, I'd like to make it a flat % chance between every party member and enemy for every move, 'cept for maybe healing.
______________________________
Okay, so what I need help on is this:
1) It seems like I need 1 script to find the target's physical (and normal attack) attacking power and 1 script to find the target's physical (and normal attack) defensive power, then put these into one script to calculate Total Damage by finding the target's (instigator) attacking strength, switching to the target, finding the target's defensive strength, then subtracting the defense from the attack and equaling Total Damage to that. Is this all I have to do for the battle formula? And, where do I put this script?
2) Same as number 1 but with magic. I really only need this for damaging magic, and healing'd have it's own without the enemy target's stats involved. Right?
3) Then for normal attacks, the accuracy goes on the weapon's direct effect, which the script does the same, but finds accuracy (instigator) and evasion (target), and goes in the direct effect's result slot? And, for "magic" I'd put this same script in all the direct effects of the "magic"s' result slots. Then in the script, after I determine if it hits or not, and it hits, I'd call the damage scripts in 1 and 2?
4) And for critical rate, I could make a flat percentage in a script that multiplies/adds to Total Damage in a script and call it at the end of each of the different damage formulas? This would add criticals possible on "magic" then too, right?
5) And, if battle order's chosen once at the beginning of battle, is it the same all throughout that battle?
Okay, others than that I know how/what to do for everything. Thank you very much!!
|
|
|
Post by Dungeon Warden on Dec 20, 2004 17:55:53 GMT -5
1) That is pretty much what the battle formula does, except it also takes into consideration if the target is blocking, if the instigator is blind, and an extra plus/minus 10% just so damage isn't always the same with every hit.
2) There are actually four magic formulas. A damage one similar to the battle formula, a healing one, a status effect one, and a Magic power one that uses all the instigators MP to cast a powerful spell. Actually, there is a fifth one that uses all the instigators HP (like the Scarifice spell).
3) That sounds about right.
4) The default battle formula checks if the Critical flag is on and does extra damage accordingly. Your way sounds like it would work. Magic doesn't normally do criticals, but I suppose you could change this.
5) Battle Order is determined at the begining of each battle round. This allows Spells like Speed Up to be used to speed up a character's attack order. Note that if you cast it on another character it won't take effect until the next round.
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Dec 21, 2004 2:01:41 GMT -5
Yay! Thank you DW, knowing the 4 needed magic formulas'll help a lot, and I'm glad to hear battle order is determined each round. One more question though, which script determines the turn order each round?
|
|
|
Post by Dungeon Warden on Dec 21, 2004 17:46:40 GMT -5
None. Attack Order is determined internally by the game system. However, if you change the variable at the beginning of the round before any one has attacked (indirect effects and traits can be set to occur before the beginning of the battle round), you can control the battle order.
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Dec 21, 2004 17:49:18 GMT -5
Okay, thanks! I think I'll just leave it, at least for now. Thank you!
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Dec 23, 2004 18:12:14 GMT -5
Okay, I went to making them and I wasn't sure of four thing so I came to ask. I'm not too familiar with when to use the Battle: Make Active Character and Battle: Change Back Active Character, although I think I understand what they do. I referenced to my old modified default Battle Formula Script and mirrored the way they were in that in this one. Any ways, is this script correct? It's the one for finding Physical Skill Damage when attacking.
Battle: Make Active Character Script: Call [Phys Form-Targ] (finds target's physical defensive power in my Targ TotalPower variable) Battle: Change Back Active Character Battle: Make Active Character Script: Call [Phys Form-Inst] (finds instigator's physical offensive power in my Inst TotalPower variable) Data: Variable: Total Damage = Inst TotalPower - Targ TotalPower
with after it in the subtracting damage script that I think (does it?) comes after the battle formula automatically as
Battle: Make Active Character Script: Call [Instigator Name] *add or subtract Total Damage from Max HP* Battle: Chane Back Active Character
And also, would it be okay to put the first Battle: Make Active Character line in the second script at the end of the first instead?
Oh yeah, and what's the difference between Data: Substitute Target Attribute for Variable and Battle: Substitute Target Attribute for Variable (and obviously their counterparts too)?
Thank you very much!
|
|
|
Post by Dungeon Warden on Dec 23, 2004 22:15:49 GMT -5
Battle: Make Active Character Script: Call [Phys Form-Targ] (finds target's physical defensive power in my Targ TotalPower variable) Battle: Change Back Active Character Battle: Make Active Character You only need one or the other. using both changes you to the instigator and back to the target again. Script: Call [Phys Form-Inst] (finds instigator's physical offensive power in my Inst TotalPower variable) Data: Variable: Total Damage = Inst TotalPower - Targ TotalPower
Battle: Make Active Character switchs between the instigator and the targets. Note that there can be more than one target for some attacks. If there is only one target, this comand will switch back and forth between the target and the instigator.
Battle: Change Back Active Character changes control back to the instigator. It is useful when there are multiple targets or if you use the Check who goes next command (which can switch control to all the battle participents in the order they attack).
The only difference between Data: Substitute Target Attribute for Variable and Battle: Substitute Attribute for Variable that I found is that the Target command also loads in battle order. Data : System : Substitute Attribute for Variable is the same command for use outsite of battle.
It doesn't matter where you put commands as long as they logically flow from one to another. Logic will dictate the best way to write scripts in most cases.
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Dec 23, 2004 22:57:49 GMT -5
Okay, I'll use the Battle: Change Back Active Character every time then since it works with everything. Thank you!!
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Dec 25, 2004 7:38:56 GMT -5
Status Report: Okay, I made all the scripts, and I know where to put them (just trash the presets and see where they're being used and put mine instead) and will be doing that soon. I tested lots of different character+equip mod stat - average enemy stat for everything to make it work right. With status effects, I made it so they have % chances of hitting ("rate", on damage + status I have to sort ability database number in the script to alter temp variable 8 (normally = rate) instead of the 150% STR damage for example, and have that all set-up too (with the moves like that I've already made)), where it finds the success chance based on accuracy and evasion, then multiplies it by the rate (chance of hitting based on spells) and divides it by 80, thus making status effects be influenced by accuracy and evasion too (with my success chances 80 is if accuracy and evasion are equal, so then divided by 80 that is 1 and thus the rate). I entered in tons of numbers and it worked well. For my criticals (on everything but status, even healing), I made it multiply the total damage by 1.4 at the end (before adding 0-10 extra % damage). It should all work smoothly, since I heavily went over it a ton. The Success Chance script took a freaking 5,400 memory all by itself , while the others didn't even surpass like 1,100 memory. There's no way I'm going to make it go by 1%'s instead. Any way, thanks a ton DW! I got it all set-up and working well thanks to you. The video demo will now most likely include a battle or two too. Yay!
|
|
|
Post by Dungeon Warden on Dec 25, 2004 21:09:13 GMT -5
I'm glad you got it working. I spent a lot of time understanding the battle system, I'm glad I was able to pass on the information to you.
I look forward to your video demo, and I hope I can play a demo soon as well.
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Jan 1, 2005 3:46:35 GMT -5
Well, I thought I had them all correct, and after thoroughly working with them still do. Have you noticed this problem any with the DBS before? It seems that any script in the "Success Check" slot of a direct effect doesn't check script branches. That's the only thing I could think of, since it's faulting at one part of the script, and whichever comes last out of the Data: Flag: Inst Success: On or Data: Flag: Inst Success: Off just happens regardless of where it is. Here's what I had as the last few lines of the event/script in the "Success Check" slot of my praticing magic spell:
TempVariable9= 1 ? 100 Script: Condition: TempVariable 9 =< Success Chance Data: Flag: Inst Success: On Condition End Script: Condition: TempVariable 9 > Success Chance Data: Flag: Inst Success: Off Condition End
When I switched the order of the two Script: Conditions the direct effect would either always go the "Result" slot or always go to the "Fail" slot, and never one or the other, and always went to the one in the last script condition (whichever one was put 2nd). This obviously shouldn't always be the case, and I tampered with altering the enemy's AGI and CHA up to 9999 and down to 0, but that had no effect. The only solution to this I could think of is doing what I said before, about controlling the hitting and missing myself in the "Result" slot's script, but doing so makes the enemy's damage animation go whether it hits or not. So, a way to fix it either by changing when the enemy's damage animation goes, or by knowing what the deal with the aforementioned quirk is would help. Thank you, DW, you're a lifesaver with all of this.
Edit: Another question I'd had, but rather simple, is there a way to change "Defend" to something else? I wanted to make it say Wait, but I looked through all the Game Info: Text Messages things and couldn't find it. Maybe, I just missed it, oh well, it's no biggy since I could always use a townsperson to tell the player that defend doesn't do anything. (I'm planning to leave defending to some abilities for the classes is why). Thank you.
|
|
|
Post by Dungeon Warden on Jan 1, 2005 17:58:45 GMT -5
If you look at the presets, you will see that the success flag is turned off at the begining of the script and only turned on during a condition. That way, the flag is only turned on if a condition is met and you never need to use a condition to turn it off.
I haven't tried to change the name Defend, but I'm sure you can change it somewhere. Check the battle commands under the Adv tab.
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Jan 1, 2005 18:02:26 GMT -5
Okay, I'll give that a try, thank you.
And, thank you for that too, I forgot that it's in each party members' adv. tab, thank you.
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Jan 3, 2005 2:12:02 GMT -5
Alright, I was about to go back to work on this thing, but thought of one issue that needed to be discussed. I want to check with you before I go to work on it again.
Okay, I was thinking about the set-up I was working to before, where the "Success Check" script determines whether it hits or not then turns Inst Success On to make the "Result" script go. The question is though: what would happen with All targeting spells? I don't have any idea, and since you said you haven't toyed with making magic attacks miss I figured you wouldn't either. This leads me to believe that doing it the other way, where in the "Result" Script I determine if hits, then call the damage formula script if it does hit, would allow the All spells to work right because technically (this may be hard to follow) the All spell would go "hit" (meaning go to the "Result" script) the first target, then determine if it "hits" (going to the damage formula from the "Result" script), then repeat this each target. If that makes sense to you DW, and sounds good, tell me. Thank you!
|
|
|
Post by Dungeon Warden on Jan 3, 2005 13:16:12 GMT -5
I believe how it works (and as you say, I haven't really tested it but it makes sense) is, flow 1 is only checked once to determine if the spell or skill can be used, then flow 2 is used to determine if the enemy is hit, and Result determines what happens when the enemy is hit. Therefore flow 2 and result should repeat for each enemy. When an ability hits multiple enemies, the visual effect (if set to Target) will hit each enemy seperately, doing damage each time. This leads me to beleave each target is treated seperately as far as the ability succeding or not.
It shouldn't be too hard to test. Just have a message appear on screen throughout the direct effect and see which messages repeat when multiple targets are hit.
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Jan 3, 2005 21:45:43 GMT -5
Alright, I'll give that a try, and come back. Thank you!
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Jan 5, 2005 2:27:19 GMT -5
Yay!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ;D I figured it out. I tested it your way and it seems both methods will work just fine, except with the normal way of using the "Success Check" will make the enemy's damage action not go if it misses, but I'm not sure which to do since I remade the enemy actions and my damage ones can look like dodging too. The problem was a stupid one, which I'm glad it turned out that way and I found it instead of something serious. In the Inst-Acu script I was loading STR x 0 instead of STR + 0 (etc.), and so the 0 held through the whole success chance formula and made it always equal 0 (thus miss, or hit if I changed it to always hit and disregard the success chance formula). So, once I quickly changed the x's to +'s it all worked fine and stuff. Yay! Thank you so much DW! I think I'm actually done (mostly, now just going through the moves I've made). I could've never done it without you, I think, so thank you very, very much. Oh, another thing I thought of that might help people is this (and I'm gonna do obviously): In the DBS for Indirect (Status) Effects you can only choose one or the other out of Turns (# of turns till effect comes off) or Attacks (being attacked), but by making a script that will remove (or a chance of removing) Indirect Effects like Sleep/Stun/Charm/Confuse etc. and calling it at the end of every damage formula, then picking Turns in the Indirect's data, will allow you to do both Turns and Attacks. This is probably a good way to do this in CBS's too. If anyone needs help with editting the DBS I can help too, though DW's still much, much more knowledgable than me with it.
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Jan 5, 2005 5:01:35 GMT -5
It all works fine, and it's not my scripts (I spent so, so long looking through them and changing them). DW, does the DBS internally add base damage to "magic"? It definitely seems that way to me, because I set rate to 0 and the move did about 30 damage everytime (this is after I changed my scripts not to add a base damage to anything) - which is insane because that should make damage become zero (negative reset to zero), and meanwhile my normal attacks (with the same formula with a set rate of 100 (/100 so 1)) were doing 12 or so. Something internal is screwing it up: I know that much for sure. The party member and enemy being tested were both 50 on every stat, so the different stats have nothing to do with it. Argh, I don't know what to do about this one...
|
|
|
Post by Dungeon Warden on Jan 5, 2005 13:57:00 GMT -5
Humm, I sure you must have made a mistake somewhere when changing the scripts. I don't have my notes right now, so I can't check where damage comes from. I might need to test magic in actually game play to see what is going on. I'm pretty sure there is no base value, unless Int has a bigger influence on magic damage then originally thought.
I'll look into this and get back to you. In the mean time, look though the commands and make sure there isn't some mistake somewhere like the STR X 0 mistake you already found.
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Jan 5, 2005 22:59:43 GMT -5
I already have so much, and there's no errors in my new scripts (and I don't use any default scripts for damage either). The normal attack formula and magic formula are both the same (minus a few different stat usages), so it's not that. I'll look through them and alter then again, but I'm pretty sure there's something wierd going on internally. Thank you for the help.
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Jan 7, 2005 5:27:57 GMT -5
I'm an idiot. I'm very, very, very sorry if I wasted your time, DW. I found I forgot to edit the default direct effect for party members' and enemies' normal attacks to use my battle formula (although somehow I managed to delete the battle formula script before that ), so I've fixed it and it works fine now. There is one problem I found, and perhaps there is a solution out there. I found that no matter what when you do Data: Target: Action Status Remove, for that turn the target will not go forward with their action (just all of a sudden skips their normal attack, magic, defend - everything), so the aforementioned technique I posted doesn't work in the DBS. So, for the tip before of removing sleep/stun/confuse/etc. in the damaging script of the direct effect of abilities and attacks does not work with the DBS, unless there is a way around this (but that's beyond my understanding of the DBS). Sorry to have misinformed everyone.
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Jan 7, 2005 6:44:57 GMT -5
I've been trying to get the status effects to work right, but have had one problem that I can't find a solution to.
So, in order to display the proper name when a unit dies you have to put Battle: Make Active Character followed by Script Call: Inst Name (in the New KO script put into the Indirect Effect of KO), however when this happens when a unit dies by poison, it always says the name of the last unit to perform an action. I cannot find a way to meet both requirements, since when you alter the New KO Script properly for either it ruins the other. Have you managed to make it say the right name when a unit dies by Poison? I just don't know what to do about it and have tried altering the applying status effect scripts, the new poison ans new ko scripts, among other things. Thank you if you can help. If you don't understand what I said I could try to explain it differently.
Edit: I just got one idea that might work: in the Turn Poison/-HP script I could make it check to see if HP is =< 0 and turn a flag on which could alter the Battle: Make Active Character in the New KO script. Do you think that would work? Thank you!
|
|
|
Post by Dungeon Warden on Jan 7, 2005 21:28:17 GMT -5
Since the enemy/character takes damage from poison on their turn, they are the instigator. Using Make Active Character switchs from the poisoned unit to the last member to take an action. Just remove Make Active Character and it should work fine.
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Jan 7, 2005 22:04:07 GMT -5
Alright, will do, thank you DW. I think it's possible to work around. Cool.
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Jan 11, 2005 21:41:53 GMT -5
I got all the messages to display correctly and target the right units. I have one new question though. In an indirect effect's "Turn" script is where you'd put the modification to the player's stat right (like STR UP 20%) like in the defaults, right? I've done this and it seems to not work. I vaguely remember you saying something about needing to do something else besides just Substitute Variable for Attribute, but I don't remember what. My "Turn" scripts are like this: Text: Clear Message Substitute Attribute for Variable modify stat (I know I've done this right) Substitute Variable for Attribute Do I need to put anything else? I'll bet you've done something like this, a stat up status effect indirect effect. Also, please tell me there's a way to modify AGI and INT and not just Attack, Guard, and Luck. Thank you for all the help!
|
|