Jump to content

Announcing our new website

To find out the latest about our new website, visit Game Dev Unlimited

- - - - -

Scripted Day/Night system


  • You cannot reply to this topic
17 replies to this topic

#1 Bob423

    Bless your face

  • Member
  • 884 posts

Posted 31 October 2011 - 03:47 AM

[RMXP]

i know this can be done with common events, but i think it will be easier with a script.

i need a script that makes the tint go through a 5 tone cycle:

dawn
midday
evening
dusk
midnight
(easily customized intervals)

could be more or less though.

in addition to that, i need the script to turn a switch on when it reaches dusk, and off when it reaches dawn. (so i can make lights and stuff)

i would also like there to be a place in the script where i can list the IDs of inside maps, where the color tone is reset, but it stores the current time as a variable so the time isnt reset when you leave. in fact, i would like the time to continue even after you enter an inside map, but the color tone doesnt change.

and i know kellessdee has a lighting system that i want to try. if i can get a link to that, that would be great.

thanks :biggrin_002:

Edited by Bob423, 31 October 2011 - 03:48 AM.


#2 bigace

    King of Spades

  • Member
  • 730 posts

Posted 31 October 2011 - 04:23 AM

Here's some scripts I found, probaby not completely what you want maybe. But here you go.


http://forum.chaos-p...hp?topic=2546.0
Spoiler
http://www.rpgrevolu...showtopic=35105
Spoiler

Edited by bigace, 31 October 2011 - 04:24 AM.


#3 Bob423

    Bless your face

  • Member
  • 884 posts

Posted 31 October 2011 - 10:28 PM

sweet thanks. dont know why i can never find this kind of stuff


edit: i have a few problems:

1. there doesnt seem to be anyway of telling weather or not a map is indoors.

2. the first one is hard to customize.

3. i think the second one will work for what i want, but its strictly set for the computer's internal clock. i dont want that

Edited by Bob423, 31 October 2011 - 10:38 PM.


#4 bigace

    King of Spades

  • Member
  • 730 posts

Posted 31 October 2011 - 11:59 PM

You should check the links to as they help. The second has the original script without the internal clock.

#5 ForeverZer0

    Extreme Member

  • Member
  • 225 posts

Posted 01 November 2011 - 05:08 AM

[shameless self-advertising]

Complete Climate & Time System

[/shameless self-advertising]

#6 bigace

    King of Spades

  • Member
  • 730 posts

Posted 01 November 2011 - 06:01 AM

How come I never saw that thing on Choas? Or was it there and I was just blind. Any ways I that thing looks awesome, I'll be taking a look at it myself. :alright:

#7 Bob423

    Bless your face

  • Member
  • 884 posts

Posted 01 November 2011 - 09:34 PM

dont worry about it guys, liz is helping me with it. thanks though :biggrin_002:


edit: actually i think ill try out that system of your zero

Edited by Bob423, 01 November 2011 - 11:57 PM.


#8 Bob423

    Bless your face

  • Member
  • 884 posts

Posted 02 November 2011 - 04:38 AM

View PostForeverZer0, on 01 November 2011 - 05:08 AM, said:

[shameless self-advertising]

Complete Climate & Time System

[/shameless self-advertising]


ok, so i have a problem with that script. its amazing and all, but i need some better instructions.

it wont let me change the climates tab at all in the .exe

i really want to use this, but cant get it to work :(


edit:
i also get this error when i run the game

"minimum WEATHER_WAIT must be less than maximum WEATHER_WAIT!"

on line 275 of the main script

Edited by Bob423, 02 November 2011 - 04:50 AM.


#9 ForeverZer0

    Extreme Member

  • Member
  • 225 posts

Posted 02 November 2011 - 05:08 AM

In the "Climates" tab, you need to have a climate selected to edit, which are listed in the listbox in the top-left corner on that panel. As for the error, it is kinda self-explanatory, the minimum needs to be less than the maximum.

#10 Bob423

    Bless your face

  • Member
  • 884 posts

Posted 02 November 2011 - 03:45 PM

yea i know you need to select something first, i did that, but when i edit something, it just goes right back to default when i click on something else.

as for the error, i dont think its that simple.
here's the method its in
Spoiler

unless its something that i did in the .exe
in which case, i need to know know how to fix it.

Edited by Bob423, 02 November 2011 - 03:45 PM.


#11 kellessdee

    mrrow ~!

  • Moderator
  • 902 posts

Posted 02 November 2011 - 07:18 PM

Are you adding the settings? The check boxes are just for selecting which setting to MODIFY. if you would like to actually SEE all the set values, click the review button. Click add to modify the settings.

Posted Image

As for the wait, open the configuration script and look for this part:

# The minimun/maximum number of seconds before the system re-calculates what
# weather pattern will be used. The number will be randomly selected from
# within the defined range.
WEATHER_WAIT = [5, 15]

Make sure the first value (in this case 5) is LESS (not equal and not greater) than the second value (in this case 15)

#12 Bob423

    Bless your face

  • Member
  • 884 posts

Posted 02 November 2011 - 11:21 PM

alright, thanks :alright:

edit: ok, so i got rid of the error, by making it [0, 1]

but now there is a new error

Spoiler

also, that add button doesnt seem to do anything.

what im trying to edit is the behavior and maps sections. in the tab, and nothing else seems to want to change either.

do i need the two scripts in a certain order?

Edited by Bob423, 02 November 2011 - 11:45 PM.


#13 Bob423

    Bless your face

  • Member
  • 884 posts

Posted 05 November 2011 - 11:26 PM

*bump*

#14 ForeverZer0

    Extreme Member

  • Member
  • 225 posts

Posted 05 November 2011 - 11:34 PM

Don't use 0.

Its a length of time between weather changes, and 0 has no length.

#15 Bob423

    Bless your face

  • Member
  • 884 posts

Posted 06 November 2011 - 01:17 AM

ok thanks, but i still have that other error

#16 ForeverZer0

    Extreme Member

  • Member
  • 225 posts

Posted 06 November 2011 - 11:20 PM

Somethings messed up with the config, and that line doesn't really explain a lot.
I imagine something is messed up with the weather probabilities. Hard to say without seeing the configuration.

#17 Bob423

    Bless your face

  • Member
  • 884 posts

Posted 06 November 2011 - 11:28 PM

ok, here it is

Spoiler


#18 ForeverZer0

    Extreme Member

  • Member
  • 225 posts

Posted 07 November 2011 - 07:40 AM

In the "Hourly Tints" section, it looks like all the values for "climate_id" are 0.

ex.
when 0 # Outdoor
when 0 # Snow
when 0 # Desert
when 0 # Underground

They should be different. I wouldn't be surprised if that was a bug in the config program. It was my very first C# project I ever made, so I'm sure there is a lot of room for improvement. Either way, try manually changing the values there to what they should be.





0 user(s) are reading this topic

members, guests, anonymous users