Melosx 27 Posted January 2, 2012 (edited) MSX - XP Characters on VX/VXAce Version: 1.0 Author: Melosx Introduction You can use XP characters whit VX and VXAce. Rename the image by adding $xp at the beginning of the name. Example: 001-Fighter01.png -> $xp001-Fighter01.png p.s.: sorry for my bad english Script #============================================================================== # ** MSX - XP Characters on VX/VXAce #============================================================================== # Author: Melosx # Notes translated by ShinGamix # http://www.rpgmakervxace.net/index.php?/user/1272-shingamix/ # Version: 1.0 # Compatible with VX and VXAce # #============================================================================== # * Description # ----------------------------------------------------------------------------- # This script allows you to use xp in vx chara simply inserting the tag # $ xp # Before the name of the file. # You can then use the normal VX / VXAce along with those of XP. # #============================================================================== # * Instructions # ----------------------------------------------------------------------------- # Place the script under Materials and above Main. Add to chara of XP # $ Xp before the tag name. # #============================================================================== #============================================================================== # ** Sprite_Character #============================================================================== class Sprite_Character < Sprite_Base def update_bitmap if @tile_id != @character.tile_id or @character_name != @character.character_name or @character_index != @character.character_index @tile_id = @character.tile_id @character_name = @character.character_name @character_index = @character.character_index if @tile_id > 0 sx = (@tile_id / 128 % 2 * 8 + @tile_id % 8) * 32; sy = @tile_id % 256 / 8 % 16 * 32; self.bitmap = tileset_bitmap(@tile_id) self.src_rect.set(sx, sy, 32, 32) self.ox = 16 self.oy = 32 else self.bitmap = Cache.character(@character_name) sign = @character_name[/^[!$]./] if sign != nil and sign.include?('$') @cw = bitmap.width / 3 @ch = bitmap.height / 4 else @cw = bitmap.width / 12 @ch = bitmap.height / 8 end if @character_name != nil and @character_name.include?('$xp') @cw = bitmap.width / 4 @ch = bitmap.height / 4 end self.ox = @cw / 2 self.oy = @ch end end end def update_src_rect if @character_name != nil and @character_name.include?('$xp') if @tile_id == 0 pattern = @character.pattern > 0 ? @character.pattern - 1 : 3 sx = pattern * @cw sy = (@character.direction - 2) / 2 * @ch self.src_rect.set(sx, sy, @cw, @ch) end else if @tile_id == 0 index = @character.character_index pattern = @character.pattern < 3 ? @character.pattern : 1 sx = (index % 4 * 3 + pattern) * @cw sy = (index / 4 * 4 + (@character.direction - 2) / 2) * @ch self.src_rect.set(sx, sy, @cw, @ch) end end end end #========================================================================== # ** Window_Base #========================================================================== class Window_Base < Window def draw_character(character_name, character_index, x, y) return if character_name == nil bitmap = Cache.character(character_name) sign = character_name[/^[!$]./] if character_name != nil and character_name.include?('$xp') cw = bitmap.width / 4 ch = bitmap.height / 4 n = character_index src_rect = Rect.new(0, 0, cw, ch) else if sign != nil and sign.include?('$') cw = bitmap.width / 3 ch = bitmap.height / 4 else cw = bitmap.width / 12 ch = bitmap.height / 8 end n = character_index src_rect = Rect.new((n%4*3+1)*cw, (n/4*4)*ch, cw, ch) end self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect) end end Compatibility Rpg maker VX/VXAce. Screenshot Edited March 2, 2012 by Melosx 2 PhoenixSoul and CT Bolt reacted to this Share this post Link to post Share on other sites
Mr. Bubble 116 Posted January 2, 2012 Since this is a small script, I will keep it up, but please try to translate script comments to English in future submissions. Thanks. Share this post Link to post Share on other sites
ShinGamix 101 Posted January 2, 2012 I translated it for you Mr. Bubble @ Melosx 1 Ally reacted to this Share this post Link to post Share on other sites
Yosuke 1 Posted February 14, 2012 I have a question I'm pretty sure you can use XP chars in VX without having a script by adding a "!$" at the beginning of the name? 1 Bilmanda reacted to this Share this post Link to post Share on other sites
Emerald 42 Posted February 14, 2012 This way, you don't have to change them. Vx (ace) sprites use 3 walking frames, while XP sprites use 4. Share this post Link to post Share on other sites
Yosuke 1 Posted February 14, 2012 So now I have a $xptestchar.png, but it's not working. Looks like this: http://imgur.com/KT0ti Script is over main and under materials. Share this post Link to post Share on other sites
Melosx 27 Posted March 2, 2012 the script work in game not in the database... In thedatabase and in the event you see the chara not correctly but in game it's ok... @ShinGamix: Thank you for the translation... I update the first post... Share this post Link to post Share on other sites
Ginolamantino 6 Posted March 10, 2012 Good job as always Melosx! If you ever need I can translate your scripts and comments for you. Share this post Link to post Share on other sites
Melosx 27 Posted March 10, 2012 Thank you gino... If I need help with translation I ask to you Share this post Link to post Share on other sites
susumelon 0 Posted June 8, 2012 Really Thank You! You helped me for making my project! Big thanks Share this post Link to post Share on other sites
Rylix 0 Posted January 22, 2013 Incompatible with Victor's Engine Free Jump script Share this post Link to post Share on other sites
yoshilord100 0 Posted September 27, 2014 I have a question how do you use it do you replace a specific script with this one or do you make a new script?i'm a bit new to this stuff So now I have a $xptestchar.png, but it's not working. Looks like this: http://imgur.com/KT0ti Script is over main and under materials. What do you mean by over main and under materials? Share this post Link to post Share on other sites