Post deleted by ArcanaCero.
What do you want your battle to be like/do?
Post deleted by ArcanaCero.
I would first ask yourself,
Why do you want a battle system?
What do you want the battle system to achieve?
Have you played many choice of games? Are there fights in any of the games you enjoyed and would like to recreate?
Post deleted by ArcanaCero.
Thereâs a battle system in @Sandstorm 's âThe Girl of Timeâ
Maybe you could get some inspiration from that.
Have you played Slammed!, Sabres of Infinity, Choice of the Petal Throne? Even Choice of Broadsides and Choice of the Dragon. Most of the Choice of Games have âbattle systemsâ of one sort or another. Iâd suggest, if you havenât already, play some of the games first in order to get inspired. Then have a look at the code to see how they do things.
Then detail out what you want your battle system to do. Once you have it planned out itâs easier to code.
Personally, I want every fight to have dramatic impact first and foremost. I want the fights to be special, for the player to be excited and to not feel like theyâre just rolling random numbers on dice. Iâd want the choices the playerâs made in the past to have an impact, the things theyâve learned to be of importance. And I hate dying, so death would never be the consequences. So if I was coding up some fights, Iâd do it keeping all of that in mind.
However your own goals may be different.
Can you at least explain the fight you want to add?
Post deleted by ArcanaCero.
You can try. Or you can just look at the code of the WiP directly using this:
We donât âdoâ combat systems. Which is what the other people have been trying to say to you in a more polite way.
Weâre about stories. If you want to make a combat system, youâre welcome to, but we donât have the time or interest in supporting it.
That sounds like more of a miscommunication. Heâs got a WiP with a story, but he wants to throw in some sort of battle stuff as well.
Post deleted by ArcanaCero.
*Facepalm
Why do I even bother trying to figure out what your intentions areâŚ
I donât have time to look.
You can code your own fight. Rather than asking developers, first do your own research. Do what I said. Play a few games. Then look at their code. Examine how they do things. Then once youâve done that you should have a better idea of how to code up your own combat.
Walk before you run.
Learn to code in Choicescript first. If you stick with it youâll slowly find that youâll begin to understand how (on your own) you would implement any kind of system you like.
[b]Battle test[/b]
You walk into the clearing where a Gnome
leaps out at you...
*temp hp
*set hp 4
*temp ehp
*set ehp 4
*temp dam
*temp edam
*label battle
*choice
#Attack
You attack.
*rand dam 1 2
*if dam = 1
You do 1 damage.
*set ehp -1
*if ehp <1
*goto win
*else
*goto battle
*if dam = 2
You do 2 damage.
*set ehp -2
*if ehp <1
*goto win
*else
*goto battle
#Wait.
Gnome attacks.
*rand edam 1 2
*if edam = 1
You take 1 damage.
*set hp -1
*if hp <1
*goto lose
*else
*goto battle
*if edam = 2
You take 2 damage.
*set hp -2
*if hp <1
*goto lose
*else
*goto battle
*label win
You win!
*ending
*label lose
You lose!
*ending
The above code is a simple battle system like old rpgs
Post deleted by ArcanaCero.
Itâs simple but it works. Usually in choicescript games they focus more on the story and combat is usually you have choices and then your stats determine what happpens.
For example.
The sound of the snapping twig gives away the Assassin's position and you spin to face him already drawing your sword.
*choice
#Cut him down.
*if swordplay >25
You easily sidestep his almost clumsy lunge dragging your sword up past his defence opening him up from hip to arm. His sword hits the dirt as does he moments later.
*goto next_scene
*else
You're too slow and his sword pierces your heart easily. You slump to the ground as death claims you.
*goto death_scene
Creating a complex combat is going to take a complex amount of coding. I plan to have some complex combats in one of my games⌠and each is going to require their own scene.
If you really feel set on creating a battle âsystemâ, rather than coding out battles, it probably would be possible to code up an oldschool D&D style combat system involving specified random number choices, but to be honest with you⌠I wouldnât want to take the time to explain how much work that would be. Iâll be getting somewhat complicated in my own game, but I havenât even started working on it yet and I have a good idea how much work itâs going to be for me. I would not be surprised in the least if I end up spending weeks on each battle. If you want some kind of shortcut where you donât need to go through that kind of work, the only real option is choose-your-own-adventure style choices like have already been mentioned above, where your stats determine the outcome. Either way you go about it, best of luck.
Post deleted by ArcanaCero.