# QPlugins - Latest: QABS

#### horror_n_oates

##### Villager
Hey, been looking through the posts here and had a question concerning QMovement and diagonal directions.

I've been using QMovement and CollisionMap for a project, but was wondering if I could adjust the diagonal directions from 45 degrees to 22.5 degrees to accommodate certain isometric maps.

Below is an example of the kind of isometric map I was trying to accommodate:

Main difference from conventional isometric maps is the lower "slope" of the diagonal lines; the movement in the above game also handles diagonal movement on a lower "slope". (Slope like diagonal movement at, instead of a 45 degree angle, a 22.5 degree angle)

Things I tried to replicate this include changing how diagonal directions are defined in QPlus.
Looking through this thread, I found this snippet that I think somewhat does that:

Code:
dir = dir || this._direction;
if (dir === 2) return Math.PI / 2;
if (dir === 4) return Math.PI;
if (dir === 6) return 0;
if (dir === 8) return Math.PI * 3 / 2;
if (dir === 1) return Math.PI * 5 / 6;
if (dir === 3) return Math.PI / 6;
if (dir === 7) return Math.PI * 7 / 6;
if (dir === 9) return Math.PI * 5 / 3;
return 0;
};

if (useDiag) {
// use degrees for diagonals
// since I don't know clean PI numbers for these degrees
var deg = radian * 180 / Math.PI;
if (deg >= 22.5 && deg <= 67.5) {
return 3;
} else if (deg >= 112.5 && deg <= 157.5) {
return 1;
} else if (deg >= 202.5 && deg <= 247.5) {
return 7;
} else if (deg >= 292.5 && deg <= 337.5) {
return 9;
}
}
return 6;
} else if (radian >= Math.PI / 4 && radian < 3 * Math.PI / 4) {
return 2;
} else if (radian >= Math.PI * 3 / 4 && radian < Math.PI * 5 / 4) {
return 4;
} else if (radian >= Math.PI * 5 / 4 && radian < Math.PI * 7 / 4) {
return 8;
} else if (radian >= Math.PI * 7 / 4) {
return 6;
}
};
I changed the diagonal radian values in the directionToRadian function accordingly, and also tried changing degree values in the radianToDirection function; both don't seem to help with the intended effect.
Unless I'm misunderstanding that the radian values don't determine to what degree a diagonal direction faces, then I may have to look into how movement is updated next.

I appreciate any thoughts on this and hope this was clear enough.

#### horror_n_oates

##### Villager
No clue exactly on that, but you can cheat by using Ultra Mode 7, setting it to whatever tilt you want the map to be, then selecting the option to adjust movement for that. https://forums.rpgmakerweb.com/index.php?threads/ultra-mode-7.94100/
Thanks for the suggestion, played around with the plugin and achieved a similar look with Yaw and Pitch set to 60 and FOV to 0, but the controls seemed problematic, especially combined with QMovement; I've tried toggling the Player_Adjust_Move_Direction parameter to no effect either, but it's understandable as its the camera being changed rather than the movement orientation. If there was a way to shift controls at this perspective (Yaw, Pitch, and FOV) in way where it makes sense from the player's perspective. Will be keeping my eye on this plugin tho.

After some digging in QMovement, I'm still unsure if the diagonally move functions are determined by a fixed definition of orthogonal directions (defined in QPlus) or calculated by a squared GridSize, hence the inability to go below or beyond 45 degrees diagonal movement. Previous posts here have also showed evidence of sprite "slipping" with the gamepad, so I'm assuming the 8 directional movement isn't entirely tile-to-tile accurate, at least with the gamepad.

#### horror_n_oates

##### Villager
So after parsing through QMovement's code for a bit, I found a use-able solution for implementing different degrees (in this case, 22.5 degrees) of orthogonal movement.

Below is what I was able to achieve, sprites and images are all placeholders for testing.

The following block can be found in the moveDiagonally function. The line to be changed is 2633.
Code:
if (this.isMovementSucceeded()) {
this._px = \$gameMap.roundPXWithDirection(this._px, horz, dist+3);        // line 2633, add a "+3" or a "*2" to the "dist" parameter
this._py = \$gameMap.roundPYWithDirection(this._py, vert, dist);
this._realPX = \$gameMap.pxWithDirection(this._px, this.reverseDir(horz), dist);
this._realPY = \$gameMap.pyWithDirection(this._py, this.reverseDir(vert), dist);
this.increaseSteps();
} else {
this.checkEventTriggerTouchFront(this.direction8(horz, vert));
}
So by looking into how the diagonal movement is being updated rather than how direction is defined, I found a few common parameters and deduced that X and Y were constantly being updated at the same rate. Considering how diagonals are drawn in the original example, with 2 pixels moving across and 1 pixel moving up/down, I thought perhaps if the player's X was incremented with a higher value than the Y, a more lateral movement could be achieved. Visually, it seems to work, so long as small values are used (other values would make the player extremely slow or fly off the map).

The 2 values that prove effective on applying to the "dist" parameter for it's X operation are "+3" and "*2"
There does not seem to be anything problematic by applying this small change, but going forward I'll keep an eye out.

Last edited:

#### Scheikowski

##### Villager
It looks like this one is useful.

Code:
if (this.isMovementSucceeded()) {
this._px = \$gameMap.roundPXWithDirection(this._px, horz, dist+1.4);
this._py = \$gameMap.roundPYWithDirection(this._py, vert, dist);
this._realPX = \$gameMap.pxWithDirection(this._px, this.reverseDir(horz), dist+0.1);
this._realPY = \$gameMap.pyWithDirection(this._py, this.reverseDir(vert), dist+0.1);
this.increaseSteps();
} else {
this.checkEventTriggerTouchFront(this.direction8(horz, vert));
}

#### EucliwoodOwlscythe

##### Warper
Hello
I want to change player/event collider during the game, but when I use the qmovement plugin command - nothing is change (I tried different variations) , so i hope you can help me, please!
What could have gone wrong?
It works if i use notetags, but i need these plugin commands!

#### Attachments

• 163.3 KB Views: 7
• 259.4 KB Views: 6

#### nintendowii111

##### Veteran
I can't get YEP_regionevents to work with QMovement. I'm trying to make foot sound effects by calling a common event when player enters a region id but it simply doesnt recognize that its in a region. Any help is greatly appreciated!

#### YoraeRasante

##### Veteran
@nintendowii111 that is weird, I remember I did use them together once in an old project. Not for footsteps though.
Did you try changing the plugin order?

#### nintendowii111

##### Veteran
@nintendowii111 that is weird, I remember I did use them together once in an old project. Not for footsteps though.
Did you try changing the plugin order?
yes i tried putting it above and below, doesn't work ;(

#### YoraeRasante

##### Veteran
Did you try something else, like changing a switch? Also, is your linked event player or event touch? does it work only on first step in the region or not at all?
In my project combining them, I had two regions, one to turn a switch on and the other by its side to turn it off, each event having the condition of the switch being... well, the opposite it turns it into (well, the one for the switch on has ). Not sure if it would repeat at each tile, even if without QMovement...

Oh wait, checking on my old project.. they were on autorun? I... am not sure if that is needed, but it worked I guess.
And QMovement is bellow the Yanfly Region Trigger.

#### nintendowii111

##### Veteran
Did you try something else, like changing a switch? Also, is your linked event player or event touch? does it work only on first step in the region or not at all?
In my project combining them, I had two regions, one to turn a switch on and the other by its side to turn it off, each event having the condition of the switch being... well, the opposite it turns it into (well, the one for the switch on has ). Not sure if it would repeat at each tile, even if without QMovement...

Oh wait, checking on my old project.. they were on autorun? I... am not sure if that is needed, but it worked I guess.
And QMovement is bellow the Yanfly Region Trigger.
I gave up on YEP Region Trigger and tried using Ryusa_FootstepSE. Same issue, nothing happens at all. That plugin also uses Region ID's and also getting no sound. Tried moving it above/below Q plugins and still no luck. Any suggestions? Could you try Using Q plugins with Ryusa_FootstepSE plugin and see could be the problem. Thanks for any help!

#### Sleepy Kitten Games

##### Veteran
If memory serves, somewhere else here in this thread someone shared a possible way to do footstep sounds with QMovement.

#### YoraeRasante

##### Veteran
was it me?
I remember I once editted... I think it was yanfly's footsteps plugin, to play the next step only after the previous ends instead of every move.

#### Sleepy Kitten Games

##### Veteran
I went searching through the thread, and here is the post I was talking about:
It seems like it'd take a lot of work and tweaking. I haven't really tried it myself, I haven't toyed with footstep sounds in a long while.

#### nintendowii111

##### Veteran
I went searching through the thread, and here is the post I was talking about:
It seems like it'd take a lot of work and tweaking. I haven't really tried it myself, I haven't toyed with footstep sounds in a long while.
Appreciate the reply, I actually figured it out

##### Veteran
I'd GREATLY appreciate help with making a simple enemy that shoots only in 1 direction. I'm making a dungeon and want fireballs shot in a single direction. I tried turning the AI off but that causes the event to do NOTHING at all. Please help
I don't know if it works with QPlugins, but try Galv's Map Projectiles. I did the exact same thing you want. I also did with events and a move route, but galv's felt way more fluid.

I can't get YEP_regionevents to work with QMovement. I'm trying to make foot sound effects by calling a common event when player enters a region id but it simply doesnt recognize that its in a region. Any help is greatly appreciated!
It still work, just tested five minutes ago. You have to put region events below all Quxios plugins. The only problem i've found is the region collision box gets halved, so you should use QM Region Colliders to set it to it's normal collision size.

Last edited:

#### StoneoftheWise

##### Warper
It looks like this one is useful.

Code:
if (this.isMovementSucceeded()) {
this._px = \$gameMap.roundPXWithDirection(this._px, horz, dist+1.4);
this._py = \$gameMap.roundPYWithDirection(this._py, vert, dist);
this._realPX = \$gameMap.pxWithDirection(this._px, this.reverseDir(horz), dist+0.1);
this._realPY = \$gameMap.pyWithDirection(this._py, this.reverseDir(vert), dist+0.1);
this.increaseSteps();
} else {
this.checkEventTriggerTouchFront(this.direction8(horz, vert));
}
I am also trying to build an isometric game. But when I try to change this line and test my game I get this error --->"QMovement requires QPlus 1.6.0 or newer to work." Bear in mind I know very little about coding but I did use Sublime Text 3 to open, edit and save. I restored the original js file and all is working again but I would love to be able to implement this change. What am I doing wrong?

#### Scheikowski

##### Villager
I am also trying to build an isometric game. But when I try to change this line and test my game I get this error --->"QMovement requires QPlus 1.6.0 or newer to work." Bear in mind I know very little about coding but I did use Sublime Text 3 to open, edit and save. I restored the original js file and all is working again but I would love to be able to implement this change. What am I doing wrong?
What is the version of your "QPlus" plugin. You can downlad 1.7.1 from Quasi's website. Put it above QMovement plugin.

#### StoneoftheWise

##### Warper
What is the version of your "QPlus" plugin. You can downlad 1.7.1 from Quasi's website. Put it above QMovement plugin.
I've been using QPlus ver 1.7.1 and it is above all other Q plugins as recommended. QMovement was working fine until I changed that one line of code in it. Once I replaced the js file with the original it is functioning again.

#### Yilou

##### Veteran
Maybe someone knows what the problem is?
I use the gavl charactersframe and the QMovement plugin and I can't achieve smooth animation (event).

Event moves higher
The player moves below and has no problems with smoothness.
I also have to make movements with the "Stepping" daw, otherwise the animation is displayed even worse.

When I turn off QMovement there’s no problem. Are these plugins not compatible?

#### Attachments

• 74.7 KB Views: 2

### Latest Profile Posts

AKA VaroClaw
Made a surprising amount of progress in these past two days. Really helps when parallax mapping breaks limitation and allowing me to be creative and make maps that match my vision.
Let's promote our amazing artists in RPG Maker community! I posted right now about my game Phil Alone on Twitter and I decided to thanks Lime Zu, the amazing artist that did all the pixel assets for my game!
I just realised that the reason behind me not being able to make a game may be the lack of my original resources. I just dont like the look of MV faces and sprites, lol. Guess I will have make my own art.
I'm posting a commission art soon!