The RPG Maker Resource Kit

RMRK RPG Maker Creation => VX Ace => VXA Scripts Database => Topic started by: TheoAllen on April 14, 2013, 10:00:40 PM

Title: Theo - Difficulty Setting
Post by: TheoAllen on April 14, 2013, 10:00:40 PM
Difficulty Setting
Version : 1.2
Type : Gameplay add-on

Introduction :
Inspired from The Elder Scroll series. This script allow you to modify game difficulty by changing the enemy parameters. The difficulty stored in $game_variables.

Features :
(Requires YEA-SystemOption)
[/list]

Screenshot
(https://dl.dropbox.com/u/41797508/Galeries/SS/spinoff/diff.jpg)
combined with YEA System Option (Screenshot from my game)

Script:
Get it from here => http://pastebin.com/VB5QUann

How to use:
- Put this script below material but above main.
- Decide the variable ID for game difficulty
- Then modify the percentage array

Credit:
You may credit me. TheoAllen

Note:
- I hope this script is useful for everyone
- If I've made some grammatical errors, it because my main language isn't english.
Title: Re: Theo - Difficulty Setting
Post by: Simple Mango on April 26, 2013, 04:11:24 AM
Hey, really like the way you have this script set up, makes it very useful.

But there's a game breaking bug that brings up this error when using Shop Processing:

Script 'Difficulty Setting' line 200: NameError occurred.

undefined local variable or method 'theolized_diff_start' for
#<Scene_Shop:0x94 d1ee0>

Note that all I did was put this in a blank project and open up the shop processing, as a test, and it still happened.

Thanks for all your work~
Title: Re: Theo - Difficulty Setting
Post by: LoganF on April 26, 2013, 07:41:14 AM
It's a typing error.

Head to line 200, you will see this method and the offending line:

Code: [Select]
alias theolized_diffset_start start
def start
  theolized_diff_start
  @diff_hash = THEOLIZED::DIFFSETTING::DIFFICULTY_HASH.dup
end

Change the line (200)

Code: [Select]
theolized_diff_start

to:

Code: [Select]
theolized_diffset_start
Title: Re: Theo - Difficulty Setting
Post by: TheoAllen on April 26, 2013, 11:51:19 PM
My bad. As LoganF said, it was a typing error.
Anyway, thanks for report. I've fixed it in pastebin
Title: Re: Theo - Difficulty Setting
Post by: Simple Mango on April 27, 2013, 02:09:40 PM
Ahhh, that explains it. Thank you much~
Title: Re: Theo - Difficulty Setting
Post by: TheoAllen on June 03, 2013, 01:51:31 AM
Small fix update. A guy in rmweb.com just found a new bug in scene shop (and it's about typing error again)
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi1281.photobucket.com%2Falbums%2Fa513%2FAlex_Cowell%2Fsavedifacultyerroe_zpsdf119def.png&hash=36a104704664c587b8df5332703581f6afed5804)
If u already use this script, just change line 207 to
Code: [Select]
@diff_hash.include?(var_value)
And I also updated bug fix in pastebin.