SRPG Engine - Plugins for creating Turn Based Strategy game

Dopan

Veteran
Veteran
Joined
Mar 27, 2020
Messages
154
Reaction score
21
First Language
German
Primarily Uses
RMMV
well, I tried using a random formula, and no matter what, the enemy drains his energy nonstop and stays technically dead, it doesn't disappear until I kill it for real. I am guessing my only solution is using Lunatic Mode or making a dedicated plugin
View attachment 150991
if (Math.random()<0.1) {a.setHp(a.hp - 100)} else {a.atk * 4- b.def * 2}
This is what the formula looks like btw.
@Yew Bowman
Could you pls Explain in Detail, what exactly it is you want as result,and what exactly you did, that didnt work like you wanted it.
Because like it looks now, i got no Idea what this is about..
and cant try to help

---------
@ All
However i recognized that the "autolife" Plugin doesnt work in MapbattleMode.
=> if the battler, that has Reraise State Active, dies in mapbattle, the Reraise Function & Animation doesnt Trigger..
But i found another AutoLife Plugin ,which works in Mapbattle Mode..(=the Reraise function works), but doesnt trigger the Animation in Mapbattle.
=>With a lot of luck, i successfully edited this Second Autolife Plugin in order to check if Mapbattle is active,and to trigger the Animation, in Mapbattle or in SVbattleMode depending on, which BattleMode is active..
=> this Edited Autolife Plugin has more Notetags than the other Plugin,and all of them work after the second edit^^

Added info in the Plugin Help info.
==>deleted the old autolife Plugin and added the New & edited "AutoLife"-Plugin
==>updated the Demo Download link (still Version2.5)
 
Last edited:

Yew Bowman

Veteran
Veteran
Joined
Sep 7, 2017
Messages
39
Reaction score
4
First Language
Spanish
Primarily Uses
RMMV
@Yew Bowman
Could you pls Explain in Detail, what exactly it is you want as result,and what exactly you did, that didnt work like you wanted it.
Because like it looks now, i got no Idea what this is about..
and cant try to help

---------
@ All
However i recognized that the "autolife" Plugin doesnt work in MapbattleMode.
=> if the battler, that has Reraise State Active, dies in mapbattle, the Reraise Function & Animation doesnt Trigger..

But i found another AutoLife Plugin ,which works in Mapbattle Mode..(=the reraise-function works), but doesnt trigger the Animation.
=>With a lot of luck, i successfully edited this Second Autolife Plugin in order to check if Mapbattle is active,and to trigger the Animation, in Mapbattle or in SVbattleMode depending on, which BattleMode is active..
=> this Edited Autolife Plugin has more Notetags than the other Plugin,but 1 Notetag that changes the Default Animation ID, doesnt work in the edited Version.

(im not sure if i can fix this later or not)
Added info in the Plugin Help info,,its still possible to set a Default Animation in the Plugin param Setup.. the same way it was in the other Plugin

==>deleted the old autolife Plugin and added the New & edited "AutoLife"-Plugin
==>updated the Demo Download link (still Version2.5)
well, if you couldn't tell by the Action Sequence , I am trying to make a skill that has a 90% chance of hitting its target and 10% chance of hitting itself
 

Dopan

Veteran
Veteran
Joined
Mar 27, 2020
Messages
154
Reaction score
21
First Language
German
Primarily Uses
RMMV
well, if you couldn't tell by the Action Sequence , I am trying to make a skill that has a 90% chance of hitting its target and 10% chance of hitting itself
Im not good with formulas but reading this again :
the enemy drains his energy nonstop and stays technically dead, it doesn't disappear until I kill it for real
..so your Formula works ? only the KO doesnt Work like it is supposed to do..? (if i understand right)

Edit 1
i deleted the old text because im pretty sure, i know what the problem is ..
When changing HP, with "allow KO",Events can get KO but wont erase the Event until BattleAction.That is technically not a Bug, its how SRPG works atm.
And for example, i use this to create fake deathStates with using a State, on which i change the CharSpriteImg (="Motion" when unsing DrQ Plugins*) to a SleepingCharSprite (to simulate a death character),if i dont want the death Battle Events, to Dissapear (=get erased) from the Map.
So you can make a Situation, where a Battle happens to make the Event get erased, or you can create a fake DeathState, where the Event has NO-"range" for anything, and looks like a sleeping or death Event, which get ignored from the Enemy AI..
Imgs and Video to show better in Spoiler:
-500 hp.pngdeath event.png
drQ EventMotions.png
*Drq Plugins to change the char sprite img :
-DRQ_EventMotions
-SRPG_MapBattle_Motions
State notetag:
(SRPG_MapBattleMotions)
<idleMotion:X> repeats motion X when no other motion is playing
bypasses the noMotions tag
------------------------------------------------
New actor, class, enemy, weapon, armor, skill, and state tag:
(SRPG_AIControl)
<aiIgnore> this unit is completely invisible to AI units
------------------------------------------------
Actor, Class, Enemy, Weapon, Armor, and State notetag:
(SRPG_MapBattleMotions)
<noMotions>
this character will not play new motions
-------------------------------------------------
New actor, class, enemy, weapon, armor, state, and skill note tags: (SRPG_RangeControl)
<blockOpponents:true/false>
# if true, opponents cannot move through you
example fakedeathstate.png

Edit 2
You also could end the turn, and wait for the next turn,
to let the FakeDeathUnit Disappear (=Event erased).
That happens aslong KO is active .

(to make another Ko State, that can erase Events at Turn End like the default KO does ,you can use "Himes Custom Death States" StateNoteTag: <custom death state> )


Edit 3
I think for your Situation it would be best to add this to your DeathState (State:1):
<aiIgnore>
<blockOpponents:
true/false>
eg1.png
eg 2.png
For Actors u can use a common event that runs parallel in SRPGbattle to change the sprite char to "blank" (=nothing).1 turn later the Event will be erased anyway..(aslong KO is active)
Or if its about an EnemyUnit and not an ActorUnit, u can use another FakeDeathState with <idleMotion:X>,to change the charSpriteIMG like its explained in "Edit 1"& "Edit 2".. u can use the Plugin Himes Placeholder States,or Auto Passive States (YEP) in order to control what state gets activated.
I will create an FakeDeathStates-Example for the Actor "shadow",
in the next Version(2.6) of the Updated-SRPG_Demo.
 
Last edited:

Yew Bowman

Veteran
Veteran
Joined
Sep 7, 2017
Messages
39
Reaction score
4
First Language
Spanish
Primarily Uses
RMMV
Im not good with formulas but reading this again :

..so your Formula works ? only the KO doesnt Work like it is supposed to do..? (if i understand right)


Edit 1
i deleted the old text because im pretty sure, i know what the problem is ..
When changing HP, with "allow KO",Events can get KO but wont erase the Event until BattleAction.That is technically not a Bug, its how SRPG works atm.
And for example, i use this to create fake deathStates with using a State, on which i change the CharSpriteImg (="Motion" when unsing DrQ Plugins*) to a SleepingCharSprite (to simulate a death character),if i dont want the death Battle Events, to Dissapear (=get erased) from the Map.
So you can make a Situation, where a Battle happens to make the Event get erased, or you can create a fake DeathState, where the Event has NO-"range" for anything, and looks like a sleeping or death Event, which get ignored from the Enemy AI..
Imgs and Video to show better in Spoiler:
*Drq Plugins to change the char sprite img :
-DRQ_EventMotions
-SRPG_MapBattle_Motions

Edit 2
You also could end the turn, and wait for the next turn,
to let the FakeDeathUnit Disappear (=Event erased).
That happens KO is active .

(to make another Ko State, that can erase Events at Turn End like the default KO does ,you can use "Himes Custom Death States" StateNoteTag: <custom death state> )


Edit 3
I think for your Situation it would be best to add this to your DeathState (State:1):

For Actors u can use a common event that runs parallel in SRPGbattle to change the sprite char to "blank" (=nothing).1 turn later the Event will be erased anyway..(aslong KO is active)
Or if its about an EnemyUnit and not an ActorUnit, u can use another FakeDeathState with <idleMotion:X>,to change the charSpriteIMG like its explained in "Edit 1"& "Edit 2".. u can use the Plugin Himes Placeholder States,or Auto Passive States (YEP) in order to control what state gets activated.
I will create an FakeDeathStates-Example for the Actor "shadow",
in the next Version(2.6) of the Updated-SRPG_Demo.
I am postive there's a third option, no way Lunatic mode or Formulas are the only solution, right?
 

Dopan

Veteran
Veteran
Joined
Mar 27, 2020
Messages
154
Reaction score
21
First Language
German
Primarily Uses
RMMV
I am postive there's a third option, no way Lunatic mode or Formulas are the only solution, right?
You can keep using your formula..
The new demo version i am currently uploading, will have a fakedeath-state Example..
This shows you, how to make the BattleUnit Disappear, when HP gets changed to 0, without needing a BattleAction ,then your Problem should be solved..

Updated-SRPG_DemoVersion 2.6 is uploaded!
-fixed revive Skill
-added Fake death State Setup for actor "shadow" (=>made with Himes Placeholder States)
=> to use this Setup for other Units just give the State "FakedeathUser" to the Unit, Units with thisState will get fakedeath when HP at 0, while other Units without the "FakedeathUser"-State will get normal KO.
-upgraded "Chuck" ( he can kill actor "shadow" now..without any BattleAction )
-added some If Conditions in Common Events, to disable fake-death from actor "shadow", after the Next Turn,because the revive skill needs real KO.
(In the Next Turn and after the unit is erased it doesnt matter anyway).
-added 2 Plugins:
->Himes Placeholder States
-> Auto Passive States (YEP)
fakedeathstate.png
--
himes setup.png
--
this.unitAddState(EventId, StateId);# Add the state of the ID specified to the unit with the specified event ID.
this SRPG_Core ScriptCall can be used to add the "FakedeathUser"-State to any unit..
 
Last edited:

Yew Bowman

Veteran
Veteran
Joined
Sep 7, 2017
Messages
39
Reaction score
4
First Language
Spanish
Primarily Uses
RMMV
You can keep using your formula..
The new demo version i am currently uploading, will have a fakedeath-state Example..
This shows you, how to make the BattleUnit Disappear, when HP gets changed to 0, without needing a BattleAction ,then your Problem should be solved..

Updated-SRPG_DemoVersion 2.6 is uploaded!
-fixed revive Skill
-added Fake death State Setup for actor "shadow" (=>made with Himes Placeholder States)
=> to use this Setup for other Units just give the State "FakedeathUser" to the Unit, Units with thisState will get fakedeath when HP at 0, while other Units without the "FakedeathUser"-State will get normal KO.
-upgraded "Chuck" ( he can kill actor "shadow" now..without any BattleAction )
-added some If Conditions in Common Events, to disable fake-death from actor "shadow", after the Next Turn,because the revive skill needs real KO.
(In the Next Turn and after the unit is erased it doesnt matter anyway).
-added 2 Plugins:
->Himes Placeholder States
-> Auto Passive States (YEP)
View attachment 151150
--
View attachment 151155
--
this SRPG_Core ScriptCall can be used to add the "FakedeathUser"-State to any unit..
nope, formula doesn't work, they never worked in the map battle because they constantly drain their health, regardless they attack or not, and that's not supposed to happen.
 

Doktor_Q

I'm not a real doktor, but I am a real Q
Veteran
Joined
Aug 1, 2016
Messages
800
Reaction score
489
First Language
English
Primarily Uses
RMMV
@Yew Bowman That's because the combat preview runs the formulas constantly to generate the preview damage numbers. I think a formula more like this would work:
JavaScript:
($gameTemp.isPrediction() || Math.random() < 0.9) ? a.atk * 4 - b.def * 2 : a.gainHp(-100)
The format used in this case is a ternary statement, which you should generally use instead of if/else statements inside formulas. The syntax is as follows:
conditionToCheck ? codeToRunIfTrue : codeToRunIfFalse

The parenthesis around the condition probably aren't needed, but I put them in for clarity and also because I can't always remember if they're needed. You can experiment if you want.

$gameTemp.isPrediction() will be true if the skill's formula is being run to get a damage prediction, instead of because the skill was actually used. It requires you to be using SRPG_positionEffects if you weren't already, as it's something I added to stop push, pull, and teleport from going off early due to predictions.

|| is an "or" statement, making the condition true if the formula is being run as part of the prediction window OR in the 90% case of success. This should prevent it from doing self-damage when the battle window is open, or anything like that, and also consistently show the damage it ought to do to the enemy.

a.gainHp instead of a.setHp makes the line shorter, and should also cause it to show a damage popup on the user.
 

Yew Bowman

Veteran
Veteran
Joined
Sep 7, 2017
Messages
39
Reaction score
4
First Language
Spanish
Primarily Uses
RMMV
@Yew Bowman That's because the combat preview runs the formulas constantly to generate the preview damage numbers. I think a formula more like this would work:
JavaScript:
($gameTemp.isPrediction() || Math.random() < 0.9) ? a.atk * 4 - b.def * 2 : a.gainHp(-100)
The format used in this case is a ternary statement, which you should generally use instead of if/else statements inside formulas. The syntax is as follows:
conditionToCheck ? codeToRunIfTrue : codeToRunIfFalse

The parenthesis around the condition probably aren't needed, but I put them in for clarity and also because I can't always remember if they're needed. You can experiment if you want.

$gameTemp.isPrediction() will be true if the skill's formula is being run to get a damage prediction, instead of because the skill was actually used. It requires you to be using SRPG_positionEffects if you weren't already, as it's something I added to stop push, pull, and teleport from going off early due to predictions.

|| is an "or" statement, making the condition true if the formula is being run as part of the prediction window OR in the 90% case of success. This should prevent it from doing self-damage when the battle window is open, or anything like that, and also consistently show the damage it ought to do to the enemy.

a.gainHp instead of a.setHp makes the line shorter, and should also cause it to show a damage popup on the user.
Eh, it's not ideal but at least the formula itself does the job, it's the best I can get at the moment. Thanks for your help, if you manage to get a better solution tell me.
 

BlissAuthority

Dang, it feels good to be a Princess
Veteran
Joined
Dec 26, 2013
Messages
139
Reaction score
50
First Language
English
Primarily Uses
RMVXA
I hate to say this, but you should probably get another translator, one who speaks English natively and who has a good grasp of the original Japanese. I can't understand the documentation or most of the example game.
 

Dopan

Veteran
Veteran
Joined
Mar 27, 2020
Messages
154
Reaction score
21
First Language
German
Primarily Uses
RMMV
I hate to say this, but you should probably get another translator, one who speaks English natively and who has a good grasp of the original Japanese. I can't understand the documentation or most of the example game.
Im not sure what you mean,is it about the default demo from the OP#1 , or do
you mean the Updated-SRPG_Demo2.6? .
(i didnt translated anything on the default Demo,and my english could be better aswell^^)
However i only translate Plugin* Help (Asian)-Text with google translater ,because thats better than nothing.. (*Plugins in the Updated-SRPG_Demo2.6)
edit
The default Demo from from OP#1 is not made,by anyone who is active here, at the moment.
RyanBram from OP#1, wasnt here since a while.But if there is something,that we could help to explain, pls ask in Detail ,(screenshots would also be helpfull) and it can probably get solved.
 
Last edited:

BlissAuthority

Dang, it feels good to be a Princess
Veteran
Joined
Dec 26, 2013
Messages
139
Reaction score
50
First Language
English
Primarily Uses
RMVXA
However i only translate Plugin* Help (Asian)-Text with google translater ,because thats better than nothing.. (*Plugins in the Updated-SRPG_Demo2.6)
That explains a lot. Google Translate is, in my experience, far worse than nothing.

It's whatever demo you currently have up on the Itch.io page. I'll take another look but hearing this makes me want to reiterate that you need a proper translation.
 

Dopan

Veteran
Veteran
Joined
Mar 27, 2020
Messages
154
Reaction score
21
First Language
German
Primarily Uses
RMMV
That explains a lot. Google Translate is, in my experience, far worse than nothing.

It's whatever demo you currently have up on the Itch.io page. I'll take another look but hearing this makes me want to reiterate that you need a proper translation.
https://ryanbram.itch.io/srpg-engine-demo = Itch.io page
thats the default Demo..
The Updated-SRPG_demo2.6, is a Extension of the default Demo, in which i changed Nothing on the Default-part of the Demo. (=means the test-Game and its Missions).
But i added all of DrQs SRPG Plugins, and some other Free SRPG Plugins and other Free* not-SRPG Plugins (*Credits Required of course)
And i Added "Chuck" and new Missions, which i used to show some Functions.
I recommend to try the Updated-SRPG_demo2.6 (=link in my Signature Spoiler),because it
has more SRPG Plugins and the Updated SRPG_Core.

The Translation of the Default Demo..(Itch.io page) is nothing we could change ,because we got no Control of the Itch.io page.
Of course i could try to edit the Default-part of my "Updated-SRPG_demo2.6" but i didnt want to change other peoples work.

In this UpdatedDemo i just wanted to add more Informations,and as i sayd my English isnt the Best.
But i understand SRPG and its Functions pretty much and DrQ knows even more when it comes to JS.Thats why i sayed if there is any Question, that it can probably get solved.

For example
; -> i saw that you tried to change the way, Actors can move and act. This wasnt possible, in the Default Demo because, "AddActionTimes" was Buged.(it only worked on Items)
But in the Updated-SRPG_demo2.6, "AddactionTimes" works fine(also on skills), thx to DrQ.
I even added Switches, to the SRPG_core Plugin (param-)Setup, that let you Control the Default ActorBattleCommands with these Switches.
That makes it easier to make these changes on "action & movement".
I am sorry if the "Updated-SRPG_demo2.6" ( the only demo i'm responsible for ) is made in to bad English.I hope Chuck and his Maps are understandable.
 
Last edited:

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

Latest Threads

Latest Profile Posts

So I decided the best way to represent insanity was to simply make two maps fight for supremacy in front of the player. The results are everything I hoped for! :LZSexcite:


Ami
look the release date - finally!!!
look the price - (convert into Rupiah)"maybe im too forcing myself…" (wait again until Autumn or Christmas Sale)
so MZ is releasing next month :/ I still don't know if I should pick it up or not
I wish all of you have a good time in your life!

Forum statistics

Threads
99,727
Messages
968,530
Members
131,437
Latest member
Higusa
Top