Enemy Soul Absorb

Status
Not open for further replies.

senpoRiot

Professional Procrastinator
Veteran
Joined
Sep 6, 2012
Messages
291
Reaction score
36
First Language
Tagalog
Primarily Uses
I've been making a battle mechanic similar to Castlevania Aria of Sorrow's Soul Absorbing.

Soul Absorb will absorb an enemy's "Soul"(which would be an armor type item) that will give you different abilities and skills.

I am making this skill through a common event but I'm having a problem about the targeting of the enemy.

I have 3 sets of different variables for the chances. High Chance and High Probability (50%), Medium Chance and Medium Probability(25%), and

Low Chance and Low Probability(10%) The six variables are randomized. 

*I just named them chance and probability so it might look cool or something :D

Then I have a conditional branch that will execute if the target's id will be equal to the enemy's id that I would specify. I used $data_enemies[enemy_id] but I'm not sure if this is the correct one. And here comes the problem. 

Soul Absorb will be successful if there's only one enemy. But there's more than one, the first conditional branch will always be executed if it's not the enemy id of the target. 

Can someone help me on how would I get the target's id so I can use it in the conditional branch?

Here's my common event.

This is the conditional branch for the first enemy, slime.

And here's for the second enemy.

 

senpoRiot

Professional Procrastinator
Veteran
Joined
Sep 6, 2012
Messages
291
Reaction score
36
First Language
Tagalog
Primarily Uses
uhh please move this topic. i posted it on a wrong topic. sorry
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
you can do a variable setting on the formula bar... like $game_variables[1] = b.enemy.enemy_id ; damage here

then on the conditonals, just check

if $game_variables[1] == enemy id that you want
 
Last edited by a moderator:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,359
Reaction score
7,672
First Language
German
Primarily Uses
RMMV
Conditional Branch : Script requires a ruby sequence to report either true or false and branches accordingly.

But you only access $data_enemy[1] in your first true branch.

If that works, then it will probably return ture whenever that enemy exists - you don't have any comparison in there to check if that is the targeted enemy, so that branch will execute even if you targeted a different enemy.
 

Maliki79

Veteran
Veteran
Joined
Mar 13, 2012
Messages
797
Reaction score
350
First Language
English
Primarily Uses
N/A
If you intend to "wear" the soul, why not just make it an item drop.

There are several condition item drop scripts you can use and set so that once the item is dropped, it can't be dropped anymore (unless you want to allow it to powerup via additional drops.)

You can even use variables and percentages to determine drop rates!

I think that might be a good way to go about doing this.
 

pawsplay

Veteran
Veteran
Joined
Mar 29, 2012
Messages
168
Reaction score
5
First Language
English
Primarily Uses
Okay, so what if you create a new State, called Soul Absorbed, and inflict it on an enemy? At the end of each round, run a Common Event that checks for the state, and if it's present, returns the id for the monster. Based on the ID, see if the matching item is in the inventory (or don't) and if it's not, grant the item.  Then all you need is to script a special item slot for Soul.
 

senpoRiot

Professional Procrastinator
Veteran
Joined
Sep 6, 2012
Messages
291
Reaction score
36
First Language
Tagalog
Primarily Uses
If you intend to "wear" the soul, why not just make it an item drop.

There are several condition item drop scripts you can use and set so that once the item is dropped, it can't be dropped anymore (unless you want to allow it to powerup via additional drops.)

You can even use variables and percentages to determine drop rates!

I think that might be a good way to go about doing this.
That's a good idea but I like to get the "soul" instantly after using the skill.

you can do a variable setting on the formula bar... like $game_variables[1] = b.enemy.enemy_id ; damage here

then on the conditonals, just check

if $game_variables[1] == enemy id that you want

 
I'm getting an error. Undefined variable "b". Do I need to change "b" into something?

Conditional Branch : Script requires a ruby sequence to report either true or false and branches accordingly.

But you only access $data_enemy[1] in your first true branch.

If that works, then it will probably return ture whenever that enemy exists - you don't have any comparison in there to check if that is the targeted enemy, so that branch will execute even if you targeted a different enemy.

 
Umm so how can I check if that is my targeted enemy?
 
Last edited by a moderator:

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
I'm getting an error. Undefined variable "b". Do I need to change "b" into something?
Uhm, you do the = b.enemy.id in the damage formula for the skill in the skill tab... if you did it there, it should not be giving an error...
 
Last edited by a moderator:

Lasselen

Villager
Member
Joined
May 13, 2013
Messages
13
Reaction score
1
First Language
French
Primarily Uses
Uhm, you do the = b.enemy.enemy_id in the damage formula for the skill in the skill tab... if you did it there, it should not be giving an error...
Hi,

I have a similar problem with my monster capture item. I put this in the damage formula, it doesn't result in an error, but doesn't set the variable either.

$data_enemies[x] doesn't give an enemy ID by the way, but some sort of code.

$game_troop.member[x].enemy_id seems to work in the script though. Use it rather than $data_enemies[x].

Oh, x starts with 0 and not 1 (the first enemy in your troop is 0, the second is 1 and so on).
 
Last edited by a moderator:

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
of course it wont... $data_enemies[x] will give you the enemy reference... if you wanna use it, it should be $data_enemies[x].id

I never even said anything about using data_enemies...

which is why I used b.enemy.id... b is the formula default for target, which is better to use than $game_troop.member[x] if you don't know which enemy can be hit.. 

yeah, it should be b.enemy.id
 
Last edited by a moderator:

senpoRiot

Professional Procrastinator
Veteran
Joined
Sep 6, 2012
Messages
291
Reaction score
36
First Language
Tagalog
Primarily Uses
I am already using V's Conditional Checks and it works perfectly for my skill.

Thanks for all the suggestions guys. This topic can be closed now :D
 

Fomar0153

Arkz
Restaff
Joined
Mar 13, 2012
Messages
1,327
Reaction score
473
First Language
English
Primarily Uses
RMMZ
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.
 
Status
Not open for further replies.

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

Latest Threads

Latest Posts

Latest Profile Posts

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'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c

Forum statistics

Threads
105,857
Messages
1,017,018
Members
137,563
Latest member
MinyakaAeon
Top