Author Topic: [RESOLVED][RMXP] 8-Actor Party script interferes with Add-ons pack  (Read 256 times)

Offline Fatih

  • Total Beginner
  • Posts: 2
  • LV: 0
    • View Profile
Hello there. New to this community though I've known about it for a long time, and recently I've been trying to do a sort of side project in RPGXP.
Basically, I've been trying to make use of this script found here. It allows a maximum of eight actors into your game. Though, the attachment is gone/corrupted and the creator of the script has been gone for years. Luckily, at the bottom, someone else seems to have reuploaded the script on pastebin. It seems to work on a fresh project, but on my actual project, I run head-on into an issue when going into battle.



One thing that I should note is that I have the Tons of Add-ons Pack, and I believe that the SP/HP bars in Part 1 might have to do with it because of how both scripts write to HP and SP display. I decided that I would take a look at the order of my scripts, and I decided to see what would happen if I moved the party script below the trio as I had it above earlier. It seems to override the bars, and testing reveals that the battle works, except that there's an issue with disposals from the death image addon (during the end of battle in any way), so I can tell this is going to take quite a bit of work.

I want to firstly find out if I can retain the bars in the Add-on collection while having the effects of the new script underway. I have been tinkering the past while trying to find out if I can do this myself but it's easier said than done with my limited Ruby knowledge.
I know for sure is that the 8 Party script defines draw_actor_hp/sp again and also re-applies the default states and even adds some ugly shadow to the text, so if I can find a way to disable whatever causes those to come about again then I'll be set. But I've been trying to go at it with no success and lots of syntax errors so I've been wondering if anyone here who is more versed in Ruby could assist me with this.
It's partially a request to have the script work with the add-ons without rewriting anything, but is it possible at this point? Am I better off requesting the same sort of script in Requests?
Thanks in advance.
« Last Edit: January 12, 2019, 05:25:37 PM by Fatih »

Online KK20

  • Master Scripter Fixer
  • Global Moderator
  • Guardian of Chaos
  • ****
  • Posts: 3195
  • LV: 382
  • Gender: Male
  • Choco Octo <3
    • View Profile
Re: [RMXP] 8-Actor Party script interferes with Add-ons pack
« Reply #1 on: January 12, 2019, 12:57:49 AM »
First off, the formatting of that script is god awful. Even though that last poster said they "fixed" it, I can't imagine what the script possibly looked like originally. I've cleaned it up: https://pastebin.com/raw/QncGr1QG

So the problem is as you said due to overloading the parameters. The reason for the parameters is because of the shadow text, which is something you don't even want. That makes things easy.

Keep the 8 actor script above Tons. Locate within it for the Window_BattleStatus class and replace the refresh method with this one
Code: [Select]
  def refresh
    self.contents.clear
    @item_max = $game_party.actors.size
    if @item_max > 7
      self.contents.font.size = 16
      self.contents.font.bold = true
    elsif @item_max > 6
      self.contents.font.size = 18
      self.contents.font.bold = true
    elsif @item_max > 4
      self.contents.font.size = 20
      self.contents.font.bold = true
    else
      self.contents.font.size = 22
    end
    for i in 0...$game_party.actors.size
      actor = $game_party.actors[i]
      if @item_max > 6
        actor_x = i * 610 / @item_max + 0
        text_x = 75
      elsif @item_max > 4
        actor_x = i * 612 / @item_max + 4
        text_x = 95
      else
        actor_x = i * 160 + 4
        text_x = 120
      end
      draw_actor_name(actor, actor_x, 0)
      draw_actor_hp(actor, actor_x, 32, text_x)
      draw_actor_sp(actor, actor_x, 64, text_x)
      if @level_up_flags[i]
        self.contents.font.color = normal_color
        self.contents.draw_text(actor_x, 96, 120, 32, "LEVEL UP!")
      else
        draw_actor_state(actor, actor_x, 96)
      end
    end
  end
I did not test it.



Other Projects
RPG Maker XP AceUpgrade RMXP to RMVXA performance!
XPA TilemapTilemap rewrite with many features, including custom resolution!


Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

Offline Fatih

  • Total Beginner
  • Posts: 2
  • LV: 0
    • View Profile
Re: [RMXP] 8-Actor Party script interferes with Add-ons pack
« Reply #2 on: January 12, 2019, 05:25:17 PM »
It works! Thank you very much!

The final script comes out as

(click to show/hide)

for any future lurkers, and it becomes compatible. There's bold text on the battle UI for stats and all, but I actually prefer that. Thanks again!
« Last Edit: January 12, 2019, 09:01:40 PM by KK20 »