ADRIFT Forum


The place to discuss the ADRIFT Interactive Fiction toolkit

Battle System Request

This forum is the place to learn about and discuss ADRIFT 5. Feel free to mention any bugs you find here, but please also add these to the Bugs & Enhancements list.

Please also refer to the ADRIFT 5 Wiki for more information.

Battle System Request

Postby RenatoDias » Tue May 01, 2018 9:37 pm

This thread is to request a battle system in ADRIFT 5, as talked about in http://forum.adrift.co/viewtopic.php?f=14&t=11424&start=30#p104575

Stats
[Reveal] Spoiler:
Stats:
Offense(ATK/Attack): How much damage you can deal.
Defense(DEF): How much damage you can protect yourself from(aka. damage mitigation/suppression).
Accuracy(ACC): How accurate you are, which means, how frequently you can hit your enemy.
Evasion(EVA): Allows to evade attacks.
*Mitigation is a term used in Overwatch for taking damage and protecting yourself.
HP: Health Points, how much damage you can receive before you get killed.


Skills
[Reveal] Spoiler:
Normal attack: A normal attack, designed to deal the ATK damage.
Hard Attack: ATK+50%ATK.(2 turns to recharge, starts ready)
Ultimate: 300% of the normal attack.(8 turns to charge, doesn’t start ready)
Formulas
Normal Attack: ATK-Enemy Defense/Enemy ATK-Your Defense
Hard Attack: (ATK+50%ATK)-DEF
Ultimate Attack: (ATK*3.0)-DEF


Battle Text:
[Reveal] Spoiler:
Normal Attack: “You attack <character> with <weapon>, he/she receives ## damage”
Hard Attack: “You decide to use a harder attack. You swing your <melee-weapon> in a stronger way, dealing ## damage”.
Ultimate Used:
“You use your ultimate ability, dealing ## damage to your target in a awesomely powerful blow” /
“Enemy uses his/her ultimate ability. <enemy ultimate line, defined by ultimate property>, he/she deals a powerful blow on you, be careful!”.
Danger: “You are in danger, get yourself healed as soon as possible”/ “He/she is in danger, now is your chance”.
Ultimate Ready: “Your ultimate ability is ready” / “Enemy ultimate is ready, heads up!”.
Ultimate Charging: “Your ultimate ability is charging, just a few more turns!”


Items:
[Reveal] Spoiler:
Light Armor: DEF+4
Medium Armor: DEF+8
Heavy Armor: DEF+12
Potion: restoration=(max_life/2)+current_life
RenatoDias
 
Posts: 72
Joined: Sat Dec 03, 2011 10:56 pm
Points: 13

Re: Battle System Request

Postby ElliotM » Tue May 01, 2018 11:07 pm

  • How do you want the command syntax for combat to look? The Adrift Standard library has dummy tasks for attack %character% or attack %character% with %object%. One design pitfall is forcing the player to type long commands over and over, so you might want to consider abbreviated command syntax or shortcuts similar to how MUDs do it.
  • I also noticed you didn't list any weapons. Is that intentional? If they exist I imagine they add to your attack stat somehow. Would like to see some examples of weapons as your fake transcript indicates they are used when attacking.
  • Your normal attack formula appears to use division unless you were showing the difference between player and npc attack calculation? I've not really done division in Adrift because it doesn't have decimal numbers and will end up rounding for you.

Can you include some example 'character sheets' showing their base stats?
ElliotM
 
Posts: 1227
Joined: Tue Apr 17, 2007 8:04 pm
Location: The Midwest in the USA
Points: 13

Re: Battle System Request

Postby RenatoDias » Wed May 02, 2018 12:10 am

Normal Attack: ATK-Enemy Defense/Enemy ATK-Your Defense
It's not a division, just showing how it would calculate when you attack and when the enemy attacks you.
For example. if the enemy attacks you, the formula would be "Enemy ATK-Your Defense(DEF)

Yours:
[Reveal] Spoiler:
ATK: 30
DEF: 20
ACC: 20
EVA: 30
HP: 300


Enemy:
[Reveal] Spoiler:
ATK: 25
DEF: 30
ACC: 25
EVA: 35
HP: 225


Weapons:
[Reveal] Spoiler:
Knifes/Daggers
Guns(there will be some gunplay)


[Reveal] Spoiler:
Commands:
Attack %character%: Attacks the enemy character with whatever weapon you go equipped, the game will check and send the corresponding message. ATK-DEF
Power Attack %character%: The equivalent of the Hard Attack on the first post. (1.5*ATK)-DEF
Use ultimate / Use ultimate on %character%: Uses your ultimate ability, which doesn't use weapons and can increase status or heal.(3*ATK)-DEF


Correction on Potion:
[Reveal] Spoiler:
Restoration=(max_life*0.5)+current_life

I hope it's enough.
RenatoDias
 
Posts: 72
Joined: Sat Dec 03, 2011 10:56 pm
Points: 13

Re: Battle System Request

Postby ElliotM » Wed May 02, 2018 2:55 am

What scale are those stats on? Or is it relative? I also need stats for the weapons.

Also need to know how Accuracy and Evasion work.
ElliotM
 
Posts: 1227
Joined: Tue Apr 17, 2007 8:04 pm
Location: The Midwest in the USA
Points: 13

Re: Battle System Request

Postby ElliotM » Wed May 02, 2018 6:03 am

BSDemo.taf
(17.4 KiB) Downloaded 4 times


adrift Code: Select all
What is in here so far:
 
* Combat stat properties (mark a character as a combatant).
* Normal, Power, and Ultimate attack tasks share common check tasks and the Damage/Strike Calculator task to centralize battle logic.
* The Strike Calculator allows attack to be multiplied by a number for normal, power, or ultimate attacks(1, 2, or 3 respectively) and the calculated result is kept in a temporary property named Strike.
* Warning text displays when certain conditions are met using Alternate Descriptions in the Strike Calculator.
 
What isn't in here so far:
 
* Any items such as armor, weapons, or potions
* Cool down timers for power and ultimate attacks are implemented but off by default due to 'bad expression' bugs/warnings. Code works fine despite the warning.
* Accuracy and evasion aren't used yet since I don't know the formula.
 
Test the battle logic with 'attack enemy', 'power attack enemy', and 'ultimate attack enemy'.
ElliotM
 
Posts: 1227
Joined: Tue Apr 17, 2007 8:04 pm
Location: The Midwest in the USA
Points: 13

Re: Battle System Request

Postby ElliotM » Wed May 02, 2018 5:22 pm

While looking back over the forum I found some discussion threads about battle systems I thought might interest you.

Combat systems.. why? (May 2016)
end of game (Dec 2014)

Both of these threads discuss things relevant to combat systems. The first one goes into why people seem interested in them and the hurdles of making a good one. One of the bigger issues discussed is the concept of text variety and repeating the same actions over and over. The second thread above discusses the impact of Undo and Save/Reload.

Dice, Probability and Skill Checks. (May 2016)

This thread has some demo files I forgot I made that you might be interested in looking at. d20 attack with cinematic scaling and text variation demo shows a method of text variation while repeating the same action that I would recommend copying the approach of if you need text variety. The d20 stat system demo in that thread is also something you can look at but I prefer the property setup I used in the Battle System demo I posted earlier as I feel that it is a bit cleaner in the organization of the properties in the property tab. That demo also had the combatant with the highest attack hit; when I played just now I got hit once by the troll and then overwhelmed him without taking another hit, which has some balance issues.
ElliotM
 
Posts: 1227
Joined: Tue Apr 17, 2007 8:04 pm
Location: The Midwest in the USA
Points: 13

Re: Battle System Request

Postby RenatoDias » Wed May 02, 2018 11:01 pm

I'll check them out. I read the "Combat systems... why?" thread before. And your battle system demo is pretty nice.
The formula for Evasion vs Accuracy calculation is simply ACC-EVA.
RenatoDias
 
Posts: 72
Joined: Sat Dec 03, 2011 10:56 pm
Points: 13

Re: Battle System Request

Postby ElliotM » Thu May 03, 2018 12:31 am

Using ACC-EVA as the formula means neither you or the enemy can ever hit each other given the stats you gave me.

Player ACC - Enemy EVA is 20 - 35 or minus 15.
Enemy ACC - Player EVA is 25 - 30 or minus 5.
ElliotM
 
Posts: 1227
Joined: Tue Apr 17, 2007 8:04 pm
Location: The Midwest in the USA
Points: 13


Return to ADRIFT 5.0

Who is online

Users browsing this forum: No registered users and 3 guests

cron