Shin megami tensei 4 Smirk status help.

Joined
Sep 7, 2019
Messages
45
Reaction score
23
First Language
English
Primarily Uses
RMVXA
Is there a way to recreate the smirk status from Shin megami tensei 4?
 

Chroma-Creative-Solutions

Graphic Designer
Veteran
Joined
Apr 5, 2020
Messages
65
Reaction score
24
First Language
English
Primarily Uses
RMMV
What is the intended effect of the status? What does the smirk status do?
 
Joined
Sep 7, 2019
Messages
45
Reaction score
23
First Language
English
Primarily Uses
RMVXA
In the game, when ever one of your party members manages to land a critical hit or hit an enemy with
a skill that has an element the enemy is weak to, they gain the smirk status effect.
It basically increases the effect of buffs and it also heals all allies if they have smirk status.
However, Smirk status cannot be granted if the user has any negative status ailments.
 

Chroma-Creative-Solutions

Graphic Designer
Veteran
Joined
Apr 5, 2020
Messages
65
Reaction score
24
First Language
English
Primarily Uses
RMMV
Alright took awhile to get this to work, you will have to do some reading, and do lots of testing and modifications, but this should get the effect you desire, at least for the first half of your question. In terms of detecting if an enemy is hit with elemental damage that matches their elemental weakness and having it apply smirk you will need other plugins (see at bottom added potential solution for that without plugins) but here is the answer to one of your questions:

You are going to need the following plugins to get the smirk effect that I determined to function:
Victor Engine Scripts Basic Module (Needed for VE Plugins)
Victor Engine Scripts Critical Hit Effects

First you are going to need separate skills that enemies use and characters use. This includes the basic attack as well! You will use the following script for the plugin in the skill notetag section to allow for it to set a state on a critical hit:
JavaScript:
<custom critical code>
if (Math.random() < 1) {
a.addState(12);
}
</custom critical code>
For a.addState() it is adding the state to the one using the spell. You may not need two skills if you are going to have enemies be able to Smirk as well. You will want to add the following code to your actor notetag section to allow for you to always have critical hits when you are testing skills and modifying your Smirk system to ensure that it is functioning, instead of having to wait for a critical hit:
Code:
<critical rate: 100000%>
//REMOVE ME IN YOUR REAL GAME THO

For your Smirk Status you can set it to whatever you want the effects to be, here is the example that I used:
Screen Shot 2020-04-21 at 7.49.16 PM.png
Make sure your code at the beginning is calling your correct smirk state. If your buffs are based on equations that take into consideration the actors M.ATK, M.DEF, etc then you can use the state to just increase those stat levels, and as a result, it will increase the effect of those buff skills just due to how you have those skills setup. This example is just a flat boost to parameters that ends at the end of the battle.

You will have to have your skill call a common event to check for the smirk effect on other party members. The common event should only have a switch in it that turns the switch on. Every single troop in your game will have to have the following code in it to check for smirk effects on party members:
Screen Shot 2020-04-21 at 7.49.40 PM.pngScreen Shot 2020-04-21 at 7.49.45 PM.png
Make sure that you turn off your switch at the end so that it only runs when Smirk goes into affect. Since Smirk cannot work if a party member is affected by other states you will have to create a chain of IF () ELSEIF () ELSEIF() statements to determine that first they are not affected by any states (Poison, Blind, etc depends on your game), then it will check to see if they are affected by Smirk, and it will heal them. You can also add any other effects, text, etc that you want under that section. You could even have it display the actors face smiling if you want! You will have to copy and modify that if else section for every single party member that you have in your game and past them ABOVE the switch = off section. This will take a lot of work and testing so make sure you are testing EACH time you add the various characters to ensure it works.

For what you are looking for with element testing you may be able to determine something based on something @padr81 said:
@Raijinn - I figured it out for you that code is almost correct. heres a working version.

if (b.elementRate(2) > 1) {100 + a.mat * 2 - b.mdf * 2 + b.addState(4); 100} else {100 + a.mat * 2 - b.mdf * 2}

On that line it says if targets element rate for fire (fire) is over 100% than do damage and add poision (state 4)
else just do regular damage.

Just change the elementRate(x) to whatever elemet you want, and change the addState(y) to the state id number, you can also change the ;100 to any number to change the odds. Eg.. 50 will make it a 50/50 chance, 75 will make it 3 outta 4 times etc..

Basically, your enemies will have to all have a specific element rate for this to work. Your elements can be defined in your types tab of your database however you want as well. For example in the default game you would set your enemy to have an element rate of ice to 100% under their traits. In the damage equation above, you could set the b.elementRate() value to be whatever your ice value is, in the default database it would as such: b.elementRate(3). Instead of b.addState(4) you would use a.addState(12), 12 in the case of my above examples because 12 is the state id of Smirk, to set the caster state to Smirk, only if they have the element rate you specify. In the example I have mentioned with ice, this would be the damage formula for a fire skill attack. anything after else{} can be the custom damage formula you want to use for the skill. Anything before a.addState() is also your custom damage formula, just the one that activates when it adds the state. For example, you could change this damage formula so that it does twice as much damage against an enemy when it determines they are a certain elemental value.

Hopefully this all helps. You will have to do lots of reading and testing to make this system function. Have fun!
 
Joined
Sep 7, 2019
Messages
45
Reaction score
23
First Language
English
Primarily Uses
RMVXA
Alright took awhile to get this to work, you will have to do some reading, and do lots of testing and modifications, but this should get the effect you desire, at least for the first half of your question. In terms of detecting if an enemy is hit with elemental damage that matches their elemental weakness and having it apply smirk you will need other plugins (see at bottom added potential solution for that without plugins) but here is the answer to one of your questions:

You are going to need the following plugins to get the smirk effect that I determined to function:
Victor Engine Scripts Basic Module (Needed for VE Plugins)
Victor Engine Scripts Critical Hit Effects

First you are going to need separate skills that enemies use and characters use. This includes the basic attack as well! You will use the following script for the plugin in the skill notetag section to allow for it to set a state on a critical hit:
JavaScript:
<custom critical code>
if (Math.random() < 1) {
a.addState(12);
}
</custom critical code>
For a.addState() it is adding the state to the one using the spell. You may not need two skills if you are going to have enemies be able to Smirk as well. You will want to add the following code to your actor notetag section to allow for you to always have critical hits when you are testing skills and modifying your Smirk system to ensure that it is functioning, instead of having to wait for a critical hit:
Code:
<critical rate: 100000%>
//REMOVE ME IN YOUR REAL GAME THO

For your Smirk Status you can set it to whatever you want the effects to be, here is the example that I used:
Make sure your code at the beginning is calling your correct smirk state. If your buffs are based on equations that take into consideration the actors M.ATK, M.DEF, etc then you can use the state to just increase those stat levels, and as a result, it will increase the effect of those buff skills just due to how you have those skills setup. This example is just a flat boost to parameters that ends at the end of the battle.

You will have to have your skill call a common event to check for the smirk effect on other party members. The common event should only have a switch in it that turns the switch on. Every single troop in your game will have to have the following code in it to check for smirk effects on party members:
Make sure that you turn off your switch at the end so that it only runs when Smirk goes into affect. Since Smirk cannot work if a party member is affected by other states you will have to create a chain of IF () ELSEIF () ELSEIF() statements to determine that first they are not affected by any states (Poison, Blind, etc depends on your game), then it will check to see if they are affected by Smirk, and it will heal them. You can also add any other effects, text, etc that you want under that section. You could even have it display the actors face smiling if you want! You will have to copy and modify that if else section for every single party member that you have in your game and past them ABOVE the switch = off section. This will take a lot of work and testing so make sure you are testing EACH time you add the various characters to ensure it works.

For what you are looking for with element testing you may be able to determine something based on something @padr81 said:


Basically, your enemies will have to all have a specific element rate for this to work. Your elements can be defined in your types tab of your database however you want as well. For example in the default game you would set your enemy to have an element rate of ice to 100% under their traits. In the damage equation above, you could set the b.elementRate() value to be whatever your ice value is, in the default database it would as such: b.elementRate(3). Instead of b.addState(4) you would use a.addState(12), 12 in the case of my above examples because 12 is the state id of Smirk, to set the caster state to Smirk, only if they have the element rate you specify. In the example I have mentioned with ice, this would be the damage formula for a fire skill attack. anything after else{} can be the custom damage formula you want to use for the skill. Anything before a.addState() is also your custom damage formula, just the one that activates when it adds the state. For example, you could change this damage formula so that it does twice as much damage against an enemy when it determines they are a certain elemental value.

Hopefully this all helps. You will have to do lots of reading and testing to make this system function. Have fun!
Thank you!
 

Latest Threads

Latest Posts

Latest Profile Posts

would i get in trouble if i didn't take out the computer icons on my fake computer screen i had Discord, Messanger, and rpg maker up
Auto-Adjust Text Outline, Run Common Events on Transfer | RPG Maker News #111

I sweep the floor. My brother, "You didn't do a good job. There are dust bunnies everywhere." He sweeps the floor weeks later. "I just swept. Why are there dust bunnies everywhere?" Me," Guess you didn't do a good enough job."
Today, I tortured my internet by downloading 20 files at once and then I played a guessing game as to which would finish their download first :kaojoy:
Oh god, just watched HawkZombie's stream of my game and realised that *none* of the branching scenes work properly. One has no character graphic, one soft locks due to a passability issue, and one doesn't have its autorun set to the right trigger. I've got first prize in the bag, baby.

Forum statistics

Threads
113,791
Messages
1,077,505
Members
147,836
Latest member
egekaia
Top