RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
[RM2K3] CBS Speed System

0 Members and 1 Guest are viewing this topic.

**
Rep: +0/-0Level 68
RMRK Junior
First time making a CBS, kinda tricky, but I get the jist. I've got the following laid out for checking speed (planning an RM2K speed system, except all the attacks and targets are selected before anyone attacks).

Apologies for the non RM2K3 format, I tend to write my stuff out in Notepad first... if equates to a fork condition, var is a variable, swt is a switch...

Code: [Select]
if [var.USER1.SPD] > [var.USER2.SPD]( #If the first character's speed is higher,
     var.USER1RESULT + 1 #Add one onto the result.
)
if [var.USER1.SPD] > [var.USER3.SPD](
     var.USER1RESULT + 1
}

Checks var.USER1 over var.USER2-var.ENEMMAX, and then var.USER 2 over var.USER1, var.USER3-var.ENEMMAX and so on...

var.BATTLERNO. - 1
if [var.USER1RESULT] = var.BATTLERNO.( #If the first user's result is equal to the number of battlers minus one...
     var.SLOT1 = 1 #He/she's placed in the first attack slot.
     if [swt.SPEEDSHOW] is ON #And if one of the characters has an ability to show the attack order...
     SHOW PICTURE(USER 1.png) #A bar appears to represent the first character being the fastest.
)

What I wanted to know is if this is the tidiest way to do this... plus, will it lag? Or is that only with nested Fork Conditions?

Also, does this attack formula seem alright? I'd like the MED ATK, HIGH DEF and LOW ATK, MED DEF should be the same value, the weaker attacks to be stronger (say, 15-20 hits over 25,) and the stronger attacks to be weaker (say 3-4 hits over 2).

Everything inside represents either numbers or vars, so variables are simply the words in the formula (like OPP.DEF, USER.ATK).

Code: [Select]
HP = 250/500/750 (LOW, MED, HIGH)
ATK/DEF = 10/30/50 (LOW, MED, HIGH)
Assuming skill used is 40 power.

OPP.DEF/10=OPP.DEF
USER.ATK/OPP.DEF=USER.ATK
USER.ATK*USER.SKILLDMG=DMG
DMG/4=DMG

LOW ATK, LOW DEF
10/10=1
10/1=10
10*40=400
400/4=100 (5 KO)

LOW ATK, MED DEF
30/10=3
10/3=3
3*40=120
120/4=30 (16-17 KO)

LOW ATK, HIGH DEF
50/10=5
10/5=2
2*40=80
80/4=20 (25 KO)

MED ATK, LOW DEF
10/10=1
30/1=30
30*40=1200
1200/4=300 (2 KO)

MED ATK, MED DEF
30/10=3
30/3=10
10*40=400
400/4=100 (5 KO)

MED ATK, HIGH DEF
50/10=5
30/5=6
6*40=240
240/4=60 (8-9 KO)

HIGH ATK, LOW DEF
10/10=1
50/1=50
50*40=2000
2000/4=500 (1 KO)

HIGH ATK, MED DEF
30/10=3
50/3=17
17*40=680
680/4=170 (2-3 KO)

HIGH ATK, HIGH DEF
50/10=5
50/5=10
10*40=400
400/4=100 (5 KO)