View Full Version : Total Realism Mod Conversation into WoC


Houman
Jul 17, 2008, 02:30 AM
Hello everyone,

Sorry for the long delay but I finally made it here to have a chat with you guys. As previously talking with NikNacks, there is an interest in importing our project into WoC.

Our team - once 7 people - has shrunk to about 3 people at this stage. We lack Python and C++ coder and this is literally where it hurts most.

Our mod is still based on Warlords and has not yet been updated to Bts because of this. I would like to know if there is anyone interested in helping us with Python , C++ (SDK) to import TR Code into BtS DLL's/Python and eventually we all together transform the whole into WoC as needed.

I hope we can have a chat about the goals and aims in this thread.

Thank you for your time,
Houman

tucoow
Jul 17, 2008, 11:08 AM
Oh God, it so honored for me to reply to TR team leader first here! TR was my MOST favorites mod!

Because lack of BTS version I haven't play it for long time, but ALWAYS I miss TR's fantastic units, promotions, especially LAND TRANSPORTS(Humvee, Chinook)! That's my most favorites and it's the motivation to put them in BTS games that I learn modular XML then find my way to WoC.:lol::lol::lol:

TR adopting WoC modular model sounds like heaven to me. I'm eagerly waiting this day to come. :)

I'm also new here and learning, I know only XML but no py & SDK. But if there is anything I can do I'll surely glad to do.:lol::lol::lol:

faichele
Jul 17, 2008, 12:21 PM
Hello!

Sad to hear your team shrunk that much; but if you'd like to move to WoC, I could offer a little assistance with porting your SDK codebase.

You know how to join the WoC group chat room?
Registration is at http://kingshomeworld.com:8080/red5/login.html (click Login at the top; there you should be able to register a new account).

Regards,
Fabian



Our mod is still based on Warlords and has not yet been updated to Bts because of this. I would like to know if there is anyone interested in helping us with Python , C++ (SDK) to import TR Code into BtS DLL's/Python and eventually we all together transform the whole into WoC as needed.

I hope we can have a chat about the goals and aims in this thread.

Hian the Frog
Jul 17, 2008, 02:54 PM
Hi All,

Yes, that's a pity. It seems that we are now only three....
A coder is really needed to help us. We can do the XML job, the Art job.... but not the Python or SDK. Here is the problem.

These two last points are like a black hole for me. :rolleyes: I hope that somebody will help us porting TR to BtS and making some bug corrections.

Hian the Frog.

Walter Hawkwood
Jul 17, 2008, 03:30 PM
... and now you have met all the team. :D

As princess Leia would put it: "You're our only hope". Basically, WoC is the only chance now for TR BtS to see the light of day. And that is one thing all three of us sincerely hope for.

rockinroger
Jul 17, 2008, 04:14 PM
Welcome aboard, TAfirehawk is on the road this week. Hes the team manager. Our main coder, Vince will be done with his finals in about 2-3 weeks. Faichele is well versed in the sdk. As is Frank. The main thing is to come to our chat sessions, as posted by Faishele above in post 3. We have guys in Europe and USA so someone is almost always on at some point. Unfortunately its that time of year for vacations and a couple guys are on them now or leaving for them soon. Do you have the code from sourceforge yet? This is the location of the newest core. http://worldofciv.svn.sourceforge.net/svnroot/worldofciv/Assets. This is the Location of the soon to be first public release. http://worldofciv.svn.sourceforge.net/svnroot/worldofciv/V1.00.

The Core of WoC is here, http://worldofciv.svn.sourceforge.net/svnroot/worldofciv/Installer/WoC_Core-v1_00-setup.exe. The current sdk is here, http://worldofciv.svn.sourceforge.net/svnroot/worldofciv/SDK/WoC_Mamba. WE also have a svn setup on sourceforge that has helpful tools, located here, http://worldofciv.svn.sourceforge.net/svnroot/wocmodules/Tools.

Another helpful location is the Wocipedia, located here, http://woc.dreamhosters.com/wiki/index.php?title=Main_Page. Many of your questions can be answered, researched there. Hopefully this is helpful info. Yours was also one of the first mods i played, and i have always enjoyed your work. If you have questions come join us in the chat. Welcome again.

Houman
Jul 18, 2008, 10:22 AM
Fantastic. Thank you guys for the warm welcome and for reaching out a hand. :-)

I can understand that these times are difficult for modding hence summer and people are gone. I leave on Tuesday and come back on Sunday. :D

We have deleted the old version of our initial BTS SVN branch. Because too much has been changed in our Warlords and it didnt made sense anymore. I have to set a new branch and will let you know as soon as this is ready.

In the meanwhile the code of TR Warlords is accessible though:
https://civ4mods.svn.sourceforge.net/svnroot/civ4mods/trunk/civ4.mod.realism/src/mod/TR_Warlords

The SDK folder is easily to be found under : \TR_Warlords\Warlord_SDK\CvGameCoreDLL
So if your SDK specialists like to have a look at that anytime they have the time. :)

Cheers,
Houman

Hian the Frog
Jul 18, 2008, 04:58 PM
Yeap. Houman is right: Thank you guys for the warm welcome and for reaching out a hand.

Loosing our work made since....wow... i don't remember, is a real pain to me. I really hope porting TR to BtS and correcting the boring bugs.
In fact, it's quite simple: i have three games at home. Civ4, Warlords and BtS. Why playing another game ? I play to civ (or colonization) since 1994, when i bought my first real PC. (It bought it because of Sid Meier and its addicting game !!!)

Thx.

faichele
Jul 21, 2008, 08:32 AM
Hello!

I have briefly seen the homepage for the TR mod, but I never played it myself under Warlords :blush:
What would help me determine which parts of the SDK were modified for TR, and how extensive these modifications are is a feature list including new unit missions and whatever additions were made that required modifying the game core DLL and/or Python.

Thanks!


In the meanwhile the code of TR Warlords is accessible though:
https://civ4mods.svn.sourceforge.net/svnroot/civ4mods/trunk/civ4.mod.realism/src/mod/TR_Warlords

The SDK folder is easily to be found under : \TR_Warlords\Warlord_SDK\CvGameCoreDLL
So if your SDK specialists like to have a look at that anytime they have the time. :)

Houman
Jul 21, 2008, 09:28 AM
Hello!

I have briefly seen the homepage for the TR mod, but I never played it myself under Warlords :blush:
What would help me determine which parts of the SDK were modified for TR, and how extensive these modifications are is a feature list including new unit missions and whatever additions were made that required modifying the game core DLL and/or Python.

Thanks!


Thank you for your help. :)

We had one main SDK developer and one recently just temporary to help out with bugfixing. From what I know, the code is always wrapped between comments. So that the changes are visible what has been added/changed belonging to which functionality etc.

Hope that helps a bit.

Walter Hawkwood
Jul 21, 2008, 10:01 AM
Here, for your convenience, are all the SDK files modified by our coders (unmodified files not included, so this won't compile into a functional dll). There are also a couple of readmes, but I think they are outdated and not comprehensive.

rockinroger
Jul 21, 2008, 05:17 PM
Thanks already had it from Source Forge.

faichele
Jul 22, 2008, 02:23 AM
Hello!

Thanks, that's a bit more convenient than having to browse the complete SDK.
As for integrating TR: Since WoC is a modular platform, the SDK source code has to react to the case when a certain functionality is turned off, and fall back to the default Firaxis code instead. That's not a huge modification to do, but it's easier to integrate (and test) this if it's done in smaller portions of code.
Since you'll have to modularize the XML and art for TR units/buildings/techs etc. anyway, my suggestion would be that you suggest where to start, and I'll move along with integrating the necessary SDK code (if there's SDK modifications involved).
As for modularizing XML: There's a converter program that can help you with this; ask rockinroger, he has more experience with that.

Here, for your convenience, are all the SDK files modified by our coders (unmodified files not included, so this won't compile into a functional dll).

Walter Hawkwood
Jul 22, 2008, 02:56 AM
Our lack of coder lately has led to some bugs still remaining in the code that have to be fixed prior to the conversion. I think (actually, I hope), it would be logical to fix them prior to conversion - if any of you would help us out on that, I'd compile the links to user-posted CTD saves and explain the likely culprits; these are likely the results of only one or two actual bugs, so, hopefully, a skilled coder can fix those easily. Just let me know, and I'll find all the stuff.

Of course, I understand that fixing a piece of Warlords code might require actually having Warlords and installing our mod, but if it is not a problem, then I suggest this is the path we take prior to the actual conversion. If it can't be done, then, once again, let me know, and we'll move on - but this will still leave us with those bugs once we convert, AND no user-posted saves that would be helpful in isolating and fixing those.

faichele
Jul 22, 2008, 04:24 AM
Our lack of coder lately has led to some bugs still remaining in the code that have to be fixed prior to the conversion. I think (actually, I hope), it would be logical to fix them prior to conversion - if any of you would help us out on that, I'd compile the links to user-posted CTD saves and explain the likely culprits; these are likely the results of only one or two actual bugs, so, hopefully, a skilled coder can fix those easily. Just let me know, and I'll find all the stuff.

Of course, I understand that fixing a piece of Warlords code might require actually having Warlords and installing our mod, but if it is not a problem, then I suggest this is the path we take prior to the actual conversion. If it can't be done, then, once again, let me know, and we'll move on - but this will still leave us with those bugs once we convert, AND no user-posted saves that would be helpful in isolating and fixing those.
The differences between the Warlords and BtS SDK are not that big (apart from espionage and corporations), I can handle these (usually).
Consequently, I'd not attempt to fix bugs under the Warlords SDK and then move to BtS, but fix whatever problems arise under BtS. That's another reason for moving over in smaller chunks; as said, easier to integrate and test.

Walter Hawkwood
Jul 22, 2008, 04:36 AM
The differences between the Warlords and BtS SDK are not that big (apart from espionage and corporations), I can handle these (usually).
Consequently, I'd not attempt to fix bugs under the Warlords SDK and then move to BtS, but fix whatever problems arise under BtS. That's another reason for moving over in smaller chunks; as said, easier to integrate and test.

Then we once again have two different strategies to choose from. You either migrate the most stable chunks of code first, or start with those likely to cause problems for easier testing.

faichele
Jul 22, 2008, 05:27 AM
Then let's just pick one TR addition that involves SDK modifications from each category: One you deem as stable, and one that possibly contains errors. I'll give each a try.

Walter Hawkwood
Jul 22, 2008, 06:05 AM
The most likely error-prone addition is the most recent one: the resource converter. It is a component that should allow buildings to take in some resources and output other resources. It was designed along these lines of functionality:

- Input resources aren't consumed by buildings; they are still there to be, for example, traded away.
- Output resources are global; they can be connected to other cities and traded between civs.
- The number of functional buildings one can construct and operate depends on the availability of input resources. For example, if you have 3 coal and 2 iron, you can build 2 steel mills (each takes 1 coal and 1 iron as input, and outputs 1 steel); if then you trade away or lose (for example, in war) 1 iron, then one of these will stop, leaving you with only 1 steel produced.
- One input resource can be simultaneously used in several chains; for example, if you have one steel, you can use it to operate both an automobile factory AND a firearms plant.

There is at least one well-documented, if totally undefeated bug in the converter code now. As the game progresses, converter buildings start randomly turning off at the beginning of the turn, as if due to a resource shortage (when the resources are actually available); this effect seems to accumulate, and the further the game progresses, the more turn off messages there are. The buildings retain their functionality later the same turn (as they are still supplied with resources really), but this might be more than just a visual annoyance, especially as the effect accumulates, it might be causing CTDs. The trigger setting off individual shortage messages seems to randomly be ANY action modifying ANY resources - discovery of new resources, connection of new resources (even ones having nothing to do with any conversion whatsoever), trade between players.

Also, and this is likely connected to the first issue, sometimes at the beginning of the player's turn, any city production requiring ANY resource (once again, even not involved in conversion process, like horses) is discontinued as if due to the lack of resources. The player can manually resume the production after that the same turn (even as soon as he gets the message), since the supply of resource isn't actually broken.

Lastly, this likely also leads to CTDs late in game (must be some overflow happening). Players reportedly can avoid CTD in a save where it is otherwise unavoidable by declaring war on the most advanced AI civ (my explanation is that this leads to disruption of some trade deals).

Since the resource converter component is the latest developed, the process can easily be retraced through our SVN, which could help you do some reverse engineering, probably. There are many issues already fixed about it lately, but, since we no longer work with the guy who developed and fixed it, this is a work not finished.

All other components are pretty stable and well-tested. There can also be some (likely random) CTD due to better AI component, but other than that, most other stuff included has a long history of stable use.

faichele
Jul 22, 2008, 06:40 AM
That's a "non-trivial" addition to debug first, but I can take a look at it first.
I'll report back when I tracked down the locations of the additions in the SDK related to that resource conversion component; even if I haven't worked directly with resources/trade routes in the SDK yet, I'll give it a try.

Walter Hawkwood
Jul 22, 2008, 07:08 AM
If this helps, initially, the component was based on this: http://forums.civfanatics.com/showthread.php?t=179993

It has come a very long way from then, though. Here are the SVN revisions that deal with the converter, if that helps:

http://civ4mods.svn.sourceforge.net/viewvc/civ4mods?view=rev&revision=1501
http://civ4mods.svn.sourceforge.net/viewvc/civ4mods?view=rev&revision=1560
http://civ4mods.svn.sourceforge.net/viewvc/civ4mods?view=rev&revision=1656
http://civ4mods.svn.sourceforge.net/viewvc/civ4mods?view=rev&revision=1821
http://civ4mods.svn.sourceforge.net/viewvc/civ4mods?view=rev&revision=1826
http://civ4mods.svn.sourceforge.net/viewvc/civ4mods?view=rev&revision=1835
http://civ4mods.svn.sourceforge.net/viewvc/civ4mods?view=rev&revision=1841
http://civ4mods.svn.sourceforge.net/viewvc/civ4mods?view=rev&revision=1862
http://civ4mods.svn.sourceforge.net/viewvc/civ4mods?view=rev&revision=1908

faichele
Jul 22, 2008, 08:51 AM
I think we have a deal :) .
This resource converter component matches perfectly with a "restricted resources" component I have in mind; instead of "just" transforming resources, it shall be possible to create certain amounts of a resource per turn (and also for resources, generate a certain amount per turn).

Walter Hawkwood
Jul 22, 2008, 08:57 AM
Great. Now all that is needed is to make it work as intended. :D

faichele
Jul 23, 2008, 12:55 AM
Great. Now all that is needed is to make it work as intended. :D
I'd need the corresponding XML + art in WoC format, if possible.
Look at http://www.woc.dreamhosters.com/wiki/index.php?title=Category:Tutorials for some examples how to convert existing XML files + art so it can be loaded by the WoC modular loading mechanism correctly. Where would you upload that content, so I can grab it for testing?

Regards,
Fabian Aichele

Walter Hawkwood
Jul 23, 2008, 02:38 AM
OK, I'll try to make XML for a few converter buildings/resources/units (we have to produce something with output resources, don't we?). That is a new job for me, so expect it to take me some time.

TAfirehawk
Jul 23, 2008, 06:36 PM
Sorry I have been too busy to get in here until now....

Obviously rockinroger and faichele have already started this process and let me explain our philosophy a bit.

The WoC Team was born out of the ViSa Modpack Team with the purpose of creating a truly modular BtS. The primary focus is to deliver a near limitless set of choices for the player to choose how he/she wants to play, not how one modder/team picks and chooses the parts.

We are not about making mods but about setting a new modular format for modding in BtS that we call the WoC Standard. We feel this is how Firaxis should have done the modular aspect of BtS.

Our objective is to help all other modders, like TR, develop a truly modular experience for the player as well as being able to share modding work far easier.

"We are here to help modders, not make a mod" :)

rockinroger
Jul 23, 2008, 09:13 PM
@ Hian and TR team, I heard from TA and Faischele that you were trying to use the converter to do your techs. Well i have a present for you, I started them for you. I used the converter. By the way im no programmer either, just a carpenter and old Infantry soldier. 101st Airborne. Desert Storm 90-91. So I joined the ViSa team knowing absolutely nothing. I didnt even know what xml was. I learn best by hands on, and making many mistakes,lol. Also i have my trusty "BFH=Big F...ing Hammer" If i hit a wall, i use it to hammer through it.

That being said this is only the Techinfos.xml, sorry i did not have the time to add in the game text and schema, also do you have unique tech quotes for them? I have added the ones we did from ViSA into WoC, although not all techs from Visa are included.

I included what we have in WoC for techs from the ancient era. Hopefully you can use that as a guide. If you have questions about the Converter or anything else, contact me on Spark as previously posted, join the world_of_civilization room. We almost have someone on 24/7. Mamba is on vacation and the converter works great, but occasionally i encounter bugs. Which Mamba can fix quickly.

Is this the best way to get files to you, or should i put them on WoC S.F. svn? Anyways good luck hope this helps.

Oh one more thing, I did not strip any of the techinfos xml. basically with Woc any tags that have nothing in them can be eliminated, except art defines. Look at the example i provided. Also i got this from your latest TR warlords mod, so i dont know if that is the most current stuff. Lastly I left bts techs in as i do not know if you changed anything in them.

Walter Hawkwood
Jul 24, 2008, 01:03 AM
Thank you very much, this will indeed be helpful - and this is easier than uploading to SVN, at least at this moment, while we still don't have that much material.

Hian the Frog
Jul 24, 2008, 05:34 AM
@ Hian and TR team, I heard from TA and Faischele that you were trying to use the converter to do your techs. Well i have a present for you, I started them for you. I used the converter. By the way im no programmer either, just a carpenter and old Infantry soldier. 101st Airborne. Desert Storm 90-91. So I joined the ViSa team knowing absolutely nothing. I didnt even know what xml was. I learn best by hands on, and making many mistakes,lol. Also i have my trusty "BFH=Big F...ing Hammer" If i hit a wall, i use it to hammer through it.

That being said this is only the Techinfos.xml, sorry i did not have the time to add in the game text and schema, also do you have unique tech quotes for them? I have added the ones we did from ViSA into WoC, although not all techs from Visa are included.

I included what we have in WoC for techs from the ancient era. Hopefully you can use that as a guide. If you have questions about the Converter or anything else, contact me on Spark as previously posted, join the world_of_civilization room. We almost have someone on 24/7. Mamba is on vacation and the converter works great, but occasionally i encounter bugs. Which Mamba can fix quickly.

Is this the best way to get files to you, or should i put them on WoC S.F. svn? Anyways good luck hope this helps.

Oh one more thing, I did not strip any of the techinfos xml. basically with Woc any tags that have nothing in them can be eliminated, except art defines. Look at the example i provided. Also i got this from your latest TR warlords mod, so i dont know if that is the most current stuff. Lastly I left bts techs in as i do not know if you changed anything in them.

Hi,

That's right. I'm still trying to use the converter. At that time, i'm still meeting problems.
I had tried yesterday to join somebody of WoC Team but failed too. I don't know why but there is an autorization failure.
That's a pity. This system seems very good but as long as i won't understand how it works, i won't go on. The problem is that english isn't my natural language. Technical words, sentences and ideas are (often) difficult to understand. The converter read-me is probably well made but i don't understand the way to follow.

I will try again to join one of you.

Note: I was a Sergeant in the 1st Regiment of Cuirassiers. I was the Tank Gunner. (105 or 120 mm cannon, depending on the Tank model, plus the secondary gun - 20 mm). My regiment history; http://en.wikipedia.org/wiki/1st_Cuirassier_Regiment_%28France%29

Yann

TAfirehawk
Jul 24, 2008, 04:33 PM
Hello!

Sad to hear your team shrunk that much; but if you'd like to move to WoC, I could offer a little assistance with porting your SDK codebase.

You know how to join the WoC group chat room?
Registration is at http://kingshomeworld.com:8080/red5/login.html (click Login at the top; there you should be able to register a new account).

Regards,
Fabian

TR Team,

Join us in the "world_of_civilization" room at the Jabber server "chat.kingshomeworld.com".

You can use Spark or any other Jabber client to register and join.

Walter Hawkwood
Jul 24, 2008, 11:50 PM
TR Team,

Join us in the "world_of_civilization" room at the Jabber server "chat.kingshomeworld.com".

You can use Spark or any other Jabber client to register and join.

Great! Now we got that figured out. :)

[to_xp]Gekko
Jul 25, 2008, 03:30 PM
so your telling me that TR is more likely than ever to make a comeback on BTS? that's some freackin' good news guys :D

Walter Hawkwood
Jul 26, 2008, 12:56 AM
Gekko;7070972']so your telling me that TR is more likely than ever to make a comeback on BTS? that's some freackin' good news guys :D

Well, I guess that's what both TR and WoC teams want to see happen. So yes, more likely than ever. :)

TAfirehawk
Jul 27, 2008, 09:08 AM
Honestly we had hoped for the last 8-9 months to get a quality team like TR to join in adopting the WoC Standard, so this is fantastic news for the WoC project.

Fierabras
Jul 29, 2008, 05:22 AM
I just got back from vacation and am very happy to see the start of this TR/WoC combo. I have played TR for Warlords in the past and I liked it very much. I will help out as much as time permits, as I'm also the main coder for CIV Gold (only 2 main members in that team :) ), which is still somewhat under development.

...Faichele is well versed in the sdk. As is Frank...

I (Frank) am not that well versed in SDK (no merging or writing on my part), but I'm a decent bug "tracer". This has been my main role in the WoC project, helping out to solve problems along the way. Lately I have been doing more Python stuff, so I can help out there as well.

Houman
Jul 29, 2008, 05:25 AM
Hey Guys,

Just to let you know I am back from Vacation as well (until I m off on 23rd for another 14 days) My task is now to write a XSLT for the art files. Hope the SDK guys see a light in the tunnel. hehe ;)

faichele
Aug 04, 2008, 02:43 AM
Hello!


Hope the SDK guys see a light in the tunnel. hehe ;)

There is no light in this tunnel ;).

Anyway, please give feedback when you've assembled some testing data for me concerning the resource conversion.

As for another possible candidate to port over into WoC, the plague feature: What does it exactly require in additional art/XML? I saw the SDK functions for it are fairly independant from other TR additions. I could also imagine an integration with the Genetic Era events engine which provides a similar plague "feature".

Regards,
Fabian Aichele

Houman
Aug 04, 2008, 03:06 AM
Hello!

There is no light in this tunnel ;).

Anyway, please give feedback when you've assembled some testing data for me concerning the resource conversion.


I think the best candidate for Resource conversation are Yann and Walter, since they have a better idea about how it should be working. I think both are on holidays right now. :)


As for another possible candidate to port over into WoC, the plague feature: What does it exactly require in additional art/XML? I saw the SDK functions for it are fairly independant from other TR additions. I could also imagine an integration with the Genetic Era events engine which provides a similar plague "feature".


Oh yes, there is a plague colony and some other art graphics once a plague starts. So there are definitely depending art files to that part of the code. But i dont think it would be hard to implement the art/xml files.

May I ask you for a favour please. Is it possible to make a BtS DLL with only once change, that is the one that allows the xml units to be seperated into Meele, Archer, mounted etc, instead of having one huge Units.xml. With that DLL, it would be a lot easier for me to finish/update the XMl files for conversion. :)

Kind Regards,
Houman

faichele
Aug 04, 2008, 03:11 AM
Hello!

OK, for the resource converter, I'll just wait for the resident specialists.
As for the plague feature: If you can separate the dependant art/XML out of TR, I could start with that.

And as for modularizing the unit XML and art of TR: Just use the DLL that is available on the WoC subversion repository; the modular loading mechanism is built-in and enabled by default.

Regards,
Fabian Aichele

I think the best candidate for Resource conversation are Yann and Walter, since they have a better idea about how it should be working. I think both are on holidays right now. :)

Oh yes, there is a plague colony and some other art graphics once a plague starts. So there are definitely depending art files to that part of the code. But i dont think it would be hard to implement the art/xml files.

May I ask you for a favour please. Is it possible to make a BtS DLL with only once change, that is the one that allows the xml units to be seperated into Meele, Archer, mounted etc, instead of having one huge Units.xml. With that DLL, it would be a lot easier for me to finish/update the XMl files for conversion. :)

Houman
Aug 04, 2008, 03:54 AM
Excellent. I will go for it then. That will help me to create the first units and make them testable for everyone else.

Thanks

mamba
Aug 04, 2008, 04:01 AM
Here (http://files.filefront.com/TR+xmlzip/;11353066;/fileinfo.html) is the converted TR xml.

This is by no means a full conversion, but it is what the converter will get you, i.e. a separate file for each definition.

For one, you will still need to extract all texts and place them with the appropriate definitions. For another, you still will need to add all xml definitions which belong together (e.g. a resource and its art, a unit and its unit class) in one subdir (I did create the dirs already, so it is just a matter of putting the appropriate files in each dir).

You probably should also still convert the xml to BtS format, e.g. use CIV4UnitArtStyleTypeInfos instead of having each civ-specific unit as a special unit for that civ. You probably also will miss some new tags introduced by BtS (most tags are optional in WoC, but art needs all its tags).

I hope this is of some help.

Houman
Aug 04, 2008, 04:15 AM
Here (http://files.filefront.com/TR+xmlzip/;11352896;/fileinfo.html) is the converted TR xml.

This is by no means a full conversion, but it is what the converter will get you, i.e. a separate file for each definition.

For one, you will still need to extract all texts and place them with the appropriate definitions. For another, you still will need to add all xml definitions which belong together (e.g. a resource and its art, a unit and its unit class) in one subdir (I did create the dirs already, so it is just a matter of putting the appropriate files in each dir).

You probably should also still convert the xml to BtS format, e.g. use CIV4UnitArtStyleTypeInfos instead of having each civ-specific unit as a special unit for that civ. You probably also will miss some new tags introduced by BtS (most tags are optional in WoC, but art needs all its tags).

I hope this is of some help.

Many Thanks for your help. I was actually creating XSLT to convert all the conversion i.e. the missing/additional xml tags etc.

However I see now that your converter works completely differently. It creates each unit in its own file? so that the art files can be put in the same named subfolder? That would make the conversation through XSLT a bit more difficult. Because beforehand I had a bunch of units in one file that I coudl convert in one go through XSLT. hmmm

Unless I convert them first and make them BTS compatible and then use your converter to split tham into separate files. Do you think that would work? In this case all the additional XML tags etc are added. Can the converter handle that? Is there a step for step tutorial for your converter?

Many Thanks,
Houman

mamba
Aug 04, 2008, 04:34 AM
Many Thanks for your help. I was actually creating XSLT to convert all the conversion i.e. the missing/additional xml tags etc.

However I see now that your converter works completely differently. It creates each unit in its own file? so that the art files can be put in the same named subfolder?

Yes, it takes the existing xml files and creates one file for each entity it finds (which differs from its original definition, if there is one).

It does not add tags (at most it strips tags which are identical to that of the original definition).

That would make the conversation through XSLT a bit more difficult. Because beforehand I had a bunch of units in one file that I coudl convert in one go through XSLT. hmmm

Unless I convert them first and make them BTS compatible and then use your converter to split tham into separate files. Do you think that would work?

Yes, do your XSLT translation first and then split the resulting xml files using the converter (if you do not know how to do that, post the files and I'll do it, it only takes a few minutes).

In this case all the additional XML tags etc are added. Can the converter handle that? Is there a step for step tutorial for your converter?

The tutorial is the readme ;) Read the "Splitting xml files" section, it covers what I have done.

The converter is pretty dumb, it just looks for certain tags (depending on the filename, e.g. <CivilizationInfo> for files ending in CIV4CivilizationInfos.xml) and creates a new file each time it encounters that tag.

Anything before the first occurrence and after the last corresponding closing tag is always prepended / appended to each file. All tags between the opening and closing tag are simply kept (even when they are not defined in the xml schema, so custom tags are kept).

If the entity it found exists in regular CIV, it can strip all tags which have not been changed (if you set the appropriate flag). For all new entities (i.e. ones with no corresponding standard ID), all tags are kept.

Houman
Aug 04, 2008, 09:40 AM
very interesting. From what I see the Button definition and Art definition is still old style within the Unit definition instead of Art file definition like in Warlords and not like BtS right?

The <AndDependencyTypes> is also WoC creation right? never seen it before...

Hmmm I see there is no way than reading your whole documentation (Damn am I lazy) hehe

NikNaks
Aug 04, 2008, 09:50 AM
I think moving the button tag should be covered in your tool. It was a BtS change, IIRC.

Yep, that's ours. Should be covered in the docs.

Have you tried our wiki? Not everything's there, but there's a lot.

mamba
Aug 04, 2008, 10:38 AM
very interesting. From what I see the Button definition and Art definition is still old style within the Unit definition instead of Art file definition like in Warlords and not like BtS right?

It does not convert Warlords xml to BtS xml, that is up to your XSLT. It just splits what it finds, without changing the xml itself.

The <AndDependencyTypes> is also WoC creation right? never seen it before...

Yes, the converter adds that based on what it encounters within the definition. Personally I think it has gone a bit overboard here, I only keep the most important (to me that is) dependencies around, not all that are possible (and thus added by the converter).

You should definitely keep all dependencies which refer to your own definitions, dependencies which refer to regular entities could be removed (of those I keep the most essential ones, e.g. techs or units but not terrain types).

Hmmm I see there is no way than reading your whole documentation (Damn am I lazy) hehe

It's not that long ;)

Fierabras
Aug 04, 2008, 04:05 PM
I have just played some TR to get reacquainted with the mod. It has been a while since I played Warlords. One thing I noticed was the extensive unit art diversity, which has been implemented in BTS as UnitArtStyle.

I was wondering, is the TR-team considering to convert their own unitartstyle or using one of the already available unitartstyles in WoC?

One thing in TR that doesn't have to be converted, is Blue Marble. You can plug in that WoC module straightaway.

Houman
Aug 05, 2008, 02:28 AM
Thank you all for your replies. Indeed the Conversion on XML part would now be tougher to be in compliant with WoC than i thought initially. But I still like to give it a try. And still i count on your help with the SDK part. So that part is at least covered. hehe

1) Sorry for my ignorance, I have downloaded the Core 1.00 and yet I see no Converter nor a Readme. Am I missing another module? I had a look on Wiki, I think its great for someone who knows WoC already, but for a beginner it still brings some challenge. Maybe things will be easier once I found your Readme. ;)

2) Thanks for the explanation regarding dependencies. I need to see how this goes. regarding the extensive Unit art diversity in TR. Thats true we have almost for every unit a civ specific one, with slightly different values. As you can see, we can not really use the UnitArtStyle in BtS, because its not just the graphics that is different but also the actual values. :) Which makes the job a bit harder. Only in very few cases we might be able to use that feature.

From all I have analyzed so far are these following steps for me to take:
1) Find your Readme and study it. hehe
2) Adjust my XSLTs to convert TR to BtS. (It is done for normal units, but not their Arts yet)
3) Create XSLTs to convert the Art files BtS Complient.
4) Find your Converter and convert all the BtS complient XMLs into WoC Format.
5) Create a SVN branch for TR_Bts_Woc and upload the first playable version, which runs only as BtS with TR Units without anything else.

This is a small and yet big step. At least our remaining team members can so keep updating the units (Textures, values, adjusting) as they usually do and have something to do. ;)

Once this is finished, I come up with a new plan for technologies and Buildings. So that step for step we are gonna finish it. :)

Cheers
Houman

mamba
Aug 05, 2008, 02:58 AM
Thank you all for your replies. Indeed the Conversion on XML part would now be tougher to be in compliant with WoC than i thought initially.

work on the conversion to BtS first, do not worry about WoC, that conversion actually will imo be relatively easy.

1) Sorry for my ignorance, I have downloaded the Core 1.00 and yet I see no Converter nor a Readme. Am I missing another module?

It is not part of the core or any module, you can get it on the SVN at

http://worldofciv.svn.sourceforge.net/svnroot/wocmodules/Tools/WoC Convertor

From all I have analyzed so far are these following steps for me to take:
1) Find your Readme and study it. hehe
2) Adjust my XSLTs to convert TR to BtS. (It is done for normal units, but not their Arts yet)
3) Create XSLTs to convert the Art files BtS Complient.
4) Find your Converter and convert all the BtS complient XMLs into WoC Format.
5) Create a SVN branch for TR_Bts_Woc and upload the first playable version, which runs only as BtS with TR Units without anything else.

These are the right steps, order should be 2, 3, 1, 4, 5 however ;) (maybe even 2, 3, 5, 1, 4 in which case 5 would be a playable version for BtS, not WoC, I'd do the latter, that way you can immediately verify that your transformation worked correctly)

faichele
Aug 05, 2008, 03:20 AM
Hello, Houman!

And still i count on your help with the SDK part. So that part is at least covered.

Well, I'd like to begin moving your SDK, but this is hardly possible without testing material; units alone are not useful for that ;).
For example, the plague feature: Either extract from TR what's necessary for buildings/whatever, and let me adapt it for WoC, or ask rockinroger to convert it (for both cases, just extract from the TR files what is relevant there). Given this, I'll be able to start working with it.

Houman
Aug 18, 2008, 07:12 AM
Hello Everyone,

I am doing some XSLT to get this little piece of work done. I am kind of stuck and was hoping you could help me out.


Input XML:

<Civ4ArtDefines xmlns="x-schema:CIV4ArtDefinesSchema.xml">
<UnitArtInfos>
<UnitArtInfo>
<Type>ART_DEF_UNIT_LION</Type>
<fScale>0.61</fScale>
</UnitArtInfo>
<UnitArtInfo>
<Type>ART_DEF_UNIT_ZEPPELIN</Type>
<fScale>0.70</fScale>
</UnitArtInfo>
</UnitArtInfos>
</Civ4ArtDefines>


Only Certain units (e.g. Zeppelin) should be extracted and rest (e.g. Lion) should be ignored. The actual information for the "Button" for Zeppelin is stored inside my XSLT.

Expected Output XML:

<Civ4ArtDefines xmlns="x-schema:CIV4ArtDefinesSchema.xml">
<UnitArtInfos>
<UnitArtInfo>
<Type>ART_DEF_UNIT_ZEPPELIN</Type>
<Button>Art/Interface/Buttons/Units/Zeppelin.dds</Button>
<fScale>0.70</fScale>
</UnitArtInfo>
</UnitArtInfos>
</Civ4ArtDefines>

With the XSLT below I only see an empty Button XML element in the correct position. My condition somehow doesn't pick up. Would be great if you could help me out with this one. Many thanks

XSLT:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:a="x-schema:CIV4ArtDefinesSchema.xml" exclude-result-prefixes="a" version="1.0">
<xsl:output method="xml" indent="yes"/>
<xsl:strip-space elements="*"/>

<UnitInfos xmlns="x-schema:CIV4ArtDefinesSchema.xml">
<Unit>
<Type>ART_DEF_UNIT_ZEPPELIN</Type>
<Button>Art/Interface/Buttons/Units/Zeppelin.dds</Button>
</Unit>
</UnitInfos>


<xsl:template match="@* | node()">
<xsl:copy>
<xsl:apply-templates select="@* | node()"/>
</xsl:copy>
</xsl:template>

<xsl:template match="a:fScale">
<xsl:element name="Button" namespace="x-schema:CIV4ArtDefinesSchema.xml">
<xsl:value-of select="document('')/xsl:stylesheet/a:UnitInfos/a:Unit/a:Button[ancestor::a:Type = document('')/xsl:stylesheet/a:UnitInfos/a:Unit/a:Type]"/>
</xsl:element>
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>

</xsl:stylesheet>

rockinroger
Aug 21, 2008, 09:12 PM
Sorry Im not familiar with XSLT, I use Winmerge or Araxismerge to compare 2 XML files and make changes, like adding in the new BTS tags to Warlords. I have some extra time this weekend if I could be of assistance.

Houman
Aug 22, 2008, 08:45 AM
Thanks rockinroger,

I figured out a way. Now the script works almost 100%. But still needs some finetuning.
I will be off for 2 weeks to see my parents and family. Sorry guys. :)

Cya soon again,
Houman

<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="x-schema:CIV4ArtDefinesSchema.xml"
xmlns:a="x-schema:CIV4ArtDefinesSchema.xml"
exclude-result-prefixes="a"
version="1.0">

<xsl:output method="xml" indent="yes"/>
<xsl:strip-space elements="*"/>

<xsl:variable name="unitInfo"
select="document('')/xsl:stylesheet/a:UnitInfos/a:Unit"/>

<UnitInfos xmlns="x-schema:CIV4ArtDefinesSchema.xml">
<Unit>
<Type>ART_DEF_UNIT_ZEPPELIN</Type>

<Button>Art/Interface/Buttons/Units/Zeppelin.dds</Button>
</Unit>
</UnitInfos>


<xsl:template match="@* | node()">
<xsl:copy>
<xsl:apply-templates select="@* | node()"/>
</xsl:copy>
</xsl:template>

<xsl:template match="a:UnitArtInfo[a:Type = document('')/xsl:stylesheet/a:UnitInfos/a:Unit/a:Type]">
<xsl:copy>
<xsl:apply-templates select="@* | a:Type"/>
<xsl:element name="Button">
<xsl:value-of select="$unitInfo[a:Type = current()/a:Type]/a:Button"/>
</xsl:element>
<xsl:apply-templates select="a:fScale"/>
</xsl:copy>
</xsl:template>

<xsl:template match="a:UnitArtInfo[not(a:Type = document('')/xsl:stylesheet/a:UnitInfos/a:Unit/a:Type)]"/>


</xsl:stylesheet>

rockinroger
Aug 22, 2008, 04:12 PM
Dang i wish i lived in Europe, i haven't taken a vacation for abour 5 years. LOL. Need any carpenters over there?