Scrippet needed for Equip Window

Status
Not open for further replies.

jamiras843

Veteran
Veteran
Joined
Jun 22, 2013
Messages
32
Reaction score
3
First Language
English
Primarily Uses
Hi, me again asking for something that seems really simple yet I cannot for the life of me figure out. I would like a script that over writes the Equipment Window, one that allows me to remove certain parameters (mainly magical defense).  I figured out how to do it for the status window, but not the equipment one.  Any help would be greatly appreciated!



This is the window I am speaking of if there's any confusion.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
If you figured it out for the status window, the logic should be pretty similar. What was your solution for the status window?
 

jamiras843

Veteran
Veteran
Joined
Jun 22, 2013
Messages
32
Reaction score
3
First Language
English
Primarily Uses
It was this

  #--------------------------------------------------------------------------  # * Draw Parameters  #--------------------------------------------------------------------------  def draw_stat_content(x, y)        [2, 3, 4, 6, 7].each_with_index {|p, i| draw_actor_param(@actor, x, y + line_height * i, p) }  end #Stat Content
but with the other window it has nothing to do with numbers and has current parameter script and post parameter 

  #--------------------------------------------------------------------------  # * Draw Parameter Name  #--------------------------------------------------------------------------  def draw_param_name(x, y, param_id)    change_color(system_color)    draw_text(x, y, 80, line_height, Vocab::param(param_id))  end  #--------------------------------------------------------------------------  # * Draw Current Parameter  #--------------------------------------------------------------------------  def draw_current_param(x, y, param_id)    change_color(normal_color)    draw_text(x, y, 32, line_height, @actor.param(param_id), 2)  end  #--------------------------------------------------------------------------  # * Draw Right Arrow  #--------------------------------------------------------------------------  def draw_right_arrow(x, y)    change_color(system_color)    draw_text(x, y, 22, line_height, "->", 1)  end  #--------------------------------------------------------------------------  # * Draw Post-Equipment Change Parameter  #--------------------------------------------------------------------------  def draw_new_param(x, y, param_id)    new_value = @temp_actor.param(param_id)    change_color(param_change_color(new_value - @actor.param(param_id)))    draw_text(x, y, 32, line_height, new_value, 2)  endend
Like this. I honestly have no scripting knowledge really and have no idea how to use the one I had in the status for the equipment window.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
No. Window_EquipStatus has pretty much the same as what the status window has. Look in the refresh method.
 

jamiras843

Veteran
Veteran
Joined
Jun 22, 2013
Messages
32
Reaction score
3
First Language
English
Primarily Uses
that made sense after you said it, and upon editing the script I seem to have an error.

I changed the line like this 

  #--------------------------------------------------------------------------  # * Refresh  #--------------------------------------------------------------------------  def refresh    contents.clear    draw_actor_name(@actor, 4, 0) if @actor    [2, 3, 4, 6, 7].each_with_index {|i| draw_item(0, line_height * (1 + i), 2 + i) }  end
Now iI have an error in Script 'Game_Actor' line 381: NoMethodError occurred. Undefined '+' for nil:NilClass

which is,

Code:
def param_plus(param_id)    equips.compact.inject(super) {|r, item| r += item.params[param_id] }end
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
Try just removing the 2+ from the last argument.  What's there is based on going from 0-5, so it has to add 2 to get the actual parameter.  What you're putting in the array IS the actual parameter (2-7) so you don't need to add the 2 at the end.

So:

[2,3,4,6,7].each {|i| draw_item(0, line_height * (1+i), i) }
I also don't think you need to use each_with_index - just each should do it.
 

IMHunter

Elite
Member
Joined
Aug 7, 2013
Messages
16
Reaction score
1
First Language
english
Primarily Uses
Shaz's Method works for me :p

Thats what I do for scrippets
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
I've already suspended you from posting for a day.  Now you've just revealed that you have multiple accounts, which is against the forum rules and an instant ban offense.  Since you have more posts on THIS account, I will leave it active, but I am banning the other one.  I will not apply the posting suspension to this account, but if you do what you did earlier, I will change my mind.  I also hope you don't have accounts 1-5 ...
 

IMHunter

Elite
Member
Joined
Aug 7, 2013
Messages
16
Reaction score
1
First Language
english
Primarily Uses
I've already suspended you from posting for a day.  Now you've just revealed that you have multiple accounts, which is against the forum rules and an instant ban offense.  Since you have more posts on THIS account, I will leave it active, but I am banning the other one.  I will not apply the posting suspension to this account, but if you do what you did earlier, I will change my mind.  I also hope you don't have accounts 1-5 ...
Okay thank you so much! I actually forgot about this account that I made last summer... The other account I made just this morning was just a new cuz I forgot about this one... But thank you for not suspending this one!
 

jamiras843

Veteran
Veteran
Joined
Jun 22, 2013
Messages
32
Reaction score
3
First Language
English
Primarily Uses
Well that worked but is there a way to close the gap where the taken out parameter was? 

 

ShadowLurk

Tanoshii~
Veteran
Joined
Feb 14, 2014
Messages
226
Reaction score
53
Primarily Uses
You want to use each_with_index for that....

Code:
[2,3,4,6,7].each_with_index {|n, i| draw_item(0, line_height * (1+i), n) }
 

jamiras843

Veteran
Veteran
Joined
Jun 22, 2013
Messages
32
Reaction score
3
First Language
English
Primarily Uses
EDIT: Actually fixed it, final code ended up being

[2,3,4,6,7].each_with_index {|p, i| draw_item( x, y + line_height * (-2 + i), p) }
Thank you everyone for the input!
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
Yeah, you're right. I'd completely overlooked that.


This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.
 
Status
Not open for further replies.

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

Latest Threads

Latest Posts

Latest Profile Posts

People3_5 and People3_8 added!

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.

Forum statistics

Threads
105,868
Messages
1,017,085
Members
137,583
Latest member
write2dgray
Top