![]() |
![]() +- Save-Point (https://www.save-point.org) +-- Forum: Material Development (https://www.save-point.org/forum-8.html) +--- Forum: Scripts Database (https://www.save-point.org/forum-39.html) +---- Forum: RPGMaker VX/VXAce (RGSS2/3) Engines (https://www.save-point.org/forum-117.html) +---- Thread: ![]() |
Correct Character Sprite Display - MechanicalPen - 02-04-2014 Correct Character Sprite Display
Version: 1.1 Introduction VXAce thinks you only want to use baby-chibi sprites, and does not properly handle cases when character sprites are taller than a tile. Script Code: #============================================================================== Instructions Paste in Materials section. Weep at how 138 lines of code were needed to fix something Enterbrain could have done in 1. Credits and Thanks Script is by Moby, with changes made by brushfe to make character sprites overlap with other character sprites correctly Author's Notes Overly wide character sprites still have issues. If I ever try to make something with VXAce I'll see what I can do about fixing it. TODO:
Terms and Conditions Not my script, found on pastebin and http://www.rpgmakervxace.net using google. I just mixed the two edits together. Don't credit me credit these nice smart people instead, RE: Correct Character Sprite Display - Taylor - 02-05-2014 RE: Correct Character Sprite Display - MechanicalPen - 02-05-2014 Walking away (down I'm guessing) from a tile immediately sets your y one less, even though you are still MOSTLY on the previous tile. Running the loop for height+1 might help solve this. And is there some way to get a sprite's screen position? Because I see you tried to "300 + curr_sprite.character.y" which you probably discovered goes wrong when curr_sprite.character.y is large. Using a sprite's screen Y (if such a thing exists) could help fix that. RE: Correct Character Sprite Display - Taylor - 02-05-2014 Screen-relative y is supposed to be a thing, but I I'm not sure what it's defined as. I want to say .y is it, but I'm not so sure. RE: Correct Character Sprite Display - Taylor - 02-10-2014 Addendum: This is another script that performs the same function. It has some similar functions to my edit above, maybe improved. Appearing over tiles is dependant on a terrain tag being visible instead of not, and events require a comment instead of being based on priority setting (normal_priority?). I want to edit this because it makes more sense to me to mark tiles that you want to appear over everything (high objects) than to mark tiles you want to appear in front of (a whole lot of ground level tiles). Replacing terrain references with $game_map.terrain_tag(last_x, last_y) == UpperTerrain && $game_map.tile_id(last_x, last_y, 2) != 0 seems to do it, but I'm not why it still draws the upper dummy even on blank tiles. (Which may cause unnecessary lag?) I believe there are things I'm still misunderstanding about the conditions to draw the dummy area, this isn't the way to do it. Events are a pain. Laggy. Better to set them <large sprite> on a case-by-case basis. Even then something is up somewhere. Hrmmm. It also appears to not work on Victor Slant-script-altered followers in general?? Replacing an early line with return false unless @character.is_a?(Game_Player) || @character.is_a?(Game_Follower) seems to do it... RE: Correct Character Sprite Display - MechanicalPen - 02-10-2014 You misunderstand how to use that script. You use terrain tiles to mark which tiles you want to be in front of the character when its Y is the same as the sprite, and behind if the character is lower than the tile. The author did this so that you could use star tiles for ceilings as well. If you want to make it so that all star tiles are treated as trees, just replace the check for a terrain tile with THIS script's check for a star tile. ( "## Creates the upper sprite that's a copy of the current sprite." That was the first way I tried to solve this problem! Unfortunately doing this way, correctly, means a sprite for every 32px you are tall, and that is a lot of sprites. Since this script doesn't do that, they'll be situations where you are in front of tiles that you should be behind.) RE: Correct Character Sprite Display - Taylor - 02-10-2014 Hrm, yeah I'm not sure what it is, but it seems that the script I posted just works better by marking the "lower" star tiles, even "(flag & 0x10 != 0)", which I think is the priority check, doesn't seem to work the same. (And yes, I defined 'flag'.) Weird. I tested this with tiles formatted as doorways and counters, and it seems that it only consistently worked with the script's default behaviour. Even though I was just swapping out the terrain tag check for the * check. It may also have something to do with X/O passability and proximity to tiles like that. I dunno. But there's two scripts for this now, so hopefully either one of them is useful and functional for people. |