Hi everyone! I'm using Firgov's CRT Mode to give my game an old-school feel, but I'd like to turn it off at certain points in order to insert a few cutscenes. The problem is, Firgov didn't include an option to turn the effect off. I'm not very good at coding, so I don't really know how to add something like this in. All I need is a way to turn the effect off and on using a plugin command. Can anyone help me with this?
Can Anyone Help Me Edit This Plugin?
Javascript/Plugin SupportHi everyone! I'm sorry to repost, but I know my issue won't be solved unless I keep people's attention, so if you know how to code, please consider helping me out with this, as I have absolutely no idea what I'm doing. 😅
By the way, I checked the terms of service and it doesn't say people can't edit it anywhere. I've tried messaging Firgov himself, but he doesn't respond.
By the way, I checked the terms of service and it doesn't say people can't edit it anywhere. I've tried messaging Firgov himself, but he doesn't respond.
most can modify, but not repost (which is a different, while it also say it improve overtime,
I dont know when.
Also I dont know how its code, and repost isn't need.
if for 3 days are no respond on your post, you can bump it, but adding a code
or modify it can be hard, sometimes impossible on how the code is written and have
to re-code to get it to work nicely and correctly.
So avoid reposting but bump your own post after 72 hours (3 days)
I dont know when.
Also I dont know how its code, and repost isn't need.
if for 3 days are no respond on your post, you can bump it, but adding a code
or modify it can be hard, sometimes impossible on how the code is written and have
to re-code to get it to work nicely and correctly.
So avoid reposting but bump your own post after 72 hours (3 days)
Merging with your previous thread, please do not make multiple threads for the same problem.
I've moved this thread to Plugin Support. Thank you.
I mean, I feel like it shouldn't be that difficult considering that all the plugin does is show a few images above the map. Also, how do you bump a post? It's always really irritated me that all of these rules/functions are never actually explained to newcomers.
I'm sorry about reposting (nobody ever explained to me how to bump posts, and I'm still trying to figure out how I do that). I'm not particularly sorry about posting in the "wrong" forum because I can never find the "right" forum. This website makes it such a struggle to find anything.
This is exactly what I'm talking about. Why is that hidden behind four pages? Something like that should be front and center. Also, your game looks really cool, did you make the logo yourself? I like it a lot.
Thank you but it was paid work done by @Kich, one of the many pixel artists for Corpse Mansion. He's a really good pixel artist.
Plugin thread (for those interested, download is plugin + necessary image files, a 3 MB zip; same version of plugin as attached here, v1.0a):
forums.rpgmakerweb.com
Looking at the code, the effect is entirely caused by a bunch of sprites layered on top of the usual display. So I suspect you don't need to edit the plugin at all...try this in a Script command:
Firgof's CRT Monitor Effect
Introduction This extractable plug and play addon puts your game-world inside a CRT/LED-hybrid monitor for a unique aesthetic. Features Animated 'buzziness' to simulate authentic CRT-style monitor errors. Support for 'glitchy' behavior, including 'ghosting' and corrupted graphics memory...
Code:
var visible = false; // <- edit this line as needed
var sp = ["1", "2", "3", "4", "4b", "5", "8", "11"];
sp = sp.map(function(s) { return "$crt_overlay" + s; });
sp.forEach(function(s) { window[s].visible = visible; });
It didn't work :/ is there anything else you can think of? I'm sorry to be such a pain but you're the first person who's been able to offer a solution.
this may be a little hacky but it seems to work.. i spent a little time trying to figure out why it works without adding the children back to the scene again which i had typed up already and realized it wasn't needed for some reason lol
Place this code inside the following function, I'll show you where below.
this would make it so if you flip that switch on the effects will turn off and if you flip it off the effects will turn back on. you can change the $gameSwitches.value(1) switch Id to any switch you want.
I still have no idea at this time why it works without adding the children again when the switch changes but whatever? lol. I'm 100% sure theres a better way to handle this but that would require digging much further than I have time to right now. It already seems wonky that this works without adding the children back into the scene. :mrsatan:
JavaScript:
if ($gameSwitches.value(1)) {
if ($crt_overlay1.parent) {
this.removeChild($crt_overlay1);
this.removeChild($crt_overlay3);
this.removeChild($crt_overlay2);
this.removeChild($crt_overlay8);
this.removeChild($crt_overlay11);
this.removeChild($crt_overlay4);
this.removeChild($crt_overlay5);
}
}
Place this code inside the following function, I'll show you where below.
JavaScript:
var _Firgof_CRTLED_update = Scene_Map.prototype.updateChildren;
Scene_Map.prototype.updateChildren = function() {
if ($gameSwitches.value(1)) {
if ($crt_overlay1.parent) {
this.removeChild($crt_overlay1);
this.removeChild($crt_overlay3);
this.removeChild($crt_overlay2);
this.removeChild($crt_overlay8);
this.removeChild($crt_overlay11);
this.removeChild($crt_overlay4);
this.removeChild($crt_overlay5);
}
}
$gameScreen.startZoom($gamePlayer.screenX(), $gamePlayer.screenY(), 2.5, 1);
if (Math.random() >= 0.25 ){
var now = Date.now();
if (now <= nextUpdate){
var target = $crt_overlay4.bitmap;
var height = SceneManager._screenHeight*Math.random();
var off = SceneManager._screenHeight*Math.random();
this would make it so if you flip that switch on the effects will turn off and if you flip it off the effects will turn back on. you can change the $gameSwitches.value(1) switch Id to any switch you want.
I still have no idea at this time why it works without adding the children again when the switch changes but whatever? lol. I'm 100% sure theres a better way to handle this but that would require digging much further than I have time to right now. It already seems wonky that this works without adding the children back into the scene. :mrsatan:
I don't know why, but it's still not working :/ Could you possibly send your edited version of the file? I might just be inserting the code you made wrong. Here's a screenshot of what I did:
Or could you possibly help me understand what I'm doing wrong? Also, thank you for taking the time to do this! I appreciate you! 🙂
Ok well it worked when i use f9 to turn the switch on and off but when i tried using an event to turn the switch on and off it would turn it off but not back on.
seems like this was needed afterall lol.
as far as what you're doing wrong i'm not entirely sure, it looks like you placed it in the correct spot and its now flipping on and off for me when i flip the switch using an event.
are you getting any errors in the console?
did you make sure to save the changes to the code and restart your play test?
JavaScript:
if ($gameSwitches.value(1)) {
if ($crt_overlay1.parent) {
this.removeChild($crt_overlay1);
this.removeChild($crt_overlay3);
this.removeChild($crt_overlay2);
this.removeChild($crt_overlay8);
this.removeChild($crt_overlay11);
this.removeChild($crt_overlay4);
this.removeChild($crt_overlay5);
}
}
if (!$gameSwitches.value(1)) {
if (!$crt_overlay1.parent) {
this.addChild($crt_overlay1);
this.addChild($crt_overlay3);
this.addChild($crt_overlay2);
this.addChild($crt_overlay8);
this.addChild($crt_overlay11);
this.addChild($crt_overlay4);
this.addChild($crt_overlay5);
}
}
seems like this was needed afterall lol.
as far as what you're doing wrong i'm not entirely sure, it looks like you placed it in the correct spot and its now flipping on and off for me when i flip the switch using an event.
are you getting any errors in the console?
did you make sure to save the changes to the code and restart your play test?
'Front and Centre' - you mean like that big 'Help' button in the menu bar of the front page where if you click it, the first thing you see is 'Forum Rules'?
OH MY GOSH! Thank you so much! I thought I had to turn the switch off to turn the effect off, but I was very very wrong. Thank you! Do you mind if I share this on the original plugin thread (I'd obviously give all credit to you for finding a solution)? There are other people there who wanted this
OH MY GOSH! Thank you so much! I thought I had to turn the switch off to turn the effect off, but I was very very wrong. Thank you! Do you mind if I share this on the original plugin thread (I'd obviously give all credit to you for finding a solution)? There are other people there who wanted this
if you haven't added in that extra bit of code you may want to, it seems like it was needed afterall.
it's a little backward yeah but it got wonky when i tried it the other way around because the switch was defaulted to off lol. sure you can do that. glad its working for you now :mrsatan:
it's a little backward yeah but it got wonky when i tried it the other way around because the switch was defaulted to off lol. sure you can do that. glad its working for you now :mrsatan:
Oh, I didn't see that. Thank you, that'll be very helpful in the future.
I've made this mistake before! The debug screen is its own scene; the
$crt_overlay sprites get added when Scene_Map is created, which happens on scene change. So when you leave the debug scene, it re-creates the map scene and all the child sprites. 😴Original thread: https://forums.rpgmakerweb.com/threads/can-anyone-help-me-edit-this-plugin.122166/