Amaranth Games   Games   News   Order   Community   Help   Blog   Goodies   Updates   Guides Developers
Username:    Password:      Register now!
Game Genres
All Games
RPG
Adventure
SIM
Story
Cute
Game Kits
Amaranth Games (games only by us)
Newest Game
Featured Game
Love's Triumph
Love's Triumph
Popular Games


Browsing this Thread:   1 Anonymous Users

      Register To Post

Difficulty Levels #1
Offline   An.
  Witches and Warlocks
gold   1567 Gold
Level : 28
EXP : 89
HP : 139 / 697
MP : 359 / 4138
Alright, I wanna ask about Difficulty levels. I know that we can make them from the States screen, but is there any other way? Because States show "easy", "heard" whatever, every time you fight and also on the menu.

So, any scripts for difficulty levels?

Thanks!

((Using RMXP, btw))

Posted on: 2012/8/19 2:56
_________________

Couple avvie and siggie set with Meroko


Re: Difficulty Levels #2
Offline   shaz
  Administrator
gold   11446 Gold
Level : 68
EXP : 81
HP : 1695 / 1695
MP : 3988 / 26283
I've never heard of using states for difficulty. Now you've got me curious.

In Aveyond, we completely scripted them. The difficulty choice was done with a script (I don't remember which one we based it off), it set a variable, then in all damage calculations we had it adjust based on difficulty, and whether the damage was inflicted by a party member or an enemy.

You could probably use a Show Choices right at the start of the game to let the player choose the difficulty level, and set a variable accordingly. But you'd still have to implement via scripts.

Posted on: 2012/8/19 4:11
_________________
While no trees were harmed in the transmission of this message,
thousands of pixels were inconvenienced.


Re: Difficulty Levels #3
Offline   An.
  Witches and Warlocks
gold   1567 Gold
Level : 28
EXP : 89
HP : 139 / 697
MP : 359 / 4138
LOL, I've always hear of States of difficulty. XD

Alright, I got that. Aveyond's using scripts. Uhm, can you give me some script, 'cuz I'm not sure how to make one. Thanks a lot~

Posted on: 2012/8/19 4:35
_________________

Couple avvie and siggie set with Meroko


Re: Difficulty Levels #4
Offline   shaz
  Administrator
gold   11446 Gold
Level : 68
EXP : 81
HP : 1695 / 1695
MP : 3988 / 26283
Are you using any additional scripts, or pure RTP? How do you want the difficulty levels to affect battles?

Posted on: 2012/8/19 16:51
_________________
While no trees were harmed in the transmission of this message,
thousands of pixels were inconvenienced.


Re: Difficulty Levels #5
Offline   An.
  Witches and Warlocks
gold   1567 Gold
Level : 28
EXP : 89
HP : 139 / 697
MP : 359 / 4138
Yes, I'm using additional scripts.

Affect? If it's in easy mode, the PC gets less damage and the monster gets more damage. Normal means its normal mode, know what I mean? Hard is the opposite of Easy.

Posted on: 2012/8/20 0:36
_________________

Couple avvie and siggie set with Meroko


Re: Difficulty Levels #6
Offline   shaz
  Administrator
gold   11446 Gold
Level : 68
EXP : 81
HP : 1695 / 1695
MP : 3988 / 26283
If you want someone to create a script, you must be EXACT about your requirements. HOW MUCH more or less damage for each mode?

How are you getting them to select the difficulty level - are you putting it into a variable, or using switches? Which one(s)? If a variable, what are the values, and which value means which difficulty level?

What scripts are you using? Are you using any custom battle scripts? That will determine how easy it is for someone to write something for you.

I won't do any scripts based on other battle systems, so if you're using another battle script, someone else will have to pop in and handle this

Posted on: 2012/8/20 1:43
_________________
While no trees were harmed in the transmission of this message,
thousands of pixels were inconvenienced.


Re: Difficulty Levels #7
Offline   An.
  Witches and Warlocks
gold   1567 Gold
Level : 28
EXP : 89
HP : 139 / 697
MP : 359 / 4138
Sorry. My explanation skills are very useless. >.>

25% easier for Easy mode, Normal is the usual RMXP settings and Hard is 25% harder.

So, um, I'm just in the starting stage and haven't decided on switches/variable, but I think I'll be using switches.

I'm using Lambchop's side view battle system script. And other scripts which I'm using don't clash with the battle system.

Um, yeah. Still a crappy explanation. >.>

Posted on: 2012/8/20 1:53
_________________

Couple avvie and siggie set with Meroko


Re: Difficulty Levels #8
Offline   shaz
  Administrator
gold   11446 Gold
Level : 68
EXP : 81
HP : 1695 / 1695
MP : 3988 / 26283
No, that's better, and I can help you because that's the only non-RTP battle system I'm familiar with.

Variables will be better - at the start of your game, use a Show Choices command to let the player select Easy, Normal or Hard. If they choose Easy, set a variable to 0. If they choose Normal, set it to 1. If they choose Hard, set it to 2. Don't let them have a Cancel option. I will base the script around that.

Now I just need you to choose which variable you're going to use, and let me know which one it is (the variable ID), so I can use it in the script.

Posted on: 2012/8/20 5:15
_________________
While no trees were harmed in the transmission of this message,
thousands of pixels were inconvenienced.


Re: Difficulty Levels #9
Offline   An.
  Witches and Warlocks
gold   1567 Gold
Level : 28
EXP : 89
HP : 139 / 697
MP : 359 / 4138


Alright. I'll be using 0, 1 & 2 as variable IDs. ((That's what you mean to ask, right? Okay, fine, I need to start using variables more than switches. >.> ))

Posted on: 2012/8/21 6:36
_________________

Couple avvie and siggie set with Meroko


Re: Difficulty Levels #10
Offline   shaz
  Administrator
gold   11446 Gold
Level : 68
EXP : 81
HP : 1695 / 1695
MP : 3988 / 26283
No

You need ONE variable. It will have a VALUE of 0, 1 or 2, depending on what difficulty level they choose.

So, say you want to use variable #15, you'll have an event like this:


Show Text
Select your difficulty level.
Show ChoicesEasyNormalHard
When 
[Easy]
  
Control Variables: [0015Difficulty Level] = 0
When 
[Normal]
  
Control Variables: [0015Difficulty Level] = 1
When 
[Hard]
  
Control Variables: [0015Difficulty Level] = 2
Branch End


Now, you have to change your code to make the battles more or less difficult.

In Game_Battler 3, make the following changes, including a new method at the end of the class (I'll just use ... to indicate code you shouldn't change)


def attack_effect
(attacker)
  ...
  if 
hit_result == true # on line 79 in default script
    # State Removed by Shock
    
remove_states_shock
    
# Add difficulty adjustment       << insert this line
    
adjust_difficulty(attacker)       << insert this line
    
# Subtract damage from HP
    
self.hp -= self.damage
    
...
end

def skill_effect
(user)
  ...
  if 
hit_result == true # on line 168 after inserting the above 2 lines
    # If physical attack has power other than 0
    
if ...
      ...
    
end
    
# Add difficulty adjustment        << insert this line
    
adjust_difficulty(user)            << insert this line
    
# Subtract damage from HP
    
last_hp self.hp
    self
.hp -= self.damage
    
...
end

#---------------------------------------------------
# Adjust damage for difficult level   
#---------------------------------------------------
def adjust_difficulty(user)
  return if [
0nil"""Miss"].include?(self.damage)

  
# Determine damage adjustment
  
if user.is_a?(Game_Actor)
    
# actors are 25% stronger on easy, 25% weaker on difficult
    
adjust = [1.2510.75][$game_variables[15]]
  else
    
# enemies are 25% weaker on easy, 25% stronger on difficult
    
adjust = [0.7511.25][$game_variables[15]]
  
end

  
# Adjust damage (take into account whether it's REAL damage, or healing)
  
if self.damage 0
    self
.damage = [1, (self.damage adjust).to_i].max
  
else
    
self.damage = [-1, (self.damage adjust).to_i].min
  end
end



If you don't want to use variable 15, but something else instead, you have to change the three Change Variable commands in the event, and the two instances of $game_variables[15] in that last bit of the script.

Posted on: 2012/8/21 18:25
_________________
While no trees were harmed in the transmission of this message,
thousands of pixels were inconvenienced.


Re: Difficulty Levels #11
Offline   An.
  Witches and Warlocks
gold   1567 Gold
Level : 28
EXP : 89
HP : 139 / 697
MP : 359 / 4138
It works! Thanks a LOT, Shaz! DD

Posted on: 2012/8/22 3:20


Re: Difficulty Levels #12
Offline   shaz
  Administrator
gold   11446 Gold
Level : 68
EXP : 81
HP : 1695 / 1695
MP : 3988 / 26283
You're welcome

Posted on: 2012/8/22 4:09
_________________
While no trees were harmed in the transmission of this message,
thousands of pixels were inconvenienced.


      Register To Post
You can view topic.
You cannot start a new topic.
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.

[Advanced Search]




Join our Newsletter!

RSS Feed

Coming Soon!

June, 2013

RPGs
Dragons Among Us
Edolie
Aveyond 4

Sandbox
Pixel Pygmies

Sim/Match 3
Butterfly Adventure

Kingdom Chat
ljspence > 05/17 15:29:35[ljspence] my brain is...full
Aveyond Wiki
Click to Visit!
made by fans, for fans
Kingdom Map

(Laws)



(Forums)



(News)



(Art Gallery)



(Cottages)



(Guilds)



(Experiments)

Who's Online
65 user(s) are online (38 user(s) are browsing My Forum Entries)

Members: 2
Guests: 63

EsmeAmelia, Rekka, more...
About Us |  Sell Our Games |  Add Your Game to Our Site
©2007 Amaranth Games, LLC
Powered by Xoops