RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
How would I put a battler in my CMS? [resolved]

0 Members and 1 Guest are viewing this topic.

***
Rep:
Level 88
I am learning how to script and i plan on making a CMS, but i want to have the battler show up in one menu, or at least the face, how would i do this? Thanks for the help in advance!  ;D
« Last Edit: March 14, 2007, 02:34:36 PM by atracious »
"Facts are useless. You could use facts to prove anything that's even remotely true." Homer Jay Simpson

"I do not know what weapons WWIII will be fought with but i know WWIV will be fought with sticks and stones" Albert Einstein

"It's better to have loved and lost than never to have loved at all." from In Memoriam, by Alfred, Lord Tennyson.

"all your base are belonging to us!" awful fantasy 3

"the grapes damb it, it's alway's the grapes!"

Funny anagrams:
Desperation=A rope ends it
Mother in law=Woman hitler
Lottery machine=Money lost in 'em
Election results=Lies lets recount
Dormitory=Dirty room
Snooze alarms=Alas! No more Z's
Eleven plus two=Twelve plus one
Cosmetic surgery="Yes, I correct mugs."
The IRS=Theirs!
Public relations=Crap, built on lies
Astronomer=Moon starer
Dementia="Detain me."
Internet chat rooms=The moron interacts
The eyes!=They see!

Currently making:
http://rmrk.net/index.php/topic,13132.0.html

***
Rep:
Level 88
Menu & Battle System Guru
you would have to have a Window_Base definition of what exactly u want to draw....

this is for faces:

Code: [Select]
  #--------------------------------------------------------------------------
  # * Draw Face Graphic
  #     actor : actor
  #     x     : draw spot x-coordinate
  #     y     : draw spot y-coordinate
  #--------------------------------------------------------------------------
  def draw_actor_graphic(actor, x, y)
    if $game_party.actors.size != 0
      bitmap = RPG::Cache.picture("Faces/" + actor.character_name)
      self.contents.blt(x - 40, y - 80, bitmap, Rect.new(0, 0, 80, 80))
    end
  end
  def draw_actor_graphicb(actor, x, y)
    bitmap = RPG::Cache.character(actor.character_name, actor.character_hue)
    cw = bitmap.width / 4
    ch = bitmap.height / 4
    src_rect = Rect.new(0, 0, cw, ch)
    self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect)
  end

but you need to have a folder called "Faces" inside of your "pictures" folder. In that Faces folder you'll need to have the faces you want but they must be 80x80.

THEN

in your CMS you'll just have to draw them with something like this:

draw_actor_graphic(@actor, X POSITION WHERE U WANT THE FACE PLACED, Y POSITION WHERE U WANT THE FACE PLACED)

as you can see....it says "draw_actor_graphic" and ur prolly thinking "don't i need to draw the face graphics?" Well, what you did in the Window_Base (you did place the coding above in window_base didn't you?) was redo the draw_actor_graphic to draw faces (I just have it titled draw face graphic in my comments so I can remember ;)) There you go!

***
Rep:
Level 88
Spoiler for:
you would have to have a Window_Base definition of what exactly u want to draw....

this is for faces:

Code: [Select]
  #--------------------------------------------------------------------------
  # * Draw Face Graphic
  #     actor : actor
  #     x     : draw spot x-coordinate
  #     y     : draw spot y-coordinate
  #--------------------------------------------------------------------------
  def draw_actor_graphic(actor, x, y)
    if $game_party.actors.size != 0
      bitmap = RPG::Cache.picture("Faces/" + actor.character_name)
      self.contents.blt(x - 40, y - 80, bitmap, Rect.new(0, 0, 80, 80))
    end
  end
  def draw_actor_graphicb(actor, x, y)
    bitmap = RPG::Cache.character(actor.character_name, actor.character_hue)
    cw = bitmap.width / 4
    ch = bitmap.height / 4
    src_rect = Rect.new(0, 0, cw, ch)
    self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect)
  end

but you need to have a folder called "Faces" inside of your "pictures" folder. In that Faces folder you'll need to have the faces you want but they must be 80x80.

THEN

in your CMS you'll just have to draw them with something like this:

draw_actor_graphic(@actor, X POSITION WHERE U WANT THE FACE PLACED, Y POSITION WHERE U WANT THE FACE PLACED)

as you can see....it says "draw_actor_graphic" and ur prolly thinking "don't i need to draw the face graphics?" Well, what you did in the Window_Base (you did place the coding above in window_base didn't you?) was redo the draw_actor_graphic to draw faces (I just have it titled draw face graphic in my comments so I can remember ;)) There you go!
so what do i do with this? I'm pretty noob, I just went through the "read this before asking for help" thing and noticed there wasn't anything on Battlers :| Sorry for being a noob! And 80x80 is kinda small...
Also i don't want it to affect the existing battlers...
« Last Edit: March 14, 2007, 01:55:36 AM by atracious »
"Facts are useless. You could use facts to prove anything that's even remotely true." Homer Jay Simpson

"I do not know what weapons WWIII will be fought with but i know WWIV will be fought with sticks and stones" Albert Einstein

"It's better to have loved and lost than never to have loved at all." from In Memoriam, by Alfred, Lord Tennyson.

"all your base are belonging to us!" awful fantasy 3

"the grapes damb it, it's alway's the grapes!"

Funny anagrams:
Desperation=A rope ends it
Mother in law=Woman hitler
Lottery machine=Money lost in 'em
Election results=Lies lets recount
Dormitory=Dirty room
Snooze alarms=Alas! No more Z's
Eleven plus two=Twelve plus one
Cosmetic surgery="Yes, I correct mugs."
The IRS=Theirs!
Public relations=Crap, built on lies
Astronomer=Moon starer
Dementia="Detain me."
Internet chat rooms=The moron interacts
The eyes!=They see!

Currently making:
http://rmrk.net/index.php/topic,13132.0.html

*
Full Metal Mod - He will pillage your women!
Rep:
Level 93
The RGSS Dude
draw_actor_battler(actor_id,x,y)

?

Sorry I have to chuckle.

OVERCOMPLICATION
"The wonderful thing about Tiggers
Is Tiggers are wonderful things
Their tops are made out of rubber
Their bottoms are made out of springs

They’re bouncy, trouncy, flouncy, pouncy
Fun, fun, fun, fun, fun!
But the most wonderful thing about Tiggers
Is I’m the only one, I’m the only one."

***
Rep:
Level 88
Menu & Battle System Guru
so what do i do with this? I'm pretty noob, I just went through the "read this before asking for help" thing and noticed there wasn't anything on Battlers :| Sorry for being a noob! And 80x80 is kinda small...
80x80 is small, so just adjust sizes in here by replacing the 80s with your desired size(but you need to adjust the position of it):
Code: [Select]
self.contents.blt(x - 40, y - 80, bitmap, Rect.new(0, 0, 80, 80))
Put this in the script called "Window_Base" using the script editor and Replace it for the default "draw_actor_graphic":
Spoiler for:
Code: [Select]
  def draw_actor_graphic(actor, x, y)
    if $game_party.actors.size != 0
      bitmap = RPG::Cache.picture("Faces/" + actor.character_name)
      self.contents.blt(x - 40, y - 80, bitmap, Rect.new(0, 0, 80, 80)) # Or w/e size u want
    end
  end
  def draw_actor_graphicb(actor, x, y)
    bitmap = RPG::Cache.character(actor.character_name, actor.character_hue)
    cw = bitmap.width / 4
    ch = bitmap.height / 4
    src_rect = Rect.new(0, 0, cw, ch)
    self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect)
  end

Also i don't want it to affect the existing battlers...

Put this in window_base just as you did before:
 
Code: [Select]
def draw_actor_battler(actor, x, y)
    battler = RPG::Cache.picture("Battlers/" + actor.character_name)
    bw = battler.width
    bh = battler.height
    src_rect = Rect.new(0, 0, bsw, bsh)
    self.contents.blt(x - bsw / 23, y - bsh, battler, src_rect)
  end

Now in window_status or window_menustatus or w/e window u want to draw the battler in...just place this in it:

Code: [Select]
draw_actor_battler(actor, X POSITION, Y POSITION)

***
Rep:
Level 88
draw_actor_battler(actor_id,x,y)

?

Sorry I have to chuckle.

OVERCOMPLICATION
I have to laugh back, I've tried that before, it doesn't work, that's why i made this topic. I get this:

"Facts are useless. You could use facts to prove anything that's even remotely true." Homer Jay Simpson

"I do not know what weapons WWIII will be fought with but i know WWIV will be fought with sticks and stones" Albert Einstein

"It's better to have loved and lost than never to have loved at all." from In Memoriam, by Alfred, Lord Tennyson.

"all your base are belonging to us!" awful fantasy 3

"the grapes damb it, it's alway's the grapes!"

Funny anagrams:
Desperation=A rope ends it
Mother in law=Woman hitler
Lottery machine=Money lost in 'em
Election results=Lies lets recount
Dormitory=Dirty room
Snooze alarms=Alas! No more Z's
Eleven plus two=Twelve plus one
Cosmetic surgery="Yes, I correct mugs."
The IRS=Theirs!
Public relations=Crap, built on lies
Astronomer=Moon starer
Dementia="Detain me."
Internet chat rooms=The moron interacts
The eyes!=They see!

Currently making:
http://rmrk.net/index.php/topic,13132.0.html

********
EXA
Rep:
Level 92
Pikachu on a toilet
Project of the Month winner for April 2007
Code: [Select]
  def draw_actor_battler(actor, x, y)
    if actor != nil and actor.battler_name != ""
      bitmap = RPG::Cache.battler(actor.battler_name, actor.battler_hue)
      cw = bitmap.width
      ch = bitmap.height
      src_rect = Rect.new(0, 0, cw,ch)
      self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect)
    end
  end

You need to ADD THIS to Window_Base first. xD And it's "battler", not "battle".

Get King of Booze for Android, for iOS, for OUYA or for Windows!
Visit our website.
You can also love/hate us on Facebook or the game itself.


Get DropBox, the best free file syncing service there is!

***
Rep:
Level 88
 :tpg: OMG IT WORKS! thank you Blizzard, Tsunokiette, and blazinhandle!
"Facts are useless. You could use facts to prove anything that's even remotely true." Homer Jay Simpson

"I do not know what weapons WWIII will be fought with but i know WWIV will be fought with sticks and stones" Albert Einstein

"It's better to have loved and lost than never to have loved at all." from In Memoriam, by Alfred, Lord Tennyson.

"all your base are belonging to us!" awful fantasy 3

"the grapes damb it, it's alway's the grapes!"

Funny anagrams:
Desperation=A rope ends it
Mother in law=Woman hitler
Lottery machine=Money lost in 'em
Election results=Lies lets recount
Dormitory=Dirty room
Snooze alarms=Alas! No more Z's
Eleven plus two=Twelve plus one
Cosmetic surgery="Yes, I correct mugs."
The IRS=Theirs!
Public relations=Crap, built on lies
Astronomer=Moon starer
Dementia="Detain me."
Internet chat rooms=The moron interacts
The eyes!=They see!

Currently making:
http://rmrk.net/index.php/topic,13132.0.html