Wrote up a draft for the first version of my battle system, looking for critique.

Doinathing

That Guy
Veteran
Joined
Sep 4, 2020
Messages
120
Reaction score
95
First Language
English
Primarily Uses
RMXP
Hi.

So, I wanted to make a unique card battle system, and I decided to write up a draft for how the base of it all should look.
I just wanted to post the draft here and see if there's anything wrong with it. I'd hate to wind up with some in efficient code as the base for my combat.
I'm going to program the whole thing using Common Events, because scripts terrify me.

Here's the draft.

Pre-Battle
set variable for enemy to 0(or whatever)
move to battle map, display player image.
check variable for enemy
if 0, set variable for enemy HP to 100

show image for enemy0
set variable for card number to 0

Card Choosing

check variable for card number
if >3, go to label for turn start
else, continue

randomize variable for card type, (0-6)
if 0, go to label for defensive cards
if 1-2, go to label for passive cards
if 3-5, go to label for aggressive cards

AGR Cards

randomize variable for card (0-14)


)REPEAT THESE STEPS FOR ALL 15 CARDS(

if 0, check for card number variable

if 0, display image for acard0 on the left
set variable for card 1 to card variable

if 1, display image for acard0 in the middle
set variable for card 2 to card variable

if 2, display image for acard0 on the right
set variable for card 3 to card variable
)-------------------------------------------(

add 1 to variable for card number
go to label for card choosing

PAS Cards

randomize variable for card (15-29)


)REPEAT THESE STEPS FOR ALL 15 CARDS(

if 0, check for card number variable

if 0, display image for pcard0 on the left
set variable for card 1 to card variable

if 1, display image for pcard0 in the middle
set variable for card 2 to card variable

if 2, display image for pcard0 on the right
set variable for card 3 to card variable
)-------------------------------------------(

add 1 to variable for card number
go to label for card choosing

DEF Cards

randomize variable for card (30-44)


)REPEAT THESE STEPS FOR ALL 5 CARDS(

if 31, check for card number variable

if 0, display image for dcard0 on the left
set variable for card 1 to card variable

if 1, display image for dcard0 in the middle
set variable for card 2 to card variable

if 2, display image for dcard0 on the right
set variable for card 3 to card variable
)-------------------------------------------(

add 1 to variable for card number
go to label for card choosing

Turn Start

show text: First Card?
show choices
>card 1
change variable for first card to 0

>card 2
change variable for first card to 1

>card 3
change variable for first card to 2


show text: Second Card?
show choices
>card 1
change variable for second card to 0

>card 2
change variable for second card to 1

>card 3
change variable for second card to 2

erase all card images

comment: this is where the turn happens


check variable for card 1

------------------------------------------------------------------
if 0, check variable for enemy hp
multiply variable for enemy hp by 4, divide by 10 put into enemy damage variable
subtract enemy damage variable from enemy hp
show text, [ENEMY] took [ENEMY DAMAGE VARIABLE] damage.
--------------------------------------------------------------------
if 15, randomize variable for misc cards, (0-9)

if between 0 and 3, set variable for instant karma to 1
else, do nothing.
--------------------------------------------------------------------
if 30, randomize variable for misc cards, (0-9)

if between 0 and 5, set variable for negate damage to 1
else, do nothing
-----------------------------------------------

check variable for card 2, repeat above steps.

if enemy health is less than 10, show text: you won! fade to player coords on starting map using x and y variables
else, continue



Enemy Turn

check variable for instant karma
if 1,

check negate damage, if 1, jump to label for enemy turn end

subtract 1 from variable for Mist's health.
if less than 1, transfer to death map

else, continue

check variable for instant karma
if 1, check variable for enemy hp
multiply variable for enemy hp by 7, divide by 10 put into enemy damage variable
show text, [ENEMY] received [ENEMY DAMAGE VARIABLE] HP of karma.

else, continue

go to label for card picking

Any advice is appreciated. Thank you!

Edit: Wait, should this be in game ideas and prototypes?

Edit 2: yeah, I tried putting the code in, and it's got a few oversights. Mostly forgot to reset variables

edit 3: this is all broken and inefficient. just for 35 cards is gonna be a nightmare to navigate, there's gotta be a better way

Edit 4: Okay! I got a very basic version of this system working! Here's each part to the new code.

1610493843313.png
1610493892680.png1610493912638.png1610493942495.png1610493963797.png
1610494022390.png1610494044872.png
1610494097773.png
1610494119457.png
1610494178025.png1610494197725.png1610494235505.png1610494279760.png1610494300525.png1610494316723.png
1610494355491.png1610494367269.png

All of this is a work in progress, but I still wanted to show it off and see what the more professional RMXP users think.
 
Last edited:

Doinathing

That Guy
Veteran
Joined
Sep 4, 2020
Messages
120
Reaction score
95
First Language
English
Primarily Uses
RMXP
This post has been updated.
 

Latest Threads

Latest Posts

Latest Profile Posts

finished the draft of some of this dude's motions!

mc0xoB4.gif


gonna work on the drafts of the other 3 now before i put detail, need to position these rather tall sprites well on the field

waiting for the term to end so i can get more time w this :kaodes:
Vaguely toying with demon/tiefling type parts but will probably work on something else first because eventually I'm going to have to make wings and I don't feel up to it yet. In the meantime, this guy:

TestChara-15.gif

I ended up reworking the interface, and Poppet's animations so she has a wand now and waves it to fire a shot. Also I gave her a shadow. Still have to rerender other stuff with shadows but eh.... I like her new "pew pew" wand. :LZSexcite:
PSA: please stop putting the word 'Eternal' in your game titles.
RMMZ: "Simple enough for a child!"
also RMMZ: "What, you're trying to make an RPG and you didn't know about Euler angles?"

Forum statistics

Threads
113,634
Messages
1,076,318
Members
147,643
Latest member
Sataesim
Top