WoC Lite(made for merging)

It can be written in JAVA or any language. Just point blank I do not know how. If someone does than it would be good. I mean while they are at it they could even better automate the module making process. Just need someone to do it.

If anyone wants to look at the WoC converter mamba did it could possibly improved on.

http://wocmodules.svn.sourceforge.net/viewvc/wocmodules/Tools/WoC Convertor.tar.gz?view=tar

It reads the schema and strips the extra unneeded xml tags as well. Just an example of maybe something to work off of. But again I do not know how.
 
Yes exactly it can be written in Java or any other scripting language by the bucket load of possibilities. Mamba's work is a good starting point because it is formulated as a NetBean project, which is a very nice development environment and totally free.

There are actually at least two possiblities:
1) You just wrap all woc modules inside an "installer" which automatically puts the module in the modules folder and adds the audio definitions.
2) You have a manual installer in the modules folder as well, for people like me who like to put modules in by hand and do the audio correction as a quick double click.

Both solutions are good probably the first is better. I am actually surprised it has not been done already but suspect that's because most WoC modules have been conceived to work only within the WoC project, not other projects like WoC Lite and RevolutionDCM.

The question is what to do about python. In theory, a WoC installer like this could also put python code in the proper places, and if there were an agreed standard, the python code could be wrapped up so that it does not execute if the module for it does not exist. This will mean that python will accumulate in the user's mod installation, but it will be dormant when the user removes the module, and at the same time prevents having to "uninstall" modules which is very ugly.

Cheers.
 
@strategyonly

well the maps should not be interfering with anything over than the one mod. The maps do not come from the WoC. You can delete them and use any map from the various RevDCM mods. I have no clue what has been changed about them as well. So if there is something giving you problem in the maps delete the file giving you the problems in the maps folder. If you find a simple solution or a mistake I did please let me know.

Edit:I had a similar problem related because of some mod installing things in the my games folder BTW. I deleted the entire folder and problem solved. But I do not used mods that change my default Civ 4 game. I always run them as their own mod.
 
@strategyonly

well the maps should not be interfering with anything over than the one mod. The maps do not come from the WoC. You can delete them and use any map from the various RevDCM mods. I have no clue what has been changed about them as well. So if there is something giving you problem in the maps delete the file giving you the problems in the maps folder. If you find a simple solution or a mistake I did please let me know.

Edit:I had a similar problem related because of some mod installing things in the my games folder BTW. I deleted the entire folder and problem solved. But I do not used mods that change my default Civ 4 game. I always run them as their own mod.

I had the same problem awhile back with the RoM maps (its always the mapscript ones) also, all i have to do is move the entire mod (from you'll) to another folder, i mainly use stuff for info and see how other people are doing things and then i add them to my stuff, so its no biggy. Just thought i'd let ya know is all.:rolleyes:
 
K.

The last version I sent up I had no problems with the map. So if someone else has problem then I will begin looking. But what I meant to say there is something wrong with your setup I think is why your getting an error.

If I am wrong then let me know. And I do not know what the RevDCM mapscripts really have. I did not look through each I mean. Sorry I did not mean to sound rude or something.
 
Yes exactly it can be written in Java or any other scripting language by the bucket load of possibilities. Mamba's work is a good starting point because it is formulated as a NetBean project, which is a very nice development environment and totally free.

There are actually at least two possiblities:
1) You just wrap all woc modules inside an "installer" which automatically puts the module in the modules folder and adds the audio definitions.
2) You have a manual installer in the modules folder as well, for people like me who like to put modules in by hand and do the audio correction as a quick double click.
Cheers.

I like option 2: If written correctly, a single WoCAudio.EXE file can check to see if any of the modules have not been loaded, and then load those modules only. So any time you add a module, one double click, on one already existing file, is all that is needed to add audio XML WoC formated data into the correct Audio XML files. In this way all new modules are written completely in WoC format and the EXE file would be a temporary solution, until the Game EXE file is finally updated by Firaxis.

Great idea! :thumbsup: With the exception of python, the installation would be completely automated. Even the python can be written is such a way that most of the code can be located in one python file. See the latest version of Orion's Inquisition Mod for a good example of a lot of python code converted to run from a single file.

Now that we have a good concept, we need a volunteer to write the WoCAudio.EXE file. Any takers?


Orion Veteran :cool:
 
@OrionVet
Yeah must admit option "2" of the installer is the best. It sits permanently in exactly the same folder as the modules folder along with the MLF control files. It can be double clicked as often as you like it will not make any difference if the audio and python have already been merged. I will take a look at writing it over the next week. If it has already been done, so be it. The only real difficulty will be how to overcome the "security" features of the various operating systems the detect exactly these type of "utilities" as being malicious.

As for also preloading python, we're going to have to come up with a standard so that the python goes dormant if the module does not exist.

Cheers.
 
@OrionVet
Yeah must admit option "2" of the installer is the best. It sits permanently in exactly the same folder as the modules folder along with the MLF control files. It can be double clicked as often as you like it will not make any difference if the audio and python have already been merged. I will take a look at writing it over the next week. If it has already been done, so be it. The only real difficulty will be how to overcome the "security" features of the various operating systems the detect exactly these type of "utilities" as being malicious.

As for also preloading python, we're going to have to come up with a standard so that the python goes dormant if the module does not exist.

Cheers.

1. No one has come out and said anything to indicate this type of utility file has been previously developed.

2. There are many different software packages that might detect and classify this utility exe file as being potentially malicious. I doubt there is a way to stop the detection, without manually creating a custom setting in the firewall to allow or ignore the file's operation. I certainly would make the effort in my firewall.

3. I'd like to suggest a near standard location for the utility to look for the audio files named: *AudioDefines.xml and *Audio2DScripts.xml. The two files can be located two or three subfolders under the Modules folder. A few Examples:

A. A new religion called Shintoism: The audio files are located in the folder Shintoism

...Modules\Religions\Shintoism

B. A new Unit called Minuteman: The audio files are located in the folder Minuteman

...Modules\Units\Minuteman

C. A new National Wonder called the Strategic Grain Reserve:

...Modules\Wonders\National\Strategic Grain Reserve

D. A new World Wonder called the Art of War:

...Modules\Wonders\World\Art of War

As you can see, the subfolders can be two or even three folders deep. I thank you for taking on the development of the WoCAudio.EXE file.

Sincerely,


Orion Veteran :cool:
 
Ok thanks for this OrionVeteran. We will see what other people think, if anything. Thankfully the solution to adding python is very simple and elegant I think. I wonder what you think. Whenever python function code has to be specifically be executed for a specific mod, what we tend to do now is first ask the question in python "is the mod enabled?" which is normally a check to GlobalAltDefines.xml or the like. The proposal is that a simple python interface class is written that asks this question in a different way. It asks "does the corresponding name of this python file exist in the modules folder?" The interface class wraps this question up so that the python modder simply asks something like:

import module_interface
...
...
def doHolyCity(self):
if module.exist(self):
{execute mod specific code}
...

The requirement then is that the module's python code exist as a single .py file with the same name as the module.

Just ideas.
Cheers.
 
Ok thanks for this OrionVeteran. We will see what other people think, if anything. Thankfully the solution to adding python is very simple and elegant I think. I wonder what you think. Whenever python function code has to be specifically be executed for a specific mod, what we tend to do now is first ask the question in python "is the mod enabled?" which is normally a check to GlobalAltDefines.xml or the like. The proposal is that a simple python interface class is written that asks this question in a different way. It asks "does the corresponding name of this python file exist in the modules folder?" The interface class wraps this question up so that the python modder simply asks something like:

import module_interface
...
...
def doHolyCity(self):
if module.exist(self):
{execute mod specific code}
...

The requirement then is that the module's python code exist as a single .py file with the same name as the module.

Just ideas.
Cheers.

I wish the Python could be that easy. Even after I moved most of the python functions into a single python file, there are still call references coming from many other python files. May I suggest you proceed with the XML side and let me think about a possible Python solution for a while. Talk to you tomorrow.

Respectfully,

Orion Veteran :cool:
 
1. No one has come out and said anything to indicate this type of utility file has been previously developed.

afaik it has not been developed yet

2. There are many different software packages that might detect and classify this utility exe file as being potentially malicious. I doubt there is a way to stop the detection, without manually creating a custom setting in the firewall to allow or ignore the file's operation. I certainly would make the effort in my firewall.

I doubt any firewall of virus detection software would care, you are just processing some files on the HD. Word does the same and noone cares either. After all, you are just changing text fiels, not executabes or dlls. The latter should trigger an alarm.

3. I'd like to suggest a near standard location for the utility to look for the audio files named: *AudioDefines.xml and *Audio2DScripts.xml. The two files can be located two or three subfolders under the Modules folder. A few Examples:

imo just search all subdirectories of Modules, no matter what level, makes no difference speed and programming wise and makes sure none are missed.

Python probably is much trickier to handle correctly than the audio xml, for now I would therefore focus on the audio part.
 
For the download, could you make the sample MLF and Modules folder contain more than just the one folder? I am curious precisely how to set up the extra folders in the MLF.

Would I use:
Code:
<Civ4ModularLoadControls xmlns="x-schema:CIV4ModularLoadingControlsSchema.xml">
	<DefaultConfiguration>Modules_Main_1</DefaultConfiguration>
	<ConfigurationInfos>
		<ConfigurationInfo>
			<Type>Modules_Main_1</Type>
			<Description>Initialize ALL Modules by using the MLF file structure</Description>
			<Modules>
				<Module>
					<Directory>Example Folder</Directory>
					<bLoad>1</bLoad>
				</Module>
				<Module>
					<Directory>Second Example Folder</Directory>
					<bLoad>1</bLoad>
				</Module>
			</Modules>
		</ConfigurationInfo>		
	</ConfigurationInfos>
</Civ4ModularLoadControls>

Or

Code:
<Civ4ModularLoadControls xmlns="x-schema:CIV4ModularLoadingControlsSchema.xml">
	<DefaultConfiguration>Modules_Main_1</DefaultConfiguration>
	<ConfigurationInfos>
		<ConfigurationInfo>
			<Type>Modules_Main_1</Type>
			<Description>Initialize ALL Modules by using the MLF file structure</Description>
			<Modules>
				<Module>
					<Directory>Example Folder</Directory>
					<bLoad>1</bLoad>
				</Module>
			</Modules>
		</ConfigurationInfo>		
		<ConfigurationInfo>
			<Type>Modules_Main_2</Type>
			<Description>Initialize ALL Modules by using the MLF file structure</Description>
			<Modules>
				<Module>
					<Directory>Second Example Folder</Directory>
					<bLoad>1</bLoad>
				</Module>
			</Modules>
		</ConfigurationInfo>		
	</ConfigurationInfos>
</Civ4ModularLoadControls>

I am inclined based on the description to say the second is appropriate, but under which circumstances would you ever use a second Configuration if so? Also, is the Default Configuration the only one that loads? If that is the case then I would have named it differently (like: SelectedConfiguration) so that it is a tad more intuitive why you would set up multiple Configurations.
 
I am no python guru but I was looking at zebra's stuff to see if it could help. He made some modular python just not enough I think, but will look at it more. If paths can be defined to modules themselves to append to the base python it would be nice. I doubt it will ever be that easy though.

As for example of the MLF. There are plenty outside of this file. I should of added more but wanted to leave very basic to let anyone add their own. Look at this thread for more modules.

http://forums.civfanatics.com/showthread.php?t=320428

You do not need a MLF in every folder necessarily. It sorts folders alphabetically if there is not a MLF in the folder.

I can not get access to my computer with Civ at the moment, but RevDCM has another MLF file that is same as in the WoC Full as well with Next War added to the end.

The first example of the MLF is more common. Other configurations never were used so I am not sure honestly how they would of worked. Anyway I hope that helps.
 
When thinking about how to make Python modular, remember that there is a BUG way of doing things which is fairly elegant. In Bug, Python events and modules are all predefined in XML with the actual events then written into one Python file with all the overhead python executed by BUG. RevDCM.py is a crudely simple example of this inside RevolutionDCM.

Multiple file support should be ok at a guess so long as each file is nothing but the mod's python and that each file imports a module interface. I definetly take Mamba's point that it's probably more difficult than I think and so will at first concentrate on straight XML porting. Ok, then the only issue about maliciousness is with people like me running Vista, where the program files directory is locked down a bit like a police state.

Cheers.
 
There's already a bit of information in the DLL about modular Python, just attempts which don't work so far, or useful in some way?

Also wondered about all of the debugging items left in there. Once I get things compiling properly with them still in there I'll work on checking if anything is dirupted by ditching it all (really shouldn't be, but best to wait).


Main question: I have to write some new XML files from scratch, and spruce up quite a few others to handle new functions. I see that readPass2 gets a CopyNonDefaults written special for it, but there aren't any special ones for readPass3. BtS doesn't USE readPass3 very much, so the only ones I can find are for single value fields where we just assume that if something was written for it, we overwrite whatever already existed. Probably won't fly so hot for some of my new fields which are a bit more complicated, but I can't remember if any of the readpass3 entries require full arrays instead of single values.


EDIT: Also, the NonDefaults setup means that if I wanted to create a module to REMOVE the bNoBadGoodies flag from a scout, I would be up the creek because False is the default value and will be ignored. Unless I am reading it wrong. I would propose you add a <bForceOverride> tag along with the TypeDependancy tags (so infobase) so that you can state that you want to force a clean slate and any default values listed (or values simply not listed at all) should override any non-defaults which are already loaded. Probably will write one for myself shortly.
 
I need to state I really am just beginning to learn C++. Yes if you could improve on it would be good. There is always room for improvement. The python part was used in WoC Full version but was not really modular. There is one folder for this in Full version to control python screens "assets/python config". It was written so people could just change screens in xml, but it was never really finished. I could see it be improved on.

I am just taking what is there for modular loading, and the TGA then removing the rest. I wanted to make it clear with comments that there were changes so anyway can see what has changed. There is a lot of debug entries left that probably are not needed. If you have any improvements it would be welcome.

Edit: I know I left the CvTeam.cpp in the the first WoC Lite version that I made. And for example there are no changes needed from it. I never did update it yet after figuring out more. I hope to make a more cleaner version when I get the chance on it. The last with RevDCM was what I was working on the most. I am going to need to revisit the older ones.
 
I just sent a new basic WoC Lite up. I removed Better BTS AI and also removed Solver's fixes. I added in the rest of the Jeckel's Autoplay changes from his SDK. It has some new features in the Autoplay.

Anyway it is just the basic version. I am going to go through these files again. I am looking to bring Rapture over later in a separate download.

http://forums.civfanatics.com/downloads.php?do=file&id=12149
 
Top Bottom