SDK changes-little help please?

First up, I apologise for not being more specific re: my SDK problems. The first difficulty I had regarding StateReligionYields was purely related to in-game effects. It compiled beautifully ;). I also do use values in excess of +100% in order to test that the changes are working-and they weren't-so I will have to try your suggestion, Impaler. Thankyou for the advice :).
Also, thankyou Gerikes. It is definitely a weight off my mind knowing that the error is only in XML (which is easier to solve) and not my SDK. I will probably use the process of elimination to isolate the problem, then go from there. Again, thankyou all for your amazing assistance, I hope that with time and practice, I can start modding the SDK and XML more confidently-and have to pick your brains less often ;).

Yours,
Aussie_Lurker.
 
Well, I have discovered the source of the problem-though not the exact NATURE of the problem. There appears to be something wrong with the GameInfoSchema file, but what remains a mystery to me. Just out of interest, how closely must the tags match between GameInfo and CivicInfo? Is it really pedantic about placement, or is it fairly flexible? Other than this, I can see no reason why its not working :(.

Aussie_Lurker.
 
Aussie_Lurker said:
Well, I have discovered the source of the problem-though not the exact NATURE of the problem. There appears to be something wrong with the GameInfoSchema file, but what remains a mystery to me. Just out of interest, how closely must the tags match between GameInfo and CivicInfo? Is it really pedantic about placement, or is it fairly flexible? Other than this, I can see no reason why its not working :(.

Aussie_Lurker.

It's probably syntactical. Schema files have their error thrown before the actual xml file is read with the SDK code, so it's not a matter of SDK.

You're missing a < somewhere, or put a / somewhere, etc. When I can't figure these things out, I undo everything I did (you did back up the file before you worked on it, right?), and then insert them piece by piece. This includes any changes that you made to the non-schema xml files you're working with.

First, do the declarations of the elements.

Code:
	<ElementType name="UniqueName" content="textOnly"/>
	<ElementType name="UniqueNames" content="eltOnly">
		<element type="UniqueName" minOccurs="0" maxOccurs="*"/>
	</ElementType>

Those things. When done, run it, make sure you don't have any errors. Since this just describes the elements, but doesn't actually put them into any elements, they're not going to be used. Thus, the only thing these are checked for is syntax. Once that's all done with no errors, Then, actually use those elements in the other element types.

Code:
<ElementType name="UnitInfo" content="eltOnly">
		<element type="Class"/>
		<element type="Type"/>
		[b]<element type="UniqueNames" minOccurs="0"/>[/b]


Run again, make sure you get no errors. If no errors, then your schema should be good. Finally, add the tags to your non-schema xml files. Run, make sure no errors (note that sometimes, as is in the case of the unit XML, the xml files aren't read until you go into a game. Schema files are, if I'm not mistaken, always read when the game starts).

XML errors are tricky, because doing the XML seems so trivial but if you screw up once (especially in the schema file) you're gonna' be on a wild goose chase, especially since the error messages most of the time spit out the wrong file name. Aside from having an XML editor that shows you if you're missing a bracket or something to that nature through coloring the text, you're going to want to change the XML very small steps at a time. Don't go throwing 10 complex new tags into the schema at once.
 
Yeah, I had pretty much decided to take this route. I uploaded the last set of XML files I had, and will alter them 1 bit at a time, until I get it right ;).

Aussie_Lurker.
 
Actualy thats should be


Code:
<ElementType name="UnitInfo" content="eltOnly">
		<element type="Class"/>
		<element type="Type"/>
		<element type="UniqueNames" minOccurs="0"/>

Or that way you dont have to alter EVERY single original element on the file, you can just add your new ones (or not) and it will be valid.
 
Impaler[WrG] said:
Actualy thats should be


Code:
<ElementType name="UnitInfo" content="eltOnly">
		<element type="Class"/>
		<element type="Type"/>
		<element type="UniqueNames" minOccurs="0"/>

Or that way you dont have to alter EVERY single original element on the file, you can just add your new ones (or not) and it will be valid.

I was just going straight from the Civ4 xml, but you're right, it does make it a lot easier to read, and update.
 
Oh, hey guys. Thanks for the excellent advice, but you forgot to mention how you also need to have:

Code:
<element type="FreeSpecialistChanges" [B]minOccurs="0"/>[/B]
This last bit I have learned is absolutely CRUCIAL when it comes to loading the XML Cache later down the track!
Still, as it turns out, it really does seem to have all been for nothing :(. Although it loaded very nicely in the end, it isn't reading ANY of my new additions-yet I know for certain that I have built the .dll file correctly. It is weeks like these which make a person wonder why the even bother with this stuff! It is giving me a huge headache, for very little evidence of progress. Maybe I ought to take a few days off, and see if it makes more sense when I come back to it? Still, thanks again for your help guys, it has been absolutely invaluable. If you want to have a look at the files in question (civicinfos.xml and GameTextInfos.xml) to see why the new fields aren't appearing in-game, I would be happy to send them your way-so just let me know.

Yours,
Aussie_Lurker.
 
OK, now this is really strange :confused:. Last night I thought my changes weren't changing because the new tags hadn't taken hold. What I have discovered, however, is that the mod is not adjusting the civics screen AT ALL-no matter WHAT alterations I do!?!? i.e. even if I remove a State Religion Happiness bonus from a civic, when I load the game the happiness is still there!! All I can think is that it is defaulting to a version of CivicInfos somewhere else. Does this problem sound familiar to you guys and, if so, how do I solve it? As always, I REALLY hate bothering you guys all the time, but you are always such a GREAT HELP :).

Aussie_Lurker.
 
Back
Top Bottom