A Tactical Grid Based Movement System

Mako

Veteran
Veteran
Joined
Mar 13, 2012
Messages
276
Reaction score
48
First Language
English
Primarily Uses
Hello All, forgive any trespasses if this topic is located in the wrong place... I thought it fit best here but who knows.


Anyway, I am trying to achieve a tactical grid based movement system not unlike the one located in the video below. What would be the best way (in your opinion) to achieve the flashing square advising the player where he/she can move? Preferably -not- through scripting. I am trying to achieve this entirely through eventing if possible. Aside from creating hundreds of events that change color I decided to seek help. Any ideas?












Edit: I'm on Stage 1 and looking for any and all help how to implement a tactic system with as little scripting as possible. It doesn't have to be restricted to a specific maker series.
 
Last edited by a moderator:

MenaKatep

Veteran
Veteran
Joined
May 11, 2016
Messages
67
Reaction score
24
First Language
English
Primarily Uses
I don't know how much of this system you actually have created at this point but you could try using the bindpicturetomap plugin and use a png that has white tiles depicting movement range. If you set it to appear under characters or above tilemap ( I forget which) then it could work. You'd have to set the current actor's map coordinates to variables then multiply them by 48 to calculate where the image should appear on the map. This seems like an interesting concept, so if you want some minor help to work on it I can definitely see what we can come up with! I would wonder though if the sheer amount of eventing required would be a waste though. I have to wonder if the amount required would cause severe lag bouts as well.  :distrust:
 

Saboera

Veteran
Veteran
Joined
Dec 20, 2012
Messages
63
Reaction score
66
First Language
French
Primarily Uses
N/A
I built a tactics like system for my game, so I can shed some light on this.


Frankly speaking, you will need scripting, at least a little bit of an edit to the picture system at minimum to lock them in place. It can be done via eventing but it's gonna be horribly inefficient so I do recommend a bit of scripting. The simplest way is to have a picture display the range but it's not gonna be dynamic and won't take in consideration collision. Another way is to use multiple of them to build a dynamic system but it's a lot more complicated. If you want elevation in it as well, you increase the complexity again. After that you can change the opacity of pictures to simulate the flashing effect.


Pathfinding and AI is gonna be a huge issue however, I don't know about MV but RPG maker has horrible pathfinding, I had to build my own pathfinding system to get it to work and that was probably the most complicated thing I managed to accomplish. You'll need to build the AI from scratch as well.


In conclusion, I really wouldn't really recommend it with RPG Maker, it's really, really troublesome to get it to work properly, even with some scripting.
 

Mako

Veteran
Veteran
Joined
Mar 13, 2012
Messages
276
Reaction score
48
First Language
English
Primarily Uses
I'm noticing that on even small maps a severe frame rate drop. Been racking my brain for days how to cut down on the events. Doesn't seem possible. Thanks for the tip! I'll try that plugin just for the looks but it's the math that is really getting me, I welcome all help.


@Saboera


Actually complex pathfinding is not really needed to duplicate this kind of system. Pathfinding wasn't too hard as I can get away with using a generalized (albet simulated) A* engine as a battle progresses, the player will move characters onto different 'trigger' tiles. These will update the state of the battle. When an enemy is figuring out what to do, it first checks battle state. If the battle state is 1 (just started the battle) then the enemies in the very back of the map will just end their turn (unless you want them to do something different like wander for example). No math or processing required. If their AI requires them to do something, then they have to figure out what to do.


An enemy mage might look like the following.


If I'm miles away from a target, (or if my AI isn't triggered yet) end my turn. (or wander)
Else
Do I have enough mana to cast spell X?
Do I have a list of targets to choose from?
Yes? -> Pathfind and fire the spell
No? -> Do I have a Target I can bash with my staff?
Yes -> Move and hit target
No -> Move towards nearest target.


Using this method I can have "rushers" move 1 or 2 spaces in the direction of any player I choose. Make tweaks where needed. At least this is my concept, can't seem to get it off the drawing board.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
I've moved this thread to VX Ace Support (since you are asking how to implement something through events and not discussing the design of the system itself). Please be sure to post your threads in the correct forum next time. Thank you.


I also only assume you are using Ace because you said "scripts" and you have the early Ace adopter badge, as you didn't say (that I could see) what you're using in your post, and your profile doesn't say what you're using.  The answers given already seem to assume you're using MV.
 
Last edited by a moderator:

Mako

Veteran
Veteran
Joined
Mar 13, 2012
Messages
276
Reaction score
48
First Language
English
Primarily Uses
To Shaz I guess it doesn't really matter what I am using if it gets the job done. I prefer MV, I actually thought I was discussing the design itself and how to implement it. Doesn't really belong in support since it's obvious that it will need both events and scripts....


Meh I can never figure out where to put topics here. I'd move it to MV if you insist, but it could easily end up in Ace or even XP if it gets the job done.
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
Your post made it sound like you were asking how to implement something from the video, and didn't indicate that you were only in the design phase of your project - it sounded like development was already underway and you just needed help getting this particular thing working.  You also said you wanted to do it with events and not scripts, and that's usually an implementation-time issue.  Questions about implementing a mechanic go in the appropriate support forums.  Questions about how a mechanic should work (the rules, how it should behave) go in the forum where you posted.


This is why I moved it - I thought you were asking HOW to implement something.
 
Last edited by a moderator:

Mako

Veteran
Veteran
Joined
Mar 13, 2012
Messages
276
Reaction score
48
First Language
English
Primarily Uses
Geez what a convoluted system. How something "should" behave is really the perception of the player. Can just as easily shove all those forums into the general discussion. I am asking HOW and asking the best way to go about achieving this (regardless of maker) with as little scripting as possible. Non specific to maker since eventing really hasn't changed...


But anyhow asinine forum management aside, picture attached to the players position did the trick I think. Got it so the player can only move within the set boundaries. Still an IMMENSE amount of lag though it's probably unattainable without scripting.  

You also said you wanted to do it with events and not scripts,

Preferably -not- through scripting.


Key word located in the original post.
 
Last edited by a moderator:

HexMozart88

The Master of Random Garbage
Veteran
Joined
May 15, 2016
Messages
1,879
Reaction score
3,349
First Language
English
Primarily Uses
RMVXA
So, doing the selector is probably the easiest part. You set a variable for the events and have a show picture and move picture using the variables. The grid spaces may be harder, but I suppose you could use regions. The only thing is I don't know how to change the colour of the tiles. (All of this that I am telling you is for Ace by the way.)
 

Mako

Veteran
Veteran
Joined
Mar 13, 2012
Messages
276
Reaction score
48
First Language
English
Primarily Uses
So, doing the selector is probably the easiest part. You set a variable for the events and have a show picture and move picture using the variables. The grid spaces may be harder, but I suppose you could use regions. The only thing is I don't know how to change the colour of the tiles. (All of this that I am telling you is for Ace by the way.)


Does it specifically apply to Ace? Regions and moving picture through variable aren't Ace specific... Could you provide more detail please? :)
 

HexMozart88

The Master of Random Garbage
Veteran
Joined
May 15, 2016
Messages
1,879
Reaction score
3,349
First Language
English
Primarily Uses
RMVXA
Ace is what I am currently using, and I have no idea what the event system in MV is like. I can make something quickly if you like and give you a screenshot. 


I am rather naive to other types of RPG Makers as Ace is the only one I've ever used. 
 

Mako

Veteran
Veteran
Joined
Mar 13, 2012
Messages
276
Reaction score
48
First Language
English
Primarily Uses
Ace is what I am currently using, and I have no idea what the event system in MV is like. I can make something quickly if you like and give you a screenshot. 


I am rather naive to other types of RPG Makers as Ace is the only one I've ever used. 


Sure that be great! Yeah MV and Ace have 99% (if not 100%) the same eventing system. So it should be cross comparable.
 

HexMozart88

The Master of Random Garbage
Veteran
Joined
May 15, 2016
Messages
1,879
Reaction score
3,349
First Language
English
Primarily Uses
RMVXA
Alright, so, slight change of plans. I have to go to bed right now, so I will try to make the event for tomorrow evening when I get the chance. 
 

Saboera

Veteran
Veteran
Joined
Dec 20, 2012
Messages
63
Reaction score
66
First Language
French
Primarily Uses
N/A
How many events are you using and why?


You should probably try and setup the technical side in advance, I don't know if this is gonna help but here's how I did it.


I have about 50 active events on a map during battles. Using Effectus from Rpg maker source, I have a steady 60 fps, unless I'm running the pathfinding where the game drops in the 50s for about 4-5 sec while the AI establish it's potential move routes and make their decision. Staying vanilla, without Effectus, it dips in the mid 50s and in the 30s-40s when pathfinding. To note, I did have to slightly make modification in Effectus to fix bugs related to my system.


All in all, I got


4 events for my playable characters


13 to apply effects specific to these characters


10 for enemies


10 for interactive objects/ NPCs if I want


10 for temporary effects,


2 for cursors


1 for localized settings on the map


Most of those events are for position tracking and graphic display only. The actual combat engine runs in the background via common events, some being in parallel process for stuff like input detection.


My picture system is pretty modified but it runs the entire interface and the dynamic grid system I got rolling.


Maps are built via a custom parallax mapping system that uses pictures mostly for everything beyond the base ground floor.


Collision and elevation are tracked via Terrain ID, 0 is not passable and everything from 1 to 7 tracks elevation, my events can't move to different elevations unless they can jump that high. I don't use the default RPG maker collision for battles, terrain IDs and Regions replace it, it allows a lot more flexibility.


Regions are use for trigger zones and special stuff, basically any objects that I could leap over (like a fence), ramps or anything else really.


AI is using a different technique, basically I attribute a variable to each possible targets/big decisions, then it runs a gauntlet of factors that can modify these variables like a score system depending on a set of quirks attributed. The AI takes decisions based on those scores which allows emergent behavior and if they act weirdly or stupidly, it's only a matter of adjusting the modifiers numbers. This makes it a lot harder to exploit AI and easy to add stuff for them to take in consideration.


It's all about 90% eventing and 10% scripting. Script calls here and there and a few scripts have been modified.


I can go in more details on specific things if you want but I hope it can give you a general idea.
 
Last edited by a moderator:

Johan Liebert

Villager
Member
Joined
Apr 6, 2016
Messages
12
Reaction score
1
First Language
French
Primarily Uses
Hello saboera. I'm really interessted by your way to approach this. What do you mean by 13 events for special effets and 10 for temporary effects and how do you handle the parameters of 10 ennemies. I did mine with 8 and it was tedious. For the grid system,  let say my hero has 4 movement points  I got the engine to check wether or not the next step is passable and draw a square at that exact position. I really like your use of regions and terrain id. I think I need to restart mine from scratch. And how do you manage skills &  ennemy skills? I use rm mv. 
 

HexMozart88

The Master of Random Garbage
Veteran
Joined
May 15, 2016
Messages
1,879
Reaction score
3,349
First Language
English
Primarily Uses
RMVXA
Probably a little late, but I have figured out something a bit simpler and using less events.


- 1 for player location and region


- 1 to show picture of darkened tiles for each region


- 1 number input event so player can choose how many spaces to move


-  enemy events


- 1 for selector that moves to the correct position on player input


That would be four events plus your enemy events (Though most of those are a matter of copying and pasting). 


Apologies for the late reply!
 

Johan Liebert

Villager
Member
Joined
Apr 6, 2016
Messages
12
Reaction score
1
First Language
French
Primarily Uses
please can you explain how you actually did it? 
 

HexMozart88

The Master of Random Garbage
Veteran
Joined
May 15, 2016
Messages
1,879
Reaction score
3,349
First Language
English
Primarily Uses
RMVXA
Event 1: 


Control Variables: [player x] = Player's Map X


Control Variables: [player y] = Player's Map Y


Get Location Info: [player region], Region ID, Variable [0004][0005]


(Same event can check enemy location in a similar way)


Event 2: 


Conditional Branch: [player region] = 1


Conditional Branch: [enemy region] = 2


Show Picture 1: "Region 1" (All default options)


Branch End


Branch End


(Repeat for every region combination of player and enemy) 


Event 3: 


Page 1 :


Conditional Branch: [player region] = 1


Conditional Branch: [enemy region] = 2


Control Switches: [number input] 


Branch End


Branch End


Page 2: 


Conditional Branch: Script: Input.trigger?:)UP)


Conditional Branch: [numbers] < 3


Control Variables: [numbers] += 1


Branch End


Branch End


Conditional Branch: Script: Input.trigger?:)DOWN)


Conditional Branch: [numbers] > 0


Control Variables: [numbers] -= 1


Branch End


Branch End


Conditional Branch: [numbers] = 0 


Show Picture 2: (Name it whatever, looks like regular number scene, default coordinates) 


Branch End


(Do this up until variable gets to three, changing graphic each time.) 


Conditional Branch: Script: Input.trigger?:)C)


Conditional Branch: [numbers] = 0 


Erase Picture 2


Set Move Route: Player 


> Move Left


Branch End


(Only after you have filled in all region combinations would you end the other conditional branch)


Event 4: 


Show Picture 2: player x, player y


Enemy Events: 


Wait: 180 Frames


Set Move Route: This Event


> Move at random


Events 1 and 2 are Parallel Process. Event 3 page 1 is Action Button, and page 2 is Autorun.


Event 4 is Action Button and the enemy events are Parallel Process.  
 

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

Latest Threads

Latest Posts

Latest Profile Posts

People3_5 and People3_8 added!

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.

Forum statistics

Threads
105,868
Messages
1,017,096
Members
137,587
Latest member
Usagiis
Top