Need Help with a script.

shaylina

Villager
Member
Joined
Mar 26, 2015
Messages
16
Reaction score
2
First Language
French
Primarily Uses
First of all, I am sorry if I didn't post this to the right place. 

I just need help with something in a bestiary script. The script is a bestiary one, and I am noob, so I understand nothing. (Had difficulty adding options in menu.)

So I use a CBS side view battlers, and the problem is in the bestiary it loads the enemy battler sprites to show, and it doesn't look good at all with all those poses. Here is where I think it go get the sprite in the battler folder.
 

 

  def draw_bestiary_battler(enemy, w, h)

    bitmap = RPG::Cache.battler(enemy.battler_name, enemy.battler_hue)

    bitmap_w = bitmap.width / 2

    bitmap_h = bitmap.height / 2

    src_rect = Rect.new(0, 0, bitmap.width, bitmap.height)

    self.contents.blt(w/2 - bitmap_w, h/2 - bitmap_h, bitmap, src_rect, 192)

  end

What I would like if any one can help, is that it loads an image with the same name as the battler image, but in the picture folder instead.

Thank you for taking time to read this. 
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
Moving to RGSSx Script Support


Instead of RPG::Cache.battler, use RPG::Cache.picture - but check if it uses the same arguments. enemy.battler_name will be fine, but I don't know if pictures use a hue like battlers and characters do.


Note, responders, this is for RMXP.
 

Milena

The woman of many questions
Veteran
Joined
Jan 26, 2014
Messages
1,281
Reaction score
106
First Language
Irish
Primarily Uses
N/A
Wouldn't it be better for this

bitmap = RPG::Cache.battler(enemy.battler_name, enemy.battler_hue)to be something like

bitmap = Cache.battler(enemy.battler_name, enemy.battler_hue)or you can change it to something like:

bitmap = Cache.picture(enemy.battler_name)and add the battler in the pictures folder?
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
Note, responders, this is for RMXP.
;) XP does not have the Cache module. You have to use RPG::Cache


And I just checked - RMXP does not use hues for pictures, so it'd just be RPG::Cache.picture(enemy.battler_name)
 
Last edited by a moderator:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,853
Messages
1,016,986
Members
137,561
Latest member
visploo100
Top