Hello together,
I present you my first plugin, written to get used to the Plugin API.
With this plugin you can set the ingame time to current time and realtime timespeed (and more).
Changes in V1.3
- after server restart the timemode is now set properly (without admin logged in)
- new command /tscsettime hh mm
Changes in V1.2
- removed bug: clock visibility setting was wrongly checked, resulting in an always visible clock on each start
- removed bug: on every entered chat command (not restricted on this plugin commands) a status line was written to chat console
- removed the status output on each start
Changes in V1.1
TimeSpeedChanger is now usable on server.
Only an Administrator can control the plugin with slash commands then.
Features
- a digital clock on screen representing current realtime
- 3 time modes: realtime, gametime and a special day-night mode
- customizable via preferences file (command names, clock position and size etc.)
Installation
Extract the files from tsc.zip into the RisingWorld/plugins folder.
It should look like this:
Usage
Via chat console you can control the plugin with following slash commands:
/tschelp
- show this help page
/tscclock
- show/ hide realtime clock on screen
/tscgametime
- switch to normal ingame timespeed
/tscrealtime
- switch to current time and realtime timespeed
/tscdaynight x.xx y.yy
- set distinct timespeed for day (08:00-22:00) and night (22:00-08:00), the amount of realtime seconds for one ingame minute, f.e.:
/tscdaynight 3.0 2.0 a minute at daytime takes 3 seconds, at night it takes 2 seconds
/tscsettime hh mm
- set the time of day, e.g.: /tscsettime 17 45
Preferences
The file "tsc.prefs" contains the following settings:
command_help=tschelp
command_clock=tscclock
command_gametime=tscgametime
command_realtime=tscrealtime
command_daynight=tscdaynight
command_settime=tscsettime
- default command names, only letters please, no special characters like / (attention: with V1.1 it is not UTF-8-ready yet)
mode=gametime
- in which mode the game starts with (gametime, realtime or daynight)
timespeed_day=1.75
- the amount of realtime seconds an ingame minute takes during daytime (between 0.01 and 999.99)
timespeed_night=1.75
- the amount of realtime seconds an ingame minute takes during nighttime (between 0.01 and 999.99)
clock_visible=true
- the initial visible state of the clock the game starts with
clock_posx=0.0
- horizontal position of clock, between 0.0 (left) and 1.0 (right)
clock_posy=1.0
- vertical position, between 0.0 (bottom) and 1.0 (top)
clock_size=20
- font size (between 1 and 100)
Notes
The little clock on screen is only a "goodie". In later versions the clock maybe removed.
If you want realtime speed but not the synchronized realtime then you can simply use:
/tscdaynight 60 60
and set the starting time of day, e.g.:
/tscsettime 12 30
The next time you restart your world, the game will continue with the time it was last ended.
I hope you enjoy it
Download Version 1.3:
tsc_1.3.zip
Sourcecode Version 1.3:
tsc_1.3_src.zip
Older Versions:
Download Version 1.0: tsc.zip Source: tsc_src.zip
Download Version 1.1: tsc_1.1.zip Source: tsc_1.1_src.zip
Download Version 1.2: tsc_1.2.zip Source: tsc_1.2_src.zip