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.

Drawing an Icon

Okay here's what's going on. I haven't used RPG Maker XP in years. Last time I used it was when everyone was using Postality Knights version but I'm glad to see there is now an official English language version. But anyhoo I thought I'd go back and have a little go of it and since I know have some small amounts of programming experience I thought I'd check the scripting as I think it would be probably better to learn by doing. So I thought I'd have a look at the title screen. I've found out how to change the words in the little window, change its opacity and position. Now the thing I want to add is icons next to the each option in the window but I'm stuck on how to do it especially since my experience was running over the basics of python ages ago. Here's what my code idea is like at the moment.

Code:
    @icon1 = Sprite.new
    @icon1.bitmap =  RPG::Cache.icon()
    s1 = "New Game"
    s2 = "Load Game"
    s3 = "End Game"
    @command_window = Window_Command.new(180, [s1, s2, s3])
    @command_window.back_opacity = 0
    @command_window.x = 535 - @command_window.width / 2
    @command_window.y = 300

I'm probably going in the wrong direction here But I was thinking that I could specify which icon I wanted using the RPG::Cache::icon() thing but I had no idea what to put into the brackets to recieve the icon I wanted (I'm just working with the RTP btw) and then afterwards I could kind of stick it on the end of the s1 variable which probably wouldn't work anyways. Any help would be greatly appreciated.
 
In the brackets, simply put the icon name.

Code:
@icon1.bitmap =  RPG::Cache.icon("Filename")

You can omit the path and the file extension.

RPG Maker XP will look for the icon in:
RTP's folder
'Graphics/Icons' folder in your game folder.


regards from paranoyas
 
Open de Database (F9), items section or skills section, weapons section, armours section... any section where you can assign an icon to the object in question.
If you choose an icon for a skill (for example)... here you got your filename! :D



regards from paranoyas
 
To get rid of the border change:
Code:
@command_window.back_opacity = 0
To:
Code:
@command_window.opacity = 0

To move the icon:
Code:
@icon.x = #
@icon.y = #
You'll need to play around with the numbers. For starting numbers you should try ones close to the window's x and y values!
 
Thanks so much guys I think I finally have basic title screen customization down now. Anyhoo I'm not sure if maybe sticking the icons nexts to each of the menu items like that is the best way to do it (can you not stick it in the window in the same way as text or does it only except strings) but I suppose it doesn't really matter I don't want to ask to much of you guys. Thanks again.
 

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