[RMVX ACE] HOW CAN I CREATE A DARK KNIGHT CHARACTER

Posts

Pages: 1
what i have in mind is a group of spells that gets stronger the more taint the character have and that also costs hp to use. how can i do that?
SunflowerGames
The most beautiful user on RMN!
13323

Do you mean:

1) You get stronger spells based on the spells you cast.

2) Based on the decisions you make in the game.


In either case the first step will likely require making a huge amount of spells
available in the database. I'm not sure if you can make the spells use variables in the damage formula, but if you can, this might help you increase the damage based on some factors. As for HP cost you can make it a % instead of an amount. So as the character levels up and gains HP it will cost the same %, which is a larger amount each time. I'm not sure if you can base this off a variable or not. But Variables are the key I think.
let me explain: the attack is inspired by the final fantasy 4`s main character`s dark wave attack. there is also an attack that is called hp drain in my game that drains hp from an enemy and that is supposed to cause the taint. dark wave is then supposed to reduce taint while costing hp and it is also supposed to do damage based on how much taint that character have.
Marrend
Guardian of the Description Thread
21781
Hrm. Do you use TP at all? If not, maybe you can set it up so that HP Drain is the only thing that charges TP. Dark Wave wouldn't necessarily cost TP, but you could probably set up a Common Event that would read how much TP has been accumulated by the character, base the damage on that somehow, then set the character's TP to zero.

You very probably need a script to enable skills to cost HP, though. I think one of Yanfly's scripts can do it, but, I can't be more specific than that. Sorry!

*Edit, clarification: Well, technically, you can set an effect of a skill to recover negative HP. Which could relay an HP cost. However, the impression I get is that you want to list the cost of Dark Wave as a cost in HP as opposed to having a 0 MP cost that happens to have an additional effect of sacrificing X% of the character's HP?

Wait a sec. Setting a skill to recover negative HP is an effect that applies to the target, not the user of the skill. NEVERMIND!

*Edit 2: Well, I suppose the cost in HP could be part of the Common Event for Dark Wave? However, yeah, I'm still getting the impression that you want the cost to be listed as a cost of HP as opposed to a cost of MP.
i do not require the cost to be listed on the ability. the HP drain ability however will cost mp as otherwise it would be too unbalanced. dark wave does not cost mp though. i do need a more specific solution than what you have provided. i am willing to learn scripting in order to create the system.
Marrend
Guardian of the Description Thread
21781
I never said that HP Drain would not cost MP?

In any event, here's what I'm understanding of what you want: there is a character that has a "taint" value, and using the HP Drain skill would increment that value. Using Dark Wave would deplete the "taint" value by some number, if not set it to zero. Regardless of how much taint is depleted, the damage of Dark Wave would be based on how much the value is depleted by.

Setting up the taint value might not be so bad, script-wise. That would be adding a property to, most probably, either the Game_BattlerBase or Game_Actor class. Both Dark Wave's and HP Drain's damage formulas might need an "eval()" expression. For example, we probably want Dark Wave to do something like...

damage = a.taint * (2 * a.mat - b.mdf)
a.taint = 0
return damage


...that. Or whatever you might have had in mind, as far as damage calculation is concerned. Meanwhile, HP Drain might look something like...

damage = 2 * a.mat - * b.mdf
a.taint += damage / 4
return damage


...that. Though, if I'm totally off-kilter, here, this would be a good place to tell me!
you are on to something. the taint value goes from 0 to 100 where 100 is class change to demon and 0 is no extra damage applied on dark wave. the demon class uses abilities that increase taint only and no abilities that reduce it. a character with 200 taint becomes an arch demon at which point taint drops to 0.(taint also drops to 0 through certain ingame events but those i should manage to do on my own.)
Yanfly has a script called the Skill Cost Manager that lets you flag a skill to cost X HP or Y% HP. Use that for the dark wave attack. In the skill's damage algorithm give it something like


base_damage * ((100 + a.tp) / 100)


And when TP is full it'll deal x2 damage. Adjust the (100 + x) / 100 bit accordingly to how you want it to scale with your taint.
This expression would be equivalent to a scaling percentage.
Marrend
Guardian of the Description Thread
21781
The character changes class when he/she exceeds certain taint values? Since it would occur mid-battle, I would advise setting up a Common Event that would, probably, be called every turn. What it would do is check to see if the character is the Demon class, then, if that fails, check to see if he/she is the Dark Knight class. If the character fails the first check to see if he/she is an Archdemon, you do another check with "$game_actors[x].taint >= 200", where X is the character ID slot that the Dark Knight character exists. If this is true, change the character's class into Archdemon.

If the first check (to see if the character was a Demon) failed, we want to check to see if the character becomes a Demon. In which case, we do another check of "$game_actors[x].taint >= 100". If that's true, switch class into Demon.

Darigaaz, I hope that made sense. If you need me to provide pictures to help explain this, I can do so.

Anyway, if I'm reading you right, in respect to Dark Wave, the Demon (and Archdemon) classes use a version of Dark Wave that does not consume taint? So, it might look more like...

damage = a.taint * (2 * a.mat - b.mdf)
if a.instance_of?(Game_Actor) == true
# This makes sure that the user of Dark Wave is a party member, as enemies don't have a "class_id" property!
  if a.class_id != 2 || a.class_id != 3
  # The above line assumes the Demon and Archdemon classes are the second and third class listed in the database. Change as necessary.
    a.taint = 0
   end
end
return damage

...that, I think?
your script have a name error on line 1. the demon class will be using its own unique spells that is very powerful but that causes taint. the arch demon does not cause taint and reverts to dark knight or black knight when KO.(the demon also reverts when KO with taint reduced to 0.)
Trihan
"It's more like a big ball of wibbly wobbly...timey wimey...stuff."
3359
I think you're missing the part where you actually need to add a "taint" attribute to battlers.
Marrend
Guardian of the Description Thread
21781
For a bit of reference, I said...

author=Marrend
Setting up the taint value might not be so bad, script-wise. That would be adding a property to, most probably, either the Game_BattlerBase or Game_Actor class.

...that. Which means, yes, I knew it wouldn't work with the default functions/parameters that are given with VX Ace. Though, I also seem to recall...

author=andreasaspenberg
i am willing to learn scripting in order to create the system.

...this. Now, call me crazy, but, I was kinda thinking you would do some research how to go about making said attribute? I dunno.
those scripts you mention is protected and any changes to them causes an error.(either that or it does nothing.) i have personally tried to edit them so this i know. it will therefore require that it is placed under materials. the help file is too general and does not teach a person that have not learned a programming language.(i have not learned any.) i have done all the research i can into scripting but it was rather limited what i got out of it. you could teach me what i need in order to create what i want as i want to learn scripting so that i can develop my own systems.
Marrend
Guardian of the Description Thread
21781
I was writing up a test-project for the purposes of creating screenshots to help illustrate what I'm doing. Though, apparently, things aren't quite as simple as I had thought! For one thing, HP Drain isn't reporting damage being done (despite all other indications (that I'm aware of) that it should), not to mention that taint isn't accumulating at all.

*Edit: While the process of debugging might be an integral part of scripting, I would prefer to be able to give you something that worked!

*Edit2:

I'm not sure how good of a teacher I would be, but, here goes.

First, we need to give characters a "taint" attribute. We can probably do this a few ways, but, the first way I would think of is to have a look at the beginning of Game_Actors...

class Game_Actor < Game_Battler
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  attr_accessor :name                     # Name
  attr_accessor :nickname                 # Nickname
  attr_reader   :character_name           # character graphic filename
  attr_reader   :character_index          # character graphic index
  attr_reader   :face_name                # face graphic filename
  attr_reader   :face_index               # face graphic index
  attr_reader   :class_id                 # class ID
  attr_reader   :level                    # level
  attr_reader   :action_input_index       # action number being input
  attr_reader   :last_skill               # For cursor memorization:  Skill

...copy-paste that into a new script (placing it below the "materials" section), and adding it in there...

class Game_Actor < Game_Battler
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  attr_accessor :name        	          # Name
  attr_accessor :nickname                 # Nickname
  attr_accessor	:taint                    # Taint attribute
  attr_reader   :character_name           # character graphic filename
  attr_reader   :character_index          # character graphic index
  attr_reader   :face_name                # face graphic filename
  attr_reader   :face_index               # face graphic index
  attr_reader   :class_id                 # class ID
  attr_reader   :level                    # level
  attr_reader   :action_input_index       # action number being input
  attr_reader   :last_skill               # For cursor memorization:  Skill

...as thus. Maybe go down a bit further into Game_Actor...
#--------------------------------------------------------------------------
# * Setup
#--------------------------------------------------------------------------
def setup(actor_id)
  @actor_id = actor_id
  @name = actor.name
  @nickname = actor.nickname
  init_graphics
  @class_id = actor.class_id
  @level = actor.initial_level
  @exp = {}
  @equips = []
  init_exp
  init_skills
  init_equips(actor.equips)
  clear_param_plus
  recover_all
end

...copy that over, then to setup an "original value" for taint. Such as...
#--------------------------------------------------------------------------
# * Setup
#--------------------------------------------------------------------------
def setup(actor_id)
  @actor_id = actor_id
  @name = actor.name
  @nickname = actor.nickname
  init_graphics
  @class_id = actor.class_id
  @level = actor.initial_level
  @exp = {}
  @equips = []
  @taint = 0
  init_exp
  init_skills
  init_equips(actor.equips)
  clear_param_plus
  recover_all
end

...that. Then, I would probably want to test to see if I can access it the way I would want to! This typically involes me making a crappy map, and creating an event that would check it for me.

Let's take a step back. At this juncture, our scripts should look like this, while our check-event would look like this. Accessing that event gives us this result. Not quite what we were looking for, but, it's certainly an indication of a step in the right direction!

Now, we setup HP Drain and a really simple version of Dark Wave.

Whoa, whoa! What was that thing I had in the damage forumla for HP Drain? What the heck does that do? Nothing, actually! At least until we update our scripts.

Battle-test time? Battle-test time! Probably, the simplest way to do it is via the Troop editor in the database. However, it might be more appropriate if you set up a fight into the event where it checks the character's current taint value!

Let's say you wanted to throw in a bit of variance, though. Now, call me crazy, but, I added a function to our scripts that should do just that. Testing again, just to make sure... okay!

*keels over*
that looks good but, could you please post the entire script here. i know that i can read it in the pictures and type it in myself but that would take extra time for me.
Trihan
"It's more like a big ball of wibbly wobbly...timey wimey...stuff."
3359
So you're okay with asking people who are already taking time out of their day to help you with your requests to take even longer to save you work?
Marrend
Guardian of the Description Thread
21781
I'm not exactly enthused about that "extra time" comment either, but...

class Game_Actor < Game_Battler
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  attr_accessor :name                     # Name
  attr_accessor :nickname                 # Nickname
  attr_reader   :character_name           # character graphic filename
  attr_reader   :character_index          # character graphic index
  attr_reader   :face_name                # face graphic filename
  attr_reader   :face_index               # face graphic index
  attr_reader   :class_id                 # class ID
  attr_reader   :level                    # level
  attr_reader   :action_input_index       # action number being input
  attr_reader   :last_skill               # For cursor memorization:  Skill
  attr_reader   :taint                    # Taint value
  #--------------------------------------------------------------------------
  # * Setup
  #--------------------------------------------------------------------------
  def setup(actor_id)
    @actor_id = actor_id
    @name = actor.name
    @nickname = actor.nickname
    init_graphics
    @class_id = actor.class_id
    @level = actor.initial_level
    @exp = {}
    @equips = []
    @taint = 0
    init_exp
    init_skills
    init_equips(actor.equips)
    clear_param_plus
    recover_all
  end
  
  def taint=(val)
    @taint = val
  end
end

def taint_gain(a, b)
  damage = variate(2 * a.mat - b.mdf)
  a.taint += damage / 4
  return damage
end

def variate(value)
  min = (value * 0.8).to_i
  max = (value * 1.2).to_i
  num = max - min
  return rand(num) + min
end


...you're welcome.
Pages: 1