RPG Maker Forums

standardplayer
standardplayer
Start with States. Set up an 'enum' with the states for the boss. For example, Idle, Moving, Attacking, Evading. Probably a few more you can think of ;) Then, figure out which ones need sub-states, like Attack. Attacking for bosses in action rpgs have at least two main attack patterns, though modern games usually have more
standardplayer
standardplayer
Figuring out the processes within each state is easy enough. You wanna think about the outer part of the process, what enacts each state. Some of it would be randomized, but some would be contextual, like how low is the boss's HP, how low is the player's, how far away is the player. If you separate the process into State Control and Individual State Process, it's much easier to think of
aporokizzu
aporokizzu
@standardplayer thanks- gives me a few things to think about. I think I have something like an enum in place (which I may have to refine based on your tips):

Right now, the boss event has a ._heal property that gets set to true when its HP drops to / below 50%. This property is checked on its movement route and if enabled, calls a Cure command.
aporokizzu
aporokizzu
It also has a ._threatened property, which is activated if a player moves close to the boss event. When this property is enabled, the movement route is interrupted so that (1) a burst defensive attack can be performed and (2) the boss can teleport away from the player (I'm still trying to figure out how to calculate the coordinates of the furthest passable tile from the player).
aporokizzu
aporokizzu
Lastly, it's normal movement route just checks how many minions it has running around the map and if it is less than the specified number, spawns a new minion. If the specified number is maintained, the boss event just moves randomly.
standardplayer
standardplayer
I've seen your code, you're knowledgeable enough to probably extend the Game_Event object in a custom Boss class. You do too much JS to be using move routes for important stuff like boss processes. You can accomplish much more complex stuff more easily if you put those processes on a custom boss object and alias the Scene_Map.prototype.update process to time stuff
aporokizzu
aporokizzu
@standardplayer I had never heard of the term enums until you mentioned it, so now I have some reading up to do. Thanks again!
standardplayer
standardplayer
No prob, just FYI JavaScript doesn't have true enums (at least not last I checked). To pull it off, you just create an object, give it properties that are named and valued just like an enum would be. Then, you call Object.freeze(yourObject) and it will basically be like an enum.
aporokizzu
aporokizzu
@standardplayer Thanks!

I say movement routes, but what I actually did was create a queue within it that lets me do JavaScript commands in an external JSON-
aporokizzu
aporokizzu
I don't know if this is good practice, but it gives me flexibility over controlling the event.
standardplayer
standardplayer
I can't see any of this because it's in your Google Drive, but I think I get what you mean. If you're doing it roughly the way I think you might be, it would be easy to use from a programming standpoint, but sounds like it would be costly for the system to process
aporokizzu
aporokizzu
@standardplayer lol sorry about that. I changed the settings so maybe you can see it now, if you're interested. I basically created a private movement route that uses the JSON commands rather than a movement route list from the engine's own movement route code.
standardplayer
standardplayer
Ok, yeah this is more or less what I thought you were doing. What I was trying to get at is since you already have the logic programmed, and even have the private move route stuff in JSON, it's a shame to do it through an event's move Route. It's gonna cost the system more than if you just aliased the Scene_Map.prototype.update process. You're so very clearly able to almost not even need an event for a boss
standardplayer
standardplayer
Very impressive, too btw. I like that you use let instead of var for everything. Altogether very well put together system!
aporokizzu
aporokizzu
@standardplayer Thanks for the tip- I will refactor accordingly... I will take any system process gains that I can get!
aporokizzu
aporokizzu
@standardplayer lol, I just lifted the code from the rpg_objects I think and reworked it to use the JSON. they use var all over the place in the original code.
standardplayer
standardplayer
var isn't bad to use on it's own, it's just generally better to use let when applicable. Since it defines stuff at block level, it's kind of almost always applicable imo lol. In the RPG base code you'll see var a lot because the code is a bit older, and honestly if you use var correctly, you won't really have an issue with it. My rule about that is to just never declare variables without a qualifier
standardplayer
standardplayer
Even that rule has some bends, though. For example, in our plugins we often start with Imported = Imported || {}; This is technically not breaking that rule, though, because it's 'safe'. It will only create a variable if the variable doesn't exist, so we don't risk overwriting something else at that level.

Latest Threads

Latest Profile Posts

EmptyVoid_ wrote on Leporine's profile.
Just letting you know that I have written a PM to you.
Testing testing. First time doing this.

What are we, facekook?
I feel inspired to write something, but block getting the way
I'll suggest you to enjoy even just for once some swordplay - then try to justify "switch weapon" actions. Magic will be more credible.
My minimap "works" but you see it is so laggy that I need to optimize it heavily. Tryna make a game here, not a slideshow.

Forum statistics

Threads
103,170
Messages
997,774
Members
134,642
Latest member
Dendroidon
Top