[TUTORIAL] Modular XML Modding With A New Dawn

How do you un-require a building from needing a resource in?

You see I want to make the Potter's Hut not require Copper or Lead resources. But the files that control this are in AND. And I want to some how override it from HAND without directly changing the files in AND.

How do I do this?

Note I tried this but it did not work ...
Code:
		<BuildingInfo>
			<BuildingClass>BUILDINGCLASS_POTTER</BuildingClass>
			<Type>BUILDING_POTTER</Type>
			<PrereqBonuses>
				<Bonus>NONE</Bonus>
				<Bonus>NONE</Bonus>
			</PrereqBonuses>
		</BuildingInfo>
 
had a once similar issue with promotion prerequisites. overrides are not always possible i was told due to the modular loading system. though not sure about your case.

here was the answer post to my problem:
Unfortunately in WoC modular you can only add stuff not remove or replace it. To remove it you would need to change the base files.
 
How do you un-require a building from needing a resource in?

You see I want to make the Potter's Hut not require Copper or Lead resources. But the files that control this are in AND. And I want to some how override it from HAND without directly changing the files in AND.

How do I do this?

Note I tried this but it did not work ...
Code:
		<BuildingInfo>
			<BuildingClass>BUILDINGCLASS_POTTER</BuildingClass>
			<Type>BUILDING_POTTER</Type>
			<PrereqBonuses>
				<Bonus>NONE</Bonus>
				<Bonus>NONE</Bonus>
			</PrereqBonuses>
		</BuildingInfo>

You need to use a <bForceOverwrite> tag. It will delete all the previous information that loaded, so make sure you keep all the values you want saved in your XML.

had a once similar issue with promotion prerequisites. overrides are not always possible i was told due to the modular loading system. though not sure about your case.

True for WoC, but not AND. I added methods to overwrite and modularly delete XML too. ;)
 
You need to use a <bForceOverwrite> tag. It will delete all the previous information that loaded, so make sure you keep all the values you want saved in your XML.

True for WoC, but not AND. I added methods to overwrite and modularly delete XML too. ;)

ah, that's a very handy tag. thx for that info.
 
True for WoC, but not AND. I added methods to overwrite and modularly delete XML too. ;)

With a bit of luck he (Afforess) made it possible for the WoC team to incorporate it back in their stuff so everyone benefits. :) btw I still have not incorporated this into AAranda's religions stuff. Slack or sidetracked easily or what ;)
 
With a bit of luck he (Afforess) made it possible for the WoC team to incorporate it back in their stuff so everyone benefits. :) btw I still have not incorporated this into AAranda's religions stuff. Slack or sidetracked easily or what ;)

WoC is dead; they have no SDK coders to mod with.
 
You need to use a <bForceOverwrite> tag. It will delete all the previous information that loaded, so make sure you keep all the values you want saved in your XML.

Wait so how would i write it? Like this?

Code:
<bForceOverwrite>
		<BuildingInfo>
			<BuildingClass>BUILDINGCLASS_POTTER</BuildingClass>
			<Type>BUILDING_POTTER</Type>
			<PrereqBonuses>
				<Bonus>NONE</Bonus>
				<Bonus>NONE</Bonus>
			</PrereqBonuses>
		</BuildingInfo>
<bForceOverwrite>

Or do I need to copy over everything from that building and just restate it all but leave out the resources?
 
Nope. Just add <bForceOverwrite>1</bForceOverwrite> at the end of the building info.
 
WoC is dead; they have no SDK coders to mod with.

So can you tell me why where I put an XML mod in the MLF makes a difference to it working or not? I am sure I checked that there were no duplicate entries, ie the mod had all new objects and was not updating existing ones. FYI I am talking about the modular version of the "Capture Slaves mod" StrategyOnly wrote. I was going to look into the onCivicChange event to see if I could add something to fix the problem with slaves existing after slavery but could not find the documentation on the function EmperorFool was going to make.
 
Debug DLL's log what folders are loaded.

OK, I wasn't being clear, mea culpa :). Part of the XML mod is not being loaded. If I have it early in the list either the unit class XML or the game text XML is not available. In the latter case it still plays fine except the units don't have the correct names just TXT_UNIT_... instead. In the former case everything fails naturally.

But if I move the module to later in the MLF everything works?
 
OK, I wasn't being clear, mea culpa :). Part of the XML mod is not being loaded. If I have it early in the list either the unit class XML or the game text XML is not available. In the latter case it still plays fine except the units don't have the correct names just TXT_UNIT_... instead. In the former case everything fails naturally.

But if I move the module to later in the MLF everything works?

Gametext only loads if the phrase "CIV4GameText" is found in the file name, somewhere. The prefix and end of the name don't matter. Same with all other files, you need the Civ4...Info for them to load.

I doubt I can help with more specific cases, unless I had the XML in question. Debug DLL's and a working debugger are much more helpful in those cases.
 
Gametext only loads if the phrase "CIV4GameText" is found in the file name, somewhere. The prefix and end of the name don't matter. Same with all other files, you need the Civ4...Info for them to load.

I doubt I can help with more specific cases, unless I had the XML in question. Debug DLL's and a working debugger are much more helpful in those cases.

The XML does not change it is in the folder and stays the same. Where I put the folder in the MLF determines if it works fully, partially or not at all. That is what I do not understand. How can changing the load order have such big effects? Especially as the objects only exist in that one mod?
 
The XML does not change it is in the folder and stays the same. Where I put the folder in the MLF determines if it works fully, partially or not at all. That is what I do not understand. How can changing the load order have such big effects? Especially as the objects only exist in that one mod?

If the objects are all independent (don't modify base XML files) it should make no difference. MLF just dictates the order in which folders load, nothing else.

Of course, if you have an error in you MLF file, it would lead to undefined behavior.
 
If the objects are all independent (don't modify base XML files) it should make no difference. MLF just dictates the order in which folders load, nothing else.

Of course, if you have an error in you MLF file, it would lead to undefined behavior.

I am assuming I have made a dyslexic error somewhere, but it is happening to someone else also! I've got them looking at the XML to see if they can find the error. Thanks.
 
Back
Top Bottom