-
I'm pondering coding up a PHP parser for FS1/2 tables, partially because I'd like to get some experience in parsing text files with PHP, and partially because it might be useful somehow.
Now, first of all, vote whether you think this could end up being useful... the possible applications are quite varied, everything from storing the .tbl info in a real database and outputting parts as needed, to comparing ship stats, to easy adjustment of various ship stats, built-in help for each option, etc etc etc.
Secondly, assuming the majority think this is worthwhile, I'll need some help, primarily in gathering up lists of all possible ship flags, attributes, context help explanations for the options, etc.
Thirdly, again assuming I go ahead with this, is there anyone of you who has past experience with PHP parsing of text files that I can work with? :D
-
Go find DM. He has skillz.
-
DM?
-
http://ironmarch.krabbit.com
Deadman.
He usually lurks on IRC.
-
I think it would be good for newer modders, but not as useful for veterans.
-
it would be good to check if any errors exist in table entries before you test it in fs2 and it doesn't work
-
Ok, I've got initial parsing completed. The script will put a border around the main sections and a grey BG behind the section title and footer (eg. "#Ship Classes" and "#End"). It will display any comments in grey colored test, and will bold the attribute names (eg. $Name: GTF Ulysses).
It also displays a list of links to the different sections in the .tbl up top.
Check it out here (http://dynamic4.gamespy.com/~freespace/tbl_parser/index.php), but keep in mind that it's big - upwards of 375Kb (which is the size of the ships.tbl). Note: the comments' color formatting seems to be messed up in Mozilla/Netscape.
Source:
$table = file("ships.tbl");
$text = '';
while (list (, $line) = each ($table)) {
$line = trim($line);
// BEGIN section check
if (strpos($line, "#") === 0) { // line begins with '#'?
if ($line == "#End") {
$line = '' . $line . "";
} else {
$tbl_heading1_id++;
$index .= '' . $line . '
';
$line = '***** CLASS="tbl_heading1_text">' . $line . "";
}
// END check for section
// BEGIN check for comments
} elseif (strpos($line, ";") === 0) { // line is commented
if (strchr($line,":")) {
list($entry_type,$entry_value) = explode(":",$line);
$entry_type = trim($entry_type);
$entry_value = trim($entry_value);
$line = "";
} else {
$line = "";
}
// END check for comments
// BEGIN data parsing
} elseif (!strlen($line) == 0) { // not blank line
list($entry_type,$entry_value) = explode(":",$line);
$entry_type = trim($entry_type);
$entry_value = trim($entry_value);
if (strchr($entry_value,";") === FALSE) {
// no comment found
} else {
list($entry_value_data,$entry_value_comment) = explode(";;",$entry_value);
$entry_value_data = trim($entry_value_data);
$entry_value_comment = trim($entry_value_comment);
$entry_value = "$entry_value_data\t\t\t";
}
$line = "$entry_type: $entry_value";
//if ($entry_type == "$Name") {
//$entry_list
//}
// END data parsing
} else {
// blank line
}
$text .= $line . "\n";
}
$text .= "\n\n
";
echo $index;
echo $text;
?>
Coming next:
- Color coding more sections
- Linking every occurance of any name attribute ($Name: XXXXX) text to that entry (for example, it would link the "Hornet" in every ship's allowable SBanks to the Hornet entry in the weapons.tbl)
- storage of every attribute and value pair in a database.
Comments and code streamline suggestions welcome. :nod:
-
Err.. now, what exactly does this do?
-
You know, I suggested something like this about a year ago. I believe Narol castigated me for DAYS about how bad an idea this was because it might make things too easy. ;)
Its still a good idea, in my opinion. Good job, Sandwich.
-
What's $index?
EDIT: Nevermind, found it.
-
Aside from wanting to work with PHP for your own 'enjoyment', what's wrong with Wordpad? Table editing (and FREDding :nervous: ) the way our fathers did it.
-
The peoples need for progress must be satisifed.
Now either leave or be put to work in the cotton fields.
-
Well, it beats mining for coal I suppose
-
Originally posted by an0n
What's $index?
EDIT: Nevermind, found it.
Hehehe - and I plan on further enhancing that llittle variable to be a expanding javascript menu system, allowing one-click access to any ship. :D
Originally posted by diamondgeezer
Aside from wanting to work with PHP for your own 'enjoyment', what's wrong with Wordpad?
Nothing, except for the same difference that there is between coding HTML in Notepad, and coding it in something that color-codes it. :)
Originally posted by diamondgeezer
...(and FREDding :nervous: ) the way our fathers did it.
You're insane. ;)
-
I'm still a bit mystified as to what this 'Parser' actually does... mind putting it in plain terms for an idiot like me? :D
-
It parses. :p
It'll turn this:
[q]$Name: GTF Ulysses[/q]
Into this:
[q]$Name: GTF Ulysses[/q]
Throughout the whole .tbl file, automagically!
-
... :confused:
Okay, I'm still confused. Do you mean, then, that it changes the formatting (to blue, bold type in this case) of certain strings in the file? But aren't TBL files opened in Wordpad, where such formatting is irrelevant..? :o
-
He means when it's displayed in the parser, it'll be colored like above. The file will still work normally.
-
Color coding basically helps skim a file faster, so besides all the nifty functions that'll probably be added later, even that is a considerable help :)
-
What nifty functions?
-
Checkbox selction of ships to include in the output .tbl...
Table display (conventional table - with columns and stuff - as opposed to FS1/2 tables) for ship stats comparison and sorting by attributes...
Table modification via user-friendly (theoretically) interface...
And pretty much anything you can think of - within reason. :p
-
sandy: it may be easier to use the fs2 source. i don't know how much C/C++ you know, but its already written and just needs a GUI. plus you can keep it up to date with all the scp shiz thats going on. either way, its still a good thing :nod:
-
Originally posted by PhReAk
sandy: it may be easier to use the fs2 source. i don't know how much C/C++ you know, but its already written and just needs a GUI. plus you can keep it up to date with all the scp shiz thats going on. either way, its still a good thing :nod:
I know zero C/C++, although I do know PHP to an extent. But what does the SCP have to do with this?
-
Ok, PHP help needed. I want to parse through a string, say:
$Allowed PBanks: ( "Subach HL-7" "Morning Star" "Prometheus S" "Maxim")
And surround every quote pair ( "..." ) with custom HTML code, such as a < SPAN >"..."< /SPAN > tag. I assume I need to use either ereg_replace or preg_replace, but I can't fit my brain around the explanations given in the manual. Anybody have a clue?
-
Originally posted by Sandwich
But what does the SCP have to do with this?
we keep adding stuff to the tables (its all optional however)
-
Originally posted by PhReAk
we keep adding stuff to the tables (its all optional however)
Gotcha, but that shouldn't be a problem. The script will parse through the table, and, for example, keep a list of every primary weapon it runns across (anything between quotes inside parentheses following the "$Allowed PBanks:" statement), not just build a static list from the original files and that's it.
EDIT: So it doesn't get lost on the previous page:
Originally posted by Sandwich
Ok, PHP help needed. I want to parse through a string, say:
$Allowed PBanks: ( "Subach HL-7" "Morning Star" "Prometheus S" "Maxim")
And surround every quote pair ( "..." ) with custom HTML code, such as a < SPAN >"..."< /SPAN > tag. I assume I need to use either ereg_replace or preg_replace, but I can't fit my brain around the explanations given in the manual. Anybody have a clue? [/B]
-
This should work, but no guarantees. You'll probably get an extra space or two at least :nervous:
$Weapons = ' "Subach HL-7" "Morning Star" "Prometheus S" "Maxim"'; //This is what $Weapons should be to work with this function, ie no parentheses
//$Output is where the final text gets stored
function WeaponParse($Weapons, $Output)
{
$Weapons = strtr($Weapons,' "','');
$WeaponsArray = explode('"',$Weapons);
foreach($WeaponsArray as $Weapon)
{
if(strlen(strtr($Weapon," ",'')))
{
$Output .= "";
$Output .= $Weapon;
$Output .= "";
}
}
}
-
Thanks, WMCoolmon - but it didn't work. ;) I dunno where it got hung up, but I am unable to troubleshoot scripts that aren't mine - especially ones that use functions I never heard of before. :p But thanks - really! :)
Anyway, I did manage to get my own version working, after discovering the existance of strtok. :D Here's the updates script:
$num_tabs = "\t\t\t"; // number of tab stops between a data line and it's comments; default = 3
$table = file("ships.tbl");
$text = '';
while (list (, $line) = each ($table)) {
$line = trim($line);
// BEGIN section check
if (strpos($line, "#") === 0) { // line begins with '#'?
if ($line == "#End") {
$line = '' . $line . "";
} else {
$tbl_heading1_id++;
$index .= '' . $line . '
';
$line = '***** CLASS="tbl_heading1_text">' . $line . "";
}
// END check for section
// BEGIN check for comments
} elseif (strpos($line, ";") === 0) { // line is commented
if (strchr($line,":")) {
list($entry_type,$entry_value) = explode(":",$line);
$entry_type = trim($entry_type);
$entry_value = trim($entry_value);
$line = "";
} else {
$line = "";
}
// END check for comments
// BEGIN data parsing
} elseif (!strlen($line) == 0) { // not blank line
list($entry_type,$entry_value) = explode(":",$line);
$entry_type = trim($entry_type);
$entry_value = trim($entry_value);
// BEGIN find quoted text
$first_quote = strpos($entry_value, '"');
$last_quote = strrpos($entry_value, '"');
if ($first_quote && $last_quote) {
$quoted = substr($entry_value,$first_quote,$last_quote - $first_quote + 1);
$entry_value_new = trim(substr($entry_value,0,$first_quote));
$tok = strtok($quoted,'"');
while ($tok) {
if (trim($tok) == "") {
// do nothing if token is empty
} else {
$entry_value_new .= " \"$tok\" ";
}
$tok = strtok('"');
}
$entry_value_new .= trim(substr($entry_value,$last_quote + 1));
$entry_value_old = $entry_value;
$entry_value = $entry_value_new;
}
// END find quoted text
if (strchr($entry_value,";") === FALSE) {
// no comment found
} else {
list($entry_value_data,$entry_value_comment) = explode(";;",$entry_value);
$entry_value_data = trim($entry_value_data);
$entry_value_comment = trim($entry_value_comment);
$entry_value = "$entry_value_data" . $num_tabs . "";
}
$line = "$entry_type: $entry_value";
//if ($entry_type == "$Name") {
//$entry_list
//}
// END data parsing
} else {
// blank line
}
$text .= $line . "\n";
}
$text .= "\n\n
";
echo $index;
echo $text;
?>
And here's (http://dynamic4.gamespy.com/~freespace/tbl_parser/index.php) the file again - updated. Lemme know if you spot anything messed up. ;)
-
Can you make the page background black? It'd be easier on the eyes.
-
I've always wondered why tblview wouldn't let you change values, that would have made life so much easier!
Flipside :D
-
Originally posted by Raa Tor'h
Can you make the page background black? It'd be easier on the eyes.
Done.
-
No problem. It was kind of fun to do some work with PHP again, even if it didn't work. :D
Suggestions/nitpicking:
1) Grouping things like Afterburner and Trail (or maybe even just indenting the optional values) would look better, IMHO.
2) Separating ship specs would give the table a cleaner look.
3) There's still no title. :p
-
Originally posted by Sandwich
Done.
Thats so much better.
Now that I can see what it is, I can say "not bad, not bad"
-
Originally posted by WMCoolmon
No problem. It was kind of fun to do some work with PHP again, even if it didn't work. :D
Suggestions/nitpicking:
1) Grouping things like Afterburner and Trail (or maybe even just indenting the optional values) would look better, IMHO.
2) Separating ship specs would give the table a cleaner look.
3) There's still no title. :p
1) You mean the stuff beginning with plus signs? I plan to next.
2) Seperating ship specs? It's all ship specs! :p
3) Meh. :p
-
Originally posted by Sandwich
2) Seperating ship specs? It's all ship specs! :p
Separating each individual ship spec, then...so that the GTF Ulysses is separate from the GTF Hercules in some way besides that little space. :p
-
Gotcha. :)
Added features:
- Indented lines beginning with "+".
- Horizontal rule between unit entries (above every "$Name: ****").
- Linked index of every unit with color-coding according to species, including "Ancient/Ancients" and a special "Other" catch-all, and placed it all in a tidy list. :D
Clickety-click! (http://dynamic4.gamespy.com/~freespace/tbl_parser/index.php)
$num_tabs = "\t\t\t"; // number of tab stops between a data line and it's comments; default = 3
$table = file("ships.tbl");
$text = '';
$html_ul_state = "closed";
$html_li_state = "closed";
while (list (, $line) = each ($table)) {
GLOBAL $html_ul_state;
$line = trim($line);
// BEGIN section check (starts with "#")
if (strpos($line, "#") === 0) { // line begins with '#'?
if ($line == "#End") {
$line = '' . $line . "";
} else {
$tbl_heading1_id++;
if ($html_ul_state == "open") {
$index .= "\n\n";
$html_ul_state = "closed";
}
$index .= '' . $line . '';
$line = '***** CLASS="tbl_heading1_text">' . $line . "";
}
// END check for section
// BEGIN check for comments (start with ";")
} elseif (strpos($line, ";") === 0) { // line is commented
if (strchr($line,":")) {
list($entry_type,$entry_value) = explode(":",$line);
$entry_type = trim($entry_type);
$entry_value = trim($entry_value);
$line = "";
} else {
$line = "";
}
// END check for comments
// BEGIN check for subentries (start with "+")
} elseif (strpos($line, "+") === 0) { // line is subentry
if (strchr($line,":")) {
list($entry_type,$entry_value) = explode(":",$line);
$entry_type = trim($entry_type);
$entry_value = trim($entry_value);
$line = "\t$entry_type:\t$entry_value";
} else {
$line = "\t$line";
}
// END check for subentries
// BEGIN data parsing
} elseif (!strlen($line) == 0) { // not blank line
list($entry_type,$entry_value) = explode(":",$line);
$entry_type = trim($entry_type);
$entry_value = trim($entry_value);
// BEGIN find quoted text
$first_quote = strpos($entry_value, '"');
$last_quote = strrpos($entry_value, '"');
if ($first_quote && $last_quote) {
$quoted = substr($entry_value,$first_quote,$last_quote - $first_quote + 1);
$entry_value_new = trim(substr($entry_value,0,$first_quote));
$tok = strtok($quoted,'"');
while ($tok) {
if (trim($tok) == "") {
// do nothing if token is empty
} else {
$entry_value_new .= " \"$tok\" ";
}
$tok = strtok('"');
}
$entry_value_new .= trim(substr($entry_value,$last_quote + 1));
$entry_value_old = $entry_value;
$entry_value = $entry_value_new;
}
// END find quoted text
if (strchr($entry_value,";") === FALSE) {
// no comment found
} else {
list($entry_value_data,$entry_value_comment) = explode(";;",$entry_value);
$entry_value_data = trim($entry_value_data);
$entry_value_comment = trim($entry_value_comment);
$entry_value = "$entry_value_data" . $num_tabs . "";
}
$line = "$entry_type: $entry_value";
// BEGIN check for entry start and name
if ($entry_type == "\$Name") {
if ($html_li_state == "open") {
$index .= "\n\n";
$html_li_state = "closed";
}
if ($html_ul_state == "closed") {
$index .= "\n\n";
$html_ul_state = "open";
}
$line = "
\n
\n $index .= "\n- \n\t";
$html_li_state = "open";
$index .= "$entry_value";
$entry_list_id++;
}
// END check for entry start and name
// BEGIN check for species
if ($entry_type == "\$Species") {
switch (trim($entry_value)) {
case "Terran":
case "Vasudan":
case "Shivan":
case "Ancient":
case "Ancients":
$index .= "\t($entry_value) ";
break;
default:
$index .= "\t(Other - $entry_value)";
}
$html_li_state = "closed";
}
// END check for species
// END data parsing
} else {
// blank line
}
$text .= $line . "\n";
}
$text .= "\n
\n
";
echo $index;
echo $text;
?>
-
Okay, now for you next trick, lets see you put the index in a frame to the left, like Javadoc does with javacode documentation. (http://java.sun.com/j2se/1.4.2/docs/api/) :D
-
Yeah, what mik said. That'd make it uberusefulâ„¢ :D
-
The headings (names) for the fighters don't seem to show up now. :confused:
-
Originally posted by WMCoolmon
The headings (names) for the fighters don't seem to show up now. :confused:
I fixed it a while ago, but forgot to post. Sorry.
Originally posted by mikhael
Okay, now for you next trick, lets see you put the index in a frame to the left, like Javadoc does with javacode documentation. (http://java.sun.com/j2se/1.4.2/docs/api/) :D
Pfft.... small play (http://dynamic4.gamespy.com/~freespace/tbl_parser/index.php). ;)
And that's all from one single index.php... it generates the frameset and both the left navigation bar and the main section. :D
Heck, I even added the page title! ;)
Should I keep posting the PHP code? It's getting kinda big... 7kb ATM.
-
Originally posted by Sandwich
Pfft.... small play (http://dynamic4.gamespy.com/~freespace/tbl_parser/index.php). ;)
except it doesn't seem to work. at least not for me (using opera)
-
Originally posted by kode
except it doesn't seem to work. at least not for me (using opera)
Opera, eh? Try viewing it in IE and see if whatever isn't working works. Did this just get broken with this latest update?
Anyone else using Opera and not being able to view the parser?
-
Exploder loads it poifect. :)
-
Oi know, I wanted Kode to load it in Explorer so he could see how it was supposed to be, and tell me what's different in Opera.
-
Originally posted by Sandwich
Opera, eh? Try viewing it in IE and see if whatever isn't working works. Did this just get broken with this latest update?
Anyone else using Opera and not being able to view the parser?
that navigational thingy didn't work yesterday. seems to work today tho. odd.
-
Originally posted by Sandwich
Pfft.... small play (http://dynamic4.gamespy.com/~freespace/tbl_parser/index.php). ;)
And that's all from one single index.php... it generates the frameset and both the left navigation bar and the main section. :D
Heck, I even added the page title! ;)
Should I keep posting the PHP code? It's getting kinda big... 7kb ATM.
You rock my world. Post a link to a txt file containing the code--or add an option to cause the PHP to spit out its own code. Something like "...tbl_parser/index.php?raw", if you follow me.
-
Originally posted by Sandwich
I fixed it a while ago, but forgot to post. Sorry.
I still don't see the ship names in the main frame. :confused:
-
They're there... I get them atleast.
-
Originally posted by WMCoolmon
I still don't see the ship names in the main frame. :confused:
What browser are you using? Take a screenie, if you don't mind. :)
-
sorry, my head hurts. can someone put this in layman's terms?
-
Originally posted by Unknown Target
sorry, my head hurts. can someone put this in layman's terms?
Simple. Go here (http://dynamic4.gamespy.com/~freespace/tbl_parser/index.php) and look at what the page does to a regular ships.tbl. :)
Anyway, after coding in frameset generation, I tried to go over the script, fix a few bugs, and modularize the thing into functions. Ha. Ha-ha. Ha-ha-ha. :rolleyes:
Anyway, after enough frustration for one day, I decided to streamline the whole thing by drawing up a flowchart for the parsing process. Lacking a nearby paper and the strength to get up and hunt one down, I ripped open my cellphone bill envelope and started writing. ;)
I've attached the file - feel free to nitpick and find things I missed before I start coding again. :p
-
oooooh, ok, major koolio. :yes:
What you're trying to do is make it so that you can edit .TBL formats in this fashion, right? That's a great idea, will really help the new guys with .tbl modding, and streamline the process for the vets ;)
-
Where have all the ship names gone? (http://members.cox.net/~wmcoolmon/images/shipstbl.gif)
There's a screenshot. :cool:
-
Originally posted by Unknown Target
oooooh, ok, major koolio. :yes:
What you're trying to do is make it so that you can edit .TBL formats in this fashion, right? That's a great idea, will really help the new guys with .tbl modding, and streamline the process for the vets ;)
In the end, yeah. First of all, though, is making sure that it parses .TBL files perfectly, otherwise if I try to actually build .TBL files with this thing, it could be majorly screwy.
Originally posted by WMCoolmon
Where have all the ship names gone? (http://members.cox.net/~wmcoolmon/images/shipstbl.gif)
There's a screenshot. :cool:
Hmm.... that's weird. What color depth are you running at? And which browser?
The white blocks aren't the ship names, BTW - that's the ship species, with each species having a differently colored background - green for Terran, beige for Vasudan, Red for Shivan, and two other colors - teal and blue, I believe - for Ancient(s) and anything else. :)
Mik and anyone else interested, I've attached the source code for the frames version. :)
-
Er, ignore that. That's the result of accidentally making a color in the GIF transparent. :nervous: Those look fine, normally.
In the main frame, though, the ship names don't show up - the links don't work, either.
Here's the chunk of missing stuff for the Ulysses:
$Name: GTF Ulysses
$Short name: TFight
$Species: Terran
+Type: XSTR("Space Superiority", 2939)
+Maneuverability: XSTR("Excellent", 2940)
+Armor: XSTR("Light", 2941)
+Manufacturer: XSTR("Triton / Mekhu", 2942)
+Description: XSTR( " ", 2943)
-
Originally posted by WMCoolmon
Er, ignore that. That's the result of accidentally making a color in the GIF transparent. :nervous: Those look fine, normally.
In the main frame, though, the ship names don't show up - the links don't work, either.
Here's the chunk of missing stuff for the Ulysses:
$Name: GTF Ulysses
$Short name: TFight
$Species: Terran
+Type: XSTR("Space Superiority", 2939)
+Maneuverability: XSTR("Excellent", 2940)
+Armor: XSTR("Light", 2941)
+Manufacturer: XSTR("Triton / Mekhu", 2942)
+Description: XSTR( " ", 2943)
[/B]
Hmm... that is weird. What version of IE is that happening under? And is that the page online, or are you running the PHP locally or on some other server, perhaps with a differently formatted ships.tbl?
-
Originally posted by WMCoolmon
Er, ignore that. That's the result of accidentally making a color in the GIF transparent. :nervous: Those look fine, normally.
In the main frame, though, the ship names don't show up - the links don't work, either.
Here's the chunk of missing stuff for the Ulysses:
$Name: GTF Ulysses
$Short name: TFight
$Species: Terran
+Type: XSTR("Space Superiority", 2939)
+Maneuverability: XSTR("Excellent", 2940)
+Armor: XSTR("Light", 2941)
+Manufacturer: XSTR("Triton / Mekhu", 2942)
+Description: XSTR( " ", 2943)
[/B]
Examine the page source in IE when you're missing stuff. You might also want to send Sandwich a copy of the html you're seeing. that would let him see if there's an intermittent failing in the script or other such problem.
-
Bumpitty! :)
Ok, I've got a few questions about the .TBL files:
1. What's with these lines? [q]+Description: XSTR( " ", 2943)
$end_multi_text[/q]
The use of $end_multi_text seems to be optional, and seems to be used after an XSTR() thingy. Can anyone tell me more? SCP dudes, perhaps?
2. The XSTR() itself has those mysterious numbers in the second half. When writing one's own table entry, I've been told to put in a -1 to avoid any conflicts. So what's the purpose of those numbers anyway?
3. Why do some lines start with a "+" as opposed to the regular "$"? Are they sub-data types of some sort?
-
i can't really help with the tables or PHP stuff, but i like what you're doing, and i see a major use for this in FW (http://nodewar.penguinbomb.com/fleetwars/)
because we were thinking about dynamicly generating everything from the table to the mision itself using PHP.
-
What really grabed my attention was the possibility to eventually store this in some real database. Now, that would be awsome - SQL anyone?
Beside I think this work should have been done ages ago, Sandwich you're one of my personal heroes!
-
Upgraded to IE 6 and it worked. But I think I found the problem...
$Name: GTF Ulysses
-
Originally posted by WMCoolmon
Upgraded to IE 6 and it worked. But I think I found the problem...
$Name: GTF Ulysses
Ahh, yes, I found that overlooked tag and fixed it already.
I've got the parser to the point where it parses through the ships.tbl file flawlessly (AFAIK), so now it'sonlt a matter of figuring out how to make it store and retrieve the table data into a database. This could be made sooo complex I don't know where to start.
For example, I can see it eventually being a database that stores every single tbl entry for every ship submitted. In addition, it could store user- and campaign-specific modifications to the baseline entries. So you'd have a GTF Ulysses, a GTF Ulysses (Sandwich interceptor mod), a GTF Ulysses (Styxx's fire-support mod), etc.
You could save and load various selection sets, eg. FS2 standard, Inferno tables, etc, and then add and remove individual ships from that starting point.
Then you'd select "Compile .TBL", and it would piece together a clean .TBL file.
-
well, that would sound great.
as for the DB, i'd say store it all under unique names, so starting with the name of the campaign it comes from, or the maker, and then the name of the ship, wityh perhaps an added number. like this:
inf-GTT Argo
sandwich-Ulysses interceptor mod-v1
and then a field in that record containing the name for use in the tbl file itself.
-
;7
Yes!! With a master DB of submitted ship types, it would be possible to make FS2 auto-download the needed TBL info to use a ship.
All you'd need would be a POF with the ship's database ID...
-
erm, well, i think you should be abeto contain into the DB too, so all you would ned is the exact db name of the ship.
-
Sorry to sound harsh, guys, but dream on. :p There isn't a chance that FS2 would download ship info dynamically - the idea is ridiculous, if for no other reason than size and always-on constraints for the poor modem users.
-
Originally posted by Sandwich
Sorry to sound harsh, guys, but dream on. :p There isn't a chance that FS2 would download ship info dynamically - the idea is ridiculous, if for no other reason than size and always-on constraints for the poor modem users.
A single tbl entry isn't that large, really. And if it really is too large...well, there are ways of dealing with that :drevil:
-
Yeah, but you were talking about storing the POF as well... might as well store the textures, too... oh, and since the SCP now allows multiple thousands of polies per ship in a mission, the POF size would increase tenfold. :doubt: