Olivia's horror effects plugin doesn't work in canvas mode ?

Emz0

Villager
Member
Joined
Nov 6, 2019
Messages
13
Reaction score
2
First Language
french/français
Primarily Uses
RMMV
Hi.

I purchased Olivia's horror effects plugin, and it doesn't appear to work in canvas mode. Is it normal ? I have RMMV 1.6.1.

Thanks for helping.

EDIT : It seems that I posted in the wrong section and I can't move it. :(
 

Emz0

Villager
Member
Joined
Nov 6, 2019
Messages
13
Reaction score
2
First Language
french/français
Primarily Uses
RMMV
So bad. :(

Is there a way to know if the game is played in canvas or webgl mode, and save this information in a variable, or maybe with a switch, so I can adapt is comportement ?

Thanks, anyway.

EDIT : Hm, it appears to don't work at all, in my project, even in webGL mode. Without any plugin, when I load a previous save, it returns :

Code:
rpg_managers.js:1943 SyntaxError: Unexpected token u in JSON at position 0
    at JSON.parse (<anonymous>)
    at Function.JsonEx.parse (rpg_core.js:8971)
    at Function.JsonEx.makeDeepCopy (rpg_core.js:9014)
    at Game_Follower.refresh (Olivia_HorrorEffects.js:936)
    at Game_Followers.<anonymous> (rpg_objects.js:8114)
    at Array.forEach (<anonymous>)
    at Game_Followers.forEach (rpg_objects.js:8103)
    at Game_Followers.refresh (rpg_objects.js:8113)
    at Game_Player.refresh (rpg_objects.js:7441)
    at Game_Player.refresh (Olivia_HorrorEffects.js:892)
And with only yep core engine :

Code:
YEP_CoreEngine.js:1098 SyntaxError: Unexpected token u in JSON at position 0
    at JSON.parse (<anonymous>)
    at Function.JsonEx.parse (rpg_core.js:8971)
    at Function.JsonEx.makeDeepCopy (rpg_core.js:9014)
    at Game_Follower.refresh (Olivia_HorrorEffects.js:936)
    at Game_Followers.<anonymous> (rpg_objects.js:8114)
    at Array.forEach (<anonymous>)
    at Game_Followers.forEach (rpg_objects.js:8103)
    at Game_Followers.refresh (rpg_objects.js:8113)
    at Game_Player.refresh (rpg_objects.js:7441)
    at Game_Player.refresh (Olivia_HorrorEffects.js:892)
:(
 
Last edited:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,950
Reaction score
13,585
First Language
English
Primarily Uses
RMMV
There are often errors when you add a plugin and then resume a previously-saved game. To be sure it's an issue with the plugin, you should start a new game after adding it and setting up all the required parameters/settings/note tags.
 

Emz0

Villager
Member
Joined
Nov 6, 2019
Messages
13
Reaction score
2
First Language
french/français
Primarily Uses
RMMV
The problem is that I can't simply start a new game, since first episodes have been distributed... So I suppose I can't add this plugin.:LZSsad:

So, I can't use this plugin in the first part of the game, that is not really important. But after a certain time, the user must restart a new game, whose behavior is altered by the content of text files (as I said here : https://forums.rpgmakerweb.com/index.php?threads/solved-change-playtime.116075/).
At this time, these kinds of plugins will be usefull.

So, here we go again : is there a way to check if the game runs in Canvas or WebGL mode, and store the result, to adapt game's behavior ?
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,950
Reaction score
13,585
First Language
English
Primarily Uses
RMMV
The issue with saved games is that some plugins set up data when the game starts, and saves that with the player's progress. So it expects to be able to pull that data from save files. If you start a game and save it, then add such a plugin, that data is not available and will give an error.

Note, I said above that SOME plugins do this. You have not actually established that this is what's happening here. It might be something completely different. It seems like an unusual error message, as if there might be something weird in note tags of the object (player/follower?) that it's trying to copy. It would be worth figuring out what the actual issue is first, rather than assuming, as it may be completely unrelated to save files.

However, even if you do establish that, you can only enable/disable plugins at runtime if the plugin has been written in a way to allow this. Most would not be. And as this is a paid plugin, only Javascript programmers who also have the plugin will be able to help you change that. Another option (if the issue is the save file thing) would be a patch that first checks when a save file is loaded, to see if the data is there, and if it is not, to create it.


But to directly answer your question, this comes from rpg_sprites.js and is how the game tells what mode it's running in:
Code:
Spriteset_Map.prototype.createTilemap = function() {
    if (Graphics.isWebGL()) {
        this._tilemap = new ShaderTilemap();
    } else {
        this._tilemap = new Tilemap();
    }
That might be difficult to use though, as if you wanted to put it into an event command, the save file has already been loaded (or attempted) by the time any map opens, so the check may not be done in time to prevent the error.


So, step 1 is still to figure out what's causing the error message.
 
Last edited:

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,277
Reaction score
11,672
First Language
English
Primarily Uses
RMVXA
[DPOST]Emz0[/DPOST]
If you want to add something, just use the Edit button on your post and type in the additional info/comment.
 

Emz0

Villager
Member
Joined
Nov 6, 2019
Messages
13
Reaction score
2
First Language
french/français
Primarily Uses
RMMV
0ups, sorry. :( I will not doing again.

Thanks, Shaz ! You're really helpful.

I think it's this plugin whose fail to load data from the save, as you said, cause it happens only with this plugin and my old saves, no matters if there is or not another plugin installed. But if I start a new game, everything works fine.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,950
Reaction score
13,585
First Language
English
Primarily Uses
RMMV
Hmmm ... so it is only previously-created save files.

But this error is just weird ...
Unexpected token u in JSON at position 0

Unfortunately, because it's a paid plugin and I don't have it, I can't look at the code to see what's happening. Perhaps someone else who has this plugin and knows javascript might be able to write you some kind of updater.
 

caethyril

^_^
Veteran
Joined
Feb 21, 2018
Messages
1,841
Reaction score
1,305
First Language
EN
Primarily Uses
RMMZ
Hmmm ... so it is only previously-created save files.

But this error is just weird ...
Unexpected token u in JSON at position 0
That error can occur when the first argument of JSON.parse is undefined, e.g.
JavaScript:
JSON.parse();   // throws "token u" error
Not sure what the precise cause may be in this case, though... :kaoslp:
 

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

Latest Threads

Latest Profile Posts

When a parent (of a less than adult aged child) is like
"Oh, I'm like a friend to my child. We're friends."
I'm like
"Oh, that kid's gonna suck...."
Baby tiger gets a belly rub! ^.^
Ami
--- Friendship System ---

(F.Mage and F.Healer's FP is 100)
F.Mage: We did it! we can beat the monster easily!
F.Healer: With the Friendship System,we got stronger thanks to you F.Mage (Hugging)
F.Mage: (Blushing) Ahh...don't say like that. we are Best Friend Forever.
(In Distand)
M.Mage: They look happy...
M.Healer: Yeah...always like that...

Forum statistics

Threads
103,284
Messages
998,581
Members
134,792
Latest member
Mid_Miester
Top