Candacis

Pixel Pusher
Restaff
Joined
May 2, 2012
Messages
1,756
Reaction score
2,829
First Language
German
Primarily Uses
I just wanted to say thanks for the great animated tile plugin. The waterfalls look so much prettier with 3 frames than just 2 frames. Thank you!
 

Jeremyr

Villager
Member
Joined
Jun 13, 2019
Messages
17
Reaction score
6
First Language
English
Primarily Uses
RMMV
Hey Caethyril, I was wondering if it was possible to make it so that, the custom popups in OnUseEffects, could have their own custom offsets positions, so that you could control things a little bit more. I was kind of doing this myself changing the popup position itself based on when the condition was meet, but thought I'd ask you, you might be able to make the process much cleaner.
 

caethyril

^_^
Global Mod
Joined
Feb 21, 2018
Messages
4,646
Reaction score
3,775
First Language
EN
Primarily Uses
RMMZ
@Jeremyr - currently, Cae_OnUseEffects positions custom popups at:
  • Base position: damageOffsetX, damageOffsetY (from core scripts)
  • Shift per visible popup: 8 px ->, <text height> px up (mimics core scripts)
What sort of change are you wanting? E.g. should the offsets be:
  1. The same for all battlers?
  2. Fixed-value, e.g. +20 px, or scripted?
  3. Defined per popup type, or apply equally to all popups?

In case it helps, I wrote this simple plugin for RMMV...not sure if it'll work in MZ.
It's designed to affect all popups, but has per-battler eval support via notetags.
 

Jeremyr

Villager
Member
Joined
Jun 13, 2019
Messages
17
Reaction score
6
First Language
English
Primarily Uses
RMMV
@Jeremyr - currently, Cae_OnUseEffects positions custom popups at:
  • Base position: damageOffsetX, damageOffsetY (from core scripts)
  • Shift per visible popup: 8 px ->, <text height> px up (mimics core scripts)
What sort of change are you wanting? E.g. should the offsets be:
  1. The same for all battlers?
  2. Fixed-value, e.g. +20 px, or scripted?
  3. Defined per popup type, or apply equally to all popups?

In case it helps, I wrote this simple plugin for RMMV...not sure if it'll work in MZ.
It's designed to affect all popups, but has per-battler eval support via notetags.
Making them defined per popup, so like another parameter option when you created one. If it isn't easy to make them individual it's ok, just thought I'd ask and see.
 

caethyril

^_^
Global Mod
Joined
Feb 21, 2018
Messages
4,646
Reaction score
3,775
First Language
EN
Primarily Uses
RMMZ
@Jeremyr: ah, I don't think I'll add that any time soon. Will keep a note of it as a feature suggestion, though! :kaohi:
 

Jeremyr

Villager
Member
Joined
Jun 13, 2019
Messages
17
Reaction score
6
First Language
English
Primarily Uses
RMMV
@Jeremyr: ah, I don't think I'll add that any time soon. Will keep a note of it as a feature suggestion, though! :kaohi:
I have another question in regards to the conditions for the popups. Using VisuStella plugin's, let's say you wanted a popup to appear, after a condition was meet within, <JS Pre-Damage as Target> or <JS Post-Damage as Target>, the popup will not appear until the next attack.

Using the <JS Post-Apply as Target>, alone to meet the condition will work first attack, except for when there is also another condition first.

Example: If my popup condition parameter was, return target.getStateDisplay(52) == 1; then, my state or skill was something like this.

<JS Post-Apply as Target>
if (value > 0) {
target.setStateDisplay(52, 1);
}
</JS Post-Apply as Target>
It will not popup, till the next attack, though if you removed the if statement, it will popup first attack.
Am I doing something wrong, is there maybe a problem with when, the popup checks the condition before the VisuStella's stuff, or is it just not something the plugin can do? One other thing to note, if you change the if (value > 0), to (target.hp > 0), it will work, so maybe I'm not defining the terms in your plugin for it to know?
 

caethyril

^_^
Global Mod
Joined
Feb 21, 2018
Messages
4,646
Reaction score
3,775
First Language
EN
Primarily Uses
RMMZ
I have another question in regards to the conditions for the popups. Using VisuStella plugin's, let's say you wanted a popup to appear, after a condition was meet within, <JS Pre-Damage as Target> or <JS Post-Damage as Target>, the popup will not appear until the next attack.
Cae_OnUseEffects evaluates the popup conditions immediately before applying the damage to the target (aimed at Game_Action#executeDamage). This is a deliberate design choice in order to offer more information in the conditions, e.g. target HP before receiving damage. So yes, I believe this is the problem:
...is there maybe a problem with when, the popup checks the condition before the VisuStella's stuff...

Suggestions:
  • Use a different Battle Core notetag? Pre-Damage might work if you load my plugin before VisuStella MZ Battle Core, since they attach to the same point in the core scripts. I haven't tested, though: that may break some features of OnUseEffects.

  • Work around it by doing the relevant check(s) in the custom popup condition, e.g.
    JavaScript:
    if (target.isStateAffected(52)) {
      if (value > 0) {
        target.setStateDisplay(52, 1);
        return true;
      }
    }
    return false;
    I know that's not ideal, though. :kaoslp:
 

Jaybeats90

Warper
Member
Joined
Oct 17, 2022
Messages
2
Reaction score
0
First Language
English
Primarily Uses
RMMZ
Hi I'm running into a problem using this plugin with FOSSIL and Yep_EquipBattleSkills , it works until I try equipping a skill slot with no skill. it then returns "Type Error Cannot read property "id" null"
Is there an easy fix for this problem? Thanks as it's an awesome plugin and really enjoyed using it so far!
 

caethyril

^_^
Global Mod
Joined
Feb 21, 2018
Messages
4,646
Reaction score
3,775
First Language
EN
Primarily Uses
RMMZ
Hi I'm running into a problem using this plugin with FOSSIL and Yep_EquipBattleSkills , it works until I try equipping a skill slot with no skill. it then returns "Type Error Cannot read property "id" null"
Is there an easy fix for this problem? Thanks as it's an awesome plugin and really enjoyed using it so far!
I'm not sure if you posted in the correct place. Does the problem occur in a new project with only FOSSIL and YEP_EquipBattleSkills, no other plugins?

If this is related to one of my plugins, please follow the troubleshooting steps in the opening post:
This information can help to fix the problem faster:
  • Instructions stating how to reproduce the problem in a new project.
    (If I can't reproduce the problem, I probably can't help you.)
  • A screenshot of the console when the unexpected behaviour occurs.
    (You can open the console by pressing F8 during test-play.)
 

Tea++

I'm human
Staff member
Admin
Joined
Mar 28, 2017
Messages
1,316
Reaction score
3,255
First Language
English
Primarily Uses
RMMZ
Hello Caethyril! :LZSjoy: I'm currently trying to use your picture touch plugin to display a picture when another picture is being hovered over, but the enter and leave triggers don't appear to be working consistently. They both seem to trigger when the mouse hovering over the picture and when it's not. I've gotten the picture to appear very briefly a few times, but most of the time it doesn't even appear.

I made a video to better illustrate what I mean.
https://youtu.be/JiMeEcWFgDY

Here's how I have it set up:
1674855427059.png
1674855121636.png1674855082408.png
 
Last edited:

caethyril

^_^
Global Mod
Joined
Feb 21, 2018
Messages
4,646
Reaction score
3,775
First Language
EN
Primarily Uses
RMMZ
@Tea++ - the video is very helpful, thanks! I was confused for a few minutes, but I think I see what's happening now. :kaophew:
The plugin has an "opacity hitbox" feature, controlled by its Minimum Opacity parameter. By default (and in your screenshot) that parameter is set to 1, i.e. any fully-transparent pixels count as "not in the picture".

If you carefully step through your video frame by frame (, and .), you can see when the cursor enters and leaves the text (black/opaque) areas of the picture. These seem to correspond to the number of messages shown.

The opacity check is also the only thing the plugin changes regarding enter/leave hit tests: everything else is handled by the core scripts.
Some possible solutions:
  1. Change the plugin's Minimum Opacity parameter to 0, to disable its opacity check.

  2. Change the opacity/alpha of the backgrounds for your menu pictures so that they're at or above the Minimum Opacity threshold.

  3. Turn on the Disable on Trigger parameter, and add an Enable Trigger plugin command to the end of each of your picture-bind events, e.g.

    ◆Text:None, None, Window, Bottom : :Enter! ◆Plugin Command:Cae_PictureTouch, Enable/Disable Bind : :Action = Enable : :Picture ID = 1 : :Trigger = Enter
    The bind will get disabled once it triggers (reserved common event) and will be enabled again when the event is complete. It's there to help prevent queueing the same event bind multiple times.
 

Tea++

I'm human
Staff member
Admin
Joined
Mar 28, 2017
Messages
1,316
Reaction score
3,255
First Language
English
Primarily Uses
RMMZ
Thank you so much for your help! It seems to have helped a bit, but it's still not doing exactly what I was hoping for. Maybe it's because I have 5 pictures each with 3 triggers?

I changed the settings like you suggested and my pictures are all 255 opacity.

Here's another video to show what's happening with these settings. (just in case it isn't immediately apparent, I'm trying to create a hover effect, but with a picture instead of tinting.)



Here's my settings:
1674934984561.png
1674935024739.png
1674935037791.png
1674935074822.png
 

caethyril

^_^
Global Mod
Joined
Feb 21, 2018
Messages
4,646
Reaction score
3,775
First Language
EN
Primarily Uses
RMMZ
@Tea++ - oh. I'm not sure why you're seeing it behave like in your video. Perhaps it's related to multiple/overlapping pictures...I don't remember how much testing I did with multi-picture setups. :kaoslp:

The triggers are handled separately, each one via the core scripts as mentioned: trigger count shouldn't be a problem. The click handler at 0:09 seems to function correctly, but the highlight pics 11~15 seem to appear for 1 (?) frame before resetting to the "New Game" highlight. Are you sure nothing else is calling common event 208? I'm not sure why it would reset like that, otherwise. :kaoswt:

You only need to bind the events once: your Parallel event currently repeats every frame, so I'd suggest adding an Erase Event command at the end. I don't think that alone will fix or change what you're seeing, but I'd suggest double-checking for other repeating Parallel/Autorun events.

(For clarity: when I mentioned opacity, I wasn't just talking about the opacity value seen in the Show/Move Picture commands. I meant the final alpha channel value of the pixel in the picture at the current location of the cursor. It looked like your pictures were transparent with black text? It's a non-issue with Minimum Opacity set to 0, though, because that disables the plugin's opacity testing.)

I'll see about making a small "picture menu" demo, that may help to highlight the problem. Might take a few days but I'll reply here and/or send you a message or something~ :kaohi:
 

Tea++

I'm human
Staff member
Admin
Joined
Mar 28, 2017
Messages
1,316
Reaction score
3,255
First Language
English
Primarily Uses
RMMZ
Thank you! I'll try that out and let you know, I haven't had a chance to try it yet. :LZSsmile:
 

caethyril

^_^
Global Mod
Joined
Feb 21, 2018
Messages
4,646
Reaction score
3,775
First Language
EN
Primarily Uses
RMMZ
@Tea++ - in case it helps, I just finished up that little demo. I didn't run across any problems with the plugin...there were a couple of issues with my event logic, but I think those are fixed now. :kaoswt:
It's a little menu of 3 commands that supports button & touch input. It's mostly the same as a typical button-only picture menu: a loop of checking button states every frame. The touch binds interface with that by setting the selected menu index (a variable) and turning on an "OK" switch. The usual "is OK triggered" check just turns on that switch rather than processing immediately. The switch is checked near the end of the loop: if it's on, the "OK" action gets processed for the selected index.

I also bound some console message scripts to the Leave and Press triggers as an example for debugging. It's a good way to check when the binds are actually activating, since script binds process immediately: they don't have to wait for the main interpreter or the Show Text window to be free.

The spinning green triangle that appears is clickable (if you can catch it) and goes blue when you hover it. I was going to add some actual examples behind the "Example" commands, but then I realised they were pretty much just different layouts/appearances of the 1-column menu.
Here's the demo link for anyone interested~
Hopefully you get it working! :kaohi:
 

kouta555

Villager
Member
Joined
Sep 13, 2016
Messages
15
Reaction score
3
First Language
Russian
Primarily Uses
RMMZ
Thank you Very much! The instant step plugin Perfectly work in MV! That thing with switch very usefull:yswt:
 

Willibab

The Lord of Whackery
Veteran
Joined
Jun 22, 2017
Messages
677
Reaction score
1,790
First Language
Norwegian
Primarily Uses
RMMZ
Hey, im using your CAE_OnHitEffect (In this case for the subskills) in conjuncture with VE_Materia and have been trying to make the materia (They are basically just Armor slot items) work like modifiers for spells.

I was wondering if there is a way to reverse the way it works. So instead of adding <subskills: > notetag to the main skill, to instead have it on the subskill.

How it currently is, if I equip two materias I get two separate skills, each with their own modifier (subskill). Unless I add all subskills to one ofc but I want them all to have 1 each so the player has to choose.
1.png

How I would like it would be that you learn the main skill Fire from an external source (your class for example)

And when you equip a materia called ''Fire Blast'' that main skill gains the subskill option.
And when I equip ''Fire Blast'' and another materia called ''Fire Purge'' I get both.

2.png

Would this be possible or would it became an entirely new plugin at that point? xD
 

caethyril

^_^
Global Mod
Joined
Feb 21, 2018
Messages
4,646
Reaction score
3,775
First Language
EN
Primarily Uses
RMMZ
@Willibab - so you want the subskill selection to appear only if they know Fire Purge and/or Fire Blast, right? If so, I think you could use a scripted tag for that, e.g. (untested):

<subskills: const s = subject.skills(); const r = [10]; for (const subskillId of [11, 12]) if (s.some(o => o.id === subskillId)) r.push(subskillId); if (r.length === 1) return []; // empty return r; >
In theory this will return [] (empty array) if neither of the subskills are available, which should skip the subskill selection. This example assumes the parent skill (Fire) is ID 10, and the subskills (Purge & Blast) are IDs 11 and 12; replace these numbers as appropriate~

Alternatively you could try this little patch to automatically do that for any subskill list that only contains the parent skill (also untested):
JavaScript:
/*:
 * @target MZ
 * @plugindesc Cae_OnUseEffects patch - if a skill has only itself as a subskill, skip subskill selection.
 * @author Caethyril
 * @url https://forums.rpgmakerweb.com/threads/125657/
 * @help This patch is free to use and/or modify for any project, no credit required.
 * @base Cae_OnUseEffects
 * @orderAfter Cae_OnUseEffects
 */
void (alias => {
  CAE.OnUseEffects.subskill.get = function(skillId, subject) {
    const res = alias.apply(this, arguments);
    if (res.length === 1 && res[0].id === skillId)
      return [];
    return res;
  };
})(CAE.OnUseEffects.subskill.get);
 

Willibab

The Lord of Whackery
Veteran
Joined
Jun 22, 2017
Messages
677
Reaction score
1,790
First Language
Norwegian
Primarily Uses
RMMZ
I had more plans today then expected :p

@Willibab - so you want the subskill selection to appear only if they know Fire Purge and/or Fire Blast, right? If so, I think you could use a scripted tag for that, e.g. (untested):

<subskills: const s = subject.skills(); const r = [10]; for (const subskillId of [11, 12]) if (s.some(o => o.id === subskillId)) r.push(subskillId); if (r.length === 1) return []; // empty return r; >

Tried this with my skills id's and got this.
error.png
error2.png


In theory this will return [] (empty array) if neither of the subskills are available, which should skip the subskill selection. This example assumes the parent skill (Fire) is ID 10, and the subskills (Purge & Blast) are IDs 11 and 12; replace these numbers as appropriate~

Alternatively you could try this little patch to automatically do that for any subskill list that only contains the parent skill (also untested):
JavaScript:
/*:
 * @target MZ
 * @plugindesc Cae_OnUseEffects patch - if a skill has only itself as a subskill, skip subskill selection.
 * @author Caethyril
 * @url https://forums.rpgmakerweb.com/threads/125657/
 * @help This patch is free to use and/or modify for any project, no credit required.
 * @base Cae_OnUseEffects
 * @orderAfter Cae_OnUseEffects
 */
void (alias => {
  CAE.OnUseEffects.subskill.get = function(skillId, subject) {
    const res = alias.apply(this, arguments);
    if (res.length === 1 && res[0].id === skillId)
      return [];
    return res;
  };
})(CAE.OnUseEffects.subskill.get);

This didn't do anything but maybe I did it wrong, I tried a ton of combinations.

Attempt.png

Maybe just say how its should be done and I'll see what I possibly did wrong. (Screenshot of how it works normally before the patch, just using Fire Purge for ease)

What should the note be in 362 (Fire) and/or in 363 (Fire Purge)?
 

Latest Threads

Latest Posts

Latest Profile Posts

Life is strange. I am currently in a train-the-trainer course for Fraud Docs and Counterfeiting Techniques. And our assignment last night was to make several counterfeit documents using simple tools like Paint and such. And I actually learned stuff that might be helpful in trying to make/edit things for RM assets. I don't think that is what the course developer had in mind! :)
Onward to more RM game dev glory.... in about 14 minutes. :LZSexcite:
grief rpg maker... why oh why did I have to jump through like 30 hoops to (hopefully) have fixed the engine targeting ko'd people during multi hit/random attacks?

Forum statistics

Threads
131,712
Messages
1,222,442
Members
173,452
Latest member
FalseCrow
Top