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

This Month's Specials

Air Command 3.0- Save $12.00
War Plan Pacific- Save $7.00

   







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

Reply
 
Thread Tools Display Modes
  #1  
Old October 24th, 2003, 06:05 AM
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

Updated hopefully fixed Version, thanx Fyron!
The only problem now is timeout errors when uploading plr files for some, migth just be my server, I don't know?

You need a HTTP server with PHP capabilty.
You can see it working here
Newbie Galactic combat 3 PBW Emergency Site


Download all files here (v 1.0):
Site ver 1.0

This is the readme, also included:
[i]
You need a http server capable of handling php files.
The starting file is index.php
You can set up as many sites as you wish but each site needs their own directory ith a gamefile and turnfiles subdirectories.
You can alter all data in simple textfiles, the configuration.txt set up is before the site is turned on and then shouldn't have to be altered anymore.
The playerdata.txt needs to be altered when players drop and are replaced.
The deadline.txt needs to be alterd when the deadline is updated.
Hopefully I'll fix a better deadline handler in the future, and a progress bar for the uplaod turnfile, that script has been giving some players troubles, I'll look into that (Not working for some).

The gamefile that lies in the GAMEFILE directory must be named in PBW standard,
that is:
Gamename_turnnumber.zip
and the gamename the same as in configuration.txt

i e:
NGC3_57.zip

The uploaded turnfiles in TURNFILES directory should be named accrdingly in PBW standard:
Gamename_playernumber(4 numbers).plr

i e:
ngc3_0001.plr

These are the textfiles that needs to be altered:

#1. Configuration.txt:
Game name
Site name
Host name
Host e-mail
Info line

i e:
NGC3
Newbie Galactic Combat 3 PBW Emergency Site
Ruatha
james@visit.se
Made 2003 by Ruatha with Wordpad.

#2. Playerdata.txt :
Number of players
Player1
Player1 e-mail
Player1 empire name

i e:
2
Ruatha
james@visit.se
Swedish Democracy
James
james@storuman.nu
Storuman Republic

#3. Deadline.txt
year
Month
Day
hour

i e:
2003
8
22
20

------------
Good luck.

Ruatha

[ October 24, 2003, 05:41: Message edited by: Ruatha ]
Reply With Quote
  #2  
Old October 24th, 2003, 06:46 AM
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

Next to do:
Auto run batch file and auto update deadline.
History.


What has been fixed:
If you name the empires without player with player name "-" it won't be marked red and will be displayed with the name "(none)".
If the empire is dead name the player "-" and name the empire for example "Dead" or whatever.

(The " shouldn't be included in the textfile)

[ October 24, 2003, 06:43: Message edited by: Ruatha ]
Reply With Quote
  #3  
Old October 24th, 2003, 08:00 AM
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

It's not much time one has to edit the Posts in....

*For the auto turn I was plannng on making a dos or windows program that runs constantly and checks the current time and the deadlines in as many defined deadline.txt files as wanted, when a deadline is found it will run the game with files from that directory, game file and plr turn files.
move all plr files to a backupdirectory and zip a new turnfile and add it to the gamefile directory.
Update the deadline.txt.
Continue to check all defined deadlines.txt.

Either written in Turbo pascal (Dos) or Delphi (windows).
Support for Mods.
There won't be any auto mail function, for a long while.

*Will also add news section and web based admin possibility as alternative to current text file based.

Anyone wanting to write part or sections of the site are welcome, otherwise I'll do it as a continually thing, slowly..

Any suggestions or other ideas?

[ October 24, 2003, 07:31: Message edited by: Ruatha ]
Reply With Quote
  #4  
Old October 24th, 2003, 09:20 AM
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

Gosh, I hate the new "Edit time expired"!!

Changed "European standard time" to "Local server Time" on main page.

Will make auto app trayable.

Suggestions.

ver 1.01
Reply With Quote
  #5  
Old October 24th, 2003, 03:15 PM
Gandalph's Avatar

Gandalph Gandalph is offline
Captain
 
Join Date: Mar 2002
Location: Santa Cruz, CA
Posts: 947
Thanks: 0
Thanked 0 Times in 0 Posts
Gandalph is on a distinguished road
Default Re: Ruatha: PBW Alternate Scripts

How to get the "Upload" section to show a player has uploaded his turn?

Also the download game file function is not working.

[ October 24, 2003, 14:27: Message edited by: Gandalph ]
__________________
All that is gold does not glitter,
Not all those who wander are lost;
The old that is strong does not wither,
Deep roots are not reached by the frost.

Reply With Quote
  #6  
Old October 24th, 2003, 03:27 PM
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 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.

[ October 24, 2003, 14:30: 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
  #7  
Old October 24th, 2003, 03:48 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 Gandalph:
How to get the "Upload" section to show a player has uploaded his turn?

Also the download game file function is not working.
There has been changes made in this area today, do you have the latest files?

Fyron fixed an error where no gamefiles except those named NGC... could be downloaded!

I fixed an error where the check for uploaded files compensated wrongly for letter case, it should work now.
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 11:53 PM.


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