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

● ARCHIVED · READ-ONLY
Started by celshade17 8 posts View original ↗
  1. Spoiler
    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. 
  2. 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...
  3. Wait, with this idea, wouldn't it be better for the player to have less luck?
  4. Apologies, forgot to add the code, it can be found here: https://github.com/Archeia/YEARepo/blob/master/Gameplay/TP_Manager.rb

    and Waterguy; it would depend whether the game logic would consider 'a.luk' to be the attacker's luck (therefore higher luk is better for more TP DMG) or the other way around. I'm more considering a 'a.luk-b.luk' kind of deal.
  5. 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.
  6. celshade17 said:
    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)
  7. 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!
  8. 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.