Help with a Front/Back Row system (minor scripting)

MazinkaiserDX

Villager
Member
Joined
Mar 14, 2012
Messages
23
Reaction score
1
First Language
Spanish
Primarily Uses
Hey!
So, I'm making a first person dungeon crawler with the awesome FPLE script, and well, what's a first person dungeon crawler without party front and back rows?

Anyway, I'm not a scripter so I did already make the basic system with events, basically a common event gives the first two party members a Front Row state and a Back Row state to the last two. My problem is that I'm trying to make it so that bows doesn't get damage penalties being in the back row.

So far what I did was to make a Back Row Attack state and a Bow Equipped state. The Back Row Attack state adds the Back Row Attack "element" to the character's attack and every enemy then would have a 50% resist against that element. The Bow Equipped state does nothing but the idea is that on the same common event that gives the front and back row states also give the Back Row Attack state to the back row unless they have the Bow Equipped state. Sadly, in the conditional branch there is no way to check for a member in the party directly or using variables so I think the only way is to check with a script line. The question is... what would be the script call for that?

Been looking the script and trying out stuff but everything I've tried gives me errors. The last one I tried was "$game.actor.battle_members[3].states.contains(26)" (26 is the ID of the bow equipped state).

Thanks for any help!

EDIT

Used $game_party.battle_members[x].state?(state_id) where "x" is the position of the party member on the formation (0, 1, 2, 3...) and it works.
And instead of using state icons to represent the row position in the main menu I just gave the icon to each position in the draw_actor_simple_status method with this:

if actor == $game_party.battle_members[0] || actor == $game_party.battle_members[1]
draw_icon(125, dx, dy)
end
else if actor == $game_party.battle_members[2] || actor == $game_party.battle_members[3]
draw_icon(127, dx, dy)
end

Because in my game the row status is tied with the position in the formation anyway. I also moved the actor name a bit to the right, the position of the icons would depend on the menu itself.
 
Last edited:

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
5,599
Reaction score
6,552
First Language
Indonesian
Primarily Uses
RMVXA
It should be
Code:
$game.actor.battle_members[3].state?(26)
 

MazinkaiserDX

Villager
Member
Joined
Mar 14, 2012
Messages
23
Reaction score
1
First Language
Spanish
Primarily Uses
Hi!

Tried it that way and I got an "undefined method actor" error, so I remembered it's $game_actor but that way I got an "undefined method battle_members" so I remembered battle_members was in Game_Party sooo I tried $game_party instead and it worked!

Also something I just learned to note, battle_members start from 0 (got that from the get leader method), so battle_members[2] would be the 3rd party member, battle_members[3] would be the 4th party member and so forth if you have more party members.

Thanks!

Now I just noticed the states don't refresh if I change formation until I close and open again the menu... I guess there should be a way to get in a refresh somewhere on the change formation script... let's see...
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
5,599
Reaction score
6,552
First Language
Indonesian
Primarily Uses
RMVXA
Sorry, I was just wake up and didn't see the clear 'picture'
Anyway, depends on where the scene is, to refresh status you can use "refresh_status" from Scene_Battle.
 

MazinkaiserDX

Villager
Member
Joined
Mar 14, 2012
Messages
23
Reaction score
1
First Language
Spanish
Primarily Uses
Hmmm... well, I was looking through the scripts and though I don't understand everything, it seems to me it does refresh, I mean, if it didn't then the character portraits and other data wouldn't change either, so it seems to me the problem is that it doesn't get the new data from the common event managing the front/back row states until I close the menu. So I'm thinking I should actually find a way to execute the common event inside the menu whenever a party change happens :o
 

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

Latest Threads

Latest Profile Posts

Day 9 of giveaways! 8 prizes today :D
He mad, but he cute :kaopride:

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.

Forum statistics

Threads
106,040
Messages
1,018,479
Members
137,824
Latest member
dobratemporal
Top