Jump to content


Photo

Need assistance with simplifying a script

vx ace rgss3 scripting simplifying

  • Please log in to reply
6 replies to this topic

#1 PhoenixSoul

PhoenixSoul

    Lady Fair Gamer

  • Member
  • 39 posts
  • LocationNülgârt, Âsürïa
  • RM Skill - Other

Posted 18 May 2017 - 07:28 PM

Okay, so I've figured out how to make certain parts of the Status Screen adapt to certain changes, such as more than five pieces of equipment.

 

I modified the default window script, but in truth, all I really did was change the values in one area, and my level of RGSS3 knowledge is not really enough for me to be able to just make it a standalone part.

 

I'll show you the code of the script so you'll know what I am talking about.

 

Spoiler

 

Can anyone help me make this to where it is much simpler? Thanks in advance to whomever assists.



#2 oichidan

oichidan

    Yet to have a title

  • Member
  • 15 posts
  • LocationLembang, Jawa Barat, Indonesia
  • RM Skill - Coder

Posted 18 May 2017 - 08:01 PM

Okay, so I've figured out how to make certain parts of the Status Screen adapt to certain changes, such as more than five pieces of equipment.

 

I modified the default window script, but in truth, all I really did was change the values in one area, and my level of RGSS3 knowledge is not really enough for me to be able to just make it a standalone part.

 

I'll show you the code of the script so you'll know what I am talking about.

 

Spoiler

 

Can anyone help me make this to where it is much simpler? Thanks in advance to whomever assists.

 

I hope this helps in any way.

 

 

# I hope this simplifies the Refresh and draw_block methods

def refresh
  contents.clear
  4.times {|i|
    y = 0
    line_y = 0
    case i
    when 0
      y = 0
      line_y = 0.5
    when 1
      y = 1.5
      line_y = 5.5
    when 2
      y = 6.5
      line_y = 16
    when 3
      y = 16
      line_y = 0
    else
      y = 0
      line_y = 0
    end
    y      *= line_height
    line_y *= line_height
    draw_block(i, y)           if y != 0
    draw_horz_line(line_y)     if line_y != 0
  }
end

def draw_block(n, y)
  case n
  when 0
    draw_actor_name(@actor, 4, y)
    draw_actor_class(@actor, 128, y)
    draw_actor_nickname(@actor, 288, y)
  when 1
    draw_actor_face(@actor, 8, y)
    draw_basic_info(136, y)
    draw_exp_info(304, y)
  when 2
    draw_parameters(32, y)
    draw_equipments(288, y)
  when 3
    draw_description(4, y)
  end
end

Edited by oichidan, 18 May 2017 - 08:10 PM.

Expect, may it grant you aught but satisfaction.

http://oichidan.tumblr.com/ | http://t.me/oichidan

 

Twitter: @oichidanTelegram: http://t.me/oichidanFacebook: http://facebook.com/oichidan |  Tumblr: http://oichidan.tumblr.com/

Listen me on SoundCloud! http://soundcloud.com/oichidan Currently I do Undertale covers with Indonesian traditional instruments 

Basically, search for oichidan anywhere in the net to find me!


#3 PhoenixSoul

PhoenixSoul

    Lady Fair Gamer

  • Member
  • 39 posts
  • LocationNülgârt, Âsürïa
  • RM Skill - Other

Posted 18 May 2017 - 08:11 PM

Without a clear understanding of where this is supposed to go and/or replace, not really...



#4 oichidan

oichidan

    Yet to have a title

  • Member
  • 15 posts
  • LocationLembang, Jawa Barat, Indonesia
  • RM Skill - Coder

Posted 18 May 2017 - 08:14 PM

Without a clear understanding of where this is supposed to go and/or replace, not really...

 

Well, it's supposed to replace the refresh and all the draw_block methods. Pardon my misunderstanding, but I didn't quite understand the 'standalone' part you're aiming to create.


Expect, may it grant you aught but satisfaction.

http://oichidan.tumblr.com/ | http://t.me/oichidan

 

Twitter: @oichidanTelegram: http://t.me/oichidanFacebook: http://facebook.com/oichidan |  Tumblr: http://oichidan.tumblr.com/

Listen me on SoundCloud! http://soundcloud.com/oichidan Currently I do Undertale covers with Indonesian traditional instruments 

Basically, search for oichidan anywhere in the net to find me!


#5 PhoenixSoul

PhoenixSoul

    Lady Fair Gamer

  • Member
  • 39 posts
  • LocationNülgârt, Âsürïa
  • RM Skill - Other

Posted 18 May 2017 - 08:19 PM

I'm not well skilled with classes, subclasses, etcetera. I know that this script is copied from the default script and just a few values changed, but I don't know how to reference it in a much simpler manner.

 

Like, I'd kinds just like to have this section of the script only...

  def refresh
    contents.clear
    draw_block1   (line_height * 0)    # value unaltered
    draw_horz_line(line_height * 0.5)  # default 1
    draw_block2   (line_height * 1.5)  # default 2
    draw_horz_line(line_height * 5.5)  # default 6
    draw_block3   (line_height * 6.5)  # default 7
    draw_horz_line(line_height * 16)   # default 13
    draw_block4   (line_height * 16.5) # default 14
  end # The altered values end here

That's all I've modified, but everything else is the same as the default.

 

I am still learning, but this was a necessity to show extra equipment without the extra equipment going into the description text below...(REALLY REALLY ANNNNOOOOOYYYIIIINNNNGGG)



#6 roninator2

roninator2

    Gamer

  • Member
  • 68 posts
  • RM Skill - Game Developer

Posted 19 May 2017 - 11:34 PM

Another script that gives you more than the default equipment slots is http://bmscripts.weebly.com/

I use the Advanced VK equip.

Not sure if it is what your looking for, but might as well take a look.


Edited by roninator2, 19 May 2017 - 11:35 PM.


#7 PhoenixSoul

PhoenixSoul

    Lady Fair Gamer

  • Member
  • 39 posts
  • LocationNülgârt, Âsürïa
  • RM Skill - Other

Posted 19 May 2017 - 11:44 PM

Another script that gives you more than the default equipment slots is http://bmscripts.weebly.com/

I use the Advanced VK equip.

Not sure if it is what your looking for, but might as well take a look.

 

Keeping this in mind, but it is not.

 

No, the status window is the main focus here.

 

I'm just trying to simplify the script, but since I know little about classes and subclasses...







0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users