Battle System on Script

I would love to see this at work in a game.

1 Like

This question is pertinent to this thread-

I’m trying to create instances with my own battle ‘system’ where you do more or less damage than normal. Let’s say for this instance that you have a {wd} (damage) set at 15 (but it could be different). But perhaps you hit better than normal- I’d like to be able to add 1/2 wd to itself. How do I do that, in a way where, after the hit, I can then subtract that 1/2 wd and again have 15 wd? Especially considering this is an odd number? How do I code this?

Post deleted by ArcanaCero.

Okay, that explains half of what I’m after. Now, after the ‘critical hit’, how do I set wd back to 15 (without using a *set wd 15 command, because the wd might be something other than 15)- I’m not sure if *set wd *.66 would be accurate.

Post deleted by ArcanaCero.

sigh No, this won’t work- I need a round-by-round, not a battle-by-battle. doing it this way, I’d need 50 or so lines of code creating a ‘memory’ of the original wd, which I could do- it would take time, but might be the only plausible way? Admittedly, *set wd *1.5 is nice and easy. Then, I just need to divide by 1/3, but don’t know how (in code).

I could work around this by just *set wd *2… and *set wd *.5, but for some wd’s, that creates a massive difference - eg, the difference between a greatsword and a dagger. wd 45 vs wd 15. I really want to work with 3rds if I can. I could work with 4ths, I suppose, if there’s no way to.

Post deleted by ArcanaCero.

If your using the *rand command remember it rerolls when you reenter the page from the stats so it’s always a good idea to use the command a page before you need to check it.

1 Like

Um, are you looking for this:

*label apply_damage
*if critical
  *set wd * 1.5
*set enemy_health - (round(wd))
*if critical
  *set wd / 3
  *set wd * 2

Alternatively if you want one line of code at the end, I think it would be *set wd (round(wd * 0.66)) although I’d have to double check if that’s the right syntax. Pretty sure it is though.

Although as @Nocturnal_Stillness pointed out, round by round has the problem of each round requiring two pages to not constantly mess things up (or the removal of the stats button).

1 Like

Yes. XD Thank you Reaperoa. That’s essentially exactly what I need.

I don’t think I’ll have any trouble with format- it’s going to be an involved process, but it should turn out great at the end.

I’ve come to the realization that it must be relatively easy to implement a Fighting Fantasy type of battle system, but will the audience appreciate it? As far as I know, most of the readers grew up with Choose Your Own Adventure, not Fighting Fantasy. I think that many of them won’t like randomness.

Post deleted by ArcanaCero.


I’m not sure why you chose to delete all of your posts in this thread. I do think it’s a pity since you were making contributions that other forum members were finding useful.

Please, instead of deleting all of your posts in a thread, thus rendering said thread incomprehensible, just ask moderators to delete and/or lock it.

I’m locking the thread since without your posts it doesn’t make sense. I’m keeping it undeleted because there are a couple of posts here that other people might want to look at if they want to implement a battle system.

This topic is now closed. New replies are no longer allowed.

1 Like