.com.unity Forums
  The Official e-Store of Shrapnel Games

This Month's Specials

winSPMBT: Main Battle Tank- Save $6.00
winSPWW2- Save $6.00

   







Go Back   .com.unity Forums > Shrapnel Community > Space Empires: IV & V

Reply
 
Thread Tools Display Modes
  #1  
Old October 24th, 2003, 03:49 PM
Ruatha's Avatar

Ruatha Ruatha is offline
Major General
 
Join Date: May 2002
Location: Linghem, Östergötland, Sweden
Posts: 2,255
Thanks: 0
Thanked 0 Times in 0 Posts
Ruatha is on a distinguished road
Default Re: Ruatha: PBW Alternate Scripts

Quote:
Originally posted by Imperator Fyron:
I suggest you not have any code read in the contents of text files to get variables. Instead, have files like "config.php" and "playerdata.php". Reading from text files is relatively slow, and prone to error, much more so than just having .php files included. And, it still just requires editing files to be installed, so it is not that big a change for the user of the script.

Also, it would be good to be able to have all the main .php files in a folder, and then have various folders for different games in subfolders, with their appropriate config files and gamefile etc. folders. So you have something like:

se.net/pbw contains the pure code .php, with nothing specific to any game
se.net/pbw/b5modgame contains the mentioned config.php and playerdata.php, as well as its subfolders of gamefile, turnfiles, etc.
The multiple folder thing will be fixed to next Version (in a day or two)
Thanx for the suggestion.
About the PHP instead of txt, will think of a good way to fix that, should be doable without to much hassle.
How where you thinking, that I should include variables in include.php where all names etc are entered and then include that file into the main index.php with the include instruction? That seems easiest.
And then make a web page to enter and alter the data in text boxes, so that no real text editing is necessary. Will do this!

[ October 24, 2003, 15:00: Message edited by: Ruatha ]
Reply With Quote
  #2  
Old October 24th, 2003, 05:17 PM
Ruatha's Avatar

Ruatha Ruatha is offline
Major General
 
Join Date: May 2002
Location: Linghem, Östergötland, Sweden
Posts: 2,255
Thanks: 0
Thanked 0 Times in 0 Posts
Ruatha is on a distinguished road
Default Re: Ruatha: PBW Alternate Scripts

Idea for new structure for next EPS (Emergency Pbw Site):


ELSEWHERE (OTHER DIRECTORY)
PASSWORD.CFG - Password for autoturn utility and main admin (Setup new games)

---------------
main Directory (Whatever name)

INDEX.PHP
Start page, choose game if more than one otherwise autodirect to MAIN.PHP

MAIN.PHP Main page where everything happens, display players, empires, uploaded, deadline, news, history.

GETTURN.PHP
Getturn script

SENDTURN.PHP
Sendturn Script

TIMEZONE.PHP
Displays deadline in different timezones, each player can check his timezone.

ADMIN.PHP
Admin script, change player names, empires, e-mails, number of players, admin password, news, turns to backup.

AUTOTURN.EXE
Checks if turns has expired or all has uploaded and then autoexecutes them if needed, updates deadlines, checks all subdirectories for DEADLINE.PHP.
Creates new games by setting up subdirectories and placing the appropriate files there.
Password used to access this program is stored in PASSWORD.CFG
Can be used to customize the sites, i e colours and any page image (Same image all pages).
Program is trayable.


-------------------
Game Directories (Name = Gamename, subdirectories)

GAMEINFO.PHP
Used to store game variables;
Number of players,
Playernames
E-mails
Empire name
Host name and e-mail.
News
Number of turns to backup
Timezone.

DEADLINE.PHP
File defining deadline and turn type (Manual, all uploaded and auto), Used in both PHP script and in AUTOTURN.EXE.
Date stored in Central European time, altered to the set timezone when displayed in each game.

TURNFILES
Directory for player turnfiles (PLR)

GAMEFILE
Directory for Gamefiles (ZIP)

BACKUP
Zipped old PLR and GAM files

[ October 24, 2003, 16:21: Message edited by: Ruatha ]
Reply With Quote
  #3  
Old October 24th, 2003, 05:56 PM
Ruatha's Avatar

Ruatha Ruatha is offline
Major General
 
Join Date: May 2002
Location: Linghem, Östergötland, Sweden
Posts: 2,255
Thanks: 0
Thanked 0 Times in 0 Posts
Ruatha is on a distinguished road
Default Re: Ruatha: PBW Alternate Scripts

Now I see that it tries to send UPLOAD.PHP when getting the turnfile. Will fix this after work (approx 27 hours of work left first...)

Last time I managed to get rid of the PHP extension by changing the file type, but this latest verion adds upload as name, will have to check why.

EDIT:STRANGE, the next computer I tried here at work worx perfect, right filename and extension!!

EDIT AGAIN:
I have a clue:
It works great on the computer with a Swedish Version of Windows 2000 but not on the one with an English Win 2000, Why?????
So Fyron, when I use Swedish win 2000 or Win XP I can download the turnfile from your site without the PHP extension.
Will have to check this further!

[ October 24, 2003, 17:02: Message edited by: Ruatha ]
Reply With Quote
  #4  
Old October 24th, 2003, 06:35 PM
geoschmo's Avatar

geoschmo geoschmo is offline
National Security Advisor
 
Join Date: Jan 2001
Location: Ohio
Posts: 8,450
Thanks: 0
Thanked 5 Times in 2 Posts
geoschmo is on a distinguished road
Default Re: Ruatha: PBW Alternate Scripts

Ruatha, fyi I am having the same problem with getting the game file on mine.

http://pbw.spaceempires.net/geoschmo/survivor2/

I got around it by modifing the index.php to look for the file directly instead of pulling up the upload.php file. But that's not a good permanent fix because I will have to modify the index file every turn.

Thanks so much for making these files available by the way. It's a big help.

What are the chances of adding a button to the index that will pull up a new email box and fill in all the player emails? It would make notifying them of a new turn very convienent. I guess you'd just need something to parse the player text file and populate a mailto command. Anyway, just a suggestion.

Geoschmo
__________________
I used to be somebody but now I am somebody else
Who I'll be tomorrow is anybody's guess
Reply With Quote
  #5  
Old October 24th, 2003, 07:13 PM
Ruatha's Avatar

Ruatha Ruatha is offline
Major General
 
Join Date: May 2002
Location: Linghem, Östergötland, Sweden
Posts: 2,255
Thanks: 0
Thanked 0 Times in 0 Posts
Ruatha is on a distinguished road
Default Re: Ruatha: PBW Alternate Scripts

Quote:
Originally posted by geoschmo:
Ruatha, fyi I am having the same problem with getting the game file on mine.

http://pbw.spaceempires.net/geoschmo/survivor2/

I got around it by modifing the index.php to look for the file directly instead of pulling up the upload.php file. But that's not a good permanent fix because I will have to modify the index file every turn.

Thanks so much for making these files available by the way. It's a big help.

What are the chances of adding a button to the index that will pull up a new email box and fill in all the player emails? It would make notifying them of a new turn very convienent. I guess you'd just need something to parse the player text file and populate a mailto command. Anyway, just a suggestion.

Geoschmo
It's an annoying BAD bug that needs to fixed fast, to bad I'm at work the next 25 hours (will still look at it some though...)
The mail button was a good idea, will do!

EDIT: Have included a crude "mail all" function, but I have nowhere to upload it (Haven't started the FTP server at home since the Last reformatation!, can't find the upload function here at the forum!)

[ October 24, 2003, 18:38: Message edited by: Ruatha ]
Reply With Quote
  #6  
Old October 24th, 2003, 07:52 PM
Ruatha's Avatar

Ruatha Ruatha is offline
Major General
 
Join Date: May 2002
Location: Linghem, Östergötland, Sweden
Posts: 2,255
Thanks: 0
Thanked 0 Times in 0 Posts
Ruatha is on a distinguished road
Default Re: Ruatha: PBW Alternate Scripts

A temporary fix one can make is to change the link from "upload.php" to the "gamefile" directory, ugly but it works while we fix it.
Have a Version of the index.php that does this aswell, but- have no way of testing it right now and nowhere to upload it.
Reply With Quote
  #7  
Old October 25th, 2003, 12:05 AM
Fyron's Avatar

Fyron Fyron is offline
Shrapnel Fanatic
 
Join Date: Jul 2001
Location: Southern CA, USA
Posts: 18,394
Thanks: 0
Thanked 12 Times in 10 Posts
Fyron is an unknown quantity at this point
Default Re: Ruatha: PBW Alternate Scripts

I added a news.html file that the host can edit to post up some nice news info. Just put this in the folder over the old index.php.

http://pbw.spaceempires.net/newsfile.zip

Have you considered making use of a database? It would greatly simplify some things.

[ October 24, 2003, 23:10: Message edited by: Imperator Fyron ]
__________________
It's not whether you win or lose that counts: it's how much pain you inflict along the way.
--- SpaceEmpires.net --- RSS --- SEnet ModWorks --- SEIV Modding 101 Tutorial
--- Join us in the #SpaceEmpires IRC channel on the Freenode IRC network.
--- Due to restrictively low sig limits, you must visit this link to view the rest of my signature.
Reply With Quote
Reply

Bookmarks

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 On

Forum Jump


All times are GMT -4. The time now is 01:47 PM.


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