damage formula while ignoring equipped weapon

Niggles

Warper
Member
Joined
Sep 30, 2019
Messages
2
Reaction score
0
First Language
English
Primarily Uses
RMMV
Good day all, i need help with this before i pull all my hair out. im designing a project where all party members are equipped with a mana consuming weapon, AND a secondary weapon (NOT dual wield) that does not consume mana.
so for example:
Main weapon = long bow
Secondary weapon = Knife

i have added the knife as another equipment type to make various knives (with various parameters) equippable
the premise is that if the party member uses skill #1 (attack), then it uses the attack stat of the knife.
To make this simpler (and my main goal) i would like to remove the attack stat of the main weapon so that the only parameters left are the knife stat + character stat.

As added information; I DO NOT have any 3rd party plugins AT ALL, only plugin that is active is Community_Basic

ive tried various damage formulas found on this forum before posting this, however they all return a damage of 0. examples of formulas below:

a.atk - a.equips()[0].atk <------- some people claim this works but not for me, return damage of 0
a.atk - a.weapons[0] <------- return damage of 0
a.atk - a.weapons[0].atk <------ return damage of 0
a.atk - a.weapons[0].params[2] <------ i think this is a rpgvx formula because it does not work with mv
a.paramBase(2) <----- this removes the main weapon which is great, but also removes the secondary weapon and only uses the characters base parameters.

any and all help will be welcomed and greatly appreciated.
 

Ossra

Formerly Exhydra
Veteran
Joined
Aug 21, 2013
Messages
1,076
Reaction score
854
First Language
English
Primarily Uses
RMMV
@Niggles Hmm, try the following :

Code:
// Attack Parameter of Actor's Weapon
a.equips()[0].params[2]
 

Niggles

Warper
Member
Joined
Sep 30, 2019
Messages
2
Reaction score
0
First Language
English
Primarily Uses
RMMV
@Ossra THANK YOU, THANK YOU, THANK YOU!!!!!! formula works perfectly.
using this parameter directly shows that it works, ill be adding multipliers and resistances as i go further.
 

Silva

Scoobityboo
Veteran
Joined
Nov 5, 2018
Messages
399
Reaction score
221
First Language
English
Primarily Uses
RMMV
The reason ".atk" doesn't work on your equipment is because it isn't ever defined in MV's code. It's only defined for battlers (ie. actors and enemies), so it won't work on anything else.

Another fyi for you

Code:
a.weapons[0].params[2]
Will work if you modify it slightly to become

Code:
a.weapons()[0].params[2]
Hopefully that's of some use to you in the future. :)
 

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

Latest Threads

Latest Profile Posts

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD

Forum statistics

Threads
105,868
Messages
1,017,070
Members
137,577
Latest member
SadaSoda
Top