Calling another class

Sai Hikawa

Villager
Member
Joined
Jun 22, 2013
Messages
26
Reaction score
0
First Language
English
Primarily Uses
N/A
Hi,

I'm having problems transitioning to another screen. What I want to accomplish is that all of the options call another screen (Scene_Fusion2). But I also want to get Scene_Fusion2 to display what you have selected from the previous screen (Scene_Fusion1).
Additionally, I am not able to exclude the main actor (the very first actor) no matter what method I try.

For ease, I was thinking of separating each screen (Scene_Fusion1 and Scene_Fusion2) into two separate screens... but I'm willing to follow suggestions.

Code:
#==============================================================================# Class Scene_Fusion < Scene_MenuBase# This class is for displaying the first Fusion screen. All options should# open the next screen, Scene_Fusion2#==============================================================================class Scene_Fusion < Scene_MenuBase  def start    super    @header_window = Window_Header.new(0, 0, Graphics.width, 50)    @list_window = Window_PartyList.new(0, 50, Graphics.width)    @list_window.set_handler(:cancel,  method(:return_scene))  end #def startend #class Scene_Fusion#==============================================================================# Class Scene_Fusion2 < Scene_MenuBase# This class is for displaying the second Fusion screen. All options should# open the next screen, displaying the status of the resulting demon#==============================================================================class Scene_Fusion2 < Scene_MenuBase  def start    super    @header_window2 = Window_Header2.new(0, 0, Graphics.width, 50)    @list_window2 = Window_PartyList2.new(0, 50, Graphics.width)    @list_window2.set_handler(:cancel,  method(:return_scene))  end #def startend #class Scene_Fusion2#==============================================================================# Class Window_Header < Window_Base# This class displays the options at the top.#==============================================================================class Window_Header < Window_Base  def initialize(x, y, width, height)    super    self.windowskin = Cache.system("Window")    self.opacity = 0    update_padding    update_tone    create_contents    draw_headers    @opening = @closing = false  end #def initialize    def dispose    contents.dispose unless disposed?    super  end #def dispose  def draw_headers    change_color(system_color)    draw_text(25, 0, 250, line_height, "Select First Demon")    draw_text(25, 25, 85, line_height, "Race")    draw_text(110, 25, 85, line_height, "Name")    draw_text(190, 25, 85, line_height, "LV")    for i in 1..6      eval("draw_text(220+(50*#{i}), 0, 30, line_height, #{i})")    end # for    change_color(normal_color)  end #def draw_headersend #class Window_Header#==============================================================================# Class Window_Header2 < Window_Base# This class displays the options at the top.#==============================================================================class Window_Header2 < Window_Base  def initialize(x, y, width, height)    super    self.windowskin = Cache.system("Window")    self.opacity = 0    update_padding    update_tone    create_contents    draw_headers    @opening = @closing = false  end #def initialize    def dispose    contents.dispose unless disposed?    super  end #def dispose  def draw_headers    change_color(system_color)    draw_text(25, 0, 250, line_height, "Select Second Demon")    draw_text(25, 25, 85, line_height, "Race")    draw_text(110, 25, 85, line_height, "Name")    draw_text(190, 25, 85, line_height, "LV")    draw_text(300, 25, 85, line_height, "Result")    change_color(normal_color)  end #def draw_headersend #class Window_Header2#==============================================================================# Class Window_PartyList < Window_Selectable# This class displays the list of party members. Should not include the# main actor. #==============================================================================class Window_PartyList < Window_Selectable  def initialize(x, y, width)    super(x, y, width, Graphics.height - y)    self.opacity = 0    data = []    self.index = 0 #Do not include the main actor!    activate    refresh  end #def initialize  def item_max    @data ? @data.size : 1  end #def item_max      def make_item_list    @data = $game_party.members.compact  end #def make_item_list    def draw_item(index)    item = @data[index]    if item      rect = item_rect_for_text(index)      draw_text(rect, item.id)      draw_text_ex(rect.x + 15, rect.y, item.class.name)      draw_text_ex(rect.x + 100, rect.y, item.name)      draw_text_ex(rect.x + 180, rect.y, item.level)      for i in 1..6        if index==i-1          #If same actor, cannot be fused          eval("draw_text(220+(50*#{i}), rect.y, 30, line_height, '-')")        elsif item.class == @data[i-1].class          #else if same class, cannot be fused          eval("draw_text(220+(50*#{i}), rect.y, 30, line_height, 'No')")        else          #else, can be fused          eval("draw_text(220+(50*#{i}), rect.y, 30, line_height, 'Yes')")          #@data[i-1].set_handler(:ok, SceneManager.call(Scene_Fusion2))          #set call handler        end #end if else      end #end for    end #end if  end #def draw_item    def refresh    contents.clear    make_item_list    create_contents    draw_all_items  end #def refresh    #set handler for showing the next screenend #class Window_PartyList#==============================================================================# Class Window_PartyList2 < Window_Selectable# This class displays the list of party members. Should not include the# main actor. #==============================================================================class Window_PartyList2 < Window_Selectable  def initialize(x, y, width)    super(x, y, width, Graphics.height - y)    self.opacity = 0    data = []    self.index = 0 #Do not include the main actor!    activate    refresh  end #def initialize  def item_max    @data ? @data.size : 1  end #def item_max      def make_item_list    @data = $game_party.members.compact  end #def make_item_list    def draw_item(index)    item = @data[index]    if item      rect = item_rect_for_text(index)      draw_text(rect, item.id)      draw_text_ex(rect.x + 15, rect.y, item.class.name)      draw_text_ex(rect.x + 100, rect.y, item.name)      draw_text_ex(rect.x + 180, rect.y, item.level)      #Compute the resulting demon      show_result(item, @data)    end #end if  end #def draw_item    #should print out the resulting demon.  def show_result(item, data)      #some code here  end #show_result    def refresh    contents.clear    make_item_list    create_contents    draw_all_items  end #def refresh    #set handler for showing the next screenend #class Window_PartyList2
 

Death10

;D
Member
Joined
Jul 18, 2012
Messages
29
Reaction score
5
First Language
Vietnamese
Primarily Uses
self.index = 0 #Do not include the main actor!To

self.index = 1 #Or Var?
 

Zalerinian

Jack of all Errors
Veteran
Joined
Dec 17, 2012
Messages
4,696
Reaction score
935
First Language
English
Primarily Uses
N/A
self.index = 0 #Do not include the main actor!To

self.index = 1 #Or Var?
That doesn't help any, it makes the cursor go off the the values if you only have one party member.

What I'm curious about is why do you need two scenes? You can easily do this with just one, which would help to get rid of your problem.
 

Death10

;D
Member
Joined
Jul 18, 2012
Messages
29
Reaction score
5
First Language
Vietnamese
Primarily Uses
That doesn't help any, it makes the cursor go off the the values if you only have one party member.

What I'm curious about is why do you need two scenes? You can easily do this with just one, which would help to get rid of your problem.
That why "or Var" is added.
 

Zalerinian

Jack of all Errors
Veteran
Joined
Dec 17, 2012
Messages
4,696
Reaction score
935
First Language
English
Primarily Uses
N/A
That why "or Var" is added.
It wouldn't help anyway, the index isn't what displays the actors, the index is which one is selected. The @data variable is what has the actors. To get rid of the first actor, you need to change

def make_item_list @data = $game_party.members.compact end #def make_item_listTo

def make_item_list @data = $game_party.members.compact @data.delete_at(0) end #def make_item_listthe party leader is always the first part member, so get rid of him/her from the list.
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
But I also want to get Scene_Fusion2 to display what you have selected from the previous screen (Scene_Fusion1).
You can store it in a global variable.

You can also pass it to the scene. Look at how Shop_Scene uses the "prepare" method to set up goods.
 
Last edited by a moderator:

Sai Hikawa

Villager
Member
Joined
Jun 22, 2013
Messages
26
Reaction score
0
First Language
English
Primarily Uses
N/A
Hmmm... I'll give it a try and let you guys know. Thanks~! :)

What I'm curious about is why do you need two scenes? You can easily do this with just one, which would help to get rid of your problem.
How do I accomplish this? I'm not very knowledgeable yet with this language, so I'm not sure what approach would be best. The reason I made 2 separate scenes is because there are 2 separate windows that will occur (the first one after selecting the NPC, the second one after selecting an item on the first screen)... but if it would be better to use a single scene, then ok. ;-)

The reason I also asked about this one is because of readability. I'm going to need to create another code with the process and variables separately, because it would be longer (at least I think it is).

Edit: On another note, I'm selecting options on the first screen, but it doesn't go to the second screen... Am I doing something wrong?
 
Last edited by a moderator:

Zalerinian

Jack of all Errors
Veteran
Joined
Dec 17, 2012
Messages
4,696
Reaction score
935
First Language
English
Primarily Uses
N/A
Edit: Oh and I forgot to ask, this is for Ace, right?

You never set a handler to go to the next screen. You need to add one of those, just like you did with the cancel button would return, you need a handler for the ok button. You have one in there that is commented out, but you'll have to change that a little bit.

As for making it all one scene, it's very easy to do. You can make all the windows at once and then just hide the ones you don't need yet. If you wanted to get more advanced with it, you could make the windows only once (One PartyList and one Header) and then rewrite what's on them and change how they act based on where you are in the scene.

If you are just starting out, though, I'd recommend just using one scene for all of it, make your windows (Two PartyList and two Headers), hide the second PartyList and Header until you need them later, and just work with your script.

You also have a lot of useless code in your PartyList and Header classes. When you make a new object of that class (as in, @list_window = Window_PartyList.new), it automatically calls 'initialize'. The first thing you do with it is call super, which will go to the parent of your current class (in this case Window_Base) and do whatever is in there. That 'super' bit already does:

self.windowskin = Cache.system("Window"), update_padding, update_tone, create_contents, and @opening = @closing = false. So you don't need that in your initialize. Window_Header's initialize can look like this:

def initialize(x, y, width, height) super self.opacity = 0 draw_headers end #def initializeThe rest of it is already done in 'super'. That is fine for both Window_Header and Window_Header2, since they both do the same thing.

Making a Handler to Continue:

You have, for the 'ok' handler:

#@data[i-1].set_handler:)ok, SceneManager.call(Scene_Fusion2)) But that won't work. You're trying to set a handler on an actor, which isn't where it goes. You want to put the handler on the window. In this case,

@list_window.set_handler:)ok, method(continue))and then somewhere else, have a method named continue which will run when you choose an actor.
If you need me to explain this in more detail, or make something more clear, just let me know.
 
Last edited by a moderator:

Sai Hikawa

Villager
Member
Joined
Jun 22, 2013
Messages
26
Reaction score
0
First Language
English
Primarily Uses
N/A
Gah, it's difficult. XD

If I understood you correctly, I could do this...

class Scene_Fusion < Scene_MenuBase def start super #Scene Fusion 1 @header_window = Window_Header.new(0, 0, Graphics.width, 50) @list_window = Window_PartyList.new(0, 50, Graphics.width) @list_window.set_handler:)cancel, method:)return_scene)) #Scene Fusion 2 @header_window2 = Window_Header2.new(0, 0, Graphics.width, 50) @list_window2 = Window_PartyList2.new(0, 50, Graphics.width) @list_window2.set_handler:)cancel, method:)return_scene)) end #def startend #class Scene_FusionAnd set @header_window2, @list_window2 as deactivated... then on the 'continue' method, I can just swap their activation (no idea how XD)?

(Edit, I tried @header_window2.deactivate, and got me errors. Where would I put the "@list_window.set_handler:)ok, method(continue))" and the continue method?)

Would that also allow me to display the selected item on the first screen to be displayed on to the other screen?
 
Last edited by a moderator:

Zalerinian

Jack of all Errors
Veteran
Joined
Dec 17, 2012
Messages
4,696
Reaction score
935
First Language
English
Primarily Uses
N/A
 class Scene_Fusion < Scene_MenuBase def start super # Fusion 1 @header1 = Window_Header.new(0, 0, Graphics.width, 50) @list1 = Window_PartyList.new(0, 50, Graphics.width) @list1.set_handler:)ok, method:)continue)) @list1.set_handler:)cancel, method:)return_scene)) # Fusion 2 @header2 = Window_Header2.new(0, 0, Graphics.width, 50) @list2 = Window_PartyList2.new(0, 50, Graphics.width) @list2.set_handler:)ok, method:)continue)) @list2.set_handler:)cancel, method:)return_scene)) # Setup Fusion 1 as the start point @list1.activate # Activate the first list. @list2.deactivate # Deactivate the second list. @list2.hide @header2.hide # Hide the second list and header. end def continue @list1.deactivate @list1.hide @header1.hide @list2.show @header2.show @list2.activate endend
The reason you got an error on header_window2.deactivate is because header_window2 can't be active or inactive, it isn't a selectable window. The lists are, so they can be active or inactive, but the headers aren't, so they can't and you got an error.
 

Sai Hikawa

Villager
Member
Joined
Jun 22, 2013
Messages
26
Reaction score
0
First Language
English
Primarily Uses
N/A
Ah, I guess that makes sense.

How do I get to display on Window_Header2 the selected item from Window_PartyList? Am I correct to assume that this would use a global variable? How do you declare one? XD

Here's what I have so far...

Code:
#==============================================================================# Class Scene_Fusion < Scene_MenuBase# This class is for displaying the Fusion screen. All options should# open the next screen, Scene_Fusion2#==============================================================================class Scene_Fusion < Scene_MenuBasedef startsuper# Fusion 1@header1 = Window_Header.new(0, 0, Graphics.width, 132)@list1 = Window_PartyList.new(0, 132, Graphics.width)@list1.set_handler(:ok, method(:continue))@list1.set_handler(:cancel, method(:return_scene))# Fusion 2@header2 = Window_Header2.new(0, 0, Graphics.width, 132)@list2 = Window_PartyList2.new(0, 132, Graphics.width)@list2.set_handler(:ok, method(:continue))@list2.set_handler(:cancel, method(:return_scene))# Setup Fusion 1 as the start point@list1.activate # Activate the first list.@list2.deactivate # Deactivate the second list.@list2.hide@header2.hide # Hide the second list and header.enddef continue@list1.deactivate@list1.hide@header1.hide@list2.show@header2.show@list2.activateendend#==============================================================================# Class Window_Header < Window_Base# This class displays the options at the top.#==============================================================================class Window_Header < Window_Basedef initialize(x, y, width, height)superself.opacity = 0draw_headers@opening = @closing = falseend #def initializedef disposecontents.dispose unless disposed?superend #def disposedef draw_headerschange_color(system_color)draw_text(60, 0, 250, line_height, "Select First Demon")draw_text(60, 25, 85, line_height, "Race")draw_text(150, 25, 85, line_height, "Name")draw_text(295, 25, 85, line_height, "LV")for i in 1..10eval("draw_text(330+(25*#{i}), 0, 25, 10, #{i})")end # forchange_color(normal_color)end #def draw_headersend #class Window_Header#==============================================================================# Class Window_Header2 < Window_Base# This class displays the options at the top.#==============================================================================class Window_Header2 < Window_Basedef initialize(x, y, width, height)superself.opacity = 0draw_headers@opening = @closing = falseend #def initializedef disposecontents.dispose unless disposed?superend #def disposedef draw_headerschange_color(system_color)draw_text(60, 0, 250, line_height, "Select Second Demon")draw_text(60, 25, 85, line_height, "Race")draw_text(150, 25, 85, line_height, "Name")draw_text(295, 25, 85, line_height, "LV")draw_text(450, 25, 85, line_height, "Result")change_color(normal_color)end #def draw_headersend #class Window_Header2#==============================================================================# Class Window_PartyList < Window_Selectable# This class displays the list of party members. Should not include the# main actor.#==============================================================================class Window_PartyList < Window_Selectabledef initialize(x, y, width)super(x, y, width, Graphics.height - y)self.opacity = 0data = []self.index = 0 #Do not include the main actor!activaterefreshend #def initializedef item_max@data ? @data.size : 1end #def item_maxdef make_item_list@data = $game_party.members.compact@data.delete_at(0) #Ensures that the first party member isn't bothered.end #def make_item_listdef draw_item(index)item = @data[index]if itemrect = item_rect_for_text(index)#draw_text(rect, item.id)draw_text_ex(22, rect.y, item.id)#draw_text_ex(rect.x + 15, rect.y, item.class.name)draw_text_ex(60, rect.y, item.class.name)#draw_text_ex(rect.x + 100, rect.y, item.name)draw_text_ex(150, rect.y, item.name)#draw_text_ex(rect.x + 180, rect.y, item.level)draw_text_ex(295, rect.y, item.level)for i in 1..10if index==i-1#If same actor, cannot be fusedeval("draw_text(330+(25*#{i}), rect.y, 25, line_height, '-')")elsif item.class == @data[i-1].class#else if same class, cannot be fusedeval("draw_text(330+(25*#{i}), rect.y, 25, line_height, 'No')")else#else, can be fusedeval("draw_text(330+(25*#{i}), rect.y, 25, line_height, 'Yes')")#@data[i-1].set_handler(:ok, SceneManager.call(Scene_Fusion2))#set call handlerend #end if elseend #end forend #end ifend #def draw_itemdef refreshcontents.clearmake_item_listcreate_contentsdraw_all_itemsend #def refreshend #class Window_PartyList#==============================================================================# Class Window_PartyList2 < Window_Selectable# This class displays the list of party members. Should not include the# main actor.#==============================================================================class Window_PartyList2 < Window_Selectabledef initialize(x, y, width)super(x, y, width, Graphics.height - y)self.opacity = 0data = []self.index = 0 #Do not include the main actor!activaterefreshend #def initializedef item_max@data ? @data.size : 1end #def item_maxdef make_item_list@data = $game_party.members.compactend #def make_item_listdef draw_item(index)item = @data[index]if itemrect = item_rect_for_text(index)draw_text(rect, item.id)draw_text_ex(rect.x + 15, rect.y, item.class.name)draw_text_ex(rect.x + 100, rect.y, item.name)draw_text_ex(rect.x + 180, rect.y, item.level)#Compute the resulting demonshow_result(item, @data)end #end ifend #def draw_item#should print out the resulting demon.def show_result(item, data)end #show_resultdef refreshcontents.clearmake_item_listcreate_contentsdraw_all_itemsend #def refresh#set handler for showing the next screenend #class Window_PartyList2
 
Last edited by a moderator:

Zalerinian

Jack of all Errors
Veteran
Joined
Dec 17, 2012
Messages
4,696
Reaction score
935
First Language
English
Primarily Uses
N/A
You don't have to store it anywhere, actually. You just need to add this to Window_PartyList:

def selected return @data[self.index]endThen, to display it, just use @list1.selected.
 

Sai Hikawa

Villager
Member
Joined
Jun 22, 2013
Messages
26
Reaction score
0
First Language
English
Primarily Uses
N/A
When I put  @list1.selected under "Window_Header2", it gives me an error about undefined methods (as in, draw_text(20,20,20,20,@list1.selected) ). Should it go somewhere else? 
 
Last edited by a moderator:

Zalerinian

Jack of all Errors
Veteran
Joined
Dec 17, 2012
Messages
4,696
Reaction score
935
First Language
English
Primarily Uses
N/A
Hmm, no, that's my fault. I thought that wrong. @list1 doesn't exist in Window_Header2, it exists in Scene_Fusion. At this point, you have a bunch of options. You could use a global variable (A variable with a $ in front, like $game_variables, or $game_party), or a bunch of other things. What I'd probably do, because using a global variable for something like this is silly, would be to simply make a method for the window to hold it. For example, we could do something like this:

def selected(value) @selected = valueendin Window_Header2, and then you could just use draw_text(20,20,20,20,@selected). But how do we put a value in there? Easy!

Back up in the continue method we made earlier, just add the is at the very end:

@list2.selected(@list1.selected)and that should do it.
 

Sai Hikawa

Villager
Member
Joined
Jun 22, 2013
Messages
26
Reaction score
0
First Language
English
Primarily Uses
N/A
Hmmm... I tried putting it as is (@selected), and it doesn't display anything. I then tried @selected.class, it displays "NilClass". Tried @selected.name, and it crashed. :)

Here's what I have so far, let me know if I'm following it correctly...

Code:
#==============================================================================# Class Scene_Fusion < Scene_MenuBase# This class is for displaying the Fusion screen. All options should# open the next screen, Scene_Fusion2#==============================================================================class Scene_Fusion < Scene_MenuBase  def start    super    # Fusion 1    @header1 = Window_Header.new(0, 0, Graphics.width, 132)    @list1   = Window_PartyList.new(0, 132, Graphics.width)    @list1.set_handler(:ok, method(:continue))    @list1.set_handler(:cancel, method(:return_scene))        # Fusion 2    @header2 = Window_Header2.new(0, 0, Graphics.width, 132)    @list2   = Window_PartyList2.new(0, 132, Graphics.width)    @list2.set_handler(:ok, method(:continue))    @list2.set_handler(:cancel, method(:return_scene))        # Setup Fusion 1 as the start point    @list1.activate # Activate the first list.    @list2.deactivate # Deactivate the second list.    @list2.hide    @header2.hide   # Hide the second list and header.  end    def continue    @list1.deactivate    @list1.hide    @header1.hide    @list2.show    @header2.show    @list2.activate    @list2.selected(@list1.selected)  endend#==============================================================================# Class Window_Header < Window_Base# This class displays the options at the top.#==============================================================================class Window_Header < Window_Base  def initialize(x, y, width, height)    super    self.opacity = 0    draw_headers    @opening = @closing = false  end #def initialize  def dispose    contents.dispose unless disposed?    super  end #def dispose  def draw_headers    change_color(system_color)    draw_text(30, 0, 250, line_height, "Select First Demon")    draw_text(30, 25, 85, line_height, "Race")    draw_text(120, 25, 85, line_height, "Name")    draw_text(265, 25, 85, line_height, "LV")    for i in 1..10      eval("draw_text(300+(30*#{i-1}), 0, 30, 10, #{i})")    end # for    change_color(normal_color)  end #def draw_headersend #class Window_Header#==============================================================================# Class Window_Header2 < Window_Base# This class displays the options at the top.#==============================================================================class Window_Header2 < Window_Base  def initialize(x, y, width, height)    super    self.opacity = 0    draw_headers    @opening = @closing = false  end #def initialize    def dispose    contents.dispose unless disposed?    super  end #def dispose    def selected(value)    @selected = value  end #def selected  def draw_headers    change_color(system_color)    draw_text(30, 0, 250, line_height, "Select Second Demon")    draw_text(420, 0, 300, line_height, @selected.class)    draw_text(30, 25, 85, line_height, "Race")    draw_text(120, 25, 85, line_height, "Name")    draw_text(265, 25, 85, line_height, "LV")    draw_text(420, 25, 85, line_height, "Result")    change_color(normal_color)  end #def draw_headersend #class Window_Header2#==============================================================================# Class Window_PartyList < Window_Selectable# This class displays the list of party members. Should not include the# main actor. #==============================================================================class Window_PartyList < Window_Selectable  def initialize(x, y, width)    super(x, y, width, Graphics.height - y)    self.opacity = 0    data = []    self.index = 0 #Do not include the main actor!    activate    refresh  end #def initialize  def item_max    @data ? @data.size : 1  end #def item_max      def make_item_list    @data = $game_party.members.compact    @data.delete_at(0) #Ensures that the first party member isn't bothered.  end #def make_item_list    def draw_item(index)    line_height = 16    item = @data[index]    if item      rect = item_rect_for_text(index)      #draw_text(rect, item.id)      draw_text_ex(0, rect.y, item.id)      #draw_text_ex(rect.x + 15, rect.y, item.class.name)      draw_text_ex(30, rect.y, item.class.name)      #draw_text_ex(rect.x + 100, rect.y, item.name)      draw_text_ex(120, rect.y, item.name)      #draw_text_ex(rect.x + 180, rect.y, item.level)      draw_text_ex(265, rect.y, item.level)      for i in 1..10        if index==i-1          #If same actor, cannot be fused          eval("draw_text(300+(30*#{i-1}), rect.y, 30, line_height, '-')")        elsif item.class == @data[i-1].class          #else if same class, cannot be fused          eval("draw_text(300+(30*#{i-1}), rect.y, 30, line_height, 'No')")        else          #else, can be fused          eval("draw_text(300+(30*#{i-1}), rect.y, 30, line_height, 'Yes')")          #@data[i-1].set_handler(:ok, SceneManager.call(Scene_Fusion2))        end #end if else      end #end for    end #end if  end #def draw_item    #def selected(value)  #  @selected = value  #end    def refresh    contents.clear    make_item_list    create_contents    draw_all_items  end #def refresh    def selected    return @data[self.index]  end #def selected  end #class Window_PartyList#==============================================================================# Class Window_PartyList2 < Window_Selectable# This class displays the list of party members. Should not include the# main actor. #==============================================================================class Window_PartyList2 < Window_Selectable  def initialize(x, y, width)    super(x, y, width, Graphics.height - y)    self.opacity = 0    data = []    self.index = 0 #Do not include the main actor!    activate    refresh  end #def initialize  def item_max    @data ? @data.size : 1  end #def item_max      def make_item_list    @data = $game_party.members.compact    @data.delete_at(0) #Ensures that the first party member isn't bothered.  end #def make_item_list    def draw_item(index)    item = @data[index]    if item      rect = item_rect_for_text(index)      draw_text(rect, item.id)      draw_text_ex(rect.x + 15, rect.y, item.class.name)      draw_text_ex(rect.x + 100, rect.y, item.name)      draw_text_ex(rect.x + 180, rect.y, item.level)      #Compute the resulting demon      show_result(item, @data)    end #end if  end #def draw_item    #should print out the resulting demon.  def show_result(item, data)        end #show_result    def refresh    contents.clear    make_item_list    create_contents    draw_all_items  end #def refresh    def selected(value)    @selected = value  end    #set handler for showing the next screenend #class Window_PartyList2 
 

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,849
Messages
1,016,975
Members
137,563
Latest member
cexojow
Top