RPG Maker VX Ace

RPG Maker VX Ace

檢視統計資料:
StrayBalloon 2015 年 1 月 21 日 上午 11:36
Help making a revive spell for battlers.
I'm trying to make a revive skill for enemies that will only revive a certain type of enemy.
For example, battler A can only revive other A's, but is in the same mob with battler B's.

What I have so far is;

b.state?(28) ? b.erase_state(1) + b.mhp / 2 : 0

However, it seems to just revive any given battler with only 1 hp. State 28 is applied to the repective battlers on turn 0.
< >
目前顯示第 1-8 則留言,共 8
Kio Kurashi 2015 年 1 月 21 日 下午 4:55 
If I recall states are removed upon death for one.

another problem you have is that 'b.erase_state(1) + b.mhp/2' will not heal the mob at all.
to fix this use 'b.erase_state(1); b.hp += (b.mhp/2)'

to fix your problem with states as they are actually unnessesary use this full code
b.enemy_id?(a.enemy_id) ? b.erase_state(1); b.hp += (b.mhp/2) : 0
This should work though I don't have time to test it atm as it is time for dinner.
StrayBalloon 2015 年 1 月 21 日 下午 5:56 
I had no idea enemy_id was a thing lol.

I tried your formula but it had a syntax error. I'm to much of a formula newb to figure out what's wrong with it.

From what I understand, it's basically saying;

Does recieving enemy have the same ID as casting enemy ?
Remove death state; current hp += half of max HP
else 0

So I tried doing this:
if b.enemy_17=a.enemy_17; erase_state(1); b.hp += b.mhp/2; else; 0; end

The enemy casts the skill and the dead ally recieves no damage lol. If I add remove death state as an effect, they are revived with 1 hp.
Kio Kurashi 2015 年 1 月 21 日 下午 7:49 
woah woah woah, you mean your code works?! enemy_17 isn't a part of the code. when I put eenmy_id thats what I meant to be there. also the first ';' you have should be a '?' with a space on either side. also what the error meant was it was saying that I had a ';' where I should have had a ':'. Also I was wrong on syntax as enemy_id is only for the troop. example Slime A = 1 and Slime B = 2. Guess I got a little more working to do.
StrayBalloon 2015 年 1 月 21 日 下午 8:03 
Yeah after I posted I started thinking that maybe you meant to leave it as "enemy_id".
Tried it, but the results were about the same.

It would make sense that the states I assign go away after death. It would explain why they become revived with 1 HP.

Would there be a way to use element type to identify who to revive rather then ID's and states?
Kio Kurashi 2015 年 1 月 21 日 下午 8:32 
element type? do you mean the element rate? if so then yes. In the example of a slime with the ice rate of 200% it would be something like
b.element_rate(4) = a.element_rate(4) ? true : false
ice is the fourth default element and .element_rate(n) returns a decimal number where 1 = 100%
so 2 is 00% and 0.5 is 50%, ect. the nat that point you don't even need to check to see if the caster and reciever are the same
Sorry forgot what we were doing for a second (it was originally asking to see if the rate was = to 2 for 200%)

also upon futher reflection I don't think you can make the skill remove death AND heal. at least not within the condition. You could put the healing in the effects but otherwise it won't work. I actually just though a newer and more simple method that will require 2 skills

the first skill will be assigned to the enemy and will have the formula of
b.element_rate(4) = a.element_rate(4) ? a.force_action(skill ID, -2) : 0
the -2 up there is actually to make the forced used skill to select the last target. Skill ID is obviously the number associated with thie second skill.

Second skill:
it will have nothing in the formula bar (actually set the damage type to none)
and will have the effects of Remove death and then + hp 50%. In that order.

This should solve the problem.
最後修改者:Kio Kurashi; 2015 年 1 月 21 日 下午 8:32
StrayBalloon 2015 年 1 月 21 日 下午 9:50 
It doesn't like the " = " . The formula you provided gives a syntax error. I'm trying different variations to see if it'll work, because this method is genius.

Last thing I did was;

b.element_rate(4) >= 1 ? a.force_action(skill 54, -2) : 0

It casts the ability, but I get the "no damage taken" message. Which would mean that the condition wasn't true?

I set the enemies to have an element_rate 4 to 100%. That should return a value of 1, according to what you typed in the last post.

I believe I'm checking for b.element_rate(4) to be greater then or equal to 1. Seems like that would work.

I also just tried this:
b.element_rate(4) == 1 ? a.force_action(skill 54, -2) : 0

No error message, just "no damage taken" from the already dead guy.

(It goes without saying skill 54 is set up how you detailed the chaining skill to be)

Kio Kurashi 2015 年 1 月 21 日 下午 10:27 
With your first script does it actually revive the enemy the way you want it to? If so then it works properly as the reason that it states it as no damage is because technically it isn't receiving any healing from the first skill.
StrayBalloon 2015 年 1 月 22 日 上午 5:33 
I've been messing around with it for a couple hours now, trying to get it to work on the simplest level possible. I've tried many different things, so hopefully I explain myself well here.

if b.element_rate(4); b.remove_state(1); a.force_action(skill 54, -2); else; 0; end

This formula succeeds at reviving the target, but with only 1 HP (Like yesterday).
Now what I gather from this is that the syntax is correct, but a.force_action does nothing because it forces the use of a turn, but doesn't generate a new turn.

Like wise, when I try this;

if b.element_rate(4); b.remove_state(1); b.force_action(skill 54, -2); else; 0; end

The revived ally cannot be forced to heal itself, because it's turn was expended in the revive process.

So of course if force_action doesn't work in either case, the chaining skill is useless.

As I was typing this, I had an idea of a formula that would do 2 different things depending on what state they were in. So in theory, I make a skill that casts twice (repeat option) and either revives; unless already revived; in which case heals 50%.

if b.element_rate(4); b.remove_state(1); else; 0; end
Effect Add: HP + 50%

I'm gonna test this and let you know what's up.
Thanks for the help so far. Really good stuff.

Post Edit:

Alright so repeat skill is def not the answer since it casts on another target. And it turns out that you don't need to remove death state to revive someone. Just by casting a generic recover HP skill on a dead ally will do.

So I'm coming to the conclusion that you don't need to define an element rate for a specific enemy for it to have a 100% rate. Which would make sense, since otherwise element based attacks would do no damage unless defined by each battler.

So now I'm doing this;

b.element_rate(4) * b.mhp / 2

When I define battlers to have an element rate(4) to 0%, they are not revived and healed by the skill. I'm sure I can do this in reverse to just define battlers with an element_rate(4) of 200% to be revived and healed rather then vice versa. I'm afraid I'm gonna have to use...
MATH! Maybe something like;

(b.element_rate(4) - 1) * b.mhp / 2

Anyways, thanks for working this out with me. Now I just have to deal with retarded battlers that constantly try to heal an unhealable target. I know there's a script for this, but I'm trying to avoid stockpiling (to many) scripts until I've learned the full capabilities of the editors tools as is.



最後修改者:StrayBalloon; 2015 年 1 月 22 日 上午 6:29
< >
目前顯示第 1-8 則留言,共 8
每頁顯示: 1530 50

張貼日期: 2015 年 1 月 21 日 上午 11:36
回覆: 8