PDA

View Full Version : PBW needs your help


geoschmo
February 12th, 2008, 09:04 PM
But this time it isn't money or parts. I need knowledge, or someone (or more than one) willing to spend some time to come up with the answers if they are not already known.

We've started supporting custom shipsets on PBW, but I don't really understand all the ins and outs of how it works in SE5. And unfortunately I don't have the time to do all the testing needed to answer these questions myself.

I need to know what files in a custom shipset folder are absolutely necessary to the ability of the game to process turns at the command line. You don't have to know anything about the PBW code. PBW simply uses the SE5 command line options. You can do the same thing using the command prompt or a batch file.

Some of the shipset folders are huge. Even the stock races are bigger than 10MB. Multiply that by the number of versions and mods we support, and it gets to be a bit of a waste of space. I have an inkling that not all the files are needed for the game to actually process the turns at the command line. Anything I can strip out without causing the turns to fail or the game to switch the user to default race files will be appreciated.

Please, enlighten me. http://forum.shrapnelgames.com/images/smilies/happy.gif

Geoschmo

Captain Kwok
February 12th, 2008, 09:33 PM
I think you can eliminate 90% of the folder size by getting rid of all the image files. Almost all of the text files could be referenced in a given turn and they can contain custom information, so I'd just leave them since they are small. The compiled script files (.csf) are needed as well.

On the mod side of things, all the image files could be dropped. That should clear up considerable space.

geoschmo
February 12th, 2008, 09:47 PM
But wouldn't eliminating the image files cause the game to revert to using the Abbidon(or whatever it defaults to) shipset? Or are you saying all that is neccesary to keep the empire linked to the proper shipset is that the server has the properly named folder in the empire directory? Geo raises hand and prepares to slap himself upside the head...

Edit: No, that's not right. An empty folder wont work. Is it just some specific text files? Or a certain one or few image files? The turns will process with nothing. What I need to know is how little can they process and not change the empire image the next time the player opens their turn.

This should only affect player empires anyway. If they miss their turn and the AI takes over, whether it follows the AI behavior prescribed by the particular mod they are using will be the least of their concerns. The issue of AI behavior would be nice to deal with, but probably beyond the scope of what I will be able to accomplish. There are simply too many variables.

All I'm trying to do is make it so you can use a custom shipset in a PBW game and your empire will still look like it's supposed too when you get your turn back from PBW.

Captain Kwok
February 12th, 2008, 10:13 PM
Yes, just keep all the empire folders with the text/csf files stored in it. That should keep everything in order for the players.

geoschmo
February 12th, 2008, 11:26 PM
Captain Kwok said:
Yes, just keep all the empire folders with the text/csf files stored in it. That should keep everything in order for the players.



No, that's not correct. When I run a turn with just those files and no image files the game changes the empire to another shipset.

Captain Kwok
February 13th, 2008, 12:00 AM
I was under the impression that running the game using the command line to process the turn neglected to load any images. If that's not the case, then MM should be considering that. It should be so as long as the model files are present (needed for combat calculations) and the slot layouts are present (for damage allocation, design creation) and other AI important files like the scripts or speech files, that it should run with no issues.

geoschmo
February 13th, 2008, 12:14 AM
Hey, welcome to my world Kwok. http://forum.shrapnelgames.com/images/smilies/happy.gif These are issues that have been brought up over and over to no avail. This is why I've delayed a year in implementing custom shipsets for SE5. At this point I'm no longer trying to get the issues resolved and I'm simply trying to come up with the best way to work around them and get it done with what we've been given.

geoschmo
February 13th, 2008, 12:15 AM
By the way, what's a "model file"?

Captain Kwok
February 13th, 2008, 12:56 AM
The model files are the .x files in an empire's folder. They're definitely required for combat resolution.

Does SE4 require the images for command prompt processing?

geoschmo
February 13th, 2008, 01:58 AM
No, SE4 doesn't require shipset images. You can run without the custom race folder at all. It will simply use the default AI files and then when you open your empire will still have your pics attached to it. If you open the turn without the pics on your computer it will pick another picset at random, but no permanent change is made. Once you get on a computer with the picset you used when setting up the empire originally, it will look right.

So the game needs the .x files for actual damage calulations? That's not just for display purposes during the replay? So I guess those files would be required then. That's the bulk of the race folder right there for most of the ones I've looked at. What does the game do if you have a shipset with no .x files I wonder.

Captain Kwok
February 13th, 2008, 02:26 AM
Well technically you shouldn't have a ship set without any model files or else it's not really a fun custom set. I would think it would use the default models and slot layouts since that's what happens with neutral races, which have no models or layout references in their folders. Not sure if that would be applicable to the middle of a game if the original referenced models or slots file were not found anymore. I would think that would scramble something up since the slot layouts would be different.

geoschmo
February 13th, 2008, 11:00 AM
Well, that's one of the things I'm hoping someone can take it upon themselves to test for us. It's about all I can manage to create a test game and run the first turn to make sure the empire image hasn't changed. Doing detailed battle damage analysis takes more time than I have available.

se5a
February 14th, 2008, 12:01 AM
maybe if pushed, aaron could get it to run with the .x file, but without the textures.

basicly each model, has a .x file and one more more texture files. the .x file just describes the triangles which make up a 3d model, the texture files are just the pretty skin.

geo, one way to support custom shipsets with mods, is to get the mod designers to include a folder with the 3rd party shipsets in the modname\empires folder. this folder only needs the AI files IF the entire complete shipset is in the default(sev\empires\shipsetname) empires folder as well.

The benifits of this is that PBW admins only need to keep the default empire folder up to date.

The Problems with this, is that mod devs need to keep the mods up to date, OR allow the mods to use the default empires via the "Allow Main Empires:= TRUE" line in the mod_definition.txt in the mod folder.
problem with the latter is that it shows two shipsets when choosing your shipset at the empire setup.

David E. Gervais
February 14th, 2008, 06:38 AM
Here's an idea.. on the PBW server replace all the texture images with a small 32x32 white (or any color) image that takes very little space.

run a batch program to rename and copy the PlaceholderTexture.bmp to the target mod folder.

I attached a small 32x32 white .bmp to this post. (It's 4k in size)

That's the only 'workaround' I can see. and it would most definately reduce the amount of space taken up on the PBW server.

another way would be to batch 'scale' all the images in the mod folder to 32x32.

Just an idea from an atrist's point of view.

Cheers! http://forum.shrapnelgames.com/images/smilies/happy.gif

capnq
February 14th, 2008, 08:33 AM
se5a said: maybe if pushed, aaron could get it to run with the .x file, but without the textures.

Probably not, because:
geoschmo said: These are issues that have been brought up over and over to no avail. This is why I've delayed a year in implementing custom shipsets for SE5. At this point I'm no longer trying to get the issues resolved and I'm simply trying to come up with the best way to work around them and get it done with what we've been given.

geoschmo
February 14th, 2008, 11:51 AM
David E. Gervais said:
Here's an idea.. on the PBW server replace all the texture images with a small 32x32 white (or any color) image that takes very little space.

run a batch program to rename and copy the PlaceholderTexture.bmp to the target mod folder.

I attached a small 32x32 white .bmp to this post. (It's 4k in size)

That's the only 'workaround' I can see. and it would most definately reduce the amount of space taken up on the PBW server.

another way would be to batch 'scale' all the images in the mod folder to 32x32.

Just an idea from an atrist's point of view.

Cheers! http://forum.shrapnelgames.com/images/smilies/happy.gif



I did something very much like this with SE4. However, what I ran into with SE4 was that for some of the game images, not the shipset images, changing the dimensions of the bitmap caused errors. Since I don't totally understand how the .x files and the texture bitmaps relate to each other, I was concerned that this might cause a problem with SE5 shipsets.

The other odd thing is that there are wide disparities in sizes of files between shipsets. For example, in the Cardassian custom shipset, the total folder size is 20MB. The largest .x file is 67kb, and the total of the .x files is only about .5MB. On the other end of the spectrum, the Shadows shipset folder size is smaller, only 18MB, but the .x files there are more than half the total, 10MB. The spacestation.x and starbase.x files for the shadows set are 1.5MB each. http://forum.shrapnelgames.com/images/smilies/eek.gif

I'm probably just going to copy the shipsets to every mod folder and be done with it.

se5a
February 14th, 2008, 02:54 PM
you can actualy open a .x file with a text editor such as notebook. it's all just a bunch of coordinates. inside the .x file the texture file is called, there is no requirement for it to be any specific size. the larger .x files probibly mean that the shipset has a higher poly count. if the textures are bigger then the texture detail will be better. the higher these two are, the better the ships tend to look, but the more work the computer has to do.

DG's idea should work for the texture files, with the portrate files you may have to keep them the same size. (you can easly see which is a texture file in most shipsets by looking at it - texture files look like someone has peeled the ship like an orange.)

Fyron
February 14th, 2008, 03:49 PM
geoschmo said:
I'm probably just going to copy the shipsets to every mod folder and be done with it.


Why?! If you don't care about what the AI does in a mod during missed turns, all you need to do is set the Allow Main Empires setting to TRUE, and install shipsets to the stock folder. You don't need to do anything else just to get a shipset callable from a mod...

At worst, to attain AI support with custom sets, all you would need to do is have a program that creates blank empire folders in each mod for each installed shipset (in the stock Empires folder), with just a copy of the two .csf scripts from another custom AI empire in the mod. There is no reason to duplicate models, textures, whatever inside mods.


se5a said:
you can actualy open a .x file with a text editor such as notebook. it's all just a bunch of coordinates.


That's not always true; some of the .x models that ship with the game appear to be in a binary format, rather than plain text. A number of the planet models are like this, for example.

se5a
February 14th, 2008, 03:50 PM
Fyron tells me that he thinks the doubling up of the shipset at empire creation has been fixed.

se5a
February 14th, 2008, 04:01 PM
Fyron said:


se5a said:
you can actualy open a .x file with a text editor such as notebook. it's all just a bunch of coordinates.


That's not always true; some of the .x models that ship with the game appear to be in a binary format, rather than plain text. A number of the planet models are like this, for example.



really? I'd not looked at them all. still, the custom ones are probibly txt.

Captain Kwok
February 14th, 2008, 08:59 PM
se5a said:
Fyron tells me that he thinks the doubling up of the shipset at empire creation has been fixed.

It hasn't, but it would be fine for Geo just to set all mods to allow main empires and just keep all the custom sets in the default empires folder.

geoschmo
February 14th, 2008, 11:19 PM
Captain Kwok said:
It hasn't, but it would be fine for Geo just to set all mods to allow main empires and just keep all the custom sets in the default empires folder.

Can anyone think of any negative ramifications of doing this? It wouldn't affect the computer players at all? Like causing them to use the stock ai behavior instead of using the mod ai files? What if there are races included in the mod that don't have race specific ai files and the modder is counting on them using the default mod folder ai files.

Captain Kwok
February 14th, 2008, 11:24 PM
There's no "use AI from race" setting in SE5, so players can only pick from the default minister styles, which are AI scripts contained in the mod's default folder.

Captain Kwok
February 21st, 2008, 03:23 PM
Aaron said that only the model texture images are required. Resizing them to 64x64 (or less I would assume) from 256x256 should be ok. So you could cut down the folder size by at least half if not more for most sets.

Suicide Junkie
February 21st, 2008, 07:21 PM
Or just 1x1 white pixels.