moldy

Veteran
Veteran
Joined
Nov 15, 2015
Messages
281
Reaction score
53
First Language
English
Primarily Uses
Excellent work so far, guys. I'm not sure if this was already addressed, but I'm trying to wrap my head around a mechanic I'd like to add called Attack of Opportunity that triggers when a unit moves away from an adjacent enemy that allows the enemy 1 free hit on the moving unit.

On that note, I'd also like to ask about triggering events in the middle of a unit's movements as well. For example: traps. I can usually do this manually by making a parallel event to trigger when a moving unit's x and y match with the trap, but the unit continues to move anyway even when inflicted a status like "unable to move" (lets pretend the trap is like a snare). I guess the challenge boils down to: is there a script call to force a unit's turn to end in this scenario the second they step on the snare trap?
 

swickster

Veteran
Veteran
Joined
Nov 8, 2012
Messages
37
Reaction score
7
Primarily Uses
Anyone know how I can change the color of the movement squares on the ground? (Flashing ones) Can someone also tell me how to get my regular menu buttons back on the non-battle maps? (Items, Equip, etc.)
 
Last edited:

Boonty

Veteran
Veteran
Joined
Oct 10, 2018
Messages
147
Reaction score
55
First Language
French
Primarily Uses
RMMV
Hello @Shoukang, your last updates convinced me to use yours plugins to make my Pokemon game :)

Have you a demo version with the TurnOrder js integrated ?
 

Shoukang

Veteran
Veteran
Joined
Jan 28, 2021
Messages
155
Reaction score
162
First Language
Chinese
Primarily Uses
RMMV
This is a start, but it still runs into the issue where existing units get a free turn before the newly spawned units. Perhaps a method to "reset" the 100 meter dash so that doesn't happen, (though in some cases, people might want that to happen, so it might be best not to make automatic.)

Also, perhaps a method of increasing the priority of certain units on the field via event script would be nice.
You are right, the existing units will get a free turn. It can be tricky to fix due to how I realize the action order plugin.
I will not update the action order plugin in the near future. My initial plan is to just make a working template and leave it for others to implement. I will also spend less time on plugin development, as I already got all I need. I believe that learning JS is the most efficient and maybe the only solution for those who want a lot of new features, I will not do everything.
Anyone know how I can change the color of the movement squares on the ground? (Flashing ones) Can someone also tell me how to get my regular menu buttons back on the non-battle maps? (Items, Equip, etc.)
Just search 'blue' in the core plugin and replace it with another color, you can search for html color names to see all the valid colors.
Hello @Shoukang, your last updates convinced me to use yours plugins to make my Pokemon game :)

Have you a demo version with the TurnOrder js integrated ?
No, but the action order plugin is plugin and play, I think a demo is not necessary.
 

Boonty

Veteran
Veteran
Joined
Oct 10, 2018
Messages
147
Reaction score
55
First Language
French
Primarily Uses
RMMV
And how it is possible to activate" Friendly Fire" skills ?
 

BlueCheezus

Villager
Member
Joined
Feb 4, 2020
Messages
8
Reaction score
0
First Language
english
Primarily Uses
RMMV
Anyone have any insight into what's causing this crash?
It's been messing with me for the past week and I can't figure it out.
It usually happens right after attacking.
Screenshot (17).png
 

Shoukang

Veteran
Veteran
Joined
Jan 28, 2021
Messages
155
Reaction score
162
First Language
Chinese
Primarily Uses
RMMV
Anyone have any insight into what's causing this crash?
It's been messing with me for the past week and I can't figure it out.
It usually happens right after attacking.
View attachment 225922
It doesn't happen in my game. Did you use the AoE and AI control plugins in my bug fix patch? If that's not the reason, a simple solution is to insert:
JavaScript:
if (!event) continue;
in between line 516 and line 517.
 
Joined
Jan 14, 2022
Messages
2
Reaction score
1
First Language
Greek
Primarily Uses
RMMV
Hi everyone, first of all, thank you for your hard work in creating all these plugins!

Secondly, I've got a question about items. When an actor uses an item, like a Healing Potion, they get EXP. I'd prefer for that not to happen, but still allow them to get EXP from skills and from attacking enemies (even if they don't defeat the enemy).

I've been looking through SRPG_Core but I'm unsure what I should change. I'd appreciate some help!
 

BlueCheezus

Villager
Member
Joined
Feb 4, 2020
Messages
8
Reaction score
0
First Language
english
Primarily Uses
RMMV
It doesn't happen in my game. Did you use the AoE and AI control plugins in my bug fix patch? If that's not the reason, a simple solution is to insert:
JavaScript:
if (!event) continue;
in between line 516 and line 517.
Thanks! your simple solution has fixed my issue.
 

Brother_Fox

Villager
Member
Joined
Feb 18, 2021
Messages
20
Reaction score
5
First Language
Russian
Primarily Uses
RMMV
Good evening!

Please, tell me, is it possible for one enemy to use several different target formulas with a certain chance?
For example, 80% chance that the search for a target is carried out according to formula a, 10% - according to formula b, 10% according to formula c?
 

arief4450

Warper
Member
Joined
May 9, 2022
Messages
1
Reaction score
0
First Language
Indonesian
Primarily Uses
RMMV
Hello guys, first of all this is a superb plugin that i've been looking for my project rn.

But i have a question. Can you attack with more than one actor when side view battle begun? if so can you tell me how? thanks.
 

darkand

Nomad Robot Artis
Veteran
Joined
Dec 22, 2020
Messages
39
Reaction score
15
First Language
spanish
Primarily Uses
RMMV
is posible make a vehicle/mount addon? like, the pilot ride the vehicle, and when the vehicle is destroyed the pilot levea it with some damage
 

TheLastYuriSamurai

TheLastYuriSamurai
Veteran
Joined
Dec 26, 2013
Messages
70
Reaction score
89
First Language
English
Primarily Uses
RMMV
Just want to say how incredible this is!! I've been experimenting with the AOE using the map battle view, and was curious if it was possible for the character to hit all around them. With the square AOE it results in attack range A (see below) when I want attack range B(see below)

Attack Range A (- is nothing, x is attack and o is user)
-xxx
-oxx
-xxx

when I want:
-x-
xox
-x-
or even below, where the user isn't hit by their own attack.
xxx
xox
xxx

I've experimented with using: <srpgAreaRange:1>, <srpgAreaType:square>, with using a minumum, ect. Nothing seems to do exactly what I'm aiming for. I don't mind scrapping the idea but thought I'd ask if anyone ever managed to get something similar to work where the user is at the center, but the attack doesn't actually hit them. My searches on this thread have so far come up empty. (My apologies if my diagrams don't make sense, I'd be happy to draw them if it would help).
 

Brother_Fox

Villager
Member
Joined
Feb 18, 2021
Messages
20
Reaction score
5
First Language
Russian
Primarily Uses
RMMV
Just want to say how incredible this is!! I've been experimenting with the AOE using the map battle view, and was curious if it was possible for the character to hit all around them. With the square AOE it results in attack range A (see below) when I want attack range B(see below)

Attack Range A (- is nothing, x is attack and o is user)
-xxx
-oxx
-xxx

when I want:
-x-
xox
-x-
or even below, where the user isn't hit by their own attack.
xxx
xox
xxx

I've experimented with using: <srpgAreaRange:1>, <srpgAreaType:square>, with using a minumum, ect. Nothing seems to do exactly what I'm aiming for. I don't mind scrapping the idea but thought I'd ask if anyone ever managed to get something similar to work where the user is at the center, but the attack doesn't actually hit them. My searches on this thread have so far come up empty. (My apologies if my diagrams don't make sense, I'd be happy to draw them if it would help).
Try the following:
<srpgRange:0>
<srpgAreaRange:1>
<srpgAreaType:square>

Selecting an enemy as the area of effect of the skill.
The number of targets can be specified with <srpgAreaTargets:X>.
For cross attack use <srpgAreaType:X> where X = plus
Seems like it should work.
 

TheLastYuriSamurai

TheLastYuriSamurai
Veteran
Joined
Dec 26, 2013
Messages
70
Reaction score
89
First Language
English
Primarily Uses
RMMV
Try the following:
<srpgRange:0>
<srpgAreaRange:1>
<srpgAreaType:square>

Selecting an enemy as the area of effect of the skill.
The number of targets can be specified with <srpgAreaTargets:X>.
For cross attack use <srpgAreaType:X> where X = plus
Seems like it should work.
That was it!! I kept using srpgAreaMinRange instead of the range = 0! Thanks!
 

boomy

Veteran
Veteran
Joined
Jan 6, 2013
Messages
206
Reaction score
191
First Language
English
Primarily Uses
RMMV
I've been looking through SRPG_Core but I'm unsure what I should change. I'd appreciate some help!
This is hard. srpg_core does not store the last action of a unit (well it does, but wipes it once the exp screen is loaded) so its hard to check if the last action done by anyone is an item or not. Usually we would use $gameSystem.EventToUnit($gameTemp.activeEvent().eventId())[1].currentAction() to check what action the active event is performing

Another issue is we can't tap into a pre-existing function to store the last action. srpg_core uses the this._actions = []; instead of the this.clearActions() function which means we can't even store the action by editing the clearActions function

So the only way to fix this is to store the action when it is made:
var _srpgMakeNewActions = Game_Battler.prototype.srpgMakeNewActions;
Game_Battler.prototype.srpgMakeNewActions = function () {
_srpgMakeNewActions.call(this);
if (this._actions.length > 0) {
console.log(this._actions);
this._previousAction = this._actions[0];
}
};

Now we have the action stored, we can edit BattleManager.makeRewards to check if the used action is an item or not, and if so alter BattleManager._rewards.exp = 0;

To check if an action is an item, I would use: $gameSystem.EventToUnit($gameTemp.activeEvent().eventId())[1]._previousAction._item._dataClass == "item"

Please, tell me, is it possible for one enemy to use several different target formulas with a certain chance?
Yeah... kind of. For example if you use the notetag: <aiTarget: Math.randomInt(20) + b.mhp>, the game will add "0-19" to the potential target's max hp and target the unit with the highest combined value. The issue is that targetScore is calculated for the size of $gameTemp.RangeMoveTable which means that this targetScore value is calculated many times for the same "target" (just at different positions) which means the randomness becomes less random.

You could change it to <aiTarget: Math.randomInt(20) > 10 ? b.mhp : 200 - b.mhp> which means about half of the time the target score will be higher if the target has maxHP and half the time the target score will be lower if the target has maxHP but again, because the targetScore function is calculated for every possible square in $gameTemp.RangeMoveTable, it means the targetScore is calculated several times, nullifying the "random" check.

The best way to circumvent this is to set a variable to a random value at the start of every turn (via an srpgEvent such as <type:afterAction> and then use the value of the variable as the "random variable". Doing this means that the random variable does not change when targetScore function is run and thus the result is always the same.

If the above doesn't make sense, here is an example:

Enemy A has two targets, X and Y
If we use <aiTarget: Math.randomInt(3)> then X and Y will have a targetScore between 0 and 2. An example calculation would be:
X: targetScore 0
X: targetScore 0
X: targetScore 1
X: targetScore 1
X: targetScore 0
X: targetScore 2
Y: targetScore 0
Y: targetScore 1
This results in X been selected as it has a targetScore of 2 (the highest). This is purely random and the targetScore changes for each iteration of $gameTemp.RangeMoveTable tile

If we use <aiTarget: $gameVariables.value(3) > 2 ? b.hp : 1> and have an <type:afterAction> event that runs a scriptCall: $gameVariables.setValue(3, Math.randomInt(5)), then there us a 40% chance the enemy A will target the unit with the highest HP, otherwise it will randomly select X or Y (as both will have target score of 1). In this scenario the calculation could be:
X: targetScore 43
X: targetScore 43
X: targetScore 43
X: targetScore 43
X: targetScore 43
X: targetScore 43
Y: targetScore 23
Y: targetScore 23
In this scenario, $gameVariables.value(3) > 2 is true, so the targetScore is set to X or Y's current HP. the targetScore is always calculated the same as $gameVariables.value(3) does not change when targetScore() is run.
 
Joined
Jan 14, 2022
Messages
2
Reaction score
1
First Language
Greek
Primarily Uses
RMMV
Now we have the action stored, we can edit BattleManager.makeRewards to check if the used action is an item or not, and if so alter BattleManager._rewards.exp = 0;
Thank you very much for your help! That did the trick. :)

I'll leave it here in case it's helpful to anyone else:
JavaScript:
var _srpgMakeNewActions = Game_Battler.prototype.srpgMakeNewActions;
Game_Battler.prototype.srpgMakeNewActions = function () {
    _srpgMakeNewActions.call(this);
    if (this._actions.length > 0) {
        console.log(this._actions);
        this._previousAction = this._actions[0];
}
};
var _srpgMakeRewards = Scene_Map.prototype.makeRewards;
Scene_Map.prototype.makeRewards = function() {
    _srpgMakeRewards.call(this);
    this._rewards = {};
    this._rewards.gold = $gameTroop.goldTotal();
    if ($gameSystem.EventToUnit($gameTemp.activeEvent().eventId())[1]._previousAction) {
        if ($gameSystem.EventToUnit($gameTemp.activeEvent().eventId())[1]._previousAction._item._dataClass == "item") {
            this._rewards.exp = 0;
        } else {
            this._rewards.exp = $gameTroop.expTotal();
        }
    } else {
        this._rewards.exp = $gameTroop.expTotal();
    }
    this._rewards.items = $gameTroop.makeDropItems();
};
 
Last edited:

Brother_Fox

Villager
Member
Joined
Feb 18, 2021
Messages
20
Reaction score
5
First Language
Russian
Primarily Uses
RMMV
Good afternoon!

If I make a skill that adds a states that deals damage over time, and that damage kills an actor or enemy, then the damage dealt is not converted into experience, the counter of living/dead actors and enemies does not change, and the enemy/actor itself does not disappear.

Is it possible to make such skills so that they work correctly?
 
Last edited:

kouta555

Villager
Member
Joined
Sep 13, 2016
Messages
13
Reaction score
2
First Language
Russian
Primarily Uses
RMMZ
Dont work with YED Side view battlers/ Seems problem With Dynamic motion plugin, if it OFF , error not shown, and sideview battler appears
 

Attachments

  • Снимок экрана (170).png
    Снимок экрана (170).png
    134.6 KB · Views: 6

Latest Threads

Latest Posts

Latest Profile Posts

"What!? 2000!? There's no way that can be right!""It's over 2900!"
New musics has been made. Praise be!
Furious and deeply saddened about the state of the US. This is the starting domino.
Thunderstorm approaching: *rumble rumble*

Me: "Hmph... so.. you've come..."

And ONLY me: (adapts fighting stance) "...now show me your TRUE POWER!!!"

*Thunderstorm fizzles out. Sunshine and rainbows.*

Seriously, ONLY ME: "No! Come back! I.. I didn't mean..."
The black rose maiden! :kaopride:
vmTLAk8.jpg

Character: Aki Izayoi from Yugioh 5Ds.

Forum statistics

Threads
123,045
Messages
1,153,649
Members
161,394
Latest member
mezzthang
Top