[XP] Tons of Add-ons

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

Previous topic - Next topic

G_G

Being snowed in gives you a lot of free time. xD Here ya go Mark. Find the add-on in the original part 1 and replace it with this.
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# Animated Battlers for Non-Action BS by Blizzard
# Version: 1.3b
# Type: Battle Graphic Improvement
# Date: 5.5.2007
# Date v1.3b: 13.8.2007
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# new in v1.3b:
#   - fixed the flicking glitch that appeared when a battler was dying
#   - improved coding, now executed over Sprite_Battler instead of
#     Spriteset_Battle and due to that increased compatibility and shorter code
#
#
# Compatibility:
#
#   95% compatible with SDK v1.x. 70% compatible with SDK v2.x. Not compatible
#   exotic action CBS-es that need special battler animation.
#
#
# Explanation:
#
#   This will animate battlers in the default battle system. To animate them,
#   you MUST HAVE the appropriate picture files. You can name them however you
#   like, but you need to give them numbers. Every other frame than the first
#   has to have a number higher than the one before. If one number is skipped,
#   the animation will loop until it reaches the highest number available
#   before the skipped number. Not that this works for actors AND for enemies.
#
# Examples:
#
#   1)
#   Arshes.png
#   Arshes1.png
#   Arshes2.png
#   Arshes3.png
#   - all frames will be shown
#
#   2)
#   Arshes.png
#   Arshes1.png
#   Arshes3.png
#   Arshes4.png
#   - only the 1st and 2nd frame will be shown
#
#   3)
#   Arshes.png
#   Arshes3.png
#   Arshes4.png
#   Arshes5.png
#   - no animation at all
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=

#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# START Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

# how many REAL frames that should be skipped before updating the battlers,
# note that using anything below 2 is not recommended and that using low values
# can increase lag dramatically
B_SPEED = 4
# Now you can define speeds for each individual actor/enemy!
A_SPEEDS = {
 1 => 6,
 # actor_id => speed,
}
E_SPEEDS = {
 1 => 8,
 2 => 10,
 # enemy_id => speed,
}

#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# END Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

#==============================================================================
# Game_Battler
#==============================================================================

class Game_Battler
 
 attr_accessor :frame
 attr_accessor :max_frame
 attr_accessor :origin_name
 attr_accessor :battler_name
 
 def get_speed
    speed = self.is_a?(Game_Enemy) ? E_SPEEDS[self.id] : A_SPEEDS[self.id]
    return speed == nil ? B_SPEED : speed
 end
 
end

#==============================================================================
# Sprite_Battler
#==============================================================================

class Sprite_Battler
 
 alias upd_animated_battlers_dbs_later update
 def update
   if $game_system.ANIBATTLERS_NON_ACTION_BS && @battler != nil
     setup_battler if @battler.origin_name != @battler.battler_name
     if Graphics.frame_count % @battler.get_speed == 0
       @battler.frame = (@battler.frame + 1) % @battler.max_frame
     end
     if @frame != @battler.frame
       @frame = @battler.frame
       name = @battler.origin_name
       name += @frame.to_s if @frame > 0
       self.bitmap = RPG::Cache.battler(name, @battler.battler_hue)
       @width = bitmap.width
       @height = bitmap.height
       self.ox = @width / 2
       self.oy = @height
     end
   end
   upd_animated_battlers_dbs_later
 end
 
 def setup_battler
   @battler.origin_name = @battler.battler_name
   @battler.frame = @frame = 0
   @battler.max_frame = 1
   loop do
     name = @battler.origin_name + @battler.max_frame.to_s
     if FileTest.exist?("Graphics/Battlers/#{name}.jpg") ||
        FileTest.exist?("Graphics/Battlers/#{name}.png")
       @battler.max_frame += 1
     else
       break
     end
   end
 end
 
 def setup_battleback
   @battler.origin_name = @battler.battler_name
   @battler.frame, @frame, @battler.max_frame = 0, 0, 1
   name = @battler.origin_name + @battler.max_frame.to_s
   while FileTest.exist?("Graphics/Battlers/#{name}.jpg") ||
         FileTest.exist?("Graphics/Battlers/#{name}.png")
     @battler.max_frame += 1
     name = @battler.origin_name + @battler.max_frame.to_s
   end
 end

end

MarkHest

Tested and working! Thanks man, you rock!  :haha:
   

Shalaren

Hey just a quick question.
I want to use these states, but how to I determine which state is going to have this effect?
I'm trying to look for how to configure it but all I can find it setting it as true or falls.
is it already set up for a certain State ID? or do I need to set it up somehow?

WhiteRose

Quote from: Shalaren on July 28, 2013, 10:47:08 am
Hey just a quick question.
I want to use these states, but how to I determine which state is going to have this effect?
I'm trying to look for how to configure it but all I can find it setting it as true or falls.
is it already set up for a certain State ID? or do I need to set it up somehow?


Each add-on has its own configuration. After turning it to true on the top, scroll down to the actual code for that add-on, and you'll see an additional configuration section where you can set up which states have this effect, and so on. :)

firevenge007

I've been trying to utilize these add-ons, but whenever I go to an old game, it pops up with an error and crashes, or whenever I press F12, so that it instantly goes back to the main menu, it pops up with an error and crashes.

Why is this happening?

Blizzard

September 24, 2013, 11:07:08 am #885 Last Edit: September 24, 2013, 11:09:49 am by Blizzard
Quote from: Blizzard on January 09, 2008, 08:50:47 am
Compatibility

90% compatible with SDK v1.x. 80% compatible with SDK v2.x. Some add-ons will corrupt your old savegames. If you experience the "Stack level too deep" error, you might already use one of these add-ons. All of these add-ons here work with each other with a success rate of 99%. This add-on collection itself WILL corrupt your old savegames.


EDIT: TO fix the F12 thing, put this above all your other scripts:

if $game_exists
  Thread.new {system('Game')}
  exit
end
$game_exists = true


This script has to stay the topmost script, no matter what.
The crash happens because of a problem in RMXP when using aliasing of already existing methods to improve compatibility between scripts.
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.

firevenge007

but it's only in old loaded games that this happens. If I start a new game, all of the add-ons are there.

KK20

Quote from: Blizzard on September 24, 2013, 11:07:08 am
This add-on collection itself WILL corrupt your old savegames.

I don't know how we can make this any clearer. The reason is due to a variable not being initialized when called upon. Starting a new game will initialize the variable and the game knows it exists. Loading an old game SKIPS this initializing process and the game DOESN'T know the variable exists.

In short, if you wish to use Tons, you will have to delete your 'old loaded games'.

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!

firevenge007

I'm making this game for a friend though, and he's already done so much in the game, and I thought there might be a way to have it able to work without him starting all over again.

Blizzard

There technically is, but it would require too much editing of all the scripts.
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.

LiTTleDRAgo

you can try to dismantle it if you're only using specific add-on

firevenge007

So could I, for example, take out one utilization of the script, like HUD, and come into contact with no problems?

I tried it with the map names and I just wrote "when x then name = nil" where x -> (1,300) so that it would display all my map's names every time you would walk into them, but it had an error.


firevenge007

Thank you for helping me, but when I try to run, it says "Script ' ' line 2887: NoMethodError occurred. Undefined method 'each' for nil:NilClass

LiTTleDRAgo

September 24, 2013, 08:01:52 pm #894 Last Edit: September 24, 2013, 08:09:45 pm by LiTTleDRAgo
try redownload the script (all of them)

edit : it seems I have a trouble with my connection, the script got cut out

*fixed*

firevenge007

I get "Script ' ' line 2608: TypeError occurred. No implicit conversion from nil to integer."

LiTTleDRAgo

what script did you use, can you pm me the script.rxdata?

firevenge007

I used all 3, but when I don't even touch any of them, it automatically redirects me to that line in the 1st script.

PhoenixFire

I actually feel like this is probably an obvious answer, but I'm trying to use the fullscreen script. I have it enabled, and I don't see any configuration options that make much sense. It doesn't ask if you want to play in full screen, so, I'm obviously doing something wrong  :P  help?
Quote from: Subsonic_Noise on July 01, 2011, 02:42:19 amNext off, how to create a first person shooter using microsoft excel.

Quote from: Zeriab on September 09, 2011, 02:58:58 pm<Remember when computers had turbo buttons?

KK20

There is no configuration required for that. From what I can guess, you might have a script below Tons that rewrites Scene_Title rather than aliases it.

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!