Problem encountered when merging ForeverZer0's CCTS with XAS 3.91

Started by Louislam, May 29, 2013, 05:34:27 am

Previous topic - Next topic

Louislam

Hi, everybody in the Chaos Project, I am new here and have been playing RMXP for years with any progress in making my own game.
Recently, I am obsessed with scripts written by gentleman ForeverZer0 and a Japanese master 桜雅 在土 that are called CCTS and XAS 3.91.

I would like to put them together, but problems occurred when I inserted CCTS script into XAS 3.91 demo that extracted my three very days trying to get wrinkles ironed out but failed anyway -- my character enters indoors when weather turns into raining, finds it comfortable, no rains anymore but still hears the sound faintly, so far so logical, right? Now,I go outdoors right off the bat, something starts go weird. Instead of seeing the raining again and hearing the sound loudly, the raining itself is gone to nowhere while I am still hearing the faint raining sound.

Can somebody helps with this, I have uploaded the demo here for your assistance:
http://www.mediafire.com/?81woa5dq921sqjm

So many many thanks!

LiTTleDRAgo

17.5 MB, too big for me to download :uhm:

did you try to change the script order?
or probably you messed up some setting in the CCTS script?

KK20

I figured it out (after spending over an hour). It was XAS.

Find in your scripts 'XAS - Initialize' for the method transfer_player, which should be around line 700. You will find this line:
$game_map = Game_Map.new

Go ahead and comment that line or delete it. I really don't know why that was even there to begin with, perhaps to reset some variables XAS uses, but that's a really lame way to do it. I'm not sure if this will bug out XAS, so be sure to test that script a bit.

For scripters: "Why was that the problem?"
In CCTS, Game_Map uses variables @climate and @old_climate. It relies on these variables to make the appropriate changes when changing maps (and climates). It assumes Game_Map is one instance that is never changed or replaced. However, with XAS calling a new Game_Map every time the player changes maps, @climate and @old_climate are deleted and initialized with the values of 0.

Also, thanks to this, I found a bug in CCTS...that I will now fix...

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

Louislam

Quote from: LiTTleDRAgo on May 29, 2013, 10:34:10 am
17.5 MB, too big for me to download :uhm:

did you try to change the script order?
or probably you messed up some setting in the CCTS script?



That's alright, problem is now fixed by KK20. Thanks anyways.

Louislam

Quote from: KK20 on May 29, 2013, 07:23:57 pm
I figured it out (after spending over an hour). It was XAS.

Find in your scripts 'XAS - Initialize' for the method transfer_player, which should be around line 700. You will find this line:
$game_map = Game_Map.new

Go ahead and comment that line or delete it. I really don't know why that was even there to begin with, perhaps to reset some variables XAS uses, but that's a really lame way to do it. I'm not sure if this will bug out XAS, so be sure to test that script a bit.

For scripters: "Why was that the problem?"
In CCTS, Game_Map uses variables @climate and @old_climate. It relies on these variables to make the appropriate changes when changing maps (and climates). It assumes Game_Map is one instance that is never changed or replaced. However, with XAS calling a new Game_Map every time the player changes maps, @climate and @old_climate are deleted and initialized with the values of 0.

Also, thanks to this, I found a bug in CCTS...that I will now fix...


Thanks so so much KK20, it finally works! :P I would never figure that out on my own anyway! :facepalm:
However, I find another problem when I try to revise the climate(0) speed from 20 to 500 and start running the game. The screen toning is somehow going wrong by becoming increasingly darker and darker until it's absolutely pitch-black within a couple of days. And it makes little difference whether or not the XAS scripts accompany, which means that's not problem of XAS but CCTS itself.
What shall I do if 500 is kept as the default value.
Thanks so much!

By the way, here are pics showing the problem:
Spoiler: ShowHide


Spoiler: ShowHide


Spoiler: ShowHide


Blizzard

Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Louislam

Quote from: Blizzard on May 30, 2013, 05:34:03 am
Please put images into spoilers. *fixes post*


Sorry about that, Bilzzard. I will be careful afterwards and thanks for your reminding!

Blizzard

No problem. Since you are a new member, you were probably not familiar with that forum rule.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

KK20

Did you make any changes to the configuration? I can't reproduce the error.
Post your script.

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

Louislam

Quote from: KK20 on May 30, 2013, 01:07:53 pm
Did you make any changes to the configuration? I can't reproduce the error.
Post your script.


Please find below URL, in the demo there is nothing changed unless  "@climate[0].speed = 500" at around line 551 in ~ CCTS v.1.2.2 script
http://www.mediafire.com/?8f4787ataajxpp1

By retesting, here is what I get after running for a while:
Spoiler: ShowHide

KK20

My screen was still acceptably dark. It never turned pitch black nor to the extent of your recent image. I can't really say what is the problem if I can't reproduce it. My only suggestion is to reduce the screen tones in the configuration.

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

Louislam

Quote from: KK20 on May 30, 2013, 02:09:30 pm
My screen was still acceptably dark. It never turned pitch black nor to the extent of your recent image. I can't really say what is the problem if I can't reproduce it. My only suggestion is to reduce the screen tones in the configuration.


Understand that you couldn't reproduce the error and thanks for your suggestion!
I have a thought though. As you can notice from the pictures the screen tones become gradually darker and darker, taking around 5 days to make it unacceptably dim, which means there could be a tinting-related variable starts accumulating from the beginning probably due to some sort of lags during the process.
I am wondering is there a limit for the time speed. Setting above may cause some sort of problems like the change rate of toning is not fast enough to catch up the changing time.
Anyways, I am starting to regret I'm not a scripter! :facepalm:

KK20

Your map's climate has weather, right? Tell me if removing all weather from happening still tints the screen dark.

I'll try my best to see if there is some logic conflict.

EDIT: Actually, yeah, I think it has to do with the weather's tinting.

 #-----------------------------------------------------------------------------
 # Weather Tints
 #   Set the tint influence for each weather type. These are NOT the values
 #   the screen tint will be, rather they are the amount applied to whatever
 #   the current screen tint already is. They will transition in/out at the
 #   same rate of the weather transition.
 #-----------------------------------------------------------------------------

My guess is that it rains, causing the screen to go dark, and then a different rain comes immediately after and adds its tint to the already dark screen.
Nah, that didn't work when I used a bunch of script calls to change the weather.

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

Louislam

Quote from: KK20 on May 31, 2013, 07:44:20 pm
Your map's climate has weather, right? Tell me if removing all weather from happening still tints the screen dark.

I'll try my best to see if there is some logic conflict.

EDIT: Actually, yeah, I think it has to do with the weather's tinting.

 #-----------------------------------------------------------------------------
 # Weather Tints
 #   Set the tint influence for each weather type. These are NOT the values
 #   the screen tint will be, rather they are the amount applied to whatever
 #   the current screen tint already is. They will transition in/out at the
 #   same rate of the weather transition.
 #-----------------------------------------------------------------------------

My guess is that it rains, causing the screen to go dark, and then a different rain comes immediately after and adds its tint to the already dark screen.
Nah, that didn't work when I used a bunch of script calls to change the weather.


Thanks for your help. Yes, it did rain when the screen drove to darkness, and it seems most of the time it is raining. Should I lower the raining occurrence to ease the problem.
But I really want my game looks like real, so some random weather is quite necessary, So does the day/night cycle, you know!
I really love this CCTS and I really want to make use of it.

KK20

Have you opened up the debug menu that comes with the script (Press Shift)? Show me some images of that along with a darkened screen.

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

Louislam

Quote from: KK20 on June 03, 2013, 12:15:41 pm
Have you opened up the debug menu that comes with the script (Press Shift)? Show me some images of that along with a darkened screen.


Hi, I make a test this time and found the problem is eased much better, though I didn't make any alteration since last time. And I also found that every time I enter into a room and come out again, the screen tone is fixed to what it should be. So I think the problem might be negligible. Thank your very much. May I preserve your assistance for future needs. :p (joking)
Indeed, I encounter yet another problem, could you take your time to have a look, I'm grateful if you can help:
https://forum.chaos-project.com/index.php/topic,13190.0.html


Zexion

Just wondering. You wouldn't happen to have any parallel process events that are affecting screen tone would you?

Louislam

Quote from: Zexion on June 04, 2013, 08:08:58 pm
Just wondering. You wouldn't happen to have any parallel process events that are affecting screen tone would you?


No, I don't use parallel process events to change screen tone because it will engender dysfunction in CCTS. Oh! I do use quite a bunch of parallel events like lampposts turning on at night automatically, so does the doors and window frames while others are for the story line.
I agree there could be a chance of parallel event messing up. I will check through it. Thanks for your suggestion!

KK20

Quote from: Louislam on June 04, 2013, 02:22:16 pm
I make a test this time and found the problem is eased much better, though I didn't make any alteration since last time.

So...are you saying your problem is fixed even though we didn't change anything? Or did the screen never turn completely dark while the debug was open (I don't understand why that would be)?
Quote from: Louislam on June 04, 2013, 10:41:40 pm
I agree there could be a chance of parallel event messing up. I will check through it. Thanks for your suggestion!

I thought you said the problem occured in the demo without any modifications other than increasing the climate speed.
Quote from: Louislam on May 30, 2013, 01:53:56 pm
in the demo there is nothing changed unless  "@climate[0].speed = 500" at around line 551 in ~ CCTS v.1.2.2 script

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!