Notice: fwrite(): Write of 467 bytes failed with errno=28 No space left on device in /home/rmrk/domains/rmrk.net/public_html/Sources/Cache/APIs/FileBased.php on line 96

Notice: fwrite(): Write of 59 bytes failed with errno=28 No space left on device in /home/rmrk/domains/rmrk.net/public_html/Sources/Cache/APIs/FileBased.php on line 96

Notice: fwrite(): Write of 1714 bytes failed with errno=28 No space left on device in /home/rmrk/domains/rmrk.net/public_html/Sources/Cache/APIs/FileBased.php on line 96

Notice: fwrite(): Write of 836 bytes failed with errno=28 No space left on device in /home/rmrk/domains/rmrk.net/public_html/Sources/Cache/APIs/FileBased.php on line 96

Notice: fwrite(): Write of 8192 bytes failed with errno=28 No space left on device in /home/rmrk/domains/rmrk.net/public_html/Sources/Cache/APIs/FileBased.php on line 96

Notice: fwrite(): Write of 44 bytes failed with errno=28 No space left on device in /home/rmrk/domains/rmrk.net/public_html/Sources/Cache/APIs/FileBased.php on line 96

Notice: fwrite(): Write of 8192 bytes failed with errno=28 No space left on device in /home/rmrk/domains/rmrk.net/public_html/Sources/Cache/APIs/FileBased.php on line 96

Notice: fwrite(): Write of 2000 bytes failed with errno=28 No space left on device in /home/rmrk/domains/rmrk.net/public_html/Sources/Cache/APIs/FileBased.php on line 96
Simple Script Shop - Page 9
Main Menu
  • Welcome to The RPG Maker Resource Kit.

Simple Script Shop

Started by Rune, May 26, 2007, 11:12:37 PM

0 Members and 1 Guest are viewing this topic.


Notice: fwrite(): Write of 243 bytes failed with errno=28 No space left on device in /home/rmrk/domains/rmrk.net/public_html/Sources/Cache/APIs/FileBased.php on line 96

Rune

Quote from: xinrua on July 19, 2007, 03:49:49 PM
EDIT 4:

There was one more error I found it was this:



Where do you get that? What do you do to get it?
Sincerely,
Your conscience.

tSwitch

I think that's the initialization of Scene_Equip, so there's probably a problem
right as they hit the Equip button in the command menu


FCF3a A+ C- D H- M P+ R T W- Z- Sf RLCT a cmn+++ d++ e++ f h+++ iw+++ j+ p sf+
Follow my project: MBlok | Find me on: Bandcamp | Twitter | Patreon

kami130

Can you create a sort of "dummy window" when enter is pressed, like, in place of the menu..you could try using the menu script..And edit the menu.. nothing big but can you change the options to
Items
Dark power
Treasure
Melody
Exit

Just leave the scripts that link to the options blank..i can handle that
Current project. GAIA
http://rmrk.net/index.php/topic,19136.msg240888.html#msg240888
Overall    05.00%
Graphics 01.0%
Music      00.05%
Story      15.00%
Gmeplay 02.00%
JOIN!!

tSwitch

that would conflict with enter being used to activate different stuffs
...err I think


FCF3a A+ C- D H- M P+ R T W- Z- Sf RLCT a cmn+++ d++ e++ f h+++ iw+++ j+ p sf+
Follow my project: MBlok | Find me on: Bandcamp | Twitter | Patreon

xinrua

#204
ok to answer modern algebra:

Just make it blank when your in the command window or if you could just put an empty place were I can put the picture I want there, and yes you are right in saying that I have pictures labelled "Face_<character name>"

I have allready made them and called them it so you just leave that part empty as well, and I will type it in.

And what I mean by were the charecter is from, is I just want to type the info of the charecter, like were he lives what he has to do, or just what he looks like thats it.

Now to answere Rune:

Ok well its at line 115 were it looks like this:



So thats what it is.

please try to fix it.



Rune

Try changing that line to
self.contents.blt(x, y, bitmap, src_rect)
Sincerely,
Your conscience.

xinrua

still not working did I mention I am using PK edition



modern algebra

#207
Okay, xinrua:

Here is the script:


class Window_BattlerInfo < Window_Base
 
  def initialize
    super (380,206,240,274)
    self.contents = Bitmap.new (width-32,height-32)
    self.z = 200
    self.opacity = 0
  end
 
  def refresh (menu_index)
    self.contents.clear
    if menu_index != -1
      info = []
      actor = $game_party.actors[menu_index]
      picture = RPG::Cache.picture ("Face_"+actor.name)
      cw = picture.width
      self.contents.blt (104 - cw/2,0,picture, Rect.new (0,0,cw,picture.height))
      # Here is where you edit the description of the party members based on Actor
      # ID. Below are two ways you can do it. Try to keep it within 3 or 4 lines.
      # It depends on the size of the corresponding picture.
      case actor.id
      when 1
        # Here is one way to do it, just type info.push "line description" It's neater
        info.push "First line of Actor 1's description"
        info.push "Second line of Actor 1's description"
        # etc....
      when 2
        # Here is a second way. Write info = ["first line", "second line", "etc..."]
        info = ["First line of Actor 2's description","Second line of Actor 2's description"]
      when 3
        info.push "Birthdate:   19 July 2007"
      when 4
      # Make a branch for all actors in the database
      end
      for i in 0...info.size
        self.contents.draw_text (0,picture.height + 10 + 32*i,228,32,info[i])
      end
    end
  end
end

class Window_Location < Window_Base
  def initialize
    super(0, 96, 160, 96)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
  end
  def refresh
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(4, 0, 120, 32, "Location")
    $data_map_infos      = load_data("Data/MapInfos.rxdata")
    self.contents.font.color = normal_color
    self.contents.draw_text(4, 32, 120, 32, $data_map_infos[$game_map.map_id].name, 2)
  end
end

class Window_MenuStatus < Window_Selectable
  def initialize
    super(0, 0, 480, 480)
    self.contents = Bitmap.new(width - 32, height - 32)
    @first_page = true
    refresh
    self.active = false
    self.index = -1
  end
  def refresh
    self.contents.clear
    @item_max = $game_party.actors.size
    if @item_max <= 2
      for i in 0...$game_party.actors.size
        x = 64
        y = i * 116
        actor = $game_party.actors[i]
        draw_actor_graphic(actor, x - 40, y + 80)
        draw_actor_name(actor, x, y)
        draw_actor_class(actor, x + 144, y)
        draw_actor_level(actor, x, y + 32)
        draw_actor_state(actor, x + 90, y + 32)
        draw_actor_exp(actor, x, y + 64)
      end
    else
      bitmap = []
      for i in 0...2
        bitmap.push (Bitmap.new (448,232)) #create a bitmap to store actor data
        if i == 0 || $game_party.actors.size == 4
          num = 2
        else
          num = 1
        end
        for j in 0...num
          actor = $game_party.actors[j+2*i]
          graphic = RPG::Cache.character(actor.character_name, actor.character_hue)
          x = 64
          y = j*116
          # draw actor graphic
          bitmap[i].blt(24 - graphic.width / 8, y+80 - graphic.height / 4, graphic, Rect.new(0, 0, graphic.width / 4, graphic.height / 4))
          bitmap[i].draw_text (x,y,120,32,actor.name) #draw actor name
          bitmap[i].draw_text (x+144,y,236,32,actor.class_name) #draw actor class
          bitmap[i].draw_text(x + 32, y+32, 24, 32, actor.level.to_s, 2)# draw actor level
          bitmap[i].draw_text(x + 24, y+64, 84, 32, actor.exp_s, 2)
          bitmap[i].draw_text(x + 108, y+64, 12, 32, "/", 1)
          bitmap[i].draw_text(x + 120, y+64, 84, 32, actor.next_exp_s)
          bitmap[i].font.color = system_color
          bitmap[i].draw_text(x, y+32, 32, 32, "Lv")
          bitmap[i].draw_text(x, y+64, 24, 32, "E")
          text = make_battler_state_text(actor, 120, true)
          bitmap[i].font.color = actor.hp == 0 ? knockout_color : normal_color
          bitmap[i].draw_text(x+90, y+32, 120, 32, text)
        end
        tw = bitmap[i].text_size ($game_party.gold.to_s).width
        bitmap[i].font.color = system_color
        bitmap[i].draw_text(24- graphic.width / 8+tw,90,100,32,$data_system.words.gold)
        bitmap[i].font.color = normal_color
        bitmap[i].draw_text(24- graphic.width / 8,90,tw,32,$game_party.gold.to_s)
      end
      @bitmap = bitmap
      if @first_page == true
        self.contents.blt (0,0,bitmap[0],Rect.new(0,0,448,232))
      else
        self.contents.blt (0,0,bitmap[1],Rect.new(0,0,448,232))
      end
      if $game_party.actors.size > 2
        self.contents.draw_text (300,150,144,32, "Scroll Left or Right to")
        self.contents.draw_text (300,176,144,32, "see more characters")
      end
    end
  end

  def scroll_right (increment)
    self.contents.clear
    if @first_page == true
      self.contents.blt (-8*increment,0,@bitmap[0],Rect.new(0,0,448,232))
      self.contents.blt (448-8*increment,0,@bitmap[1],Rect.new(0,0,448,232))
      if increment == 55
        @first_page = false
      end
    else
      self.contents.blt (-8*increment,0,@bitmap[1],Rect.new(0,0,448,232))
      self.contents.blt (448-8*increment,0,@bitmap[0],Rect.new(0,0,448,232))
      if increment == 55
        @first_page = true
      end
    end
  end
 
  def scroll_left (increment)
    self.contents.clear
    if @first_page == true
      self.contents.blt (-448+8*increment,0,@bitmap[1],Rect.new(0,0,448,232))
      self.contents.blt (8*increment,0,@bitmap[0],Rect.new(0,0,448,232))
      if increment == 55
        @first_page = false
      end
    else
      self.contents.blt (-448+8*increment,0,@bitmap[0],Rect.new(0,0,448,232))
      self.contents.blt (8*increment,0,@bitmap[1],Rect.new(0,0,448,232))
      if increment == 55
        @first_page = true
      end
    end
  end
 
  def get_page
    if @first_page == true
      return 0
    else
      return 1
    end
  end
 
  def update_cursor_rect
    if @index < 0
      self.cursor_rect.empty
    else
      self.cursor_rect.set(0, (@index%2) * 116, 280, 96)
    end
  end
end

class Window_PlayTime < Window_Base
  def initialize
    super(0, 0, 160, 112)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.z = 200
    refresh
  end
  def refresh
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(4, 8, 120, 32, "Play Time")
    @total_sec = Graphics.frame_count / Graphics.frame_rate
    hour = @total_sec / 60 / 60
    min = @total_sec / 60 % 60
    sec = @total_sec % 60
    text = sprintf("%02d:%02d:%02d", hour, min, sec)
    self.contents.font.color = normal_color
    self.contents.draw_text(4, 40, 120, 32, text, 2)
  end
  def update
    super
    if Graphics.frame_count / Graphics.frame_rate != @total_sec
      refresh
    end
  end
end


class Scene_Menu
  def initialize(menu_index = 0)
    @menu_index = menu_index
    @increment = 0
  end
  def main
    s1 = "Items"
    s2 = "Skills"
    s3 = "Equip"
    s4 = "Status"
    s5 = "Save"
    s6 = "End Game"
    if $game_party.actors.size == 0
      @command_window.disable_item(0)
      @command_window.disable_item(1)
      @command_window.disable_item(2)
      @command_window.disable_item(3)
    end
    if $game_system.save_disabled
      @command_window.disable_item(4)
    end
    @location_window = Window_Location.new
    @status_window = Window_MenuStatus.new
    @status_window.x = 160
    @status_window.y = 0
    @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6])
    @command_window.index = @menu_index
    @command_window.x = 222
    @command_window.y = 246
    @command_window.z = 200
    @steps_window = Window_Steps.new
    @playtime_window = Window_PlayTime.new
    @playtime_window.x = 470
    @playtime_window.y = 10
    @battler_window = Window_BattlerInfo.new
    Graphics.transition
    loop do
      Graphics.update
      Input.update
      update
      if $scene != self
        break
      end
    end
    Graphics.freeze
    @command_window.dispose
    @battler_window.dispose
    @location_window.dispose
    @playtime_window.dispose
    @status_window.dispose
    @steps_window.dispose
  end
  def update
    if @status_window.active
      if @status_window.get_page == 1
        if $game_party.actors.size < 4
          @status_window.index = 2
        else
          if @status_window.index % 2 == 0
            @status_window.index = 2
          else
            @status_window.index = 3
          end
        end
      else
        @status_window.index %= 2
      end
    end
    @playtime_window.update
    if @increment != 0
      @increment += 1
      @increment %= 56
      if @scroll == true
        @status_window.scroll_right (@increment)
      else
        @status_window.scroll_left (@increment)
      end
      if @increment == 0
        @status_window.refresh
        @status_window.active = true
      end
      return
    end
    if @command_window.active
      @command_window.update
      update_command
      return
    end
    if @status_window.active
      @status_window.update
      update_status
      return
    end
  end
  def update_command
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      $scene = Scene_Map.new
      return
    end
    if Input.trigger?(Input::C)
      if $game_party.actors.size == 0 and @command_window.index < 4
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      case @command_window.index
      when 0
        $game_system.se_play($data_system.decision_se)
        $scene = Scene_Item.new
      when 1
        $game_system.se_play($data_system.decision_se)
        @command_window.active = false
        @status_window.active = true
        @status_window.index = 0
      when 2
        $game_system.se_play($data_system.decision_se)
        @command_window.active = false
        @status_window.active = true
        @status_window.index = 0
      when 3
        $game_system.se_play($data_system.decision_se)
        @command_window.active = false
        @status_window.active = true
        @status_window.index = 0
      when 4
        if $game_system.save_disabled
          $game_system.se_play($data_system.buzzer_se)
          return
        end
        $game_system.se_play($data_system.decision_se)
        $scene = Scene_Save.new
      when 5
        $game_system.se_play($data_system.decision_se)
        $scene = Scene_End.new
      end
      return
    end
  end
  def update_status
    @battler_window.refresh (@status_window.index)
    if $game_party.actors.size > 2
      if Input.trigger? (Input::RIGHT)
        @increment = 1
        @scroll = true
        @status_window.active = false
        $game_system.se_play ($data_system.cursor_se)
        @battler_window.refresh (-1)
        return
      elsif Input.trigger? (Input::LEFT)
        @scroll = false
        @increment = 1
        @status_window.active = false
        $game_system.se_play ($data_system.cursor_se)
        @battler_window.refresh (-1)
        return
      end
    end
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      @command_window.active = true
      @status_window.active = false
      @status_window.index = -1
      return
    end
    if Input.trigger?(Input::C)
      case @command_window.index
      when 1
        if $game_party.actors[@status_window.index].restriction >= 2
          $game_system.se_play($data_system.buzzer_se)
          return
        end
        $game_system.se_play($data_system.decision_se)
        $scene = Scene_Skill.new(@status_window.index)
      when 2
        $game_system.se_play($data_system.decision_se)
        $scene = Scene_Equip.new(@status_window.index)
      when 3
        $game_system.se_play($data_system.decision_se)
        $scene = Scene_Status.new(@status_window.index)
      end
      return
    end
  end
end



Credit Rune for this, all I did was add the scrolling function and the face display. It's his script, I didn't even touch all the stuff he had done.




And for your other problem with the Equip Menu, try replacing:


case @actor.id
when 1
bitmap = RPG::Cache.character ("Face_Ozaki",@actor.character_hue)
when 2
bitmap = RPG::Cache.character ("Face_Talier",@actor.character_hue)
when 3
bitmap = RPG::Cache.character ("Face_Toyomori",@actor.character_hue)
when 4
bitmap = RPG::Cache.character ("Face_Yuka",@actor.character_hue)
when 5
bitmap = RPG::Cache.character ("Face_Yuka",@actor.character_hue)
end


with:



bitmap = RPG::Cache.picture("Face_"+@actor.name)



and make sure all of those graphics are imported into the Pictures folder of your game, since you'll need them there for my script.

xinrua

#208
ooh looks good, but there is something wrong with it as you can see some stuff does not show Like this:




the text in the status window, gold window, and location window does not show as you see in the picture is ther a way to fix this?

EDIT 2:

Oh and you fixed my menu problem! thank you so much thank you all!



tSwitch

I don't have it handy, but try Blizzard's font override
that and you should import those battler pix differently, to get rid of the white


FCF3a A+ C- D H- M P+ R T W- Z- Sf RLCT a cmn+++ d++ e++ f h+++ iw+++ j+ p sf+
Follow my project: MBlok | Find me on: Bandcamp | Twitter | Patreon

xinrua

#210
I will Its just a test one to see if it works, and were can I get Blizzard's font override.

(Edit Ooops)

Ok I just found the overide and it works!



tSwitch



FCF3a A+ C- D H- M P+ R T W- Z- Sf RLCT a cmn+++ d++ e++ f h+++ iw+++ j+ p sf+
Follow my project: MBlok | Find me on: Bandcamp | Twitter | Patreon

modern algebra

When you import those pictures, it looks best if you make the background transparent by left clicking on it.

Oh, and just so you know, it was the scrolling animation that I had never done before, so thank you for giving me an opportunity to work that out  ;D

Rune

Quote from: xinrua on July 20, 2007, 03:47:41 AM
Oh and you fixed my menu problem! thank you so much thank you all!

You mean the equip menu?
If so, i'm open for requests ^_^
Sincerely,
Your conscience.

xinrua

#214
yer welcome modren....?

And yep The pic I used in there was just a test to see if it would work just incase my computer crashes, and i loose evrything.

I changed the pics in the equip menu different from the ones in the menu. It make it look better, oh and thank you for your help it works realy great!

You guys are like the first people who helped me with scripts I all ways had to wait for ever, so thank you so much!

(Edit 1)

Ok hey umm you can do this request last becuase you allready helped me. This is for a friend I need A script for hime for a skill and item window he wants everything reversed like the description at the bottom. please do this for him I tried it but my computer crashed so it got deleted.

so please do this! :bean: ;8



modern algebra

errrm... I don't know what you're requesting?

If you mean rearrange the item and skills windows, do you have a mockup?

Or do you mean reverse the description like make all the words backwords :P

I don't think I will be able to take it, someone else might though.

tSwitch

I'll probably be able to do it, can you post a mockup?


FCF3a A+ C- D H- M P+ R T W- Z- Sf RLCT a cmn+++ d++ e++ f h+++ iw+++ j+ p sf+
Follow my project: MBlok | Find me on: Bandcamp | Twitter | Patreon

xinrua

what I mean is my friend needs two scripts, and this is what he wants:

for the skill window:



And for the item window:



And that should be good thnkxs for your help!




tSwitch

alright, so I'll use "what ever you want to put here" to display the actor's battler and such

and for the item screen, he's ok with a blank space down at the bottom till he selects an item?
or does he want the actors always to show there?

that's all I need to know ^_^


FCF3a A+ C- D H- M P+ R T W- Z- Sf RLCT a cmn+++ d++ e++ f h+++ iw+++ j+ p sf+
Follow my project: MBlok | Find me on: Bandcamp | Twitter | Patreon

xinrua

yes it is blank until he selects an Item, and what he just said to me were in the skill menu were it says
"what ever you want to put here" he probly wants same thing done with the item menu, so were you pick a skill, and then your charecters popup in the blank spot. To were you can give the skill to any charecter you want.

and he said if that does not work then just let it show what ever you think should be there.



tSwitch

alright, I'll make the item menu exactly as per the mockup
the skill menu I'm confused about, he wants the same blank space at the bottom, with the "w/e you want" space still there?
if yes, I'll have no problem
if no, explain ?_?


FCF3a A+ C- D H- M P+ R T W- Z- Sf RLCT a cmn+++ d++ e++ f h+++ iw+++ j+ p sf+
Follow my project: MBlok | Find me on: Bandcamp | Twitter | Patreon

xinrua

he wants the same thing as the item menu only on the side of were he said "what ever you want to put here"

so when you click on an skill, the charecters show in that box then you pick who you want to have that skill.

understand now?



tSwitch

yeah, I get it
alright, I'll get to work on it


FCF3a A+ C- D H- M P+ R T W- Z- Sf RLCT a cmn+++ d++ e++ f h+++ iw+++ j+ p sf+
Follow my project: MBlok | Find me on: Bandcamp | Twitter | Patreon

xinrua




tSwitch

umm...does he have a custom skill learn script or something?
because the skills menu is not normally used to display skills that are learned, it
displays currently learned skills, and selecting one (for use out of battle) pops up the actor
select window to choose who to teach it to.


FCF3a A+ C- D H- M P+ R T W- Z- Sf RLCT a cmn+++ d++ e++ f h+++ iw+++ j+ p sf+
Follow my project: MBlok | Find me on: Bandcamp | Twitter | Patreon