Edit Resource Happiness

SpikerzZ

Chieftain
Joined
Mar 18, 2011
Messages
18
Hi, first of all, I would like to say that Civilization V rocks, it is the best one of the 5, but the happiness sucks in it.

I am trying to update the resources to produce more happiness, but I can't figure it out, I have in my main mod a file called "NewResources.xml" and in it I have

<?xml version="1.0" encoding="utf-8"?>
<!-- edited with XMLSPY v2004 rel. 2 U (http://www.xmlspy.com) <GameData>
<NewResources>
<Update>
<Where Type="RESOURCE_IVORY"></where>
<Set Happiness="1"></set>
</Update>
<Update>
<Where Type="RESOURCE_WHALE"></where>
<Set Happiness="3"></set>
</Update>
<Update>
<Where Type="RESOURCE_PEARLS"></where>
<Set Happiness="2"></set>
</Update>
</Resources>
</GameData>

I did low numbers just to test, I will eventually have 8's for the resources.

is there anyone who can help me with this? :D
 
First of all, you've got this in the wrong forum. Questions go in the general C&C forum. I'll report the post so that a mod will move it.

Second, you've got <NewResources> in there. There's no such thing, it should just be <Resources>. This is probably the one that's causing it to break.

Third, when posting XML on boards, use the (CODE) tag (brackets instead of parentheses). Much easier to read.

Fourth, while the code might be technically correct, instead of writing
<Where Type="RESOURCE_WHALE"></where>
just write
<Where Type="RESOURCE_WHALE"/>
(and the same for the Set). It means the same thing, but is much easier to read.

Fifth, OnModActivated/UpdateDatabase. If you don't know what I meant by that, then that's also the problem.

Now, beyond that, you're going to utterly destroy the game's balance if you move all those up to 8. It's not hard to learn how to use the Happiness system to stay above 0 at the current values.

Also, you didn't need to ask us for this. The game has debugging log outputs that you can enable to check this for yourself. Go into your config.ini file, turn on the Logging flags, and when the game loads the database you'll get a bunch of log files in your Logs directory. The xml.log file would have told you this problem.
 
First of all, you've got this in the wrong forum. Questions go in the general C&C forum. I'll report the post so that a mod will move it.

Second, you've got <NewResources> in there. There's no such thing, it should just be <Resources>. This is probably the one that's causing it to break.

Third, when posting XML on boards, use the (CODE) tag (brackets instead of parentheses). Much easier to read.

Fourth, while the code might be technically correct, instead of writing
<Where Type="RESOURCE_WHALE"></where>
just write
<Where Type="RESOURCE_WHALE"/>
(and the same for the Set). It means the same thing, but is much easier to read.

Fifth, OnModActivated/UpdateDatabase. If you don't know what I meant by that, then that's also the problem.

Now, beyond that, you're going to utterly destroy the game's balance if you move all those up to 8. It's not hard to learn how to use the Happiness system to stay above 0 at the current values.

Also, you didn't need to ask us for this. The game has debugging log outputs that you can enable to check this for yourself. Go into your config.ini file, turn on the Logging flags, and when the game loads the database you'll get a bunch of log files in your Logs directory. The xml.log file would have told you this problem.

OK this is what I have
Code:
<?xml version="1.0" encoding="utf-8"?>
<!-- edited with XMLSPY v2004 rel. 2 U (http://www.xmlspy.com) <GameData>
  <Resources>
    <Update>
       <Where Type="RESOURCE_IVORY"/>
       <Set Happiness="1"/>
    </Update>
    <Update>
       <Where Type="RESOURCE_WHALE"/>
       <Set Happiness="3"/>
    </Update>
    <Update>
       <Where Type="RESOURCE_PEARLS"/>
       <Set Happiness="2"/>
    </Update>
  </Resources>
</GameData>
still don't work and yes I have it in the update database. Thats what I originally had I been trying different things
 
Attach the files (complete with .modinfo file) to your post and we can take a look at it. I don't see anything else wrong with it.
 
Attach the files (complete with .modinfo file) to your post and we can take a look at it. I don't see anything else wrong with it.

I hope this worked, I attached the files I am editing, just to let you know, I am editing the Canada True North Strong and Free Mod, and am in no way distributing this mod for anyone, this is all for my own personal use.

I also got the latest patch.
 
I hope this worked, I attached the files I am editing, just to let you know, I am editing the Canada True North Strong and Free Mod, and am in no way distributing this mod for anyone, this is all for my own personal use.

I also got the latest patch.

hmm don't work, it gives me an upload error
I will upload it to my web site and give the link

The address is http://www.gigasoft.ca/downloads/canada.zip
 
Okay, you've got a VFS issue, but it looks like you're also using an outdated version of the SDK. Make sure it is set to auto-update through Steam as well. (It's not automatically patched when the game is, unless you do this.) Without this, it won't load any of your .dds files correctly.
Once the SDK is updated, right-click on each .dds file inside ModBuddy, and select Properties. In the small window that pops up there'll be an "Import into VFS" option, defaulting to False. You need to change it to True for all .dds files, as well as any non-Gamedata XML or premade Lua (neither of which you have).

But that won't cause a game-stoipping error, just a lot of error popups as you play. What WILL cause an error is that you've got OnModActivated/UpdateDatabase for two files (your CIV5Resources.xml and your Civ5Buildings.xml) that aren't actually contained in the mod. They're in the directories, but if you look inside the .modinfo file you'll see that they're not listed in the <Files> block.

And nitpick: while it won't break anything since you were consistent on it, you should really rename Civ5Buildings.xml to be CIV5Buildings.xml (note the capital letters on the I and V) to match the other files.

EDIT:
One more thing. The reason you were getting all those TXT_KEY errors you mentioned in another thread is that you've got Quebec City as a city in your empire, despite the fact that it's also the name of one of the city-states in the game. That's why the error happened; you were trying to define a text key that had already been set.
While adding the _CANADA_ to each key name fixed the conflict, it won't change the fact that you can still have Quebec City as a city-state. This could cause problems. What you should do is remove Quebec City from the list of possible city-states while you're at it.

Final nitpick: in your mod's Description, you say "Take the reigns of Canada." It's either a bad pun (although really, are there any good ones, ever?) or you misspelled "reins". Then again, we are talking about Canada as a world-conquering empire, so maybe the humor was intentional... (no offense.)
 
Okay, you've got a VFS issue, but it looks like you're also using an outdated version of the SDK. Make sure it is set to auto-update through Steam as well. (It's not automatically patched when the game is, unless you do this.) Without this, it won't load any of your .dds files correctly.
Once the SDK is updated, right-click on each .dds file inside ModBuddy, and select Properties. In the small window that pops up there'll be an "Import into VFS" option, defaulting to False. You need to change it to True for all .dds files, as well as any non-Gamedata XML or premade Lua (neither of which you have).

But that won't cause a game-stoipping error, just a lot of error popups as you play. What WILL cause an error is that you've got OnModActivated/UpdateDatabase for two files (your CIV5Resources.xml and your Civ5Buildings.xml) that aren't actually contained in the mod. They're in the directories, but if you look inside the .modinfo file you'll see that they're not listed in the <Files> block.

And nitpick: while it won't break anything since you were consistent on it, you should really rename Civ5Buildings.xml to be CIV5Buildings.xml (note the capital letters on the I and V) to match the other files.

EDIT:
One more thing. The reason you were getting all those TXT_KEY errors you mentioned in another thread is that you've got Quebec City as a city in your empire, despite the fact that it's also the name of one of the city-states in the game. That's why the error happened; you were trying to define a text key that had already been set.
While adding the _CANADA_ to each key name fixed the conflict, it won't change the fact that you can still have Quebec City as a city-state. This could cause problems. What you should do is remove Quebec City from the list of possible city-states while you're at it.

Final nitpick: in your mod's Description, you say "Take the reigns of Canada." It's either a bad pun (although really, are there any good ones, ever?) or you misspelled "reins". Then again, we are talking about Canada as a world-conquering empire, so maybe the humor was intentional... (no offense.)

1) I got the latest version of SDK
2) I don't understand how to update the VFS
3) I payed through and there is no problem, plus I had Quebec City as a City State
4) Like I said, I didn't make this mod, I just edited it, so take the reigns of Canada wasn't my words
5) Canada is about peace, and I am proud to be a canadian, we are welcome to almost any country without problem, and people like us, why wouldn't I be a proud Canadian. :D
6) The Canadian mod works fine, it is the happiness I am trying to get working, I added it to files but not sure if I did it right, like I said, I am not the creator of this mod, I just want to edit it.
 
1) I got the latest version of SDK

If you did, then every line in the <Files> block would have "import="1"" or "import="0"". They don't. That's why I said it. It wasn't a guess; either your SDK isn't up-to-date, or you're trying to modify a mod made with an older SDK and not fully rebuilding it correctly.

A correct, up-to-date SDK leads to modinfo file with lines like
<File md5="B06323AD71ED378697B3B19C2E7305F1" import="1">Art/BW_SMAC1024.dds</File>
<File md5="EE379C7F43CBF92595A9EFC34812EBF8" import="0">XML/BasicInfos/CIV5Concepts.xml</File>

See the import parts? That's what you're missing, and it's set automatically by the versions of ModBuddy that were released after the December patch (for PCs. I think Macs got that in March?) If you'd rebuilt the mod with an up-to-date SDK any time after December, it'd have those commands in it.

2) I don't understand how to update the VFS

I just told you in my previous post. Right-click, Properties, Import into VFS. You MUST do this to get the mod to work. (Plus you have to fix the other issue I mentioned with the two incorrect UpdateDatabases.)

I understand that it was someone else's mod you're tweaking, but the original clearly predates the December patch (when the VFS change was made), and until you fix it, it will not work no matter which part is yours and which part was the original mod. They've done this twice now, where old mods no longer work with the newest game engine; you just have to deal with it and fix things yourself if you want to alter old mods.
 
If you did, then every line in the <Files> block would have "import="1"" or "import="0"". They don't. That's why I said it. It wasn't a guess; either your SDK isn't up-to-date, or you're trying to modify a mod made with an older SDK and not fully rebuilding it correctly.

A correct, up-to-date SDK leads to modinfo file with lines like
<File md5="B06323AD71ED378697B3B19C2E7305F1" import="1">Art/BW_SMAC1024.dds</File>
<File md5="EE379C7F43CBF92595A9EFC34812EBF8" import="0">XML/BasicInfos/CIV5Concepts.xml</File>

See the import parts? That's what you're missing, and it's set automatically by the versions of ModBuddy that were released after the December patch (for PCs. I think Macs got that in March?) If you'd rebuilt the mod with an up-to-date SDK any time after December, it'd have those commands in it.



I just told you in my previous post. Right-click, Properties, Import into VFS. You MUST do this to get the mod to work. (Plus you have to fix the other issue I mentioned with the two incorrect UpdateDatabases.)

I understand that it was someone else's mod you're tweaking, but the original clearly predates the December patch (when the VFS change was made), and until you fix it, it will not work no matter which part is yours and which part was the original mod. They've done this twice now, where old mods no longer work with the newest game engine; you just have to deal with it and fix things yourself if you want to alter old mods.

I know this is a dumb quetion, but how do I load the mod into modbuddy? I did open file then opened one dds file at a time but I can't find were it says to import into vfs, I do find properties but am I looking in the wrong place?

This mod does work perfect except when I update my stuff, other then that it is perfect, avter I re-name all the cities. Sorry but I like the old modding of Civ III the best, it was easy to understand and I just enter my info. I made civilizations from scratch in there and to me this seems to be harder to even do basic stuff.
 
Back
Top Bottom