Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

> 


———
Before you ask! Read! ;)

You must have 30+ Posts to create a topic here!

Thanks for reading!
———

 
Reply to this topicStart new topic
> Difficulty Script
BleachBummer
post Jan 5 2012, 02:33 PM
Post #1


Level 2
Group Icon

Group: Member
Posts: 20
Type: Writer
RM Skill: Beginner




Before I ask, I want to say that if it is impossible or way to difficult to make, I will understand and drop my request.

I was wondering if their could be a difficulty script that gives you an option to pick your difficulty to start the game and modifies the enemies according to the difficulty. And example of this could be like certain stats you pick are halfed on Easy, stay the same on Normal, and doubled on Hard.

Again, if it can't be done, I will understand. I just think it would be cool if it could.
Go to the top of the page
 
+Quote Post
   
TNinja
post Jan 5 2012, 06:11 PM
Post #2


Level 10
Group Icon

Group: Revolutionary
Posts: 167
Type: Event Designer
RM Skill: Skilled




I remember there was a dificulty scrip from the KCG. I guess it was called "KCG_BattleDifficulty"?

The script doesn't work alone, and needs some other KCG scripts I recall.


__________________________
Eye 'em so lolicon.
677,09kb.gif animation incoming, and 20k dancing coconut dude.
Go to the top of the page
 
+Quote Post
   
munkis
post Jan 6 2012, 04:40 AM
Post #3


Woah, dude...
Group Icon

Group: Revolutionary
Posts: 197
Type: Writer
RM Skill: Intermediate




No, it'll work by itself, the two scripts mentioned in its header are optional.

http://www.rpgrevolution.com/forums/index....showtopic=36210

Or you could use this one:

http://www.rpgrevolution.com/forums/index....showtopic=47514


__________________________
Go to the top of the page
 
+Quote Post
   
BleachBummer
post Jan 6 2012, 10:51 AM
Post #4


Level 2
Group Icon

Group: Member
Posts: 20
Type: Writer
RM Skill: Beginner




QUOTE (munkis @ Jan 6 2012, 04:40 AM) *
No, it'll work by itself, the two scripts mentioned in its header are optional.

http://www.rpgrevolution.com/forums/index....showtopic=36210

Or you could use this one:

http://www.rpgrevolution.com/forums/index....showtopic=47514


OK, I looked at the scripts and am a little confused on trying to figure out how to get them to work as well as how to make each one use only three difficulties?
Go to the top of the page
 
+Quote Post
   
BleachBummer
post Jan 6 2012, 05:52 PM
Post #5


Level 2
Group Icon

Group: Member
Posts: 20
Type: Writer
RM Skill: Beginner




Never mind, I figured it out already. My only questions now is why is the HP lowered to 1 when you choose a difficulty?

And is there anyway to make certain events trigger depending what difficulty you are on?

Thanks.
Go to the top of the page
 
+Quote Post
   
munkis
post Mar 4 2012, 07:34 AM
Post #6


Woah, dude...
Group Icon

Group: Revolutionary
Posts: 197
Type: Writer
RM Skill: Intermediate




Sorry for the late reply, but...

QUOTE
why is the HP lowered to 1 when you choose a difficulty?


My difficulty script changes the actor's stats, not the monster's.

CODE
  def base_maxhp
    n = actor.parameters[0, @level]
    n *= $game_variables[MNK_Difficulty_Select::DIFFICULTY_STAT_VAR[0]]; n /= 100
    return n
  end


That code sets the inital maxHP to whatever the variable is equal to. But since we dividing 100/100, it's set equal to 1.

CODE
  def setup(actor_id)
    munkis_setup(actor_id)
    $game_variables[MNK_Difficulty_Select::DIFFICULTY_STAT_VAR[0]] = MNK_Difficulty_Select::DIFFICULTY_STAT_VAR[1]
  end


This sets the variable to whatever value you tell it to.

CODE
  def choice_1
    $game_switches[MNK_Difficulty_Select::SELECTION_MADE] = true
    $game_variables[MNK_Difficulty_Select::DIFFICULTY_STAT_VAR[0]] += 15
    Audio.se_play("audio/se/"+MNK_Difficulty_Select::SELECTION_SE,100,100)
    $game_switches[6] = true
    return_scene
  end
  def choice_2
    $game_switches[MNK_Difficulty_Select::SELECTION_MADE] = true
    Audio.se_play("audio/se/"+MNK_Difficulty_Select::SELECTION_SE,100,100)
    $game_switches[6] = true
    return_scene
  end
  def choice_3
    $game_switches[MNK_Difficulty_Select::SELECTION_MADE] = true
    $game_variables[MNK_Difficulty_Select::DIFFICULTY_STAT_VAR[0]] -= 15
    Audio.se_play("audio/se/"+MNK_Difficulty_Select::SELECTION_SE,100,100)
    $game_switches[6] = true
    return_scene
  end
  def choice_4
    $game_switches[MNK_Difficulty_Select::SELECTION_MADE] = true
    $game_variables[MNK_Difficulty_Select::DIFFICULTY_STAT_VAR[0]] -= 30
    Audio.se_play("audio/se/"+MNK_Difficulty_Select::SELECTION_SE,100,100)
    $game_switches[6] = true
    return_scene
  end


This part makes any final changes you need to make.

QUOTE
And is there anyway to make certain events trigger depending what difficulty you are on?


Yes there is a way to do that. I think that may be where that random $game_switches line came from, but I'd recommend you use a different switch ID for each difficulty.

This post has been edited by munkis: Mar 5 2012, 06:05 AM


__________________________
Go to the top of the page
 
+Quote Post
   
BleachBummer
post Mar 10 2012, 09:41 AM
Post #7


Level 2
Group Icon

Group: Member
Posts: 20
Type: Writer
RM Skill: Beginner




QUOTE (munkis @ Mar 4 2012, 07:34 AM) *
CODE
  def base_maxhp
    n = actor.parameters[0, @level]
    n *= $game_variables[MNK_Difficulty_Select::DIFFICULTY_STAT_VAR[0]]; n /= 100
    return n
  end


That code sets the inital maxHP to whatever the variable is equal to. But since we dividing 100/100, it's set equal to 1.

CODE
  def setup(actor_id)
    munkis_setup(actor_id)
    $game_variables[MNK_Difficulty_Select::DIFFICULTY_STAT_VAR[0]] = MNK_Difficulty_Select::DIFFICULTY_STAT_VAR[1]
  end


This sets the variable to whatever value you tell it to.

CODE
  def choice_1
    $game_switches[MNK_Difficulty_Select::SELECTION_MADE] = true
    $game_variables[MNK_Difficulty_Select::DIFFICULTY_STAT_VAR[0]] += 15
    Audio.se_play("audio/se/"+MNK_Difficulty_Select::SELECTION_SE,100,100)
    $game_switches[6] = true
    return_scene
  end
  def choice_2
    $game_switches[MNK_Difficulty_Select::SELECTION_MADE] = true
    Audio.se_play("audio/se/"+MNK_Difficulty_Select::SELECTION_SE,100,100)
    $game_switches[6] = true
    return_scene
  end
  def choice_3
    $game_switches[MNK_Difficulty_Select::SELECTION_MADE] = true
    $game_variables[MNK_Difficulty_Select::DIFFICULTY_STAT_VAR[0]] -= 15
    Audio.se_play("audio/se/"+MNK_Difficulty_Select::SELECTION_SE,100,100)
    $game_switches[6] = true
    return_scene
  end
  def choice_4
    $game_switches[MNK_Difficulty_Select::SELECTION_MADE] = true
    $game_variables[MNK_Difficulty_Select::DIFFICULTY_STAT_VAR[0]] -= 30
    Audio.se_play("audio/se/"+MNK_Difficulty_Select::SELECTION_SE,100,100)
    $game_switches[6] = true
    return_scene
  end


This part makes any final changes you need to make.



I see, so in order to change it so it start on Max HP, I just need to make the change to the top part? Or is there a little more than that? If so, can you give an example while I try to see if I can figure it out.

QUOTE (munkis @ Mar 4 2012, 07:34 AM) *
Yes there is a way to do that. I think that may be where that random $game_switches line came from, but I'd recommend you use a different switch ID for each difficulty.


Do you mind giving me an example for using a different swtch ID for each difficulty?
Go to the top of the page
 
+Quote Post
   
munkis
post Apr 2 2012, 05:04 AM
Post #8


Woah, dude...
Group Icon

Group: Revolutionary
Posts: 197
Type: Writer
RM Skill: Intermediate




Sorry for the late reply, but here goes:

QUOTE (BleachBummer @ Mar 10 2012, 09:41 AM) *
I see, so in order to change it so it start on Max HP, I just need to make the change to the top part? Or is there a little more than that? If so, can you give an example while I try to see if I can figure it out.


No, all you need to do is change the second value in this array

CODE
  #[In-game variable id, value]
  DIFFICULTY_STAT_VAR = [4,100]


to whatever you want it to be. This will change all of the non-HECO stats, it won't allow you to only change certain ones.

QUOTE (BleachBummer @ Mar 10 2012, 09:41 AM) *
QUOTE (munkis @ Mar 4 2012, 07:34 AM) *
Yes there is a way to do that. I think that may be where that random $game_switches line came from, but I'd recommend you use a different switch ID for each difficulty.


Do you mind giving me an example for using a different swtch ID for each difficulty?


CODE
$game_switches[n] = true


where n is an in-game switch id, and can be any positive integer. Just look at the "Control Switches" event command to see what I mean.


__________________________
Go to the top of the page
 
+Quote Post
   

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 24th May 2013 - 12:40 PM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker