Nickname functioning as Weapon: A bit of modification.

Panda_Artist

Humble RPG Fan
Veteran
Joined
Dec 22, 2018
Messages
62
Reaction score
4
First Language
Portuguese
Primarily Uses
RMVXA
Hello everyone.

I hope I am not like a flea around here, but thanks to you guys I have been able to progress quite well into my big project.

I have programmed my game so that, instead of equipping multiple weapons you recieve weapon upgrades. So. I have used the nickname in RMVX Ace to place the name of the "Equipped" Weapon.

However. What I am requesting here is the following:

- The ability to add a functionality to this "nickname". For example, if an actor has a certain nickname (Which in this cases functions as if he/she has a new weapon equipped, he/she would recieve the stats that "weapon" nickname is programmed with.)

Basically, I would like the nick name to function like equipment, with a stat boost attributed to that weapon "nickname"

I did try Galv's Nickname functionality but it did not work at all for some reason.

UPDATE

I was able to play around with the programming a bit and found a way around it.
 

Attachments

Last edited:

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
1,959
Reaction score
418
First Language
English
Primarily Uses
RMVXA
It sounded like you were describing item affixes and prefixes
 

Panda_Artist

Humble RPG Fan
Veteran
Joined
Dec 22, 2018
Messages
62
Reaction score
4
First Language
Portuguese
Primarily Uses
RMVXA
No. Basically what I want is to give a nickname a stat boost. Sorry if I didn't explain correctly. Unfortunately what I tried did not work.
 

vFoggy

Veteran
Veteran
Joined
Nov 3, 2012
Messages
66
Reaction score
27
Primarily Uses
Here:
Code:
#===============================================================================
#
# Script Name: Nickname Base Stats
# Author: vFoggy
# Description:
#   This script increases an actor's parameters depending on their nickname.
#   The parameters are taken from a weapon in the database that has the same
#   name as the actor's nickname. Basically if an actor's nickname exists as a
#   weapon, their base params, xparams and sparams will increase according to  
#   the weapon's params.
#
#===============================================================================

class Game_Actor < Game_Battler
 
  alias fog_setup setup
  def setup(actor_id)
    fog_setup(actor_id)
    @nickname_stats = $data_weapons.find{|i| !i.nil? && i.name == @nickname}
  end
 
  def nickname_plus(param_id)
    if @nickname_stats
      features = @nickname_stats.features.select{|f| f.code == FEATURE_PARAM}
      features.select!{|f| f.data_id == param_id}
      nickname_value = features.inject(0){|v, f| v+f.value} * @nickname_stats.params[param_id]
      return nickname_value
    else
      return 0
    end
  end
 
  alias fog_pb param_base
  def param_base(param_id)
    fog_pb(param_id) + nickname_plus(param_id)
  end
 
  alias fog_xparam xparam
  def xparam(xparam_id)
    nickname_value = 0
    if !@nicknamestats.nil?
      features = @nickname_stats.features.select{|f| f.code == FEATURE_XPARAM}
      features.select!{|f| f.data_id == xparam_id}
      nickname_value = features.inject(0){|v, f| v+f.value}
    end
    fog_xparam(xparam_id) + nickname_value
  end
 
  alias fog_sparam sparam
  def sparam(sparam_id)
    nickname_value = 0
    if !@nicknamestats.nil?
      features = @nickname_stats.features.select{|f| f.code == FEATURE_SPARAM}
      features.select!{|f| f.data_id == sparam_id}
      nickname_value = features.inject(0){|v, f| v+f.value}
    end
    fog_sparam(sparam_id) + nickname_value
  end
end
Didn't have enough time to test it thoroughly though.
You basically create a weapon with the same name as the nickname you want to "connect" it to. I chose to use weapons because it seems easier to control values etc. Those values are used as the base values of the actor's parameters.
Currently it only uses params, xparams and sparams. If you would like me to add other features, like atk-element, (de)buff rates etc., let me know.
 

Panda_Artist

Humble RPG Fan
Veteran
Joined
Dec 22, 2018
Messages
62
Reaction score
4
First Language
Portuguese
Primarily Uses
RMVXA
Thanks so much for the effort, unfortunately I could not get it to work but I have found another way around it!!

I used a Victor's passive states to create the weapon as state! Worked well so far.
 

vFoggy

Veteran
Veteran
Joined
Nov 3, 2012
Messages
66
Reaction score
27
Primarily Uses
Thanks so much for the effort, unfortunately I could not get it to work but I have found another way around it!!

I used a Victor's passive states to create the weapon as state! Worked well so far.
Seems like there was a conflict with another script.
In any case, good thing you got it working :)
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Ugh! I have a headache coming on--not sure if it's from the sudden change in weather or caffeine withdraw...only one way to fi d out--Coffee time!
Found this old picture in the plastic case with my medical documents. I don't remember who this character is (I draw a lot of original characters and forgot about them very soon), but I like the design, may be I'll add guy in my game.

reading what makes plugins tick, so you can use other plugins to trigger said plugin... setup up Luna MV to have my own custom ATB Gauges from Yanfly's ATB. cool
It's Easter on Monday. Anybody got any Easter quarantine eggs? It'll also be my birthday, I'll be 31.
Sometimes I feel like I'm using plugins feature the wrong way. But as long as it works tho.

Forum statistics

Threads
95,798
Messages
932,021
Members
126,221
Latest member
Tsume
Top