Hello fellow RPG makers.
I am running into a problem with a mechanic I have been trying to figure out for months now. Here is my problem from a mechanical and flavor context:
What I want is for a character to be able to use blood magic but only when using a weapon called "Glass Dagger". The Glass dagger will magically draw blood into it whenever it attacks something living (in other words skeletons don't bleed so they wouldn't "stack" blood into the dagger). Upon using blood magic spells the "stacks" of blood in the dagger will be removed based on the cost of the spell (in blood).
I went about accomplishing these goals by first creating a state called "Bloodied" which would be applied to the User instead of the target upon attacking. (used a notetag to do this)
I then used the tag "cost[state 9]" on a skill called "Violent Thirst" to restrict access to this skill to only when the "Bloodied" State is on the user. The cost is the "bloodied" state, so the blood is then removed and in order to use the skill again, the user would have to attack, filling the dagger with blood once again.
The only problem here was that all actors would receive bloodied. So I used the following adjustment to the attack formula:
# This is supposed to do the following:Check to see which actor is attacking
If actor1 is attacking
apply “bloodied” state and go to “Attack”
If not actor1 go to “Attack”
Attack: Actually calculate and apply damage.
if a.id==1; a.add_state(9); else; end; + (20 + a.atk * 0.4 - b.def * 0.2)
The problem here was that Actor1 would receive the “Bloodied” state from the very beginning of the game no matter which weapon he was using. I would like “Bloodied” to only be applied after he has learned blood magic, and only when he is using the “Glass Dagger”.
edited script: I noticed that I did not need to check which actor was using the Glass Dagger since it would only ever be used by the main character.
if weapon.id==63; a.add_state(9); else; end; + (20 + a.atk * 0.4 - b.def * 0.2)
However, this does not work. For some reason the formula does not check to see which weapon is being used. The formula returns zero damage (does not crash the game).
Is there something wrong with my syntax? But more importantly is there a solution to my problem? Or even another way of accomplishing my goals?
So long as the character can only use specific skills when they have blood in the dagger, the dagger receives blood only after attacking an enemy, and the blood is removed from the dagger upon using the skill, the methodology is of no concern to me. Any possible ways to accomplish this? I need you guys to get creative for me! Hehe! Any help is much appreciated!
Thanks in advance for your time and effort!
Salty.
I am running into a problem with a mechanic I have been trying to figure out for months now. Here is my problem from a mechanical and flavor context:
What I want is for a character to be able to use blood magic but only when using a weapon called "Glass Dagger". The Glass dagger will magically draw blood into it whenever it attacks something living (in other words skeletons don't bleed so they wouldn't "stack" blood into the dagger). Upon using blood magic spells the "stacks" of blood in the dagger will be removed based on the cost of the spell (in blood).
I went about accomplishing these goals by first creating a state called "Bloodied" which would be applied to the User instead of the target upon attacking. (used a notetag to do this)
I then used the tag "cost[state 9]" on a skill called "Violent Thirst" to restrict access to this skill to only when the "Bloodied" State is on the user. The cost is the "bloodied" state, so the blood is then removed and in order to use the skill again, the user would have to attack, filling the dagger with blood once again.
The only problem here was that all actors would receive bloodied. So I used the following adjustment to the attack formula:
# This is supposed to do the following:Check to see which actor is attacking
If actor1 is attacking
apply “bloodied” state and go to “Attack”
If not actor1 go to “Attack”
Attack: Actually calculate and apply damage.
if a.id==1; a.add_state(9); else; end; + (20 + a.atk * 0.4 - b.def * 0.2)
The problem here was that Actor1 would receive the “Bloodied” state from the very beginning of the game no matter which weapon he was using. I would like “Bloodied” to only be applied after he has learned blood magic, and only when he is using the “Glass Dagger”.
edited script: I noticed that I did not need to check which actor was using the Glass Dagger since it would only ever be used by the main character.
if weapon.id==63; a.add_state(9); else; end; + (20 + a.atk * 0.4 - b.def * 0.2)
However, this does not work. For some reason the formula does not check to see which weapon is being used. The formula returns zero damage (does not crash the game).
Is there something wrong with my syntax? But more importantly is there a solution to my problem? Or even another way of accomplishing my goals?
So long as the character can only use specific skills when they have blood in the dagger, the dagger receives blood only after attacking an enemy, and the blood is removed from the dagger upon using the skill, the methodology is of no concern to me. Any possible ways to accomplish this? I need you guys to get creative for me! Hehe! Any help is much appreciated!
Thanks in advance for your time and effort!
Salty.



