If I were doing all my own sprites, this wouldn't be an issue, but I'm trying to use as much RTP stuff as possible for my current project. It's my first "serious" attempt at making something, and I'm doing it mostly for practice. In future projects, I hope to actually use none of the RTP. It'll be great, maybe!
Anyway, what I'd like to do is take care of something that's been subtly bothering me for the last couple of weeks since I've been working on this. I really feel like characters (the player and NPC's, specifically) should all be about 16 pixels higher, to look like they're standing in the center of the square they're in, rather than at the bottom. I could go and edit every sprite I use, making them shorter, and pushing them upward, but... that would be a ton of work, and it'd likely be easier to make sprites from scratch.
A scripting solution should be possible, I hope... I'm just still not great at this stuff. I imagine it'd have to involve putting a Comment in any events that represent NPC's, so as to avoid offsetting doors and the like. Can anyone help me out with this?
I really should just stop trying to put all these fancy things into my practice project, but... I guess I'm just too nitpicky! <_<;
like this? (change OFFSET_Y to whatever you want)
*code deleted*edit : ups, I missed this...
Quote from: Nath on September 08, 2016, 02:04:27 am
so as to avoid offsetting doors and the like...
this should do it
#==============================================================================
# ** Game_Character
#------------------------------------------------------------------------------
# This class deals with characters. It's used as a superclass for the
# Game_Player and Game_Event classes.
#==============================================================================
class Game_Character
#--------------------------------------------------------------------------
# * Alias Listing
#--------------------------------------------------------------------------
$@ || alias_method(:screen_y_3x552qs, :screen_y)
#--------------------------------------------------------------------------
# * Get Screen Y-Coordinates
#--------------------------------------------------------------------------
def screen_y(*args)
screen_y_3x552qs(*args) + screen_y_offsets
end
#--------------------------------------------------------------------------
# * Get Screen Y-Offsets
#--------------------------------------------------------------------------
def screen_y_offsets
case @character_name
when '001-Fighter01','002-Fighter02', '.....' #<<< add npc graphic name yourself
return 10
when '048-Fairy01', '....'
return 20
end
return 0
end
end
Yes!
That actually does exactly what I wanted!
Thanks! :up: