Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
158 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,16 @@ | |||
Changelog | |||
--------- | |||
- Changed the default time that the server will go without processing before stopping processing to 12 minutes. (2 attempts) | |||
- Added an option for NMR behavior, giving a setting that will make the game wait indefinitely for a missing player. | |||
- Added pagination to game chat archive screens | |||
- Fixed bug where users attempt to join a non-joinable game and get an incorrect error message | |||
|
|||
Updating | |||
-------- | |||
- Take a backup (database and files) <-- Important! | |||
- Set the server to maintenance mode (perhaps set an appropriate message warning users of the update in config.php first) | |||
- Wait a minute for all active processes to finish | |||
- Run update.sql | |||
- Copy the new code over the old code | |||
- View and test the updated site | |||
- Turn off maintenance mode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,2 @@ | |||
ALTER TABLE `wD_Backup_Games` CHANGE `missingPlayerPolicy` `missingPlayerPolicy` ENUM( 'Normal', 'Strict', 'Wait' ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'Normal'; | |||
ALTER TABLE `wD_Games` CHANGE `missingPlayerPolicy` `missingPlayerPolicy` ENUM( 'Normal', 'Strict', 'Wait' ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'Normal'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,56 @@ | |||
<?php | |||
/* | |||
Copyright (C) 2004-2010 Kestas J. Kuliukas | |||
This file is part of webDiplomacy. | |||
webDiplomacy is free software: you can redistribute it and/or modify | |||
it under the terms of the GNU Affero General Public License as published by | |||
the Free Software Foundation, either version 3 of the License, or | |||
(at your option) any later version. | |||
webDiplomacy is distributed in the hope that it will be useful, | |||
but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
GNU General Public License for more details. | |||
You should have received a copy of the GNU Affero General Public License | |||
along with webDiplomacy. If not, see <http://www.gnu.org/licenses/>. | |||
*/ | |||
|
|||
defined('IN_CODE') or die('This script can not be run by itself.'); | |||
|
|||
/** | |||
* @package Base | |||
* @subpackage Pager | |||
*/ | |||
|
|||
require_once(l_r('pager/pagerthread.php')); | |||
class PagerForum extends Pager | |||
{ | |||
public static $defaultPostsPerPage=30; | |||
public $type='forum'; | |||
|
|||
function __construct($itemsTotal) | |||
{ | |||
parent::__construct('forum.php',$itemsTotal,self::$defaultPostsPerPage); | |||
} | |||
function getCurrentPage($currentPage=1) | |||
{ | |||
parent::getCurrentPage($this->pageCount); | |||
if ( $this->currentPage>$this->pageCount ) | |||
$this->currentPage = $this->pageCount; | |||
} | |||
function currentPageNumber() | |||
{ | |||
if( $this->currentPage != $this->pageCount ) | |||
return parent::currentPageNumber(); | |||
else | |||
return ''; | |||
} | |||
|
|||
function SQLLimit() | |||
{ | |||
return ' LIMIT '.($this->pageCount-$this->currentPage)*$this->itemsPerPage.', '.$this->itemsPerPage; | |||
} | |||
} |
3e446c7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi kestas,
nice addition. We have something similar on vDip but made this a bit more complex for the following reason:
It's impossible for these games to continue without mod-support. Many experts like such a setting but also many players so not care and ruin the game for the better players. If a game gets paused by a missing player (usually a 1 SC player in a loosing position) for about 1-2 weeks usually all others loose interest.
In my solution you can set how many times the phase should be extended, and for how many turns this setting should be active. Usually the first 2 turns (with all phases included) is enough. Also it does not put the game on hostage if a 1 SC-power did not enter any orders.
Finally it puts the country in question in civil disorder. So a replacement can be found.
These is the setting from the gamecreate:
NMR-policy:
-Dropdown with 4 possible solutions:
This rule will send a players into Civil Disorder (CD) if there are No Moves Received (NMR) from them.
Any value greater 90 will set the value to ∞, a value of 0 will set this to off.
This way the feature works quite well, but without I fear your admins need to CD quite a lot of countries on a regular basis.
3e446c7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3e446c7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feel free to ask any questions.
Basically it works this way:
If a country does not submit any orders for the first X turns (this is configurable in the game-create and and we have a default setting of 1) and this country has more than 1 SC it set the Orderstatus for all other players from "Ready" to "Save", sets the process-time to now()+phase-length and CDs the countries with no moves. Now the other players can look for a replacement or just continoue without the player. It does this Y times (with a default of Y=1) till a replacement is found.