Jump to content
XCOMUFO & Xenocide

Xnet.xml


Recommended Posts

Hi

 

Since from programing view xnet.xml will have no more changes (at least until v.1+) I want to move main copy of xnet.xml into CTD resposibility. Then people from CTD department can add there recently completed texts and ALL people can help moving texts from .rtf to final .xml. Programmers from time to time (and before every release version) will (at least i will!!) copy this file from SVN Assets into working version.

 

What do you think? (Especially You Azrael :) )

 

Beetle

Link to comment
Share on other sites

Hi

 

Since from programing view xnet.xml will have no more changes (at least until v.1+) I want to move main copy of xnet.xml into CTD resposibility. Then people from CTD department can add there recently completed texts and ALL people can help moving texts from .rtf to final .xml. Programmers from time to time (and before every release version) will (at least i will!!) copy this file from SVN Assets into working version.

 

What do you think? (Especially You Azrael :) )

 

Beetle

I like it, I was thinking of doing it in a few weeks since I don't have time right now, but Mad is already doing it, once full it will be easier to update, I hope :)

Link to comment
Share on other sites

Hi

 

Since from programing view xnet.xml will have no more changes (at least until v.1+) I want to move main copy of xnet.xml into CTD resposibility. Then people from CTD department can add there recently completed texts and ALL people can help moving texts from .rtf to final .xml. Programmers from time to time (and before every release version) will (at least i will!!) copy this file from SVN Assets into working version.

 

What do you think? (Especially You Azrael :) )

 

Beetle

I like it, I was thinking of doing it in a few weeks since I don't have time right now, but Mad is already doing it, once full it will be easier to update, I hope :)

A few weeks ago I was working on a tool to automatically generate xnet.xml from the CTD items. It's about 30% done. If you like, I can probably have it done by Monday. Although Azrael said something about such a tool already existing.

Link to comment
Share on other sites

Hi

 

Since from programing view xnet.xml will have no more changes (at least until v.1+) I want to move main copy of xnet.xml into CTD resposibility. Then people from CTD department can add there recently completed texts and ALL people can help moving texts from .rtf to final .xml. Programmers from time to time (and before every release version) will (at least i will!!) copy this file from SVN Assets into working version.

 

What do you think? (Especially You Azrael :) )

 

Beetle

I like it, I was thinking of doing it in a few weeks since I don't have time right now, but Mad is already doing it, once full it will be easier to update, I hope :)

A few weeks ago I was working on a tool to automatically generate xnet.xml from the CTD items. It's about 30% done. If you like, I can probably have it done by Monday. Although Azrael said something about such a tool already existing.

I... did? :huh?:

Link to comment
Share on other sites

A few weeks ago I was working on a tool to automatically generate xnet.xml from the CTD items. It's about 30% done.  If you like, I can probably have it done by Monday.  Although Azrael said something about such a tool already existing.

I... did? :huh?:

I thought you did, that's why I stopped work on it. However, as I seem to have deleted all e-mails where I mentioned it, I guess I imagined it. At any rate, I'm happy to finish it, if anyone (e.g. you or Mad) thinks it would be of use.

Link to comment
Share on other sites

A few weeks ago I was working on a tool to automatically generate xnet.xml from the CTD items. It's about 30% done.  If you like, I can probably have it done by Monday.  Although Azrael said something about such a tool already existing.

I... did? :huh?:

I thought you did, that's why I stopped work on it. However, as I seem to have deleted all e-mails where I mentioned it, I guess I imagined it. At any rate, I'm happy to finish it, if anyone (e.g. you or Mad) thinks it would be of use.

It'd certainly help update xnet.xml, that would be real nice :)

Link to comment
Share on other sites

A few weeks ago I was working on a tool to automatically generate xnet.xml from the CTD items. It's about 30% done.  If you like, I can probably have it done by Monday.  Although Azrael said something about such a tool already existing.

I... did? :huh?:

I thought you did, that's why I stopped work on it. However, as I seem to have deleted all e-mails where I mentioned it, I guess I imagined it. At any rate, I'm happy to finish it, if anyone (e.g. you or Mad) thinks it would be of use.

Yea! Complete it! I will stop compiling the xnet.xml 'till Monday, if you can really do it! :)

For now, we agreed (at least I think so, did we Az? :) ) that the first two lines of each CT (so the Title and the Adress) go in the shortentry, the main text in the body and the last fluff - which will be most of the times the last paragraph into the fluff line...).

I included the xnet.xml I managed to come up with until now.

 

xnet2.xml

Link to comment
Share on other sites

A few weeks ago I was working on a tool to automatically generate xnet.xml from the CTD items. It's about 30% done.  If you like, I can probably have it done by Monday.  Although Azrael said something about such a tool already existing.

I... did? :huh?:

I thought you did, that's why I stopped work on it. However, as I seem to have deleted all e-mails where I mentioned it, I guess I imagined it. At any rate, I'm happy to finish it, if anyone (e.g. you or Mad) thinks it would be of use.

Yea! Complete it! I will stop compiling the xnet.xml 'till Monday, if you can really do it! :)

For now, we agreed (at least I think so, did we Az? :) ) that the first two lines of each CT (so the Title and the Adress) go in the shortentry, the main text in the body and the last fluff - which will be most of the times the last paragraph into the fluff line...).

I included the xnet.xml I managed to come up with until now.

 

xnet2.xml

Sure, though it really seems irrelevant what goes where, we are not using the short entry for what it was originally thought of, apparently.

Link to comment
Share on other sites

Sure, though it really seems irrelevant what goes where, we are not using the short entry for what it was originally thought of, apparently.

 

True, but maybe one day we will, so we should decide how to put it and do it like this...

Link to comment
Share on other sites

Sure, though it really seems irrelevant what goes where, we are not using the short entry for what it was originally thought of, apparently.

 

True, but maybe one day we will, so we should decide how to put it and do it like this...

Aha, but the short entry wasn't "made" to contain the title, AFAIK, it was made to contain a summary, so if we were to use it, we'd have to *sigh* change it all back to however we want it, but I wouldn't worry, I don't think that'll happen soon.

Link to comment
Share on other sites

Sure, though it really seems irrelevant what goes where, we are not using the short entry for what it was originally thought of, apparently.

 

True, but maybe one day we will, so we should decide how to put it and do it like this...

Aha, but the short entry wasn't "made" to contain the title, AFAIK, it was made to contain a summary, so if we were to use it, we'd have to *sigh* change it all back to however we want it, but I wouldn't worry, I don't think that'll happen soon.

...so? We just leave it as I started it? Oki! Who agrees? Me! :D

Link to comment
Share on other sites

Sure, though it really seems irrelevant what goes where, we are not using the short entry for what it was originally thought of, apparently.

 

True, but maybe one day we will, so we should decide how to put it and do it like this...

Aha, but the short entry wasn't "made" to contain the title, AFAIK, it was made to contain a summary, so if we were to use it, we'd have to *sigh* change it all back to however we want it, but I wouldn't worry, I don't think that'll happen soon.

...so? We just leave it as I started it? Oki! Who agrees? Me! :D

Sure :)

Link to comment
Share on other sites

A few weeks ago I was working on a tool to automatically generate xnet.xml from the CTD items. It's about 30% done.  If you like, I can probably have it done by Monday.  Although Azrael said something about such a tool already existing.

I... did? :huh?:

I thought you did, that's why I stopped work on it. However, as I seem to have deleted all e-mails where I mentioned it, I guess I imagined it. At any rate, I'm happy to finish it, if anyone (e.g. you or Mad) thinks it would be of use.

Yea! Complete it! I will stop compiling the xnet.xml 'till Monday, if you can really do it! :)

For now, we agreed (at least I think so, did we Az? :) ) that the first two lines of each CT (so the Title and the Adress) go in the shortentry, the main text in the body and the last fluff - which will be most of the times the last paragraph into the fluff line...).

I included the xnet.xml I managed to come up with until now.

 

xnet2.xml

I'm very confident that I can have it finished by Monday. A word of warning, it's in C#, so you'll need the .NET framework to run it. (I love C#, 4 lines of code to read in a RTF file and chunk it into the paragraph entries used in xnet.xml.)

Link to comment
Share on other sites

I'm very confident that I can have it finished by Monday.  A word of warning, it's in C#, so you'll need the .NET framework to run it.  (I love C#, 4 lines of code to read in a RTF file and chunk it into the paragraph entries used in xnet.xml.)

Well, unless this script uses some specific Windows.Forms stuff, it will be possible to run it with mono too (C# lover here :D ).

Link to comment
Share on other sites

I'm very confident that I can have it finished by Monday.  A word of warning, it's in C#, so you'll need the .NET framework to run it.  (I love C#, 4 lines of code to read in a RTF file and chunk it into the paragraph entries used in xnet.xml.)

Well, unless this script uses some specific Windows.Forms stuff, it will be possible to run it with mono too (C# lover here :D ).

It shouldn't need anything special, a dialog with a couple of edit fields, buttons, and a FileDialog. So, yes, I hope it will run on mono.

Link to comment
Share on other sites

I'm very confident that I can have it finished by Monday.  A word of warning, it's in C#, so you'll need the .NET framework to run it.  (I love C#, 4 lines of code to read in a RTF file and chunk it into the paragraph entries used in xnet.xml.)

Monday would be great. Any day sooner would be even more great :) .NET framework won't be a problem. Will 1.0 will be sufficient or do you expect 2.0?

Link to comment
Share on other sites

I'm very confident that I can have it finished by Monday.  A word of warning, it's in C#, so you'll need the .NET framework to run it.  (I love C#, 4 lines of code to read in a RTF file and chunk it into the paragraph entries used in xnet.xml.)

Monday would be great. Any day sooner would be even more great :) .NET framework won't be a problem. Will 1.0 will be sufficient or do you expect 2.0?

Should be 1.1. Also, if you PM me your "real" e-mail I can post you the files with confidence you can read them. If you've been tracking one of the other threads, you'll be aware I'm having problems with uploads to the Xenocide site.

Link to comment
Share on other sites

Should be 1.1.  Also, if you PM me your "real" e-mail I can post you the files with confidence you can read them.  If you've been tracking one of the other threads, you'll be aware I'm having problems with uploads to the Xenocide site.

Yea, I noticed. Email is underway :)

Link to comment
Share on other sites

Included in this item are:

Rtf2Xml.exe -> generates xnet.xml from rtf

Rtf2Xml-source.zip -> the c# source for Rtf2Xml.exe

xnet.xml.zip -> zipped up copy of xnet.xml generated by tool on my PC

xnetCtFiles.xml -> file needed by Rtf2Xml.exe

 

Instructions:

 

1) Copy xnetCtFiles.xml to ...\assets\Creative Text Department\XNet

2) run Rtf2Xml.exe, and browse to

...\assets\Creative Text Department\XNet\xnetCTfiles.xml

3) Click on process button

New xnet.xml will be created beside xnetCTfiles.xml

 

Reason for file xnetCtFiles.xml is because the rtf files don't include the xnet name, or the category for each entry. So the file xnetCtFiles.xml represents my initial stab at mapping the .rtf files to XNET entries (in research.xml)

So, there's a few issues:

 

There are the duplicated entries in the assets repository itself.

e.g. Barracks Facility & Barracks, Laser Defense Array & Laser Defense Facility

 

There's a number of rtf files I couldn't figure out the XNET value for, or match the XNET value with a rtf.

 

Ideally this information would be embedded in the articles, and xnetCTfiles.xml would not be needed.

Rtf2Xml.exe

Rtf2Xml_source.zip

xnetCtFiles.xml

xnet.xml.zip

Link to comment
Share on other sites

Included in this item are:

Rtf2Xml.exe -> generates xnet.xml from rtf

Rtf2Xml-source.zip -> the c# source for Rtf2Xml.exe

xnet.xml.zip -> zipped up copy of xnet.xml generated by tool on my PC

xnetCtFiles.xml -> file needed by Rtf2Xml.exe

And based on my previous problems with up/downloading files to/from this site, I've just tried to download & open the zip files, and it worked for me.

Link to comment
Share on other sites

That's some impressive work :) this will be a great help for us.

But the generated xnet.xml does not validate correctly, There seems to be some problem in the ending file.

edit: found it, the generated xnet.xml lacks these last lines in the last entry:

</paragraph>
</body>    
 </entry>
 </xnet>

 

I have to make some modifications to XnetCTfiles, mostly with the titles and file names, It'll remain uploaded into xenocide.assets/Creative Text Department/Xnet

 

edit: uploaded.

Again, excellent job, very quick too :)

 

edit: I get a problem with the program, it can't find Alien Research/Alien Harvest.rtf, the file is there, but it doesn't seem to be able to find it.

 

yet another edit: the xnet looks cool now, but there is one problem, when clicking on the Alien Research category, Xenocide crashes, I suppose it has something to do with the missing Alien Harvest file?

 

edit: removed useless file.

Edited by Azrael
Link to comment
Share on other sites

That's some impressive work :) this will be a great help for us.

But the generated xnet.xml does not validate correctly, There seems to be some problem in the ending file.

edit: found it, the generated xnet.xml lacks these last lines in the last entry:

</paragraph>
</body>    
 </entry>
 </xnet>

 

I have to make some modifications to XnetCTfiles, mostly with the titles and file names, It'll remain uploaded into xenocide.assets/Creative Text Department/Xnet

 

edit: uploaded.

Again, excellent job, very quick too :)

 

edit: I get a problem with the program, it can't find Alien Research/Alien Harvest.rtf, the file is there, but it doesn't seem to be able to find it.

 

yet another edit: the xnet looks cool now, but there is one problem, when clicking on the Alien Research category, Xenocide crashes, I suppose it has something to do with the missing Alien Harvest file?

I don't see any problem with the xnet.xml I uploaded.

 

On my copy of the CTD, "alien harvest" is in the "alien" directory, not "alien research".

The original XnetCTfile.xml pointed to the alien directory, but you've changed it to alien research.

Did you move the .rtf file as well?

 

And yes, I have to admit that the program I wrote is somewhat lacking in error handling.

If it can't find a file it's been told to look for, the program aborts, leaving the xnet.xml file in an unfinished (and invalid) state.

 

Easy way to check that xnet.xml is complete and successful is open xnet in firefox. If you can read it all, and last entry is alien freighter, then it all built OK.

 

I'll upload a version with missing file detection in a few days, unless someone else wants to do it. (Tomorrow I've got a ton of RL work to do.)

Link to comment
Share on other sites

On my copy of the CTD, "alien harvest" is in the "alien" directory, not "alien research".

The original XnetCTfile.xml pointed to the alien directory, but you've changed it to alien research. 

Did you move the .rtf file as well?

 

The correct directory is /alien research/

The Problem is, that you wrote "Alien Resarch" instead of "Alien Research" Az... :) I would have commited it to the SVN, but I lack clearance... <_>

 

---Edit---

 

Oh, and dteviot? Can you write a mechanism that automaticly removes color tags out of the CTs while copying the CT to the Xnet.xml? (you know, the ones from the forum like ) That would be just great! :)

Edited by Mad
Link to comment
Share on other sites

That's some impressive work :) this will be a great help for us.

But the generated xnet.xml does not validate correctly, There seems to be some problem in the ending file.

edit: found it, the generated xnet.xml lacks these last lines in the last entry:

</paragraph>
</body>    
 </entry>
 </xnet>

 

I have to make some modifications to XnetCTfiles, mostly with the titles and file names, It'll remain uploaded into xenocide.assets/Creative Text Department/Xnet

 

edit: uploaded.

Again, excellent job, very quick too :)

 

edit: I get a problem with the program, it can't find Alien Research/Alien Harvest.rtf, the file is there, but it doesn't seem to be able to find it.

 

yet another edit: the xnet looks cool now, but there is one problem, when clicking on the Alien Research category, Xenocide crashes, I suppose it has something to do with the missing Alien Harvest file?

I don't see any problem with the xnet.xml I uploaded.

I had opened it from the zip, so it couldn't find the schema and that was the error, it validates ok.

 

On my copy of the CTD, "alien harvest" is in the "alien" directory, not "alien research".

The original XnetCTfile.xml pointed to the alien directory, but you've changed it to alien research. 

Did you move the .rtf file as well?

Yep, that was a mistake. I also corrected the "Gravity Defense Facility.rtf" to "GAIA Defense Array.rtf".

 

On my copy of the CTD, "alien harvest" is in the "alien" directory, not "alien research".

The original XnetCTfile.xml pointed to the alien directory, but you've changed it to alien research. 

Did you move the .rtf file as well?

 

The correct directory is /alien research/

The Problem is, that you wrote "Alien Resarch" instead of "Alien Research" Az... :) I would have commited it to the SVN, but I lack clearance... <_<

 

---Edit---

Fixed it, was too sleepy last night to properly type <_<

 

Oh, and dteviot? Can you write a mechanism that automaticly removes color tags out of the CTs while copying the CT to the Xnet.xml? (you know, the ones from the forum like ) That would be just great! :)

I don't think that is necessary, as CTs don't have color tags, the only ones that do are active and rather old texts that I uploaded to have a backup of some sorts (and didn't remove the tags cause I uploaded over 100 texts all in one go ;)), when they get completed or worked on, the correct entries will replace them.

Link to comment
Share on other sites

I don't think that is necessary, as CTs don't have color tags, the only ones that do are active and rather old texts that I uploaded to have a backup of some sorts (and didn't remove the tags cause I uploaded over 100 texts all in one go ;)), when they get completed or worked on, the correct entries will replace them.

Oh. I always thought these were considered "done"...

Link to comment
Share on other sites

I don't think that is necessary, as CTs don't have color tags, the only ones that do are active and rather old texts that I uploaded to have a backup of some sorts (and didn't remove the tags cause I uploaded over 100 texts all in one go ;)), when they get completed or worked on, the correct entries will replace them.

Oh. I always thought these were considered "done"...

Nope, after the site went down I realised we had too many texts on the forums and decided to make a backup, that's why there are so many incomplete texts :)

Link to comment
Share on other sites

Azrael,

 

OK, I've fixed Rtf2Xml so it now gives a warning when it can't find a specified file.

 

Stupid questions time,

I notice you've updated the "name" field in the xnetCtFiles.xml.

e.g. you've changed

"XNET_XC-1_GRYPHON" to "XC-1 Gryphon Interceptor"

 

However, doesn't the name attribute in xnet.xml need to match the entries in research.xml. (So that we know which items to display on XNET, based on what has been researched?

And it's the responsiblilty of the framework to look up the name attribute in the xml file and translate it into the player visible string. (Using the file dictionary.xml)

 

Rtf2Txt.cs.txt is the updated source code. (I've added a .txt extension to allow it to upload.)

Rtf2Xml.exe

Rtf2Txt.cs.txt

Link to comment
Share on other sites

Azrael,

 

OK, I've fixed Rtf2Xml so it now gives a warning when it can't find a specified file.

 

Stupid questions time,

I notice you've updated the "name" field in the xnetCtFiles.xml.

e.g. you've changed

"XNET_XC-1_GRYPHON" to "XC-1 Gryphon Interceptor"

 

However, doesn't the name attribute in xnet.xml need to match the entries in research.xml.  (So that we know which items to display on XNET, based on what has been researched?

And it's the responsiblilty of the framework to look up the name attribute in the xml file and translate it into the player visible string.  (Using the file dictionary.xml)

 

Rtf2Txt.cs.txt is the updated source code.  (I've added a .txt extension to allow it to upload.)

I suppose not, having "XNET_XC-1_GRYPHON" does not look pretty at all on the xnet, does it? I suppose there will be a way to link the items in the research schema to the ones in the xnet one.

Link to comment
Share on other sites

Hi

 

All names in xnet.xml have to match names in research.xml :)

 

About displaying in xnet, there is language.xml wich say how to display names of corse if there isn't searching string it displays it without change (and give an error/warining in system/dictionary.log)

 

Beetle

 

edit: typo

Edited by Beetle
Link to comment
Share on other sites

Hi

 

All names in xnet.xml have to match names in research.xml :)

 

About displaying in xnet, there is language.xml wich say how to display names of corse if there isn't searching string it displays it without change (and give an error/warining in system/dictionary.log)

 

Beetle

 

edit: typo

Ok, so for example, xnet.xml has to display "XNET_SPAWN_AUTOPSY", and Language.xml will display it as "Spawn Autopsy" on Xnet? Because when the names on xnet.xml were in that form, they were displayed as "XNET_BLAH_BLAH" and not as "Blah Blah"

 

edit: yes it is, sorry I think I messed it up :Blush: will correct it in a min.

Edited by Azrael
Link to comment
Share on other sites

Exactly :)

 

in example there is in xnet.xml:

 

in lenguage.xml:

 

Doing like this we can easy handle all names and also quite easy translate game.

 

In fact there was some errors here in last progres release:

in xnet ther was

 

in language:

 

in research:

 

and if we (in last PR) change

"set xnet_allentries 1" in xenoautoexec.cfg

to

"set xnet_allentries 0"

we won't see our Landing Pad even thou we should :)

Link to comment
Share on other sites

Ok, fixed my messup, I also commited the rtf2xml program to the Xnet folder :)

Great work dteviot =b

I will work on updating the language schema :)

My ego may be showing, but shouldn't someone set up a "tools" repository (or directory) and store the source for rtf2xml, for when it needs additional mods in the future.

 

I'd offer to do it, but I'm still not a member of the programming team. (hint hint)

 

Incidentally, my name is David, dteviot is just my logon.

 

Cheers,

David

Link to comment
Share on other sites

My ego may be showing, but shouldn't someone set up a "tools" repository (or directory) and store the source for rtf2xml, for when it needs additional mods in the future.

 

I think there is one somewhere. But I'm not sure where it is :).

 

Where is the source of package updater?

Edited by UnFleshed One
Link to comment
Share on other sites

Ok, fixed my messup, I also commited the rtf2xml program to the Xnet folder :)

Great work dteviot =b

I will work on updating the language schema :)

My ego may be showing, but shouldn't someone set up a "tools" repository (or directory) and store the source for rtf2xml, for when it needs additional mods in the future.

 

I'd offer to do it, but I'm still not a member of the programming team. (hint hint)

 

Incidentally, my name is David, dteviot is just my logon.

 

Cheers,

David

Yep, I'll upload your source code as well :)

Last time you uploaded a zip with several files, now you just uploaded one single file, is there something else that you didn't upload?

 

I uploaded the updated xnet.xml, xnetctfiles.xml, research.xml and english.xml into the repository, also a txt file explaining where goes what for those of you who have no clue but want to update the xnet :)

Link to comment
Share on other sites

My ego may be showing, but shouldn't someone set up a "tools" repository (or directory) and store the source for rtf2xml, for when it needs additional mods in the future.

 

I think there is one somewhere. But I'm not sure where it is :).

 

Where is the source of package updater?

 

svn.projectxenocide.com/tools

 

just do a checkout. There's also the tool to create the globe-mesh and to cut up textures for it.

 

Rincewind

Link to comment
Share on other sites

Last time you uploaded a zip with several files, now you just uploaded one single file, is there something else that you didn't upload?

No, the fix only required changing one file, and as file was small, I just uploaded the file.

And I see that Unfleshed has uploaded it. Thanks.

Link to comment
Share on other sites

×
×
  • Create New...