Main Menu
  • Welcome to The RPG Maker Resource Kit.

calendar script

Started by kathis, March 14, 2007, 10:21:33 PM

0 Members and 1 Guest are viewing this topic.

kathis

Ok I need this script like asp hopefully in less than 5 hours -_-

this is what I want

I want a window that when you push "g" you will see it displaying a time , day, month, and year

the time will will be custom such as 12 minuets = an hour, or 10 days = a month
63 months = a year
ext (I would like a place where I can fiddle with this please)

NOW here is the hard part, I want the clock for the game to go WHILE game play, and WITHOUT GAME PLAY meaning even if the game is off it will still keep going in time.


I thank you in advance
Project
New project. The other dimention DND
RPG makers challenge http://rmrk.net/index.php/topic,13503.0.html

Irock

Can you say, "impossible to make in 5 hours"?

Something like this could take weeks or even months.

kathis

wow someone actully repleied ^_^ perhaps but I know there are scripts like this...well parts of it really flying around out there >.>
Project
New project. The other dimention DND
RPG makers challenge http://rmrk.net/index.php/topic,13503.0.html

modern algebra

There is an event-based system similar to what you want in the Tut DB ... I'll find the link...

http://rmrk.net/index.php/topic,8957.0.html

There. It is obviously easy to fiddle with because it is just events. I don't think it will keep going even when the game is off though... I'm not exactly sure how I'd do that either - I think you could store the current time from the computer at the game start as a variable and subtract it from the current time taken from comp and put in some scaling calculations, but I'm not sure how to do that so maybe someone else will help you more...

kathis

#4
Nearly what I wanted but not quiet there... the game will need to start at the point of time that is related to our time. >.> and minuets won't go that quickly XD but yes events are nice to use but they cannot draw out the main fact of our time, also if I were to save in the demo it would wouldn't contiune to count in time when the game is off. its close but not there... and worst yet -_- I can't take apart the game becuase its encryopted...well I can but thats hacking  >.>
Project
New project. The other dimention DND
RPG makers challenge http://rmrk.net/index.php/topic,13503.0.html

Tsunokiette

What you're asking for is impossible, unless you know how to send signals to a satalite. xD

Which I doubt any of us do.

The closest you can get is real-time where it only checks the computer. Sorry.
"The wonderful thing about Tiggers
Is Tiggers are wonderful things
Their tops are made out of rubber
Their bottoms are made out of springs

They're bouncy, trouncy, flouncy, pouncy
Fun, fun, fun, fun, fun!
But the most wonderful thing about Tiggers
Is I'm the only one, I'm the only one."

kathis

#6
the help says

[spoiler]
The time class.

SuperclassObject
Included ModuleComparable
Class MethodTime.now
Returns the current Time object.

Methodsself + other
Returns a time that is later than self by other seconds.

self - other
When other is a Time object, returns the difference between the two times with Float. If other is a numeric value, returns a time that is earlier than self by other.

self <=> other
Compares times. other must be a Time object or a numeric value; if a numeric value, the times are compared in terms of seconds since the epoch began.

strftime(format)
Returns the time, having been converted into a string via a format string. The format string may be specified with the following:

%A

Day of the week (Sunday, Monday ... )

%a

Day of the week, abbreviated (Sun, Mon ... )

%B

Month (January, February ... )

%b

Month, abbreviated (Jan, Feb ... )

%c

Date and time

%d

Day of the month (01-31)

%H

Time of day, 24-hour format (00-23)

%I

Time of day, 12-hour format (01-12)

%j

Day of the year (001-366)

%M

Minutes (00-59)

%m

Month of the year (01-12)

%p

AM or PM

%S

Seconds (00-60, 60 being a leap second)

%U

Week of the year, the first week starting with the first Sunday (00-53)

%W

Week of the year, the first week starting with the first Monday (00-53)

%w

Day of the week (0-6, 0 denoting Sunday)

%X

Time

%x

Date

%Y

Year, 4-digit

%y

Year, 2-digit (00-99)

%Z

Time zone

%%

The character %


sec
Returns the seconds.

min
Returns the minutes.

hour
Returns the hour.

mday
Returns the day.

mon
Returns the month.

year
Returns the year.

wday
Returns the number representing the day of the week.
[/spoiler]

QuoteI think you could store the current time from the computer at the game start as a variable and subtract it from the current time taken from comp and put in some scaling calculations

alrigth looking at what we know from the help how can we do this, how do we take that verable store so we can do its calulations?

*Edit*

Varible data

@data[variable_id] = value

so lets see here  if we want varible 4950 to be seconds

@data[4950] = %S
?


ps its not inpossible for a few reasons if you played the pokemon series for gbc you would know that their time system went on even if the game wasn't on.
Project
New project. The other dimention DND
RPG makers challenge http://rmrk.net/index.php/topic,13503.0.html

Tsunokiette

That's because it sent a signal to a satelite lol.

Like a said, it's pretty much impossible to do EXACTLY what you want. But real-time is entirely possible.

I've used the Time class before, I know its limitations.
"The wonderful thing about Tiggers
Is Tiggers are wonderful things
Their tops are made out of rubber
Their bottoms are made out of springs

They're bouncy, trouncy, flouncy, pouncy
Fun, fun, fun, fun, fun!
But the most wonderful thing about Tiggers
Is I'm the only one, I'm the only one."

kathis

Quote from: Tsunokiette on March 15, 2007, 02:28:46 AM
That's because it sent a signal to a satelite lol.

Like a said, it's pretty much impossible to do EXACTLY what you want. But real-time is entirely possible.

I've used the Time class before, I know its limitations.

I fail to see how it sent a signal to a satelite -_-
Project
New project. The other dimention DND
RPG makers challenge http://rmrk.net/index.php/topic,13503.0.html

Tsunokiette

Microchip? It's pretty common. (Ex: Watches)
"The wonderful thing about Tiggers
Is Tiggers are wonderful things
Their tops are made out of rubber
Their bottoms are made out of springs

They're bouncy, trouncy, flouncy, pouncy
Fun, fun, fun, fun, fun!
But the most wonderful thing about Tiggers
Is I'm the only one, I'm the only one."

italianstal1ion

it cant read from the computer's time?

anyway, how'd they do it in pokemon then? I doubt the gameboy color sent messages to satellite every time you turned the game on. (pokemon gold/silver btw)

Tsunokiette

There's no other way unless you include self-recharging nano-bots and moving parts. -_-

Also,I already said it could read from the computer's time. (That's whatI meant by real-time). Making it SEEM that the time runs continuously.

I suppose if one is willing to spend hours upon hours figuring out a constant ratio system which would have to factor in a never ending continual increase of time then it's possible. But I sincerely doubt anyone would do that. Besides, you'd probably get a hanging error.
"The wonderful thing about Tiggers
Is Tiggers are wonderful things
Their tops are made out of rubber
Their bottoms are made out of springs

They're bouncy, trouncy, flouncy, pouncy
Fun, fun, fun, fun, fun!
But the most wonderful thing about Tiggers
Is I'm the only one, I'm the only one."

kathis

#12
well from my understanding its the gb games are like the nes games (old but refering to their construction not their design and stuff like that) every game had a battery. which is why now a days its hard to play these games becuase they keep blinking -_- the battery doesn't take much energy I am guessing, but seriously if they are going to use stalight signals then why not make it possible to trade on a network like that? -_- or anything for that matter, but yes I know there is a way to get the computers time onto your game because I have seen it in a menu at some time. I regert ever losing these scripts. secondly I am stil fiddling with code. XD How do you store a varible through script?


thridly I HAVE the ratio already planned out -_-
Project
New project. The other dimention DND
RPG makers challenge http://rmrk.net/index.php/topic,13503.0.html

kathis

http://home.comcast.net/~dcwikman/time/

found the script that does custom time and all that. just not on real time

blizard helped me get real time but now comes the part of putting that knowleage into that ((if it can,,)

class Game_System
   
   attr_accessor :time
   
   alias init_time_system initialize
   def initialize
     init_time_system
     @time = Time.now
   end
   
   def update_time
     @time = Time.now
     $game_variables[100] = @time.sec if $game_variables != nil
    $game_variables[101] = @time.min if $game_variables != nil
     $game_variables[102] = @time.hour if $game_variables != nil
     $game_variables[103] = @time.mday if $game_variables != nil
      $game_variables[104] = @time.wday if $game_variables != nil
      $game_variables[105] = @time.mon if $game_variables != nil
       $game_variables[106]= @time.year if $game_variables != nil
      end
 
end


and place "$game_system.update_time if $game_system != nil"
under every "Graphics.update" in the scean_(what ever)

this would go by your computer clock.

so here is the question going by the script I linked up there is there a way to set the time on a varible? and if so where would it be placed?  ( I got my varibles in commend events to work nicely to match the time I would like XD
Project
New project. The other dimention DND
RPG makers challenge http://rmrk.net/index.php/topic,13503.0.html