Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Int Stat determins Attack

Mega Flare

Awesome Bro

Well i use to have a script that did this but since the HACK thingy i cant go back to the topic and get it:( So anyways this is what i want,
For this 1 Character i want there INT stat to effect there Attack Power like if there weapon has 5 atk and there int is like 15 it would add 3 more atk power making it 8.
 
What is the formula? how does INT influences the attack power


EDIT: Taking a guess that you want to add int / atk to the attack power

Add this in a new script above main
Code:
class Game_Actor
  alias int_base_atk base_atk
  def base_atk
    atk = int_base_atk
    if @actor_id == some_id
      atk += base_int / atk
    end
    return atk
  end
end
 
Ahh ok then the code should be this instead

Code:
class Game_Actor
  alias int_base_atk base_atk
  def base_atk
    atk = int_base_atk
    if @actor_id == some_id
      atk += base_int / 5
    end
    return atk
  end
end

replace some_id with the id of the actor
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top