Jump to content


Photo

CSCA Difficulty System

csca difficulty

  • Please log in to reply
22 replies to this topic

#1 casper667

casper667

    Advanced Member

  • Member
  • 548 posts
  • RM Skill - Jack of All Trades

Posted 06 November 2012 - 05:46 PM

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

Spoiler


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, 06 April 2013 - 04:52 AM.


#2 DarthVollis

DarthVollis

    Moogle Master

  • + Sponsor
  • 445 posts
  • LocationSivart's Casino
  • RM Skill - Pixel Artist

Posted 06 November 2012 - 07:14 PM

Interesting idea. I may use it in future project. Thanks.

MoogleFantasy_zpse4aab1d3.gif


#3 ekomega

ekomega

    Advanced Member

  • Member
  • 268 posts

Posted 20 November 2012 - 02:27 AM

So I noticed in a thread on RMRK, http://rmrk.net/inde...ic,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!

#4 casper667

casper667

    Advanced Member

  • Member
  • 548 posts
  • RM Skill - Jack of All Trades

Posted 20 November 2012 - 03:30 PM

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.

#5 Levi Stepp

Levi Stepp

    RPG Maker VX Veteran

  • Member
  • 198 posts
  • LocationBedroom
  • RM Skill - Designer

Posted 26 November 2012 - 04:08 PM

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, 27 November 2012 - 11:25 AM.

Just a signature.
Website: TBA~


#6 ekomega

ekomega

    Advanced Member

  • Member
  • 268 posts

Posted 26 November 2012 - 11:20 PM

That would be great!

#7 OffeNDer

OffeNDer

    Advanced Member

  • Member
  • 114 posts

Posted 18 February 2013 - 02:38 AM

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, 18 February 2013 - 02:38 AM.


#8 casper667

casper667

    Advanced Member

  • Member
  • 548 posts
  • RM Skill - Jack of All Trades

Posted 18 February 2013 - 08:38 AM

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?



#9 OffeNDer

OffeNDer

    Advanced Member

  • Member
  • 114 posts

Posted 18 February 2013 - 02:11 PM

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



#10 yion90

yion90

    Member

  • Member
  • 17 posts

Posted 15 March 2013 - 09:40 AM

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?


513f16b07a365.jpg
 


#11 casper667

casper667

    Advanced Member

  • Member
  • 548 posts
  • RM Skill - Jack of All Trades

Posted 15 March 2013 - 11:08 AM

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.



#12 yion90

yion90

    Member

  • Member
  • 17 posts

Posted 15 March 2013 - 01:05 PM

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, 15 March 2013 - 02:30 PM.

513f16b07a365.jpg
 


#13 casper667

casper667

    Advanced Member

  • Member
  • 548 posts
  • RM Skill - Jack of All Trades

Posted 16 March 2013 - 06:28 AM

$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)


#14 yion90

yion90

    Member

  • Member
  • 17 posts

Posted 16 March 2013 - 10:41 AM

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


513f16b07a365.jpg
 


#15 casper667

casper667

    Advanced Member

  • Member
  • 548 posts
  • RM Skill - Jack of All Trades

Posted 16 March 2013 - 12:49 PM

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)


#16 yion90

yion90

    Member

  • Member
  • 17 posts

Posted 17 March 2013 - 05:51 AM

Thanks a lot. :)


513f16b07a365.jpg
 


#17 kory_toombs

kory_toombs

    Advanced Member

  • Member
  • 33 posts
  • RM Skill - Writer

Posted 09 April 2013 - 05:22 AM

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, 09 April 2013 - 05:30 AM.

My Games:

 

Demonic Tutor:

http://rpgmaker.net/games/5633/

 

Giadon Saga:

http://rpgmaker.net/games/4971/

 

Dragon Lancer:

http://rpgmaker.net/games/4708/


#18 casper667

casper667

    Advanced Member

  • Member
  • 548 posts
  • RM Skill - Jack of All Trades

Posted 09 April 2013 - 06:40 AM

Remove the #'s in your script call.



#19 Shadow Fox

Shadow Fox

    Advanced Member

  • + Sponsor
  • 202 posts
  • RM Skill - Writer

Posted 19 April 2013 - 10:55 AM

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, 19 April 2013 - 11:00 AM.


#20 casper667

casper667

    Advanced Member

  • Member
  • 548 posts
  • RM Skill - Jack of All Trades

Posted 19 April 2013 - 05:32 PM

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, 19 April 2013 - 05:33 PM.






Also tagged with one or more of these keywords: csca, difficulty

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users