I need help with a custom spell

● ARCHIVED · READ-ONLY
Started by Vashin WestCreek 9 posts View original ↗
  1. I am currently trying to create an attack that requires you to put in a health sacrifice to use, as well as having a specific item equipped.

    EXAMPLE: If John has a fire stone equipped and is in battle he can sacrifice X health to do Y damage (planned formula is Y=2x, with a curve for leveling up)

    So my two requirements are,

    1. How do I create an attack that requires you to put in a health sacrifice of YOUR CHOICE?

    2. How do I bind this attack to having an item equipped? 

    3ish. What formula would work better than the one up there? 
  2. For nr. 2, add the skill to the weapon/armor features or add the weapon type to the required weapon of the skill.

    For nr. 1 I think a common event with actor change hp and battle change enemy hp, set either to a constant or a variable that player could choose with input number, 

    __

     skill goes

    call common event[1]    

    skill damage formula is v[2]

     common event goes

    input number with x digits, store number as variable 1

    change Hp: actor[n], -variable 1

    control variable 2 = variable 1

    control variable 2 *=2

    __

     battle change enemy hp would mean the player has less control over which enemy to attack, therefore the variable in the damage formula instead.
  3. MektiKwiiger said:
    For nr. 2, add the skill to the weapon/armor features or add the weapon type to the required weapon of the skill.

    For nr. 1 I think a common event with actor change hp and battle change enemy hp, set either to a constant number or a variable that player could choose with input number, 

     skill goes

    call common event[1]    

    skill damage formula is v[2]

     common event goes

    input number with x digits, store number as variable 1

    change Hp: actor[n], -variable 1

    control variable 2 = variable 1

    control variable 2 *=2
    Well thank you for telling me this, I'm sure someone with more experience than me would be able to use this in 5 seconds flat. .  .but I'm kind of a newb, would you be kind enough to tell me which menus i need to go through to find and enter these variables?
  4. Sure, no problem. I was learning this on the go actually, as I have no previous experience with editing skills, so there might me a much easier way to to this,

    In the database, go to the common events tab.

    in the contents  of the common event we are making

    tab 1 message   Show text  "select hp sacrificed"

    tab 1 message   select input number . Variable for number will be our first variable that sets the amount of damage to the player and set the amount of digits according to what you want

    tab 1 message   Show text  "select party member to be sacrificed"

    tab 1 message   select Show choice . let there be choices for each partymember, with the when  of choice[n]   as control variable  and variable 3 set to  game data   party member[n]   actor ID

    tab 1 actor    select change HP of actor variable 3  to decrease by variable 1

    tab 1 game progression  variable 2 set  equal to variable 1

    and then  tab 1 game progression  variable 2 mul[tiply] by constant 2

    In the database, go to the skill tab.

    in your skill, on the top right is the area for damage calculation is an input field named formula

    In formula type in v[n],     n being the number of variable 2

    Below the area for damage calculation is Effects

    in this field double-click and go to the fourth tab named Other in the new popup window

    Choose common event  and select the common event we made for this from the dropdown selection.

    There, I hope I made it understandable.
  5. tab 1 message   Show text  "select party member to be sacrificed"

    tab 1 message   select Show choice . let there be choices for each partymember, with the when  of choice[n]   as control variable  and variable 3 set to  game data   party member[n]   actor ID

    I don't quite understand what you mean by all of that [n] stuff, does this require me to have already built a few actors, (and also this is probably more confusion but it seems like by inputting these values here, they are fixed at that position on the battle field)
  6. n is short for number. I didn't know if you have /plan to have 1, 2, 4 or 16 actors in the party.

    I didn't really remember how put   remove variable 1 amount of hp from actor who(se turn it is now) or (has item so-and-so equiped)

    So this party member selection thing is a workaround

    the show choice puts little window where the player can choose between different options

    here it is used to select the one actor who loses hp

    when it comes to the "by inputting these values here, they are fixed at that position on the battle field"

    that is actually not what this is doing

    variable 3 set to  game data   party member[n]   actor ID 

    is saying  Find  the actor who is in position number n, store the ID of that actor to variable3

    So putting this in the common event

    say you plan on having 3 actors in the party

    show choice  and input the choice alternatives member 1, member 2 and member 3

    there is branching out according to what was chosen, so where if the first member is chosen, set variable 3 to first member of party, then do the same for the other choices
  7. When you say control variable do you mean variable 1

    "tab 1 actor    select change HP of actor variable 3  to decrease by variable 1

    tab 1 game progression  variable 2 set  equal to variable 1

    and then  tab 1 game progression  variable 2 mul[tiply] by constant 2

    In the database, go to the skill tab."

    is the underlined portion supposed to go in the when event or just sit their at the end?
  8. Would he have to put some sort of "HP check" branch to make sure he has enough HP to cast said spell? For example, if he chooses to sacrifice 500HP but only has 450?
  9. Hmm, that could be an exploit that ought to be plugged yes. 

    Found out that the damage is done before common events are run, separated the parts into two skills. Wrote script to force variable 2 back to 0 at the start of a new fight. project uploaded to dropbox 

    This is where I'll have to take my leave.  @Vashin WestCreek I recommend that you do some tutorials, these forums have a lot of those.