casper667

csca
CSCA Difficulty System

23 posts in this topic

CSCA Difficulty System
By: Casper Gaming (Casper667)
Last Update: April 6, 2013
Latest version: 1.0.3

Introduction
Allows you to create difficulties, which can currently effect Encounter Rate, Enemy Gold & Exp drop, and Enemy Stats. You can also easily access the difficulty variable to use it for custom things in conditional branches or eventing.

Features
- Create a difficulty system in your game
- Change difficulties at any time
- Unlimited custom difficulties

Screenshots


difficulty.jpg



How to Use
Place in your materials section. Setup required. Instructions in script.

Script
Text file is found here(copy and paste everything into your script editor in the materials section): LINK
Requires CSCA Core Script to work properly - Get it here!

 

Updates

version 1.0.1

- Aliased param_base
- Changed hash keys to symbols
 
version 1.0.2
-Difficulty array is now 0 based for all script calls
 
version 1.0.3
- Properly aliased initialize in CSCA_Core... *facepalm*
 

Credit
Casper Gaming

Terms
http://www.caspergam...rms_of_use.html

Edited by casper667
DreamcasterDC likes this

Share this post


Link to post
Share on other sites

So I noticed in a thread on RMRK, http://rmrk.net/index.php/topic,46302.0.html, for DT's Difficulty script, a user Pacman had an issue with re-writing the param_base method.

 

You do:

def param_base(param_id)
   return enemy.params[param_id] if (param_id == 1 || param_id == 0) &&
 !CSCA::DIFFICULTY::MODIFY_HPMP

   (enemy.params[param_id] * ($csca.d_enemystats.to_f/100)).to_i
 end

 

And you don't alias param_base.

 

For the script from RMRK, he initially had it as:

def param_base(param_id)
case $difficulty
when 0
enemy.params[param_id] * TODDDIFFICULTY::EASYM
when 1
enemy.params[param_id]
when 2
enemy.params[param_id] * TODDDIFFICULTY::HEROICM
when 3
enemy.params[param_id] * TODDDIFFICULTY::HARDM
else
enemy.params[param_id]
end
end

 

And it was suggested he modify it to:

 

alias todd_difficulty_gmen_param_base param_base
def param_base(param_id, *args)
n1 = todd_difficulty_gmen_param_base(param_id, *args)
n2 = case $difficulty
when 0 then TODDDIFFICULTY::EASYM
when 1 then 1
when 2 then TODDDIFFICULTY::HEROICM
when 3 then TODDDIFFICULTY::HARDM
end
return n1 * n2
end

 

Do you think it is important to make a similar change in your script to alias param_base? And could you implement such a thing?

 

 

Thanks!

Share this post


Link to post
Share on other sites

It probably won't break anything if it's not aliased, though I can't believe I missed that. For some reason I thought param_base was only defined in the Game_BattlerBase class :wacko:. I'll alias it for a future version.

Share this post


Link to post
Share on other sites

It probably won't break anything if it's not aliased, though I can't believe I missed that. For some reason I thought param_base was only defined in the Game_BattlerBase class :wacko:/>. I'll alias it for a future version.

is there a way to add this to Yanfly's System Options.

I can't seem to figure it out.

Tried making a command for it, but it doesn't appear.

 

 

Edit~

I decided to use a different difficulty script since I got a different one to work in System Options.

Edited by KoutaStepp

Share this post


Link to post
Share on other sites

i try to use this script, and i already have the core, but when i select for example insane, the exp rate and gold rate is not changing.....

 

any way i can make sure it is working ?

Edited by OffeNDer

Share this post


Link to post
Share on other sites
i try to use this script, and i already have the core, but when i select for example insane, the exp rate and gold rate is not changing.....

 

any way i can make sure it is working ?

 

What other custom scripts are you using?

Share this post


Link to post
Share on other sites
i try to use this script, and i already have the core, but when i select for example insane, the exp rate and gold rate is not changing.....

 

any way i can make sure it is working ?

 

What other custom scripts are you using?

 

hmmm

i am using a lot of scripts, 

but i am using more of your script than other script, 

 

here list of your script that i am using now.

Core

Menu organizer

Encyclopedia

Auto save plus

Game info

Colosseum + wagers

Menu theme

Menu MOD

Shop Status colors

Difficulty System

Snippets

Shop Upgrade

 

^ thats from you,

and i am using some of Moghunter  script...

 

 

however, i also try to test another difficulty system from another forum but it is also not working,,,

 

the exp still the same

Share this post


Link to post
Share on other sites

I need help with this one.

Im trying to increase the Difficulty by 1 everytime a new character joins.

My question is, how can i change the difficulty manually?

Share this post


Link to post
Share on other sites

I need help with this one.

Im trying to increase the Difficulty by 1 everytime a new character joins.

My question is, how can i change the difficulty manually?

You'd do

$csca.difficulty = 1

 

for the first difficulty set up, 2 for the second, etc.

Share this post


Link to post
Share on other sites

I feel like a Retard... i used $csca.difficulty == 1 instead of just one = -.-.... Thanks a lot! ^^

 

Another Question though.

Is there a way to show the chosen difficulty in the message box or store it as a visible variable so i can

show the player what Difficulty it's currently on?

 

For example:

Im using 14 Difficulties. Only 5 Visible to the Player, the rest changes depending on the Party Size.

So that's why i'm not using the scene command (it shows all 15 Diffulties O.O)

Instead iam using a Customized Menu with changing paralax backgrounds when you press up or down.

 

It works now but what i want is. When u press the button C (standard Enter.)

That it ask you if you are sure about your Decision

"Do you want to play on ____ difficulty?"

Now i want to have ____ to be displayed as the chosen Difficulty.

Is that possible?

 

EDIT: i think your script actually said using two == ... :) you should make a note about it if iam right.

i might be wrong tho and i accidently added another = in the "how to"

 

EDIT2: I got it working with the excessive uses of switches now.

but i will still request a possible way to show what difficulty you chose for future needs or

someone else who needs it.

(possible to show in Menus or custom save files etc.)

I think it would be a good idea.

Edited by yion90

Share this post


Link to post
Share on other sites

$csca.difficulty is a variable. If you want to check which difficulty the player is on and show text accordingly, you can do

Conditional branch: script: $csca.difficulty == x  (where x is the difficulty number you want to check)

 

If you just want to display the name of the difficulty in a text box, you can make this script call:

a=CSCA::DIFFICULTY::DIFFICULTIES
t=a[$csca.difficulty][:name]
t2="Your current difficulty is: "
$game_message.add(t2 + t)

Share this post


Link to post
Share on other sites

whenever i use

 

a=CSCA::DIFFICULTY::DIFFICULTIES
t=a[$csca.difficulty][:name]
t2="Your current difficulty is: "
$game_message.add(t2 + t)

 

i get an error:

5144a0a3cd25b.jpg

Share this post


Link to post
Share on other sites

You must not have the latest version of the script.

 

For older versions, it'd look like this:

a=CSCA::DIFFICULTY::DIFFICULTIES
t=a[$csca.difficulty]["name"]
t2="Your current difficulty is: "
$game_message.add(t2 + t)

Share this post


Link to post
Share on other sites

The set up says to use a script call for

 

    # scene = CSCA_Scene_DifficultySelect
    # SceneManager.call(scene)
 

Is this right?

 

I tried to run an event using this, but it doesn't do anything.

 

 

Edit: I want the selection to begin at the start of the game.

And the difficulty to be locked for the duration of the game.

Edited by kory_toombs

Share this post


Link to post
Share on other sites

In my game monsters do not give out gold... will I need to remove or change the ENEMYGOLD part of your script?

For example for the story difficulty do I remove ":enemygold => 150" or do I change every enemygold line to say ":enemygold => 0"?

Sorry for the noob question

Edited by Shadow Fox

Share this post


Link to post
Share on other sites

It just multiplies the gold amount by the % you set, so if the gold received is 0 then anything multiplied by it will also be 0.

Don't delete the line, it just won't have any effect.

Edited by casper667

Share this post


Link to post
Share on other sites

I have been using your script for a while now and I think its really great.

But I'm not sure if the script actually effects the encounter rate (Am I doing something wrong?)

Share this post


Link to post
Share on other sites

@Kory Why would you think it doesn't? An easy way to test would be to use a huge value such as -99% or +100% or something. With smaller values such as +/-10% it might not be very noticeable since 10% of the default 30 steps is only 3 steps, not something that will really be felt by the player especially because it's slightly random.

Share this post


Link to post
Share on other sites

Hello!

I was wondering if there was a way to make the script show the difficulty in XS's Menu Delux?

I managed somehow to at least make it show "Difficulty: 2" with my noob skills.

Is there a way to make it say "Easy" or "Normal" instead?

Picture:

http://puu.sh/7dVJc

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.