Problems with modular loading

Alulim

Chieftain
Joined
Dec 19, 2005
Messages
16
Location
USA
Hi, I hope this is the right place for this. I'm having a few problems with the modular loading system in BtS, maybe someone here can help.

  1. Modules don't seem to load from CustomAssets. According to 14.3 in Kael's post here, they should load if they're in "CustomAssets\Modules", but I can only get them to load from "Mods\Modname\assets\Modules". Has anyone got this working or is this a feature that didn't make it into BtS?

  2. Modular text tags can't replace non-modular text tags. If I make a modular text file (of the form *_Civ4GameText.xml), I can create new text tags, I just can't overwrite old ones, like say <Tag>TXT_KEY_CITY_NAME_WASHINGTON</Tag>. I know my modular text files are being read, since the game gives me an error box if I have typos, but the old text tags don't get overwritten. Or maybe the non-modular text is loaded after modular text, unlike the other sorts of files? Is this a bug or am I doing something stupid?
 
You are not doing something stupid at all.

But in order for you to get rid of the old TXT names you will have to include within your own mod is an Actual Civ4GameText.xml with those entries you don't want in it taken out. Because you see what is happening is the game is still loading the original text files and then it ADDS the new text in as well. In order to take something out you will have to remove it from the original Text Files by doing the following.

1.) copy past the original Civ4GameText.xml into your mod folder.
2.) remove all the entries you want to remove.
3.) Place this within your Assets/Xml/Text folder within your mod.

Once you have done this. Your new Civ4GameText.xml file will supercede the original one.

Something I will be working on shortly is a Blank Assets folder which in itself will be a module. It will remove all current civ's from the game so that you can have only the Civ's you chose to have. By doing this I'll Also have to make new modules which will allow you to add each civ in one at a time.

I did do this for Warlords but found that the DiplomacyInfos.xml file got really upset with me. Impaler[WRG] wrote a fix for this the only thing is I haven't gotten word from him that it is also available now for BtS
 
A question about P&P LH and modular modding

Looking at Wilhelmina mod I noticed Wilhelmina_CIV4CivilizationInfos.xml file.
It comes from firaxis BTS CIV4CivilizationInfos.xml file with only netherland civ inside PLUS the following lines
Code:
				<Leader>
					<LeaderName>LEADER_WILHELMINA</LeaderName>
					<bLeaderAvailability>1</bLeaderAvailability>
				</Leader>
to set Wilhelmina as 2nd netherland leader

But what happens if I'll made another different Mods to add a further "2nd" netherland leader?
I guess that my second mod step on the first and Wilhelmina disappears, right?

For modular modding purpose I would have expected something like this
Code:
<?xml version="1.0"?>
<!-- Civilization Infos -->
<Civ4CivilizationInfos xmlns="x-schema:LEADERXXX_CIV4CivilizationsSchema.xml">
	<CivilizationInfos>
		<CivilizationInfo>
			<Type>CIVILIZATION_NETHERLAND</Type>
			<Leaders>
				<Leader>
					<LeaderName>LEADER_XXX</LeaderName>
					<bLeaderAvailability>1</bLeaderAvailability>
				</Leader>
			</Leaders>
		</CivilizationInfo>
	</CivilizationInfos>
</Civ4CivilizationInfos>
in order to add any further netherland leader at the bottom of the previous ones (Willelm, Wilhelmina, LeaderXXX, ecc...)
 
This has come up before. Even your solution is not a good work around on this. A good way to work around the issue is for someone to come up with a front loading program to manage the modules.
 
Thanks purplexus! It sounds like it might be best not to use modular loading for my alternate city names mod. I can just picture someone removing my alternate city names files from the modules folder (either for a single civ or all of them) but leaving behind the "blanked" xml and wondering why the Americans keep founding cities called TXT_KEY_CITY_NAME_WASHINGTON. :crazyeye:
 
Thanks purplexus! It sounds like it might be best not to use modular loading for my alternate city names mod. I can just picture someone removing my alternate city names files from the modules folder (either for a single civ or all of them) but leaving behind the "blanked" xml and wondering why the Americans keep founding cities called TXT_KEY_CITY_NAME_WASHINGTON. :crazyeye:

So lets see how we can get a work around for this.

What we would first do is blank the civ's out. Then we create Modules for each original civ. That should work for what you are trying to do.

Now when you want to replace the american's with your own version. they will have cities with your own flavour. Its all doable. Tonight I'll Start on Blanking out the civ's
 
An even better solution would simply be to have the Leaderhead reference the Civilization it belongs to rather then the other way around (same thing for Unique Units). Hopefully I can code that in some day, though it won't be compatible with default BtS.
 
I also encountered the problem that modules don't seem to load from CustomAssets. See my other post here. Has anyone found a work-around for this?
 
Ambrox about your question earlier about using a General XXX for a LeaderHead Name....
I guess apparently the only true work around that will work is to incorporate a mod in which the LH will reference the Civilization instead of the other way around like it does now.
 
I tried to do what ambrox suggested, but it caused all kinds of errors. I believe a modified schema could address it. That, or it combined with a SDK or python script.
 
What I do is just keep 1 CivilizationInfos File, and edit it, as i add leaders. Ignoring the XXX_CivilizationInfos.xml for each individual leader.

Its not completly 100% plug and play, but one has to Cut+Paste the Diplomacy's file anyway, so I dont really care.

The diplomacy issue is now resolved.

The purpose for creating Modules though is also to make this as easy as possible for the Non Programming types.

Sounds like Impaler has thought of a way to Implement a Leader referring to their civilization... instead of the other way around. He has also mentioned he will try to code this in and get us an update.
 
Ok i am having a problem with the attached file:

It will not override the original file to be placed in the civ that i want to play? Each civ i play gives the original one and not the custom unit one, what is wrong????
 
Ok i am having a problem with the attached file:

It will not override the original file to be placed in the civ that i want to play? Each civ i play gives the original one and not the custom unit one, what is wrong????

Well if you want it to replace the SAM Infantry, then you have to name it the same, not different as you have with Yellow_SAM_Infantry.

Although I don't understand why it doesn't show up ingame as a regular unit :confused: It is in the pedia and WB just fine, but even when I turned off the upgrade unit tag it still wouldn't show up....


EDIT:
It looks like an EDU in the pedia saying it replaces the SAM Infantry....but it won't show up on a unique Civ if the CivilizationInfos.xml isn't in the Module as well.
 
Well if you want it to replace the SAM Infantry, then you have to name it the same, not different as you have with Yellow_SAM_Infantry.

Although I don't understand why it doesn't show up ingame as a regular unit :confused: It is in the pedia and WB just fine, but even when I turned off the upgrade unit tag it still wouldn't show up....


EDIT:
It looks like an EDU in the pedia saying it replaces the SAM Infantry....but it won't show up on a unique Civ if the CivilizationInfos.xml isn't in the Module as well.


You know i thought of that also, about the CivInfo but i didnt want to use that because i wanted all civs to use it??:crazyeye:

EDIT: Ok tried the <Class>UNITCLASS_SAM_INFANTRY</Class>
<Type>UNIT_SAM_INFANTRY</Type>

and it WORKED!!

But only thing i was thinking about then was now if playing with other person(s) (multiplayer)they will have to use the same SamInfan then? I think?
 
I've never played a multiplayer game, but from the modding side I can pretty well bet you that all players must be using the same mods as you if you want to avoid problems. All you need to do is ZIP Up your CustomAssets folder and send it to the other players. The same goes for any succession or PBEM games -- any game that's shared among players in some way.

If you just replace the unit with a similar unit with different abilities (meaning not a new unit), then the game would work if no one else has your mods, but the units would work differently for them than they do for you.
 
I've never played a multiplayer game, but from the modding side I can pretty well bet you that all players must be using the same mods as you if you want to avoid problems. All you need to do is ZIP Up your CustomAssets folder and send it to the other players. The same goes for any succession or PBEM games -- any game that's shared among players in some way.

If you just replace the unit with a similar unit with different abilities (meaning not a new unit), then the game would work if no one else has your mods, but the units would work differently for them than they do for you.

Custom Assets is not used....but you are right, all players in MP will need identical Modules.
 
Top Bottom