[XP] Unlimited Levels

Started by Blizzard, February 10, 2010, 02:52:25 am

Previous topic - Next topic

Blizzard

February 10, 2010, 02:52:25 am Last Edit: October 07, 2021, 10:29:55 am by Blizzard
Unlimited Levels
Authors: Blizzard
Version: 1.1
Type: Actor Attribute Modifier
Key Term: Actor Add-on

Introduction

This script will allow actors to have levels higher than 99. It automatically calculates the required EXP and the stats using RMXP's default method of calculation.

This work is licensed under BSD License 2.0:
QuoteCopyright (c) Boris "Blizzard" Mikić
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1.  Redistributions of source code must retain the above copyright notice,
    this list of conditions and the following disclaimer.

2.  Redistributions in binary form must reproduce the above copyright notice,
    this list of conditions and the following disclaimer in the documentation
    and/or other materials provided with the distribution.

3.  Neither the name of the copyright holder nor the names of its contributors
    may be used to endorse or promote products derived from this software
    without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.

You may use this script for both non-commercial and commercial products without limitations as long as you fulfill the conditions presented by the above license. The "complete" way to give credit is to include the license somewhere in your product (e.g. in the credits screen), but a "simple" way is also acceptable. The "simple" way to give credit is as follows:
QuoteUnlimited Levels licensed under BSD License 2.0, Copyright (c) Boris "Blizzard" Mikić

Alternatively, if your font doesn't support diacritic characters, you may use this variant:
QuoteUnlimited Levels licensed under BSD License 2.0, Copyright (c) Boris "Blizzard" Mikic

In general other similar variants are allowed as long as it is clear who the creator is (e.g. "Unlimited Levels created by Blizzard" is acceptable). But if possible, prefer to use one of the two variants listed above.

If you fail to give credit and/or claim that this work was created by you, this may result in legal action and/or payment of damages even though this work is free of charge to use normally.


Features

  • allows actors to have levels higher than 99
  • automatic calculation of generated stats with minimum error rate
  • easy to use

v1.1
  • added new license
  • added usage and crediting instructions


Screenshots



Demo

Unlimited Levels

Script

Just make a new script above main and paste this code into it.
Script Download

Instructions

Inside the script in the first comment.

Compatibility

99% compatible with SDK v1.x. 95% compatible with SDK v2.x. Can cause incompatibility issues with custom leveling systems. WILL corrupt your old savegames.

Credits and Thanks

  • Boris "Blizzard" Mikić

Author's Notes

It is recommended that you also use a script that allows unlimited Max HP, Max SP, Str, Dex, Agi, Int and EXP in combination with this script.
In case a speed setting other than -10, 0 and 10 is being used, the attributes generated by this script can be higher by 1 in some cases for some levels due to a computational error in the interpolation function.

If you find any bugs, please report them here:
http://forum.chaos-project.com

That's it! N-Joy! =D
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.

G_G

Very nice blizz! :D Even I have been waiting for this script. *lv's up* *downloads* *goes back to bad for a few hours*

Jragyn

Mister Blizzard,

Genius Work!

Though why not implement the unlimited Stats into this script?
I'd use your scripts over KGC's any day if you wrote your own variation of these style scripts <3


--JeR
A bright light can either illuminate or blind, but how will you know which until you open your eyes?

Blizzard

Because it's an unrelated system. Just because they are all numbers in the database doesn't mean they are all the same. You wouldn't say SP cost and actor level are the same thing, would you?
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.

Jragyn

No, but I'd be happy to have more compiled numbers of scripts together than a script for every method under the sun  :^_^':

I just figured that the unlimited part and all relating to an actor part might make it easy to tie them all together in a single script. I have to say though that I still don't know the hugest amount of scripting, so I'm apparently quite wrong  :<_<:
A bright light can either illuminate or blind, but how will you know which until you open your eyes?

Blizzard

I actually think that most "Stat Limit Break" scripts out there work fine. So you can probably use any of them without problems.
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.

Jragyn

Your likely right.
But now that THAT is settled, back to the important matter I pressed you with before:
Spoiler: ShowHide
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
#_/    ◆戦闘難易度 - KGC_BattleDifficulty◆
#_/----------------------------------------------------------------------------
#_/  戦闘難易度の設定機能を追加します。
#_/  (メニュー等に表示する場合は[MenuAlter][TitleOption]参照)
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/

#==============================================================================
# ★ カスタマイズ項目 ★
#==============================================================================

module KGC
  # ◆ Difficulty
  #  " Name ", HP, SP, STATS, EXP, Gold, Drop Rate»
  # Specify the magnification of each item (percentage).
  BD_DIFFICULTY_LIST = [#HP   SP  STAT  XP   GP  DROP
        ["Sissy-Bitch",  33,  33,  50,  25,  25,  0], # 0
        ["Weak",         66,  66,  75,  50,  50,  25], # 1
        ["Regular",     100, 100, 100, 100, 100, 100], # 2
        ["Hard-ish",    150, 150, 150, 150, 125, 150], # 3
        ["Psycho",      200, 200, 200, 200, 150, 200], # 4
        ["Infinity",    300, 300, 300, 300, 225, 400], # 5
        ["L33t Mode",   500, 500, 500, 500, 500, 800]  # 6
  ]
  # ◆初期難易度
  #  BD_DIFFICULTY_LIST のインデックス。
  BD_INITIAL_DIFFICULTY = 2
end

#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

$imported = {} if $imported == nil
$imported["BattleDifficulty"] = true

module Difficulty
  #--------------------------------------------------------------------------
  # ● 難易度設定取得
  #--------------------------------------------------------------------------
  def self.get
    # 難易度設定を返す
    return KGC::BD_DIFFICULTY_LIST[$game_system.difficulty]
  end
  #--------------------------------------------------------------------------
  # ● 難易度設定変更
  #--------------------------------------------------------------------------
  def self.set(index)
    # 範囲外ならば変更しない
    return if index < 0 || index >= KGC::BD_DIFFICULTY_LIST.size
    $game_system.difficulty = index
  end
  #--------------------------------------------------------------------------
  # ● 能力値補正済みエネミー取得
  #--------------------------------------------------------------------------
  def self.get_revised_enemy(enemy)
    en = enemy.clone
    diff = self.get
    en.maxhp = en.maxhp * diff[1] / 100
    en.maxsp = en.maxsp * diff[2] / 100
    en.str   = en.str   * diff[3] / 100
    en.dex   = en.dex   * diff[3] / 100
    en.agi   = en.agi   * diff[3] / 100
    en.int   = en.int   * diff[3] / 100
    en.atk   = en.atk   * diff[3] / 100
    en.pdef  = en.pdef  * diff[3] / 100
    en.mdef  = en.mdef  * diff[3] / 100
    en.exp   = en.exp   * diff[4] / 100
    en.gold  = en.gold  * diff[4] / 100
    if en.treasure_prob < 100
      en.treasure_prob = [en.treasure_prob * diff[5] / 100, 100].min
    end
    return en
  end
end

#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

#==============================================================================
# ■ Game_System
#==============================================================================

class Game_System
  attr_accessor :difficulty  # 難易度
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #--------------------------------------------------------------------------
  alias initialize_KGC_BattleDifficulty initialize
  def initialize
    # 元の処理を実行
    initialize_KGC_BattleDifficulty

    @difficulty = KGC::BD_INITIAL_DIFFICULTY
  end
  #--------------------------------------------------------------------------
  # ● 難易度一覧
  #--------------------------------------------------------------------------
  def difficulty_list
    return KGC::BD_DIFFICULTY_LIST
  end
end

#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

#==============================================================================
# ■ Game_Enemy
#==============================================================================

class Game_Enemy < Game_Battler
  #--------------------------------------------------------------------------
  # ● 基本 MaxHP の取得
  #--------------------------------------------------------------------------
  alias base_maxhp_KGC_BattleDifficulty base_maxhp
  def base_maxhp
    n = base_maxhp_KGC_BattleDifficulty
    n *= Difficulty.get[1]
    return n / 100
  end
  #--------------------------------------------------------------------------
  # ● 基本 MaxSP の取得
  #--------------------------------------------------------------------------
  alias base_maxsp_KGC_BattleDifficulty base_maxsp
  def base_maxsp
    n = base_maxsp_KGC_BattleDifficulty
    n *= Difficulty.get[2]
    return n / 100
  end
  #--------------------------------------------------------------------------
  # ● 基本腕力の取得
  #--------------------------------------------------------------------------
  alias base_str_KGC_BattleDifficulty base_str
  def base_str
    n = base_str_KGC_BattleDifficulty
    n *= Difficulty.get[3]
    return n / 100
  end
  #--------------------------------------------------------------------------
  # ● 基本器用さの取得
  #--------------------------------------------------------------------------
  alias base_dex_KGC_BattleDifficulty base_dex
  def base_dex
    n = base_dex_KGC_BattleDifficulty
    n *= Difficulty.get[3]
    return n / 100
  end
  #--------------------------------------------------------------------------
  # ● 基本素早さの取得
  #--------------------------------------------------------------------------
  alias base_agi_KGC_BattleDifficulty base_agi
  def base_agi
    n = base_agi_KGC_BattleDifficulty
    n *= Difficulty.get[3]
    return n / 100
  end
  #--------------------------------------------------------------------------
  # ● 基本魔力の取得
  #--------------------------------------------------------------------------
  alias base_int_KGC_BattleDifficulty base_int
  def base_int
    n = base_int_KGC_BattleDifficulty
    n *= Difficulty.get[3]
    return n / 100
  end
  #--------------------------------------------------------------------------
  # ● 基本攻撃力の取得
  #--------------------------------------------------------------------------
  alias base_atk_KGC_BattleDifficulty base_atk
  def base_atk
    n = base_atk_KGC_BattleDifficulty
    n *= Difficulty.get[3]
    return n / 100
  end
  #--------------------------------------------------------------------------
  # ● 基本物理防御の取得
  #--------------------------------------------------------------------------
  alias base_pdef_KGC_BattleDifficulty base_pdef
  def base_pdef
    n = base_pdef_KGC_BattleDifficulty
    n *= Difficulty.get[3]
    return n / 100
  end
  #--------------------------------------------------------------------------
  # ● 基本魔法防御の取得
  #--------------------------------------------------------------------------
  alias base_mdef_KGC_BattleDifficulty base_mdef
  def base_mdef
    n = base_mdef_KGC_BattleDifficulty
    n *= Difficulty.get[3]
    return n / 100
  end
  #--------------------------------------------------------------------------
  # ● 基本回避修正の取得
  #--------------------------------------------------------------------------
  alias base_eva_KGC_BattleDifficulty base_eva
  def base_eva
    n = base_eva_KGC_BattleDifficulty
    n *= Difficulty.get[3]
    return n / 100
  end
  #--------------------------------------------------------------------------
  # ● EXP の取得
  #--------------------------------------------------------------------------
  alias exp_KGC_BattleDifficulty exp
  def exp
    n = exp_KGC_BattleDifficulty
    n *= Difficulty.get[4]
    return n / 100
  end
  #--------------------------------------------------------------------------
  # ● ゴールドの取得
  #--------------------------------------------------------------------------
  alias gold_KGC_BattleDifficulty gold
  def gold
    n = gold_KGC_BattleDifficulty
    n *= Difficulty.get[5]
    return n / 100
  end
  #--------------------------------------------------------------------------
  # ● トレジャー出現率の取得
  #--------------------------------------------------------------------------
  alias treasure_prob_KGC_BattleDifficulty treasure_prob
  def treasure_prob
    n = treasure_prob_KGC_BattleDifficulty
    if n < 100
      n *= Difficulty.get[6]
      return [n / 100, 100].min
    else
      return n
    end
  end
end


How to correctly Blizofy the drop rate modifier so it works :D
A bright light can either illuminate or blind, but how will you know which until you open your eyes?

Blizzard

What do you mean? So it works with Blizz-ABS? Somebody else had the same problem and I said I'll make an add-on for Tons myself a bit later. Probably next week when I get some time to add the most recent changes, etc. into Tons.
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.

Jragyn

Heh, that someone was probably me, as I presented this issue to yu a week or two ago.
I suppose my lack of ability to consistently follow up with my issue/requests is the reason I didn't see anything about it being added to ToNs. I am glad to hear this though.

My earballs are happier thanks to you, Blizzard.

Oh! And kudos to you and your scripting skill. I am thoroughly impressed and in awe about 20/6.


--JeR
A bright light can either illuminate or blind, but how will you know which until you open your eyes?

Shining Riku

February 14, 2010, 11:00:20 am #9 Last Edit: February 14, 2010, 12:03:24 pm by Shining Riku
This. Is....

INCROYABLE!

This is so awesome! Thanks Blizz! :D
EDIT: Ok, I tried changing the max EXP in the main scripts but it didn't help me reach a higher level. I tried finding a script to change max EXP but couldn't find one.

If there is a Script change I can do using what I have now to make it work, please let me know! If I need another script to change Max EXP....if you know where to find it I'd like to know. Thanks again for making the script, Blizz! (I really wanna be able to get past level 150 though, lol)
EDIT AGAIN:

OMG FAIL!!! I'm so sorry! I've found what the heck I was doing wrong. Sorry for the waste of time! O_O
(why is it I never catch my own issues until after I've told others? o_oU)

Final EDIT:

Ok, I fail very hard. Level cap is still at 139 despite setting up levels in the script. I'm still lost >_<U

Blizzard

It should be in Game_Actor#exp=. There should be a line like this:

exp = [[exp, 9999999].min, 0].max


This should be where the EXP cap is. If not, press CTRL+SHIFT+F and type 9999999 and it will do a global search on that number so you can find all places where it appears. That should help you find all the necessary locations in the scripts that you need to change.
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.

Shining Riku

That's really weird. I actually found that line and modified it.
I know my way around the default scripts enough that finding that line was easy. Very easy.

But it didn't pay any attention to my edit. Is there a chance that one of the other scripts i'm using is overwriting that line? I dunno how often people would try over-writing it. Maybe I should go dig around the scripts I added in and see if I can find anything.

Thanks Blizzard. Hopefully I can get this sorted out! If I do, well, that's one more problem I know how to handle when the time comes. I appreciate your help

Jragyn

CTRL + SHIFT + F

Who needs to dig when you can search every bit of script for specific bits at once? :D
A bright light can either illuminate or blind, but how will you know which until you open your eyes?

ezrarishona

Blizz,

YOU ARE AWESOME!!!

you helped me ALOT!Thanks!

Lobstrosity

For this script, is there an actual maximum level it can get to? If so, can you edit what the maximum is?
Don't come any closer. I'm armed... with SCIENCE!

Blizzard

June 08, 2010, 05:42:30 am #15 Last Edit: June 08, 2010, 05:46:20 am by Blizzard
Code: Script
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# START Level Database
#
#   Use following template to give your actors a custom maximum level:
#
#     when ID then LEVEL
#
#   ID    - ID of the actor in the database
#   LEVEL - initial level / final level of that actor
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
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.

Lobstrosity

Don't come any closer. I'm armed... with SCIENCE!

Lobstrosity

When using the script you just posted, where do I go to to change the maximum? Do I type it into the script?
Don't come any closer. I'm armed... with SCIENCE!

Blizzard

Quote from: Blizzard on June 08, 2010, 05:42:30 am
Code: Script
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# START Level Database
#
#   Use following template to give your actors a custom maximum level:
#
#     when ID then LEVEL
#
#   ID    - ID of the actor in the database
#   LEVEL - initial level / final level of that actor
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

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.

Lobstrosity

Yes, but how do I use this script. Where do I put the maximum level?
Don't come any closer. I'm armed... with SCIENCE!