Magusalfador

AKA VaroClaw
Veteran
Joined
Jun 15, 2014
Messages
274
Reaction score
44
First Language
English Spanish
Primarily Uses
RMMV
OMG, im dumb. It is not user, it is target, like this:
Code:
<Custom React Effect>
randomN = Math.floor((Math.random() * 2) + 1)
  if (randomN == 1){
target.addState(43)
  }
</Custom React Effect>


Well, now you know how to put state into enemies =P
 
Joined
Apr 13, 2020
Messages
34
Reaction score
0
First Language
English
Primarily Uses
RMMV
Oh okay replace all user. with target.

Let me try it and see if it works, and I'll get back with you.
 
Joined
Apr 13, 2020
Messages
34
Reaction score
0
First Language
English
Primarily Uses
RMMV
It worked!

You are the best. Thank you for your patience and help! I will surely come back to this post and ask you for help if I run into anything else.

One question though, If Iris reaches her HP threshold for Withstand to activate and I heal her after battle, will the Withstand state disappear then? By the looks of the code, it seems if she heals herself above the threshold it should go away, right?
 

Magusalfador

AKA VaroClaw
Veteran
Joined
Jun 15, 2014
Messages
274
Reaction score
44
First Language
English Spanish
Primarily Uses
RMMV
No problem, glad I helped =)

Nop, it wont go away, the code specifically checks for damage under certain amount and just that. So if you heal Iris the state will remain. If you want the state to go away, we can add to that code.

Anything, let me know.
 
Joined
Apr 13, 2020
Messages
34
Reaction score
0
First Language
English
Primarily Uses
RMMV
That would be cool but I did just try removing the state after battle and that works. So, if you're up for it that would be swell!

However, I do notice a concern with my states in general and something I need in Trish's Heavy Hitter state. First, the states keep counting down by 2 rather than 1 and not sure why that is exactly. Second, I do need Trish's Heavy Hitter to activate for one turn after a turn ends or the beginning of next turn before moves are picked. I know you mentioned before that the codes are triggered when an enemy hits the character and that seems to be exactly the case for Trish's state. How would I resolve this?

I'm going to look through the YEP BuffStatesCore and AutoPassiveStates notes to see if I can find something.
 

gstv87

Veteran
Veteran
Joined
Oct 20, 2015
Messages
2,523
Reaction score
1,566
First Language
Spanish
Primarily Uses
RMVXA
just a passing comment:
instead of using yanfly's plugin, if we're talking about 2 specific actors from the lot, wouldn't it be easier to set a note tag marking that actor out, and use a small addition to the actor object that'd spot it?

it's just 2 exceptions! does that require a whole plugin by a third party?
if the action of the plugin is manageable by states and troop events, the only thing that needs to be taken care of, is the triggering of that action, which is dependent on the actor itself.
.....hence, the marking.
 

Magusalfador

AKA VaroClaw
Veteran
Joined
Jun 15, 2014
Messages
274
Reaction score
44
First Language
English Spanish
Primarily Uses
RMMV
@gstv87 I have no idea of what you are talking about. Im pretty sure there are easier ways of doing stuff, but those are the only ways I know.

@ShaggyPlaysGames Regarding why your states are counting down in 2´s, are you using any Atb, Ctb system? sometimes those work differently with how buff and states work, check and play with different settings.

Ok if you want Iris to lose her buffs if her Hp goes above 25% HP, place this code on State 40 AND 42, below the other code.

Code:
<Custom Action End Effect>
  if ($gameActors.actor(1).hp >= $gameActors.actor(1).mhp * .25){
$gameActors.actor(1).removeState(41)
  }
</Custom Action End Effect>

In this method when anyone does any heals on Iris, it will remove the state after that action, if youa re going to have more party members, they must have the code too.

For Trish´s Heavy Hitter to activate at the beginning of a turn, it is at the beggining of HER turn? if that is the case, just change the name in the notetag, from:
Code:
 <Custom React Effect>
</Custom React Effect>

to


  <Custom Turn Start Effect>
  </Custom Turn Start Effect>

And that should work =)
 
Joined
Apr 13, 2020
Messages
34
Reaction score
0
First Language
English
Primarily Uses
RMMV
Okay I messed with Turn Start Effect today and it worked so I'm glad I resolved that and you confirming it correct. As Iris, at least I tried lol

I'm not using an Atb or Ctb system or plugin since I don't know exactly what that is yet.

EDIT: I did find this.

EDIT 2: Custom Turn Start Effect doesn't seem to be working. It didn't activate at all when I play test.
 

Attachments

  • StateBuffTurnSettings.PNG
    StateBuffTurnSettings.PNG
    218.7 KB · Views: 4
Last edited:

Magusalfador

AKA VaroClaw
Veteran
Joined
Jun 15, 2014
Messages
274
Reaction score
44
First Language
English Spanish
Primarily Uses
RMMV
Ok, try this on state 42.

Code:
<Custom Turn Start Effect>
randomN = Math.floor((Math.random() * 1) + 1)
  if (randomN == 1){
$gameActors.actor(2).addState(43)
  }
  </Custom Turn Start Effect>

As a test, this should activate 100% at the beginning of Trish´s turn. If it works, then change the first "1" into a "2" in the line below:
randomN = Math.floor((Math.random() * 1) + 1).

That will reduce the chance to 50%.
 
Joined
Apr 13, 2020
Messages
34
Reaction score
0
First Language
English
Primarily Uses
RMMV
Ok, try this on state 42.

Code:
<Custom Turn Start Effect>
randomN = Math.floor((Math.random() * 1) + 1)
  if (randomN == 1){
$gameActors.actor(2).addState(43)
  }
  </Custom Turn Start Effect>

As a test, this should activate 100% at the beginning of Trish´s turn. If it works, then change the first "1" into a "2" in the line below:
randomN = Math.floor((Math.random() * 1) + 1).

That will reduce the chance to 50%.
Hmmmm nothing.
 

Magusalfador

AKA VaroClaw
Veteran
Joined
Jun 15, 2014
Messages
274
Reaction score
44
First Language
English Spanish
Primarily Uses
RMMV
Do you mind showing me pictures again?

It should work...
 
Joined
Apr 13, 2020
Messages
34
Reaction score
0
First Language
English
Primarily Uses
RMMV

Attachments

  • Iris1.PNG
    Iris1.PNG
    197.3 KB · Views: 3
  • Trish 3.PNG
    Trish 3.PNG
    182.7 KB · Views: 4
  • Trish1.PNG
    Trish1.PNG
    164.8 KB · Views: 3
  • Trish2.PNG
    Trish2.PNG
    193 KB · Views: 3

Magusalfador

AKA VaroClaw
Veteran
Joined
Jun 15, 2014
Messages
274
Reaction score
44
First Language
English Spanish
Primarily Uses
RMMV
Hmm...I just tried it on my end and both works. The only reason I can think of is that state 42 is not applied to Trish and that is why it is not working.

I made some modifications. so:

Withstand state (40)
Code:
<Custom Respond Effect>
  if (target.hp <= target.mhp * .25){
target.addState(41)
  }
</Custom Respond Effect>

<Custom Action End Effect>
  if ($gameActors.actor(1).hp >= $gameActors.actor(1).mhp * .25){
$gameActors.actor(1).removeState(41)
  }
</Custom Action End Effect>


Hard Hitter state (42)
Code:
<Custom Turn Start Effect>
randomN = Math.floor((Math.random() * 1) + 1)
  if (randomN == 1){
$gameActors.actor(2).addState(43)
  }
  </Custom Turn Start Effect>

<Custom Action End Effect>
  if ($gameActors.actor(1).hp >= $gameActors.actor(1).mhp * .25){
$gameActors.actor(1).removeState(41)
  }
</Custom Action End Effect>

I attached a video for you to see how it is actually working, both cases.
 
Joined
Apr 13, 2020
Messages
34
Reaction score
0
First Language
English
Primarily Uses
RMMV
Hmm...I just tried it on my end and both works. The only reason I can think of is that state 42 is not applied to Trish and that is why it is not working.

I made some modifications. so:

Withstand state (40)
Code:
<Custom Respond Effect>
  if (target.hp <= target.mhp * .25){
target.addState(41)
  }
</Custom Respond Effect>

<Custom Action End Effect>
  if ($gameActors.actor(1).hp >= $gameActors.actor(1).mhp * .25){
$gameActors.actor(1).removeState(41)
  }
</Custom Action End Effect>


Hard Hitter state (42)
Code:
<Custom Turn Start Effect>
randomN = Math.floor((Math.random() * 1) + 1)
  if (randomN == 1){
$gameActors.actor(2).addState(43)
  }
  </Custom Turn Start Effect>

<Custom Action End Effect>
  if ($gameActors.actor(1).hp >= $gameActors.actor(1).mhp * .25){
$gameActors.actor(1).removeState(41)
  }
</Custom Action End Effect>

I attached a video for you to see how it is actually working, both cases.
Is the custom action end effect suppose to be on Heavy Hitter? It looks like the same as Withstand's Custom Action End.

EDIT: If you look at Trish's picture in her notes it says the passive state is 42
 
Last edited:

Magusalfador

AKA VaroClaw
Veteran
Joined
Jun 15, 2014
Messages
274
Reaction score
44
First Language
English Spanish
Primarily Uses
RMMV
Yeah, it should be on both and every party member. That code is run after an action, lets say that if Iris heals herself, the code will run and remove state 41. But also, if Trish heals Iris, the code will run and will remove the state as well.

Yeah, I can see the notetag on Trish that grants state 42. Did you placed an icon on state 42 and you see on Trish? I honestly dont know why the code is not placing state 43 on Trish.
 
Joined
Apr 13, 2020
Messages
34
Reaction score
0
First Language
English
Primarily Uses
RMMV
Yeah, it should be on both and every party member. That code is run after an action, lets say that if Iris heals herself, the code will run and remove state 41. But also, if Trish heals Iris, the code will run and will remove the state as well.

Yeah, I can see the notetag on Trish that grants state 42. Did you placed an icon on state 42 and you see on Trish? I honestly dont know why the code is not placing state 43 on Trish.
I'll give it a try here and get back to you.
 

Magusalfador

AKA VaroClaw
Veteran
Joined
Jun 15, 2014
Messages
274
Reaction score
44
First Language
English Spanish
Primarily Uses
RMMV
Ok, lets just take out the % chance check. Can you place this on Trish state 42?
Code:
<Custom Turn Start Effect>

$gameActors.actor(2).addState(43)

</Custom Turn Start Effect>

This should add state 43 every time Trish starts her turn.
 
Joined
Apr 13, 2020
Messages
34
Reaction score
0
First Language
English
Primarily Uses
RMMV
Ok, lets just take out the % chance check. Can you place this on Trish state 42?
Code:
<Custom Turn Start Effect>

$gameActors.actor(2).addState(43)

</Custom Turn Start Effect>

This should add state 43 every time Trish starts her turn.
Nothing. Maybe I'm going to look through everything again and see if I spot a mistype or something. If not, I'll just create a new state in a different slot.
 

Magusalfador

AKA VaroClaw
Veteran
Joined
Jun 15, 2014
Messages
274
Reaction score
44
First Language
English Spanish
Primarily Uses
RMMV
Yeah, try that because it SHOULD work, if Iris iw working fine, it should do the same with Trish.
 

Latest Threads

Latest Profile Posts

Reading about metaverses recently. I can totally imagine myself in the future, logging in with VR glasses to a virtual beach villa sitting in a virtual chair, with a virtual laptop facing the sea...coding 16-bit RM.
Mod name: "[Game name] Gameplay Overhaul"
What they actually mean: "Here is a mod that makes the game harder."
I decided to reinstall one of my most favourite game of all times, Gothic 2. Time to get back to Khorinis!
So much game make... I needs to rest. The foods call.
-Casino with bunnysuit green check.png
1638563168795.png

Forum statistics

Threads
117,166
Messages
1,105,098
Members
153,259
Latest member
litespace
Top