Author Topic: [XP] Tons of Add-ons  (Read 247816 times)

Offline KK20

  • Master Scripter Fixer
  • Global Moderator
  • Guardian of Chaos
  • ****
  • Posts: 3097
  • LV: 374
  • Gender: Male
  • Choco Octo <3
    • View Profile
Re: [XP] Tons of Add-ons
« Reply #960 on: January 28, 2017, 11:30:34 PM »
I kinda expected that, when I inserted the scripts file into a new project and pressed run, I would have received an error message. But the game started fine.



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


NNID: KK20-CP
Discord: KK20 Tyler#8901

Offline Wraith89

  • Trained Member
  • *
  • Posts: 41
  • LV: 9
  • Sous le ciel de Paris
    • View Profile
Re: [XP] Tons of Add-ons
« Reply #961 on: June 03, 2017, 12:56:11 AM »
Hi long time no talk  :^_^\':

I am having problem with one particular aspect in compatibility which is bugging me. So I use a modified Game_Battler 3 (the one by Xelias), and tailored it so most of the mechanics can be more interesting to make up for the lack of interesting ones in RMXP, and I am sure I put everything in the right order. But depending on where I put the script, some features bug out, while others work when I put the modified Game_Battler 3 elsewhere. In the end I decided on this order, because only one feature is bugged for me at the moment.



It is the Absorb HP/SP script, where it does its own thing, and ignores everything else I modified from Game_Battler 3. Namely it would break through MP Shield, and when one of my character uses it, its damage is incredibly wonky, with the multi-hit script by DerVVulfman it does 0 on multiple hits. Yeah it is weird. Do I need to fix anything in the absorb script to cater to Game_Battler_3? The Game_Battler 3 script is here

Thank you.

Offline KK20

  • Master Scripter Fixer
  • Global Moderator
  • Guardian of Chaos
  • ****
  • Posts: 3097
  • LV: 374
  • Gender: Male
  • Choco Octo <3
    • View Profile
Re: [XP] Tons of Add-ons
« Reply #962 on: June 03, 2017, 08:39:06 AM »
It would be easier if you could provide a demo with reproducible steps. With that many scripts modifying the same classes and methods, it could be a number of problems.



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


NNID: KK20-CP
Discord: KK20 Tyler#8901

Offline Wraith89

  • Trained Member
  • *
  • Posts: 41
  • LV: 9
  • Sous le ciel de Paris
    • View Profile
Re: [XP] Tons of Add-ons
« Reply #963 on: June 03, 2017, 07:06:23 PM »
My apologies, good sir.
Here it is.

https://www.sendspace.com/file/fuj7fa

The drain skills in question is 60 and 61, MP Shield is I think 402, which I just put there to test, as drain goes through it. It is really only drain skills that are wonky, displays weird, etc. It is probably because I have fiddled around with the battle formula too much to enhance on the battle system that was provided.

Offline KK20

  • Master Scripter Fixer
  • Global Moderator
  • Guardian of Chaos
  • ****
  • Posts: 3097
  • LV: 374
  • Gender: Male
  • Choco Octo <3
    • View Profile
Re: [XP] Tons of Add-ons
« Reply #964 on: June 03, 2017, 10:24:55 PM »
I'm just gonna conclude that Absorb skills and Multi_Strike scripts are incompatible--the game will run, but they do not function as intended.

First off, Xelias's Passive Augments (god that script was terribly done...) completely re-writes methods in Game_Battler, specifically skill_effect. Because of this, any scripts ABOVE it that make additions or changes to skill_effect will be completely ignored. In your script list, that would be any modifications you did to Game_Battler 3 and G_G's State Affect Skills.

Continuing with this script, your configuration for all the constant variables is incorrect. When you do this:
Code: [Select]
MASTERY_BOWKNIFE_ID =
OMNI_MASTERY_ID =
BLUE_SKILLS = (2..113).to_a
you are effectively stating that MASTERY_BOWKNIFE_ID and OMNI_MASTERY_ID will both equal (2..113).to_a as well. You need to put zeroes at the end of those equations if you don't want to use them.

The reason for the zeroes in the damage pop-ups is due to the way the Absorb script works. If the target has 200 HP, but your attack could potentially do 500 HP, you're only going to be doing 200 HP and healing for 200 HP. Because of the multi-hit script, you are reducing the target's HP with each hit. If you completely kill the target i.e. they have 0 HP, there's nothing left to drain, so damage becomes 0.

But the problem now is how the user's HP is healed. I'm sure you've noticed that the Multi-hit script does one last hit after the animation is over. It's at this point the Absorb script will heal the user, and ONLY for this last hit. Since you've effectively killed the Bee in your demo project, the last hit will do 0 damage and heal for 0 HP.

I didn't look into MP Shield as I felt the above was the main issue going on in your game.
« Last Edit: June 03, 2017, 10:26:48 PM by KK20 »



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


NNID: KK20-CP
Discord: KK20 Tyler#8901

Offline Wraith89

  • Trained Member
  • *
  • Posts: 41
  • LV: 9
  • Sous le ciel de Paris
    • View Profile
Re: [XP] Tons of Add-ons
« Reply #965 on: June 03, 2017, 11:58:10 PM »
I see. I thought that script was outdated, because it made things unnecessarily complicated. I am no scripter so it is really the best I can do at the moment before any optimisation can come through. I even mixed many scripts together into that one page to make things compatible. So I guess I could move G_G's State Affect Skills down.

That makes sense for the drain thing. The multi-hit was testing, so I can just not make absorb moves multi-hit and see how that functions.

The only problem with the MP Shield is that drain moves hit through it ignoring it. If I put that ugly Xelias Script below Blizzard's the MP Shield works but everything else breaks, which is not worth it, so I am just looking into the absorb script at the moment.

Thank you though.

Offline KK20

  • Master Scripter Fixer
  • Global Moderator
  • Guardian of Chaos
  • ****
  • Posts: 3097
  • LV: 374
  • Gender: Male
  • Choco Octo <3
    • View Profile
Re: [XP] Tons of Add-ons
« Reply #966 on: June 04, 2017, 12:22:55 AM »
Replace the Game_Battler in the Absorb script to this
Code: [Select]
class Game_Battler
 
  alias skill_effect_hpsp_absorb_later skill_effect
  def skill_effect(user, skill)
    last_hp = self.hp
    last_sr = self.sr if $crls && self.is_a?(Game_Actor)
    result = skill_effect_hpsp_absorb_later(user, skill)
    if $game_system.ABSORB_HP_SP && self.damage.is_a?(Numeric)
      if SKILL_IDS_SP.include?(skill.id)
        self.sr = last_sr if $crls && self.is_a?(Game_Actor)
        if user != self
          if self.is_a?(Game_Enemy) && UNDEAD_SP.include?(self.id)
            self.damage = -self.damage
          end
          if self.sp >= self.damage
            self.sp -= self.damage
          else
            self.damage, self.sp = self.sp, 0
          end
        else
          self.damage = 0
        end
      elsif SKILL_IDS_HP.include?(skill.id)
        lost_hp = last_hp - self.hp
        self.sr = last_sr if $crls && self.is_a?(Game_Actor)
        if user != self
          if self.is_a?(Game_Enemy) && UNDEAD_IDS.include?(self.id)
            self.damage = -self.damage
          end
          self.damage = lost_hp
        else
          self.damage = 0
        end
      end
    end
    return result
  end
 
end
Since the MP shield appears to apply one-tenth of the damage to HP, the damage pop-up on the target and the amount healed by the user will be that one-tenth amount.



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


NNID: KK20-CP
Discord: KK20 Tyler#8901

Offline Wraith89

  • Trained Member
  • *
  • Posts: 41
  • LV: 9
  • Sous le ciel de Paris
    • View Profile
Re: [XP] Tons of Add-ons
« Reply #967 on: June 04, 2017, 12:48:54 AM »
Thank you! I will try this out and see how things work. I see there is a new variable lost_hp.

Offline Kaiph

  • Trained Member
  • *
  • Posts: 32
  • LV: 1
  • Gender: Male
    • View Profile
Re: [XP] Tons of Add-ons
« Reply #968 on: December 13, 2017, 05:57:33 PM »
Sorry if this has already been answered before, but I don't have the patience to search through nearly a decade of posts.
I'm trying out the EQUAP system and have set up my actor with a weapon and armor which teach separate skills, just as a test for now. For argument's sake, let's say my armor teaches me 'Cure' and my weapon teaches 'Fire'. If I start gaining AP on both skills and then unequip my armor, I still gain AP on 'Cure', despite not having that skill equipped: when I re-equip after a couple more battles, my AP for 'Cure' and 'Fire' are the same, as if I'd never unequipped my armor.

Has this been noticed before? And is there a way I can fix it?

(I also understand this is 6 months since the last post, but I figured it'd be okay since it's relevant)

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 19962
  • LV: 642
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: [XP] Tons of Add-ons
« Reply #969 on: December 13, 2017, 06:16:42 PM »
Do you have any custom scripts that could conflict? Looking at my code, the Game_Actor#equip method is implemented properly, but what you are experiencing could happen if it didn't work right. Do you use any custom equipment systems? Also, have you checked this topic yet? http://forum.chaos-project.com/index.php/topic,23.0.html
Check out Daygames and our games:

King of Booze      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


Quote from: winkio
I do not speak to bricks, either as individuals or in wall form.

Quote from: Barney Stinson
When I get sad, I stop being sad and be awesome instead. True story.

Offline Kaiph

  • Trained Member
  • *
  • Posts: 32
  • LV: 1
  • Gender: Male
    • View Profile
Re: [XP] Tons of Add-ons
« Reply #970 on: December 13, 2017, 08:19:13 PM »
I've had a look at what scripts I have, but the only scripts I have so far are your three Tons scripts, your Analyze script (placed below Tons), one which turns off the battle music change, and one to give element and status effects to enemies' physical attacks. (Plus a stack level fix at the top for good measure). They all seem to be in the right order and to my knowledge I haven't altered Game_Actor; I wouldn't know how.

Offline KK20

  • Master Scripter Fixer
  • Global Moderator
  • Guardian of Chaos
  • ****
  • Posts: 3097
  • LV: 374
  • Gender: Male
  • Choco Octo <3
    • View Profile
Re: [XP] Tons of Add-ons
« Reply #971 on: December 13, 2017, 09:30:20 PM »
Actually Blizz, looking at it logically, there is a problem.

Code: [Select]
  def add_ap(val)
    @skills.each {|id| @ap[id] = 0 if @ap[id] == nil}
    @ap.each_key {|id|
        @ap[id] = self.ap(id) + val
        @ap[id] = 0 if self.ap(id) < 0
        maxap = BlizzCFG.maxap(id)
        @ap[id] = maxap if self.ap(id) > maxap}
  end
You're adding AP to skills that have their IDs stored in the @ap hash table. This occurs for every skill the actor ever comes in contact with as seen in the first line of the method.

Might be as easy as just changing it from @ap.each_key to @skills.each
« Last Edit: December 13, 2017, 09:36:37 PM by KK20 »



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


NNID: KK20-CP
Discord: KK20 Tyler#8901

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 19962
  • LV: 642
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: [XP] Tons of Add-ons
« Reply #972 on: December 14, 2017, 09:22:41 AM »
I think you're right. >_>

@Kaiph: Feel free to fix it manually on your end. I'll upload a fixed version ASAP.
Check out Daygames and our games:

King of Booze      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


Quote from: winkio
I do not speak to bricks, either as individuals or in wall form.

Quote from: Barney Stinson
When I get sad, I stop being sad and be awesome instead. True story.

Offline Kaiph

  • Trained Member
  • *
  • Posts: 32
  • LV: 1
  • Gender: Male
    • View Profile
Re: [XP] Tons of Add-ons
« Reply #973 on: December 14, 2017, 04:50:27 PM »
That seems to have worked, thanks :)

Is the Passive Skills script restricted to stat and Gold/EXP changes or is it possible to have a skill that defends against status effects and elements?
In other words, could I use EQUAP and Passive together to teach my character to resist poison passively, or would that need an extension of the script to work?

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 19962
  • LV: 642
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: [XP] Tons of Add-ons
« Reply #974 on: December 14, 2017, 06:00:54 PM »
It would require some edits to support status effects and elements.
Check out Daygames and our games:

King of Booze      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


Quote from: winkio
I do not speak to bricks, either as individuals or in wall form.

Quote from: Barney Stinson
When I get sad, I stop being sad and be awesome instead. True story.