View Full Version : Need Help with a New Project


Thorburne
Nov 29, 2007, 03:11 PM
O.k, I originally posted this in the Utility thread, but realized that it may have been the wrong place. I am looking for help with a project I have undertaken. Right now, I am pooring over all of the XML files from Vanilla, Warlords, and BTS. I am trying to gather the information so that I can put it all into an Access Database. Right now, I am just going through the files to get the Tags and I am not even halfway done that part yet. As I knew it would be before I started, this is a real time consuming task.

Why am I doing it? Two reasons!

1. Hopefully, once I am able to compile the information into the database, I am hoping that one of you programming geniuses can magically link it to the actual XML files, and to be able to create mod folders, and we could have a full blown editor. It's a pipedream, I know, but it may be worth a shot.

2. All else fails, I may have something that can be used for planning out simple mods. Changing values and adding stuff, etc.

Well, in any case, it is still in it's early stages. What I am doing now is copying all of the xml files to Excel and narrowing down to the seperate tag fields in each file. Once that is done, I plan on building the tables in Access, then putting the default data in for each table. Then I will work on the forms and general layout of the application. That will pretty much be the limit of my ability (if nothing before that throws up a stonewall in front of me).

What would be helpful? Does anybody know if any of the above steps have been completed (even partially) which may assist me in completing this task? Whether it be a compilation of the XML files, or a chart or what have you, whatever can help me with this task would be appreciated. Even some suggestions. I have MS Office 2007, complete with Access 2007. Any tips and suggestions the creation and linking of the Dbase would be appreciated as well. Though Excel and Access has an XML import feature, I can't get it to work. I don't know if it is a limitation of the program, or if I am doing something wrong.

Below,in the spoiler, is my original in case that may offer any more help as to where I am coming from and where I am trying to go with this so that those looking to help may better understand my POV. Or the link to the original post is http://forums.civfanatics.com/showthread.php?t=252421. Though, it may be better if you just post responses here.

Does anybody know if an XML map is available that will show how all of the xml files (including BTS) are related to each other? I'm not a programmer, but thanks to Civ IV, I now have a very basic understanding of the XML structure. However, from what I've seen, the connections form a massive web and it can be dizzying trying to sort it all out. I am trying to put the data from the XML into a database and to see what can be done from there. I wanted to see if anybody has laid it out so that it will be easier to determine relationships between tables and such. I'm sure I could figure it out myself... but that could take some time. And inputting the data will likely be cumbersome in itself as it is. Anyway, any help that can make things smoother will be great.

I have Access 07 and I have tried importing the data directly into Access, but you can only do one file and it does automatically link according to the structure. Excel is the same way when you try to import. Of course, there may be something that I'm missing there.

In any case, I want to see what I can do while I have the time. I'm currently unemployed, so I have a lot of free time at the moment. Of course, that time is limited as I am desperately seeking a job before my money runs out. Either way could hinder me within the next few weeks, but I'll see what I can do. At least it will give me something to do to keep me from sinking too much into despair. (On that note, anybody know of any IT work in the Greater Baltimore Area?)

Anyway, any help (in either area) would be appreciated.


Finally, I think I am going to take a small break from this for a couple days. I've been doing this for a couple days, and it is already starting to burn me out... probably because of the overwhelming nature of the task. I do intend to follow through and at least come up with something.. even if I have to scale down my goals. Other factors may also slow me down (family matter, a new job, relocating), but I hope to have something produced by, say, February. (Another game comes out then that will probably soak up my spare time.)

Thanks in advance for any assistance and have a nice day.

CXDamian
Nov 29, 2007, 07:44 PM
Civ4Wiki can probably ease some of the burden. You may be able to find an importer/exporter for mediawiki pages which would ease it a bit further.

There is also the Beyond the Sword Editor Kael posted, which is an excel 2007 workbook utilizing vb scripts. This is probably a better option depending on your needs.

Thorburne
Nov 30, 2007, 05:52 PM
Yeah, I think I remember the editor from Kael, but the las time I checked, it was all geared towards FfH. Someone was supposed to adjust it for basic, but I haven't seen anything yet.

Also, the link that you posted for the Wiki didn't seem to work.

Thanks

Tholish
Dec 02, 2007, 05:03 AM
You can edit XML with Word Pad, just Open With and select it. I like XML Blue Print 5 if you want something that checks Well Formedness and counts lines.

XML is so easy to edit that a dedicated editor is almost pointless. What's needed is a compilation of what tags do. Maybe that's what that Wiki tag is. Here's one I made for me for buildings, attached.

Basically, if you know the game, you can just open the XML in wordpad and Find where a tag is used. For example:
If you copy a tag like this
<bWater>0</bWater> go to Edit/ Find and paste the tag into the blank and then change it to
<bWater>1</bWater>, and hit enter you will be taken to where the boolean(<bTagname>) is a yes (>1<), and find that this is used only for buildings like Harbor that are on the coast. Thus you know that this means the building can only be built on the coast, not that it supplies fresh water to the city.

Thorburne
Dec 02, 2007, 10:25 PM
Yes, editing the XML, for the most part, is easy... even for a non-scripter like me. However, the problem is going through the pages of code to find a couple tags (per object) to edit. For example, look at units. Their are a ton of them and the code for one unit is a mile long. Fishing through that code (even with the find command) is over tedious. A GUI eases that pain and allows more focus on the actual mod. Also, another problem is the domino change, where changing one thing little tag leads to needing to change something in several other places. There is where it would be nice for a map or reference of some kind. A skilled programmer could even create a function in an editor which automatically changes, or at least direct the users to the next area that needs to be changed.