Nickname functioning as Weapon: A bit of modification.

Panda_Artist

Humble RPG Fan
Veteran
Joined
Dec 22, 2018
Messages
59
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,878
Reaction score
410
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
59
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
65
Reaction score
25
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
59
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
65
Reaction score
25
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 Profile Posts

putting a puzzle in my game that BSODs the player's computer if they complete it
I finally got a book out the door after seven years of nothing \^-^/ Now if I can get a game out the door too, that'd be great...
MY GAME IS NOW OFFICIALLY RELEASED!!
*FurAffinity is down*
*Sets house on fire*
This is fine.

Forum statistics

Threads
94,363
Messages
920,262
Members
124,126
Latest member
TookMyRole
Top