[XP] Visual Equipment for Blizz-ABS

Started by Blizzard, February 01, 2010, 09:39:36 am

Previous topic - Next topic

KK20

August 30, 2013, 12:49:25 pm #80 Last Edit: August 30, 2013, 02:03:16 pm by KK20
I don't get it...wouldn't that still be the same amount of sprites/work?
Fix I did in my head: ShowHide

Anywho, if the problem is keeping the player as actor 1 but having separate sprites, find this line under Sprite_CharacterEquipment
        a_id = (BlizzCFG::ACTOR_UNIQUE ? "#{@character.battler.id}_" : '')

and make it

       if BlizzCFG::ACTOR_UNIQUE
         if @character.battler.id == 1 and $game_switches[1]
           a_id = "2_"
         else
           a_id = "#{@character.battler.id}_"
         end
       else
         a_id = ''
       end

Then replace the update method with this

 def update
   super
   @gender_switch = $game_switches[1] if @gender_switch.nil? #<=== Be sure to change if...
   weapons = @character.battler.weapons
   armors = @character.battler.armors
   if @weapons != weapons || @armors != armors ||
       @character_name != @character.character_name ||
       @gender_switch != $game_switches[1] #<============= ...you want to use a different switch
     @weapons = weapons
     @armors = armors
     @character_name = @character.character_name
     self.create_bitmap
     @cw = self.bitmap.width / @character.pattern_size
     @ch = bitmap.height / 4
     self.ox = @cw / 2
     self.oy = @ch
     self.src_rect.x = @character.pattern * @cw
     self.src_rect.width = @cw
   end
   self.visible = !@character.transparent
   sx = @character.pattern * @cw
   sy = (@character.direction - 2) / 2 * @ch
   self.src_rect.set(sx, sy, @cw, @ch)
   self.x = @character.screen_x
   self.y = @character.screen_y
   self.z = @character.screen_z(@ch)
   self.opacity = @character.opacity
   self.blend_type = @character.blend_type
   self.bush_depth = @character.bush_depth
 end

If the actor's ID is 1 and game switch 1 is ON, then actor 1's sprites will be drawn as if it were actor 2.

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

Shalaren

August 30, 2013, 03:49:26 pm #81 Last Edit: August 30, 2013, 03:50:39 pm by Shalaren
Yes that could do exactly what I need it to, so I tried it out but when the switch is on weird stuff happens.
so the first 3 armors I have in the database are 3 helmets in which I am using as "Hair" slots.
so in the character creation I have it where you choose a haircut, so right after choosing a gender (when the switch is on) The sprite of Actor 1 from the helmet ID 2 is drawn on top of the Helmet ID 2 of Actor 2. and armor ID 7 isn't showing while the switch is on. I am probably confusing sometimes so Ill get you a picture in a sec.

here

(and yes I do have 2 versions for everything)

it might be something really simple, but I don't know what it is :S

KK20

So what you're saying is that it's drawing 'a1_2' and 'a2_2' together, but it doesn't draw 'a1_7' nor 'a2_7' for the female sprite? Yeah, I have no clue what could be causing that. I'd need a demo to thoroughly test it--nothing in the code stands out to me right away.

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

Shalaren

Nvm! I deleted the script and added it again and now it works just fine! (I must have messed up something somehow)

Thanks alot :) this edit makes the gender difference I needed!

glad300

An update to display extra slots of G777 Multislot script would be very nice  :^_^':