Parameter increases based on equipped weapon type

Sword_of_Dusk

Keyblade Master
Veteran
Joined
Sep 13, 2015
Messages
247
Reaction score
290
First Language
English
Primarily Uses
RMMV
I do not know for sure if this thread goes here, as my issue may have a non script solution I don't see, so I apologize in advance if I posted it in the wrong place.

Anyway, I'm using Neon Black's Passive States script to create...well, passive states. It works fine, but I'm just mentioning it in case it needs to be known. Now, I can easily create states that boost parameters when an actor gains the state, but what I can't do is tie a boost to a specific weapon type.

To better expand on this, I want to create some passive states that increase the Strength stat when an actor is currently equipped with a specified weapon type, i.e if actor 1 has a sword equipped, Strength is increased by 5 points. If they equip a different weapon type, the boost goes away until equipping a sword again.

So, is this possible with the base program, or do I need an additional script to do this?
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,290
Reaction score
11,693
First Language
English
Primarily Uses
RMVXA
Does this need to be a state? Is Strength your name for ATK, or is it something different?
 

Sword_of_Dusk

Keyblade Master
Veteran
Joined
Sep 13, 2015
Messages
247
Reaction score
290
First Language
English
Primarily Uses
RMMV
Yeah, Strength is ATK in my game.

I need it to be a state because the boost will be a learnable passive skill, and Neon Black's script does passives through states. Of course, if there's another way, I'm all ears.
 

Harosata

Dramatic Lightning's BFF
Veteran
Joined
Aug 20, 2015
Messages
246
Reaction score
70
First Language
English
Primarily Uses
RMVXA
I currently have damage formulas that uses weapons in their calculations. For example, one of my weapons deal 1.5x damage to plant monsters when equipped. What you are looking for is:

if user.actor? and user.weapons.any? {|weapon| weapon.wtype_id == 1}
if user.actor? and user.armors.any? {|armor| armor.atype_id == 1}

-user - Replace this depending on the script; ie a in damage formulas, @subject in action, etc.
-weapons/armors - The array that holds the weapons and armor of the current user (the reason we need to check if the user is the actor)
-any? - This returns true if at least one item in the array returns true, with each item given a name like armor/weapon.
-wtype_id/atype_id - The ids of weapon and armor respectively, numbered by the database.

---

Hm...The second-half of the question is how to apply that concept to a state. Mine is in a custom damage formula, which I could also add if a.state?(SWORDEQUIPPED). I suppose you don't want to write a custom formula, so you might need a script like Himework's Feature Conditions that activates certain features like regen and stat boosts when conditions like equipped weapon types are present...

Wait, do states only add percentages or can they also add specific number of stats?
 

Sword_of_Dusk

Keyblade Master
Veteran
Joined
Sep 13, 2015
Messages
247
Reaction score
290
First Language
English
Primarily Uses
RMMV
Sorry for the late reply. Persona 5 has my full attention at the moment.

Anyway, I believe states only add percentages, which is not quite what I want. I suppose a passive skills script that didn't use states is probably my best bet.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

I think I've got my hero designs pretty much finialised ( still got some tweaks. ) In the end it'll be the four outfit colour variants with four different skintones.

I'm a bit conflicted. One the one hand, it's quite visually cool to make bodies of water that the player can interact with by going into it. However obscuring the player character from a gameplay perspective is pretty bad. Hmm... There's the option to make the area around the player visible, but then that kind of defeats the purpose of submerging them. :unsure:
Stream will be live shortly with some Darkest Dungeon! Feel free to drop by!
Another two plugins done! One being an on map grid inventory.
busy with my newborn child, can't even touch pc at all ;_;

Forum statistics

Threads
104,298
Messages
1,005,353
Members
135,812
Latest member
Yagyu_Chan
Top