Raised This Month: $32 Target: $400
 8% 

[REQ] Set time & date on server


Post New Thread Reply   
 
Thread Tools Display Modes
terrum
AlliedModders Donor
Join Date: Apr 2006
Location: United Kingdom
Old 10-03-2019 , 22:31   Re: [REQ] Set time & date on server
Reply With Quote #11

Quote:
Originally Posted by fysiks View Post
So I guess, based on the restrictions you've noted, there is no good solution. Though, I've seen some "fake time" libraries that might be able to give a running process a fake time (on Linux).
I've considered using faketime as a last resort, but because the server runs on, effectively, an uneditable docker image it would be super hard to get faketime installed on it.

I just thought that, similarly to the 'game name changer' plugin, there would be some simple function that could be injected by the plugin to make the server think it was a different time. (The 'game name changer' plugin uses functions such as FM_GetGameDescription, FMV_STRING and FMRES_SUPERCEDE)

Another option would be to have the plugin somehow activate the birthday/christmas mode(s) instead of having it inject the date/time.
__________________
Thanks,
Terrum.



Last edited by terrum; 10-03-2019 at 22:33.
terrum is offline
Send a message via AIM to terrum Send a message via MSN to terrum Send a message via Skype™ to terrum
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 10-03-2019 , 22:40   Re: [REQ] Set time & date on server
Reply With Quote #12

Quote:
Originally Posted by terrum View Post
I just thought that, similarly to the 'game name changer' plugin, there would be some simple function that could be injected by the plugin to make the server think it was a different time. (The 'game name changer' plugin uses functions such as FM_GetGameDescription, FMV_STRING and FMRES_SUPERCEDE)
Well, the concept of date/time is a well known thing that is provided by lower level APIs so it's unlikely that a game developer would want/need to abstract that concept in the game.

Quote:
Originally Posted by terrum View Post
Another option would be to have the plugin somehow activate the birthday/christmas mode(s) instead of having it inject the date/time.
Orpheu is able to call functions that weren't capable of being called before so maybe one of the functions you need could be called by it. You'd have to find the function in the game and then have someone generate the necessary files for configuring Orpheu to call the function.
__________________
fysiks is offline
terrum
AlliedModders Donor
Join Date: Apr 2006
Location: United Kingdom
Old 10-03-2019 , 22:46   Re: [REQ] Set time & date on server
Reply With Quote #13

Quote:
Originally Posted by fysiks View Post
You'd have to find the function in the game.
I assume that would be nearly impossible without source code.

And I'm terrible with 'reverse engineering' software such as HEX editors and memory scanners. Although Cheat Engine has something that can detect change in memory.

Either way that would be beyond my knowledge unfortunately, hopefully someone that has a little more know-how with this sort of thing can help.
__________________
Thanks,
Terrum.


terrum is offline
Send a message via AIM to terrum Send a message via MSN to terrum Send a message via Skype™ to terrum
Moody92
Veteran Member
Join Date: May 2011
Location: Oman
Old 10-04-2019 , 15:47   Re: [REQ] Set time & date on server
Reply With Quote #14

Alright, you can host your gameserver in a virtual machine inside your host. That'd enable you to modify the date & time without tampering with your main host.
Moody92 is offline
terrum
AlliedModders Donor
Join Date: Apr 2006
Location: United Kingdom
Old 10-04-2019 , 15:59   Re: [REQ] Set time & date on server
Reply With Quote #15

Quote:
Originally Posted by Moody92 View Post
Alright, you can host your gameserver in a virtual machine inside your host. That'd enable you to modify the date & time without tampering with your main host.
No, that's far too extreme of a measure and takes far more resource than necessary to accomplish such a small thing.
__________________
Thanks,
Terrum.



Last edited by terrum; 10-04-2019 at 15:59.
terrum is offline
Send a message via AIM to terrum Send a message via MSN to terrum Send a message via Skype™ to terrum
tarsisd2
Veteran Member
Join Date: Feb 2016
Location: brazil
Old 10-05-2019 , 09:55   Re: [REQ] Set time & date on server
Reply With Quote #16

Have a look at this
https://forums.alliedmods.net/showthread.php?t=91915

Might help you in some way
tarsisd2 is offline
terrum
AlliedModders Donor
Join Date: Apr 2006
Location: United Kingdom
Old 10-05-2019 , 10:01   Re: [REQ] Set time & date on server
Reply With Quote #17

Quote:
Originally Posted by tarsisd2 View Post
Have a look at this
https://forums.alliedmods.net/showthread.php?t=91915

Might help you in some way
Not really, as I'm far from a coder, and all that seems to do is convert real time to UNIX time and back. I don't think it will offer any sort of help in terms of what functions need to be found, correct me if I'm wrong.
__________________
Thanks,
Terrum.


terrum is offline
Send a message via AIM to terrum Send a message via MSN to terrum Send a message via Skype™ to terrum
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 17:12.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode