Modmoding question (tags outside their normal schema)

apotheoser

Prince
Joined
Apr 15, 2006
Messages
336
I'm trying to make a civic give bonuses to specific specialists. For example, Engineers get +1:hammers: - but only Engineers. Civ4CivicsInfo only allows SpecialistExtraCommerce, which applies to every kind of specialist (and only does types of Commerce anyway).

So I went into Civ4BuildingsInfo and found the tag for changing specific specialist yields, SpecialistYieldChanges. I added SpecialistYieldChanges and all the applicable subtags to Civ4GameInfoSchema, from Civ4BuildingsSchema. The game actually loads, so that part worked anyway. :)

However, it doesn't actually change the Specialist's output. For example:

<SpecialistYieldChanges>
<SpecialistYieldChange>
<SpecialistType>SPECIALIST_ENGINEER</SpecialistType>
<YieldChanges>
<iYield>5</iYield>
<iYield>5</iYield>
<iYield>5</iYield>
</YieldChanges>
</SpecialistYieldChange>
</SpecialistYieldChanges>

didn't change anything about my Engineers when I switched to the Civic I put it in.

Questions:
(1) Why not?
(2) Do I need to look in (a) the python or (b) the .dll to try and fix this?
 
Schema changes allow you to change what is the XML file without any errors, but anything you put in the XML file has to be read by the DLL to have an impact on the game. So to move tags from one file to another (even if they share a schema, like Promotions and Units do) you need to modify the DLL.
 
Schema changes allow you to change what is the XML file without any errors, but anything you put in the XML file has to be read by the DLL to have an impact on the game. So to move tags from one file to another (even if they share a schema, like Promotions and Units do) you need to modify the DLL.

Is your "An Idiot's Guild to Editing the DLL" a good place to start?

http://forums.civfanatics.com/showthread.php?t=314201
 
Hmm, I'm having trouble building the .dll. It seems there is no such file or directory as sal.h.

Apparently this is a problem with the version of the Windows platform SDK I am using?

Edit: fixed via copying a sal.h i had lying around into the sdk directory.
 
Never heard of sal.h, so not sure why it is looking for it. Are you using Kael's guide or Refar's?

i was using kael's codeblocks guide. apparently a few other people had this problem too, judging from the thread. googling sal.h also turns up some other people using various IDEs that have had this problem. I think the problem is that v6.1 of the platform SDK does not come with sal.h.

it turns out i have Microsoft VS9 on my computer though, which had sal.h that I copied over to the SDK Include directory.
 
Top Bottom