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.

This one should be easy for most scripters! So will you try to help me?

I am translating some things from English to my language in RPG Maker XP. For that effect I am replacing some words in the script by the corresponding words in my language. I've managed to find and translate most words in the script so far except this one. Can you tell me where it is, where it can be translated in the script?

The word is:

- "Critical" - I think it shows up when you do a "critical hit" during battle. I already found "Miss" and translated it but this one doesn't seem to be near it as it, in my opinion, should be...

Thank you for your help!
 
It looks like you didn't understand my question. I want to know where the expression "Critical" or "CRITICAL" is located in the script of RPG Maker XP, so I can alter the word "Critical" that shows up in game when you do a critical hit. Hope you understood now.
 
Make a new script above Main, add this:
Code:
module RPG
class Sprite < ::Sprite
    alias my_damage damage
    def damage(value, critical)
      dispose_damage
      if value.is_a?(Numeric)
        damage_string = value.abs.to_s
      else
        damage_string = value.to_s
      end
      text = "CRITICAL"
      bitmap = Bitmap.new(160, 48)
      bitmap.font.name = "Arial Black"
      bitmap.font.size = 32
      bitmap.font.color.set(0, 0, 0)
      bitmap.draw_text(-1, 12-1, 160, 36, damage_string, 1)
      bitmap.draw_text(+1, 12-1, 160, 36, damage_string, 1)
      bitmap.draw_text(-1, 12+1, 160, 36, damage_string, 1)
      bitmap.draw_text(+1, 12+1, 160, 36, damage_string, 1)
      if value.is_a?(Numeric) and value < 0
        bitmap.font.color.set(176, 255, 144)
      else
        bitmap.font.color.set(255, 255, 255)
      end
      bitmap.draw_text(0, 12, 160, 36, damage_string, 1)
      if critical
        bitmap.font.size = 20
        bitmap.font.color.set(0, 0, 0)
        bitmap.draw_text(-1, -1, 160, 20, text, 1)
        bitmap.draw_text(+1, -1, 160, 20, text, 1)
        bitmap.draw_text(-1, +1, 160, 20, text, 1)
        bitmap.draw_text(+1, +1, 160, 20, text, 1)
        bitmap.font.color.set(255, 255, 255)
        bitmap.draw_text(0, 0, 160, 20, text, 1)
      end
      @_damage_sprite = ::Sprite.new(self.viewport)
      @_damage_sprite.bitmap = bitmap
      @_damage_sprite.ox = 80
      @_damage_sprite.oy = 20
      @_damage_sprite.x = self.x
      @_damage_sprite.y = self.y - self.oy / 2
      @_damage_sprite.z = 3000
      @_damage_duration = 40
    end
end
end
Change 'text = "CRITICAL"' into whatever you like.

Not sure if this works, but it should as far as I can tell.

EDIT: I tested it and it worked perfectly fine with any word I used.
 

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