Battle System on Script

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?

1 Like

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:

1 Like

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.

1 Like

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.

1 Like

Post deleted by ArcanaCero.

*Facepalm

Why do I even bother trying to figure out what your intentions are…

1 Like

@ArcanaCero

I don’t have time to look.

You can code your own fight. :slight_smile: 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.

1 Like

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.

3 Likes
[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

1 Like

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.