Help with Skills,Common Events and multiple damage types in skills.

celshade17

Warper
Member
Joined
Jun 6, 2014
Messages
4
Reaction score
0
First Language
English
Primarily Uses
Hello everyone,
I'm currently working on a project that uses YEA's TP manager but there is something I want to do with it that my system seems not to like.

Basically, I want to set things so that when a character takes damage, they lose an amount of TP based on the attacker's luck.

My initial idea was to set the code to ":take_hp_dmg => "-a.luk" but the game produces this error when I try it: http://puu.sh/9gz7X/0fb832a9c2.png

I'm very much a novice with coding so I would very much enjoy a simple solution to this. Thanks alot. 
Edit: The above spoiler was regarding the original problem I had that perhaps someone could still fix but now I've shifted on to something else..

What I'm looking to do now is to have a skill that does two seperate formulas for damage. essentially I'm looking to make a skill that does both these formula:

HP damage: "a.atk-(b.def+(b.agi/3))"

TP damage: "c=a.luk-b.luk*b.tcr; if c>=0; b.tp-=c; else; 0;end"

I've been doing some research and it seems like I could get this done by using common events but I have no idea how these work. 
 
Last edited by a moderator:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,675
First Language
German
Primarily Uses
RMMV
please link to the script you're using if you want help.


a is a placeholder for the skill user in the damage formula - that placeholder isn't defined outside of skill use, and I don't know where that script places its formulas...
 

YoraeRasante

Veteran
Veteran
Joined
Jun 6, 2014
Messages
1,643
Reaction score
420
First Language
Portuguese
Primarily Uses
RMMV
Wait, with this idea, wouldn't it be better for the player to have less luck?
 

YoraeRasante

Veteran
Veteran
Joined
Jun 6, 2014
Messages
1,643
Reaction score
420
First Language
Portuguese
Primarily Uses
RMMV
ah, I see.
I thought it was a double-edge kind of deal for you to be putting it in a script instead of just doing it in the database.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,675
First Language
German
Primarily Uses
RMMV
My initial idea was to set the code to ":take_hp_dmg => "-a.luk"
If you lok at the other existing formulae in the script, you'll see that parameters are referenced by name only, without any object placeholder.
A correct syntax would probably be "- luk", but that would always reference the actor's own luck - it seems like there is no way to reference an attacker's parameters.


(haven't tested anything, this is just from looking at the script linked)
 

celshade17

Warper
Member
Joined
Jun 6, 2014
Messages
4
Reaction score
0
First Language
English
Primarily Uses
Yeah I kinda figured as much.  Would it possible to somehow add a snippet of script do enable the sort of thing I'm trying to do? If not here then where?

Perhaps I don't need this extra code though. I got an idea about instead using "X -luk" where X is a flat number. I intend to keep TP at a maximum of 100 meaning the X is a flat percent damage to current TP and luk will act as armour against that. 

I guess I could use this a back-up plan if nobody feels like providing a modification to the script.

Thanks for the help anyway!
 

celshade17

Warper
Member
Joined
Jun 6, 2014
Messages
4
Reaction score
0
First Language
English
Primarily Uses
Edit: (because I'm dumb)

My problem has shifted, and I'd rather not make a new topic so quickly so I'll just edit this one:

What I'm looking to do now is to have a skill that does two seperate formulas for damage. essentially I'm looking to make a skill that does both these formula:

HP damage: "a.atk-(b.def+(b.agi/3))"

TP damage: "c=a.luk-b.luk*b.tcr; if c>=0; b.tp-=c; else; 0;end"

In the end, this skill does both HP and TP damage to a single target. 

I've been doing some research and it seems like I could get this done by using common events but I have no idea how these work. 
 
Last edited by a moderator:

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

Latest Threads

Latest Posts

Latest Profile Posts

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
How many parameters is 'too many'??

Forum statistics

Threads
105,864
Messages
1,017,056
Members
137,573
Latest member
nikisknight
Top