.com.unity Forums

.com.unity Forums (http://forum.shrapnelgames.com/index.php)
-   Dominions 3: The Awakening (http://forum.shrapnelgames.com/forumdisplay.php?f=138)
-   -   Dom3 programming/scripts to reset timers (http://forum.shrapnelgames.com/showthread.php?t=45813)

Gandalf Parker June 19th, 2010 11:19 PM

Re: Dom3 programming/scripts to reset timers
 
It appears that the choices are this.....

Game has a 48 hour timer, 30 hours in we get a request for an 8 hour extension
(A) take down game, change timer to the 18 hours left plus 8 more --hours 26, restart.
Of course the request is because they DO plan to beat the timer so most likely the game quickhosts. Maybe in the middle of night. So I might not get to it for 5 hours after hosting. For that time the players have seen a new --hours 26 countdown. And what do I fix it to? The original --hours 48? Then there is a jump in the timer to complain about. Or do I set it for 48 minus the 5 hours its already run? That means another try to reset it on the NEXT hosting.

OR
Game has a 48 hour timer, 30 hours in we get a request for an 8 hour extension
(B) take down game, and restart it. This puts 48 hours back on the clock.
Of course the request is to beat the timer so most likely the game quickhosts. Possibly in the middle of the night. And it immediately gets a new 48 hour clock.

OK (B) puts too much time on the clock. But its a one time change and one time difference between what the players are expecting. I think in games I am running (not hosting) this might be the standard for now until something more complicated can be worked out.

TheDemon June 21st, 2010 02:12 AM

Re: Dom3 programming/scripts to reset timers
 
Quote:

Originally Posted by Gandalf Parker (Post 749521)
It appears that the choices are this.....

Game has a 48 hour timer, 30 hours in we get a request for an 8 hour extension
(A) take down game, change timer to the 18 hours left plus 8 more --hours 26, restart.
Of course the request is because they DO plan to beat the timer so most likely the game quickhosts. Maybe in the middle of night. So I might not get to it for 5 hours after hosting. For that time the players have seen a new --hours 26 countdown. And what do I fix it to? The original --hours 48? Then there is a jump in the timer to complain about. Or do I set it for 48 minus the 5 hours its already run? That means another try to reset it on the NEXT hosting.

OR
Game has a 48 hour timer, 30 hours in we get a request for an 8 hour extension
(B) take down game, and restart it. This puts 48 hours back on the clock.
Of course the request is to beat the timer so most likely the game quickhosts. Possibly in the middle of the night. And it immediately gets a new 48 hour clock.

OK (B) puts too much time on the clock. But its a one time change and one time difference between what the players are expecting. I think in games I am running (not hosting) this might be the standard for now until something more complicated can be worked out.


Speaking as someone who hosts direct connect manually, I almost always do B, because A is far too much of a pain. And I tell my players to suck it up and blame the guy who wanted an extension.



Keep in mind I've never used Linux so it's possible I'm spouting BS,

But A should be possible. The first part of A isn't hard to do manually, although I'm sure it's possible to script given that the current timer is in the log and in the packet when you ping a server. Then you would just need to enter the extension ammount as a parameter and run something that reads the log/packet, adds the parameter, then closes the running dom3 and opens a new one with the newly calculated timer. Probably unnecessary, but we have computers to do math for us so why not.

For the second part (after it hosts), I'm sure there's a way to use --postexec to close the game and re-launch it using the original switches. Again I have never used linux but I'm sure there's a way to close the parent, probably by disassociating the child job from the parent job first. I googled up this but I have no idea if it is even related to what you're trying to do:
http://help.lockergnome.com/linux/Sp...ict509666.html

Gandalf Parker June 21st, 2010 10:03 AM

Re: Dom3 programming/scripts to reset timers
 
Thank you. That is exactly the territory and gives me some important keywords I had forgotten in order to search further.

Im still trying to get motivated to look further into it but that will help immensely if I do. (so far no "please" just "its really expected" which is actually a minus on the motivation meter)


All times are GMT -4. The time now is 02:02 AM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2024, Shrapnel Games, Inc. - All Rights Reserved.