[XP] Tons of Add-ons

Started by Blizzard, January 09, 2008, 08:50:47 am

Previous topic - Next topic

KK20

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 Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

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

Join the CP Discord Server!

Wraith89

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.

KK20

June 03, 2017, 04:24:55 pm #962 Last Edit: June 03, 2017, 04:26:48 pm by KK20
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:

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.

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

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

Join the CP Discord Server!

Wraith89

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.

KK20

Replace the Game_Battler in the Absorb script to this

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 Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

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

Join the CP Discord Server!

Wraith89

Thank you! I will try this out and see how things work. I see there is a new variable lost_hp.

Kaiph

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)

Blizzard

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 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


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

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

Kaiph

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.

KK20

December 13, 2017, 02:30:20 pm #969 Last Edit: December 13, 2017, 02:36:37 pm by KK20
Actually Blizz, looking at it logically, there is a problem.


  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

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

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

Join the CP Discord Server!

Blizzard

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 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


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

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

Kaiph

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?

Blizzard

It would require some edits to support status effects and elements.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


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

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

Wraith89

A little request for anyone willing to try: is there a way to configure "Blue Magic Skill" add-on to have untargetable skills? As in skills that will never be learned by a blue magic skill. Thank you in advance.

KK20

According to
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# START Blue Status Database
#   
#   Set up the database below using following template:
#   
#     when STATE_ID then return [CHANCE, GROUP_1, GROUP_2, ...]
#     
#   STATE_ID - the state ID in the database
#   CHANCE   - the probability in % that the skill will be learned
#   GROUP    - "class" from which skills can be learned
#   
#   Every status effect that is not defined here has a chance of 0% to make the
#   attacked actor learn the skill of the attacker. Depending on the state,
#   only enemies', actors' or both groups' skills can be learned. Add one or
#   more of the following classes after the probability factor:
#     
#     Game_Enemy - represents enemies
#     Game_Actor - represents actors
#   
#   Keep in mind that you need at least one group from which skills can be
#   learned.
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
yes, it sounds like you can.

Or I just don't understand your question.

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

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

Join the CP Discord Server!

Wraith89

Sorry. I will clarify. There are actually two Blue Magic addon in Tons: Blue Magic States and Blue Magic Skill. The one you posted is the state, and the groups that are defined are "Actors" and "Enemies". What I was asking was the following:

Suppose you use the blue magic skill (or be in a state, whichever addon is used) on an enemy that knows Fire and Heal. However, let's say in this scenario Heal cannot be copied by Blue Magic. I was asking if we can define skills that can never be copied by Blue Magic in any way, as in a list of exceptions by skill ID one can configure. Blue Magic addons currently do not have such parameters and will copy anything enemies and actors may have when targeted.

KK20

I see now.

You could just add a new config like
BLUE_MAGIC_UNLEARNABLE_SKILLS = [1]

And edit the appropriate area in the two scripts to look like
if rand(100) < $data_skills[battler.current_action.skill_id].hit
  ids = []
  if target.is_a?(Game_Enemy)
    target.actions.each {|act| ids.push(act.skill_id) if act.kind == 1 && !BLUE_MAGIC_UNLEARNABLE_SKILLS.include?(act.skill_id) }
  elsif target.is_a?(Game_Actor)
    target.skills.each {|skl| ids.push(skl) if !BLUE_MAGIC_UNLEARNABLE_SKILLS.include?(skl) }
  end

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

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

Join the CP Discord Server!

Wraith89

Thank you. It works perfectly! I'd give the level up if I could, but apparently it no longer exists.

SolarisSpell

Hello

Can I ask for support using Blizzard's  Minimap?

I think Ton of Add-ons is amazing (I'm using some of its features). The minimap script I've using until now is proving to be more a more unreliable the grater my project becomes, so I wanted to use this one because it's so smooth.

If it were possible to ask for help, here are my troubles:

Spoiler: ShowHide

The script auto-detects my 'transfer events' and creates a purple square in the minimap. But sometimes, it instead creates a purple arrow and I don't know how to make sure it always creates a square. If I have more than one transfer event one after another, it sometimes shows the majority as purple squares, and one as a purple arrow.
Can you choose to not auto-detect so I can specify when/where to show in the minimap? And can you make that this purple squares are borderless? For events it's great to have a border, but if I want to have a large transfer area, I would like to show it as a large rectangle, and not as a line of squares

Also, maybe it's completely my fault, but I don't know how to create different kind of minimap events like, show enemies like this, npcs like that, treasures in a different way, etc...
It would be great if it were possible to use images for this little events, as I already have some nice ones.

It's probably not important, but I don't know what Game_Member is. I think it breaks my game, so I'm just removing it.

And finally, player arrow is somehow erratic. Sometimes it works, sometimes it isn't shown. But when it does work, if you change to the large version of the minimap (pressing F5 again), the green arrow just doesn't move, even if you do.


Thanks

KK20

Quote from: SolarisSpell on May 31, 2021, 02:12:36 pmThe script auto-detects my 'transfer events' and creates a purple square in the minimap. But sometimes, it instead creates a purple arrow and I don't know how to make sure it always creates a square. If I have more than one transfer event one after another, it sometimes shows the majority as purple squares, and one as a purple arrow.
This is a bug. Locate the following in the script and make sure it looks like this:
  def check_events
    events, names = [$game_player], [nil]

Quote from: SolarisSpell on May 31, 2021, 02:12:36 pmCan you choose to not auto-detect so I can specify when/where to show in the minimap?
I don't know what you mean by this question. If you don't want an event to show up on the minimap, you just put \nomap in its name.

Quote from: SolarisSpell on May 31, 2021, 02:12:36 pmAnd can you make that this purple squares are borderless?
This is how the square is being made:
          if @names[i] == '' || @events[i].name.clone.gsub!('\box') {''}
            sprite.bitmap = Bitmap.new(8, 8)
            sprite.bitmap.fill_rect(0, 0, 8, 8, Color.new(0, 0, 0, 128))
            sprite.bitmap.fill_rect(1, 1, 6, 6, color)
The border is made by the first fill_rect call, the second creates the colored square. Thus the obvious solution is to do this:
          if @names[i] == '' || @events[i].name.clone.gsub!('\box') {''}
            sprite.bitmap = Bitmap.new(8, 8)
            sprite.bitmap.fill_rect(0, 0, 8, 8, color)
Just know that this will affect all events that are to be drawn as a box, not just teleport spots. Maybe you can do this instead:
          if @events[i].teleport
            sprite.bitmap = Bitmap.new(8, 8)
            sprite.bitmap.fill_rect(0, 0, 8, 8, color)
          elsif @names[i] == '' || @events[i].name.clone.gsub!('\box') {''}
            sprite.bitmap = Bitmap.new(8, 8)
            sprite.bitmap.fill_rect(0, 0, 8, 8, Color.new(0, 0, 0, 128))
            sprite.bitmap.fill_rect(1, 1, 6, 6, color)
          else
            sprite.bitmap = Bitmap.new(56, 14)
            sprite.bitmap.blt(0, 0, $tons_cache.get_image(arrow), rect, 128)
          end

Quote from: SolarisSpell on May 31, 2021, 02:12:36 pmAlso, maybe it's completely my fault, but I don't know how to create different kind of minimap events like, show enemies like this, npcs like that, treasures in a different way, etc...
#   Any event with and comment with "\spc" in their code will be also
#   displayed differently.
With the default configuration, it shows the event as a yellow arrow.

Quote from: SolarisSpell on May 31, 2021, 02:12:36 pmIt would be great if it were possible to use images for this little events, as I already have some nice ones.
That's more suited for a script request. This script creates its own graphics for the minimap entirely in RGSS.

Quote from: SolarisSpell on May 31, 2021, 02:12:36 pmIt's probably not important, but I don't know what Game_Member is. I think it breaks my game, so I'm just removing it.
It's part of the caterpillar script, which is in Part 1 of Tons. IDK how you're saying it's breaking your game unless you don't have Part 1 in your game. Tons requires all 3 parts to ensure nothing breaks. Granted, if you know what you're doing, then removing the offending line isn't a big deal.

Quote from: SolarisSpell on May 31, 2021, 02:12:36 pmAnd finally, player arrow is somehow erratic. Sometimes it works, sometimes it isn't shown. But when it does work, if you change to the large version of the minimap (pressing F5 again), the green arrow just doesn't move, even if you do.
Don't know how to reproduce the arrow not being shown.
As for the map being moved to the middle of the screen, I don't know if not updating the events in real-time is a bug or intended. When you hold down the Z button and move with the arrow keys on larger maps, it is supposed to scroll the minimap.

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

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

Join the CP Discord Server!