Hello everyone, hope y'all having a great day!
I'm currently working on a shield bash skill, and i'm considering to have the skills deals extra damage based on the shield defensive stat. I've been messing around with the formulas for quite a few hours and browsed google, but haven't been able to pinpoint it yet. Could someone give me an helping hand? ^_^
Thanks!
Thanks a lot! I was rather close to that, but it would have taken me a while to figure it out by myself.
Also, I've already made it that the skill cannot be used if the character is not holding a shield 🙂
Thank!!
For future reference it helps if you work with the nature of JavaScript to make it bend to your will. For example, if we wanted to know what the target object's current state looks like:
a.atk * 4 - b.def * 2 + (console.info(b), 0)
This injects printing the state of object b to the Console (press F8 to access it during a Play Test), then returns 0 as the result of the expression inside the () thanks to the comma operator. In the Console I found actor() by opening the Game_Actor and looked under __proto__ for what prototype methods were available.
ok, so this is very similar to my last quesion so i won't needlessly create an other topic :
I want to store the defensive stat of a shield inside a Variable to later use it in a string, i'm guessing the way to do it is very similar to what was previously explain, but i'm still not used to calling script, so any help would be greatly appreciated! Thanks.
1) Create a Map Event or Common Event.
1) Under Contents create a new Event Command. (Double-clicking, hitting the Return key, or right-click and select "New...").
2) Under Tab 1, Left-hand side, in the "Game Progression" group, click the "Control Variables..." button.
3) At the very bottom, under Operand, select the "Script" radio button and enter your JavaScript there.
Oddly enough, this is also how you assign a string literal to a Game Variable.
You can also use Game Variables inside the JavaScript by using $gameVariables._data[idx]
Good Luck!
Thanks for the help! I was yet to notice that the previous formulas would only take the starting gear into consideration, would've gave me a headache most likely haha ^^'