09-04-2018, 10:53 PM
Thank you! Title has been updated.
Here is the code for the menu graphics.
I then call it on the Scene_Menu (replacement) script like
@menu_graphics = Menu_Graphics.new
@menu_graphics.x = 0
@menu_graphics.y = 0
Which I don't know if it's the best way to do it, but it functions okay so far
Here's an example of $game_variables[1] at 0, versus at 5, just to give a visual. (All I did was change the colors around. The filenames are just specific for my own reference.)
That is pretty much exactly what I'm trying to do. Kind of a mix of point and click and visual novel. I haven't tried playing around with mouse scripts just yet (I plan to), but I will take just about anything over the default control scheme. Any items collected will be pretty much exclusively for puzzles or referencing things like passwords.
I'm having a lot of trouble figuring out how the placement of icons and selection stuff works on the item window though. It may be down to me being absolutely terrible at math, but I can't figure out how to get the selection box to actually line up properly with the icons. I'm legitimately at a loss. It's all been trial and error and comparing different menu edits to the base code, but I can't actually understand which numbers do what and why. So I just keep having this same issue but in slightly different ways:
I'm also not sure if it's even possible to put them horizontally closer together and/or vertically further apart.
Here is the code for the menu graphics.
Code:
#==============================================================================
# **Menu Graphics
#==============================================================================
class Menu_Graphics < Window_Base
#----------------------------------------------------------------------
# * Object Initialization
#----------------------------------------------------------------------
def initialize
super(0, 0, 640, 480)
self.contents = Bitmap.new(width - 32, height - 32)
self.opacity = 0
#-----------------------------------------------------------------------
# * Draw Background
#-----------------------------------------------------------------------
@menuback = Sprite.new
@menuback.x = 0
@menuback.y = 0
#-----------------------------------------------------------------------
# * Variable Graphic Changes For Background
#-----------------------------------------------------------------------
#Background 1
if $game_variables[1] < 5
@menuback.bitmap = RPG::Cache.picture('backtest1')
#Background 2
else $game_variables[1] >= 5
@menuback.bitmap = RPG::Cache.picture('backtest2')
end
#-----------------------------------------------------------------------
# * Draw Character Graphic
#-----------------------------------------------------------------------
#Display character graphic
@charactergraphic = Sprite.new
@charactergraphic.x = 375
@charactergraphic.y = 50
#-----------------------------------------------------------------------
# * Variable Graphic Changes For Character
#-----------------------------------------------------------------------
if $game_variables[1] == 0
@charactergraphic.bitmap = RPG::Cache.picture('hanneutral')
elsif $game_variables[1] == 1
@charactergraphic.bitmap = RPG::Cache.picture('hanworry')
elsif $game_variables[1] == 2
@charactergraphic.bitmap = RPG::Cache.picture('penneutral')
elsif $game_variables[1] == 3
@charactergraphic.bitmap = RPG::Cache.picture('penhappy')
elsif $game_variables[1] == 4
@charactergraphic.bitmap = RPG::Cache.picture('penworry')
elsif $game_variables[1] == 5
@charactergraphic.bitmap = RPG::Cache.picture('penpsych')
else $game_variables[1] == 6
@charactergraphic.bitmap = RPG::Cache.picture('penaffect')
end
#-----------------------------------------------------------------------
# * Character Names And Changes
#-----------------------------------------------------------------------
@charactername = Sprite.new
@charactername.x = 310
@charactername.y = 15
if $game_variables[1] <= 2
@charactername.bitmap = RPG::Cache.picture('testname1')
else $game_variables[1] > 2
@charactername.bitmap = RPG::Cache.picture('testname2')
end
end
end
@menu_graphics = Menu_Graphics.new
@menu_graphics.x = 0
@menu_graphics.y = 0
Which I don't know if it's the best way to do it, but it functions okay so far
Here's an example of $game_variables[1] at 0, versus at 5, just to give a visual. (All I did was change the colors around. The filenames are just specific for my own reference.)
Content Hidden
I'm having a lot of trouble figuring out how the placement of icons and selection stuff works on the item window though. It may be down to me being absolutely terrible at math, but I can't figure out how to get the selection box to actually line up properly with the icons. I'm legitimately at a loss. It's all been trial and error and comparing different menu edits to the base code, but I can't actually understand which numbers do what and why. So I just keep having this same issue but in slightly different ways:
Content Hidden
I'm also not sure if it's even possible to put them horizontally closer together and/or vertically further apart.