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.

Display element icons Help please

Hi. I'm new to posting.
I've been a viewer of the site a while though.

Anyhoo,
I'm trying my hand at a bestiary and I'm just wondering if there's a way that I can display on each monsters page, an icon that represents the monsters weaknesses and resistances.

If you don't understand that, then let me try to explain more.

If an enemy has a resistance to wind and a weakness against fire, can I somehow relate an icon to wind and fire and have that icon display in my bestiary instead of just the words wind and fire.

:-/ was that even any clearer than before.

Thanks for any help.:)
 
To narrow it down, you would want to only display the elements (fire,earth,water) and states (venom,dazzle,stun) that are not set at the default rating of 'C'. If the rating is OTHER than the default 'C', then the icon(s) will appear otherwise you would have an icon for every possible element and status.

This is what I used for going through SKILLS to add to an array that holds Element states:
Code:
 skill_element = []
        for i in $data_skills[skill.id].element_set
          $data_temp = $data_system.elements[i].clone
          c = $data_temp.slice!(/./m)
          if c != "%"
            skill_element.push(RPG::Cache.icon($data_system.elements[i].clone))
          end
        end

And this to draw 'em after retrieving the names:
Code:
for i in 0...skill_element.length
          rect = Rect.new(130 + x + (i * 26), y + 126, 0, 24)
          self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
          self.contents.blt(130 + x + (i * 26), y + 126, skill_element[i], Rect.new(0, 0, 24, 24), 255)
        end
(I hardcoded the x/y position... sorry...)

Instead of $data_skills, you'd probably be using $data_enemies. And again, you'd want to narrow them down in some way.

Gotta go.

G'night.
 

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