This site is in archival mode. A replacement is being developed. In the meantime, please use the PBW2 Forums for community discussions. The replacement software for this site will use a unified account system with PBW2, and any newly created threads will carry over.
Welcome to Spaceempires.net
Login or Register

Search
Modules
· Content
· Downloads
· Forums
· Game Info
· Image Gallery
· Links
· Shipyards
· Topics
· Staff

User Info
· Welcome, Anonymous
Membership:
· New: Astorre
· New Today: 0
· New Yesterday: 0
· Overall: 3155

People Online:
· Visitors: 146
· Members: 0
· Total: 146

  

Spaceempires.net :: Problems creating a PBW game :: View topic
Forum FAQ :: Search :: Memberlist :: Usergroups :: Profile :: Log in to check your private messages :: Log in


Problems creating a PBW game

 
Post new topic   Reply to topic    Spaceempires.net Forum Index -> SEIV Play By Web
View previous topic :: View next topic  
Author Message
Glorfang
Space Emperor


Joined: Jul 14, 2009

PostPosted: Thu Jul 16, 2009 7:10 am    Post subject: Problems creating a PBW game Reply with quote

How exactly do you go about creating a PBW game for SEIV? The first one I tried to create I set up for 2 players, but the.gam file we downloaded only had one human player. Obviously, I did something wrong, but I don't know what. Any suggestions? We're both running stock SEIV v1.95(want to keep things as straight forward as possible for our first few games). Am I supposed to start the game (as host) with 2 human palyers, then save the game, then upload it? Or do I set it up on PBW, the start the game?

Any help would be greatly appreciated


Back to top
Fyron
Galactic Guru


Joined: Aug 04, 2003
Location: CA, USA

PostPosted: Thu Jul 16, 2009 5:08 pm    Post subject: Reply with quote

You have to create the savegame with all player empires set up in the proper order (the order they are listed on PBW). The basic process is something like:

1) Create game on PBW with X player slots.
2) Wait for X players to join, and upload their empire plr files.
3) Once you have all the players you'd like, and they have all uploaded their plr files (including you, the host, if you are a player), download the empire file archive. I'd also recommend removing any excess player slots, to eliminate dead weight. eg: You created the game with 10 slot,s but only got 8 players to join. Remove the last two, so you don't have pointless dead player slots floating around. They won't hurt anything, but they are unaesthetic. Wink
4) Set up the game with whatever mod and settings you and the players agreed upon, adding all of the player empires in the exact same order they are listed on the PBW game page. Pay careful attention to the generation of AI empires; many PBW games eliminate them to remove easy fodder.
5) Start game. SE4/5 will generate a.gam file. Upload it to PBW as the first turn, and let the mayhem begin.

As an aside, PBW cannot create savegames, due to a complete lack of support for command line game creation.


For whatever current game you are referring to, you should be able to just create a new savegame with all the players, and upload it as a replacement turn over the one on PBW. You do not need to start a new game on PBW to continue (at least, on PBW2; dunno about the other one).


Smarter than your average Texrak.


Back to top
Glorfang
Space Emperor


Joined: Jul 14, 2009

PostPosted: Fri Jul 17, 2009 3:59 am    Post subject: Reply with quote

Thanks for the reply. The next question I have is, where do the players get the plr file? Isn't that generated by the first turn of the game, or am I missing something? Sorry if I'm being a pain, just trying to figure this out. Confused

Back to top
Fyron
Galactic Guru


Joined: Aug 04, 2003
Location: CA, USA

PostPosted: Fri Jul 17, 2009 4:14 am    Post subject: Reply with quote

Players download the turn in an archive file (eg: adrum.gam file, plus combat/movement replays like adrum.cmb and adrum.mvl and such), and extract it into the appropriate Savegame folder. They then play the turn with SE4/5. Once they are done, they hit end turn, and the game closes and generate the.plr file (eg: adrum_0001.plr). They then upload this file to the PBW server.

Once all players have uploaded, or a deadline has passed, it is time to process the turn. If you are using PBW2, you can either download the turn files manually (via "Download Turn And Plr Files") and process the turn, or you can run the Autohost.

If you process manually, you will need to make sure to zip up all of the new files for your game, and upload them (in one archive file). Basically, grab everything in the Savegame folder starting with the game file name, except for any.plr files. These ancillary files include movement replay files, combat logs, and statistics files (very important for SE5 IIRC).

If you use the autohost, it will handle downloading the turn and empire files, processing the turn, zipping up all the relevant files, and uploading the package to PBW2 for you. I'd highly recommend it.


Smarter than your average Texrak.


Back to top
Glorfang
Space Emperor


Joined: Jul 14, 2009

PostPosted: Fri Jul 17, 2009 5:30 am    Post subject: Reply with quote

I have a bad feeling I'm going to wear out my welcome quickly. I downloaded and configured the.ini for autohost(near as I can tell Confused ), ran it and got "Status orange: Game cannot be processed; mod 'stockse4_195' not found in INI". I changed the info for the executable to the path of the game. Then, per the readme, I left the rest of that line alone. I'm not running any mods, so I left the rest of that alone as well. I tried setting the modpath for stock to the path of the game, and changed the savepath to that of the stock savegame folder. Any suggestions would be greatly appreciated.

Back to top
SuicideJunkie
Leaky Guru


Joined: May 28, 2005
Location: Canada!

PostPosted: Fri Jul 17, 2009 12:15 pm    Post subject: Reply with quote

I guess you're the first one to use it for a stock game.

Code:
<mods>
            <stock>
...
            </stock>

The mod ID tags must match the ID that PBW returns in order to match.
As indicated, PBW is calling stock "stockse4_195", so the tag in the INI file should be changed to:
Code:
<mods>
            <stockse4_195>
...
            </stockse4_195>


Back to top
Fyron
Galactic Guru


Joined: Aug 04, 2003
Location: CA, USA

PostPosted: Fri Jul 17, 2009 4:35 pm    Post subject: Reply with quote

Maybe the INI should come with a set of "stock" mods for various game versions?

Glorfang wrote:
I have a bad feeling I'm going to wear out my welcome quickly.

No worries, man. This stuff is all still quite new and under development. We need people to find the problems with it! Smile


Smarter than your average Texrak.


Back to top
Glorfang
Space Emperor


Joined: Jul 14, 2009

PostPosted: Fri Jul 17, 2009 11:13 pm    Post subject: Reply with quote

Well, since you put it that way...

I now know how Bill Murray felt in Groundhog day. I edited the ini per SJ's instructions, and that cleared that problem up. The problem now is I'm running the same turn over and over. Here's what my ini looks like now:
<baseURL>http://pbw.spaceempires.net/</baseURL>
<loginPath>login/process</loginPath>
<readyGameListPath>node/host</readyGameListPath>
<gamePath>game/</gamePath>
<downloadPath>/downloadturnandplr</downloadPath>
<uploadPath>/uploadturn</uploadPath>
<uploadFormParam>turn_file</uploadFormParam>
</PBW2>
<host>
<archiveCommand>C:\Program Files\WinRAR\rar.exe a -ep $archive $files</archiveCommand>
<extractCommand>C:\Program Files\WinRAR\rar.exe e $archive $destination</extractCommand>
</host>
<games>
<SE4>
<executable> C:\Program Files\Shrapnel Games\Malfador Machinations\Space Empires IV Gold\Se4.exe "$savepath\$gamename.gam" "$password" "0" "$modpath" -nd</executable>
<mods>
<stockse4_195>
<modpath></modpath>
<savepath>C:\Program Files\Shrapnel Games\Malfador Machinations\Space Empires IV Gold\Savegame</savepath>
</stockse4_195>
<cbattles17>
<modpath>carrierbattles1.7</modpath>
<savepath>d:\se4\carrierbattles1.7\savegame</savepath>
</cbattles17>
</mods>
</SE4>
</games>
</config>

And to add insult to injury, now, when I try to process the turns manually, the players get completelly different.gam files. Shocked

So, where do I go from here guys?

On a side note, can we get a smiley that slams his head into the wall?


Back to top
Fyron
Galactic Guru


Joined: Aug 04, 2003
Location: CA, USA

PostPosted: Sat Jul 18, 2009 2:15 am    Post subject: Reply with quote

Which game are you having trouble with?

Smarter than your average Texrak.


Back to top
Glorfang
Space Emperor


Joined: Jul 14, 2009

PostPosted: Sat Jul 18, 2009 3:40 am    Post subject: Reply with quote

first run on PBW 2

Back to top
Fyron
Galactic Guru


Joined: Aug 04, 2003
Location: CA, USA

PostPosted: Sat Jul 18, 2009 5:22 am    Post subject: Reply with quote

I'm going to need more information on what exactly has been going on here. I'm seeing 19 turn folders, but the game is set to turn 2. I see that the game was played til turn 19, with both players uploading plr files. Then both were kicked, the game number was set to 1, and the players rejoined and played a turn or two. Then a lot of game editing happened (presumably changing turn numbers), a lot of files were uploaded and replaced, and so on.

I'm guessing some problem occurred with turn 19? I see that there is a 0kb combat log (.cmb) file in the files for turn 19... Related? At that point, you should have stopped and reported it. I have no idea what you were trying to do, but experiencing problems with, past that point. This makes it difficult to figure out what went wrong then, as well as what has happened past that point.


Smarter than your average Texrak.


Back to top
Glorfang
Space Emperor


Joined: Jul 14, 2009

PostPosted: Sat Jul 18, 2009 6:25 am    Post subject: Reply with quote

Ok, let me try to sort this out. You know I had trouble getting the game to start(filename issues). I got that sorted out, and wanted to run it for a while, get the hang of the system. I stopped at turn 19 because I'd been at it all night and wanted to try out the Autohost. The first attempts I ran into the error above regarding the mod name. After reading SJ's post, and editing the autohost.ini, I started having problems with the turn files downloaded to the players. Because autohost was deleting /overwriting files on my host computer, I had to start over. After the second time, I should have stopped and asked for advice. I was hoping I could resolve the issue myself. Instead, all I did was muddy the waters, and for that I apologize.
So...what do I need to do at this point to correct my errors?


Back to top
Fyron
Galactic Guru


Joined: Aug 04, 2003
Location: CA, USA

PostPosted: Sat Jul 18, 2009 10:57 am    Post subject: Reply with quote

Part of the problem is that the turn files players download are cached. On the first download access, an archive is created with any player-specific files and the *.gam file. On subsequent downloads, the existing file will be served instead. There could probably be a file date comparison with the *.gam file for the turn, to cover weird edge cases where these files end up not getting cleared properly by other actions.

This file caching does not happen at all with the host *.gam + *.plr archive; it is always deleted if present before a fresh copy is generated and sent to client download.

This can probably explain everything after the turn was set back to 1, which doesn't do anything about clearing out old files. Even though everything would look fine from the host perspective, any player "download turn" action is going to be subject to the cached turn files already present in the game folders from the previous run.

=====

As for the first run through, I'm not really sure what might have happened. Do you recall when you started having issues with the player downloads? Was it on that last turn (19), or did it start earlier? Did it happen every turn after you got the autohost to work, or just for some turns?


Smarter than your average Texrak.


Back to top
Glorfang
Space Emperor


Joined: Jul 14, 2009

PostPosted: Sat Jul 18, 2009 5:59 pm    Post subject: Reply with quote

When autohost failed to work the first time, I thought it might be because it needed to start at the begining so to speak, so I started the game over. Once the mod name issue was resolved, I started again. I started the game, uploaded it to the server, then we downloaded the files to the players, played our first turns, and sent the plr files to the server. I ran the console autohost, and things seemed to work, no error messages. It scrolled by so fast, I couldn't read what it did, so I checked the log. Everything seemed ok in the log. Autohost shut itself off after processing the turn(is that normal?). Then we downloaded the new turn files, and started our game. Trouble was we were back at turn 1, and everything we had done was gone. We ran the turn again, uploaded the plr files, and I ran Autohost. Same thing happened. The turn file was sequenced as the second turn, but it was the first turn again. We ran our turns again, but this time I tried to process the turn manually. When we downloaded the turn files, each player had a different one. Not just a different turn, but completely different lists of AI players(I know your feellings about this, but we plan on playing co-op against the ai the first few times).

In the mean time, my.gam files had been overwritten by auto host, so I had to start the gam again, and replace the turn. Each time I did that, I edited the game to start at turn 1 again. I did not realize that would pose a problem, not knowing how your server worked. I thought the files on the server would be overwritten as well, to liimit the amount of space taken by the game.

Is there something in the autohost ini file I need to change to make sure old files are removed?


Back to top
Fyron
Galactic Guru


Joined: Aug 04, 2003
Location: CA, USA

PostPosted: Sun Jul 19, 2009 1:45 am    Post subject: Reply with quote

The autohost should be able to start and stop processing turns at any point in the timeline. It doesn't have to be used from turn 1 (barring random bugs, anyways).

On the second (and all subsequent) game runs, PBW2 found player turn archives for turn 2 already present in the file system, so served them without generating new ones with the new, correct savegame files in them (to save CPU cycles). Note that the host turn file is always wiped out if its found, thus fresh one is always servered to the host/autohost download.

The first turn, presumably uploaded via "replace turn," would have been fine, however. The replace turn function deletes an existing turn directory before recreating it and placing the new turn files in it. The regular "upload next turn" function doesn't explicitly clear any existing files, however. Anything uploaded (the turn file, the *.plr files) will be overwritten as expected, but any previously created player turn download archives will still be their, fouling the system.

I've added some file date checks to replace any old player turn archive that predates the current *.gam file for the turn. This should eliminate the serving of old, incorrect turn files in the future.

I've also added checks to prevent reducing the turn number. There are other potential issues with doing this, and it's safest to just prevent it from happening for now.


Smarter than your average Texrak.


Back to top
Glorfang
Space Emperor


Joined: Jul 14, 2009

PostPosted: Sun Jul 19, 2009 2:43 am    Post subject: Reply with quote

First off, ty for your patience, time, and effort, and sorry for making such a dog's dinner out of something that shoulda been straight forward.

So, in order to proceed without screwing up, I should
1 create a new game
2 replace turn
3 have the players download the.gam file
4 play turn
5 upload player file
6 run autohost
7 repeat steps 3-6

In addition, I'll leave the turn # where it is now, that has no effect in the game right?

Anything else I should know, or suggestions you have?


Back to top
Fyron
Galactic Guru


Joined: Aug 04, 2003
Location: CA, USA

PostPosted: Sun Jul 19, 2009 5:23 am    Post subject: Reply with quote

If your intention is to start over again, I can just wipe out all of the files and set the game back to turn 0 for you.

Smarter than your average Texrak.


Back to top
Glorfang
Space Emperor


Joined: Jul 14, 2009

PostPosted: Sun Jul 19, 2009 4:16 pm    Post subject: Reply with quote

Yes please, and thank you.

Back to top
Fyron
Galactic Guru


Joined: Aug 04, 2003
Location: CA, USA

PostPosted: Sun Jul 19, 2009 5:20 pm    Post subject: Reply with quote

Done.

Smarter than your average Texrak.


Back to top
Display posts from previous:   
Post new topic   Reply to topic    Spaceempires.net Forum Index -> SEIV Play By Web All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB
All logos and trademarks used on this site, all comments and stories posted for reading, all files hosted for download,
and all art work hosted for viewing are property of their respective owners; all the rest copyright 2003-2010 Nolan Kelly.
Syndicate news: SpaceEmpires.net News RSS Feed - Syndicate forums: SpaceEmpires.net Forums RSS Feed
Page Generation: 0.20 Seconds