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.
dungeons and dragons

0 Members and 1 Guest are viewing this topic.

*
Rep: +0/-0Level 87
Ok I have been tooling around with RMXP for a week or so and the whole massively huge stats as well as the odd way damage is calculated makes me annoyed. I am rewriting the damage script to be more dungeons and dragons like. However I have a few scripting questions:

First
Logically does this work?
Code: [Select]
# First hit detection
    attacker_hit = (rand(20) + attacker.str + attacker.agi)
    self_defence = (10 + self.pdef + self.dex)
    hit_result = (self_defence < attacker_hit)
    # If hit occurs
    if hit_result == true
      # Calculate basic damage
      atk = [rand(attacker.atk) + attacker.str].max
      self.damage = atk

Second
Dungeons and dragons handles criticals in this way
critical check: rand(20) > Weapons Critical range
critical damage: damage * weapons critical multiplier

I would need to have the script check the weapon ID and then based on the ID of the weapon assign those variables. I know it goes something like this

when 1 # weapon Id 1
Assign variables
when 2 # weapon Id 2
Assign variables

there just needs to be some script before that part and i don't know that part. If I could have that part explained it would make me happy.

Third
In dungeons and dragons you can attack multiple times in one round if your Bab or in the case in the script above your agi is high enough. Such that if (agi - 5) > 0 you can attack again. Then after that attack if (agi - 10) > 0 you can attack a third time. You can keep attacking in this manner until your agi - (some numeber) =< 0 Can someone point me in the right direction on how to get this done?