need help wrapping up the celtic mod (swapping Carthage and Celtia in RFC3000BC)

antaine

King
Joined
Aug 1, 2005
Messages
737
I decided to summarize the issues I'm having here so they're not spread out over multiple posts and forums.

There seems to be only a few glitches that are proving sticky to solve. If anyone has modded Rhye's before, I'd be grateful for them to have a look at it. Here's a quick summary of everything I'm trying to fix:

1) on the initial screen where you choose your civ, all the dates and powers etc for Celtia appear as X or XXX. Carthage still appears in the Civilopedia with the dates and all, so I'm thinking that something must still be pointing at them instead of Celtia, but i'm not sure what files the initial interface (and the civilopedia) point at. I've described this problem here:
http://forums.civfanatics.com/showthread.php?p=8840694

2) I'm also trying to change the name of the mod from "Rhye's and Fall of Civilization" to "Rhye's and Fall of Civilization with Celts." If I change the WBSave file to reflect "with Celts" and change the directory of the mod to match, it causes the game to ignore the modded dll entirely and use the plain BTS one, which, of course, causes a python "you have been defeated, turn 0" crash because there are more than 18 civs.
I've described this problem here:
http://forums.civfanatics.com/showthread.php?p=8839669

3) Finally, I've cut and pasted three UHVs from other civs, with appropriate and obvious modifications (such as names). Only the first UHV works, and I can't figure out why the other two don't. The three I've made are
a) build 5 barracks, 5 stables, and 5 duns by 200 AD (this one works, except that it seems to erase the accomplishment after 200AD, moving from 1/0 to 0/0)
b) control three cities in the British Isles by 200 AD (broken)
c) lose no cities before 600 AD (broken)
I've described this problem here:
http://forums.civfanatics.com/showthread.php?p=8845249


If I can manage to fix those three things, I think I can file this mod under "done" and set about trying to do the same for the multiplayer version.
 
1) Civ-selection screen data is defined in CvRhyes.cpp and unlike everything else it is ordered alphabetically (or rather, by the order in XML), so you'll have to modify that file and recompile the DLL. All the text data with Xs and XXXs is on top of the file and Celtia(=Byzantium) is the 5th column (assuming your new Celtic civ is in Byzantium's position in CIV4CivilizationInfos.xml, duh).

EDIT: It could probably be done without editing the DLL if you replaced Carthage with Celts, and used its XML entry, e.g. your celtic civ would have to be set as CIVILIZATION_CARTHAGE in the WBSave, and then you can just edit the text files for Carthage.

2) You can change the WBSave and folder name (and INI file mod name) but then you have to update the ModPath=... inside the WBSave (in Notepad).

3) no idea, I haven't played with that part of RFC yet
 
Well that's just the problem. Neither changing it from

ModPath=Mods\Rhye's and Fall of Civilization

to

ModPath=Mods\Rhye's and Fall of Civilization with Celts

nor

ModPath=Rhye's and Fall of Civilization with Celts

seems to work. Python has a conniption, even when the titles and references inside the ini files are made to match. There has to be something somewhere else that is reaching for files of the original name.



As for the CIVILIZATION_CARTHAGE part, Carthage is still in the game, so it is still "CIVILIZATION_CARTHAGE." I looked at CvRhyes.cpp again and saw that simply replacing all the _CAR entries with _CEL entries wasn't going to do the trick...the slot immediately after all of them was filled with XXXs, so I think the game was reading the alphabetical order and reaching for that. I've adjusted it and will recompile tonight (seems to take me about 3 hrs or so), so I guess I'll know tomorrow. I'm pretty sure that'll do the trick, though, and I don't think I would have found that without your suggestion, so much thanks there!
 
...seems to work. Python has a conniption, even when the titles and references inside the ini files are made to match. There has to be something somewhere else that is reaching for files of the original name.

There just isn't, and it works fine for me. Must be some simple mistake somewhere. Try shorter name and/or remove the ModPath=... line from WBSave completely, without it the game will just assume the mod's folder is the one where the map folder with WBSave is.

As for the CIVILIZATION_CARTHAGE part, Carthage is still in the game, so it is still "CIVILIZATION_CARTHAGE." I looked at CvRhyes.cpp again and saw that simply replacing all the _CAR entries with _CEL entries wasn't going to do the trick...the slot immediately after all of them was filled with XXXs, so I think the game was reading the alphabetical order and reaching for that. I've adjusted it and will recompile tonight (seems to take me about 3 hrs or so), so I guess I'll know tomorrow. I'm pretty sure that'll do the trick, though, and I don't think I would have found that without your suggestion, so much thanks there!

Game uses the order of civilizations in CIV4CivilizationInfos.xml in this case. If you add/edit new civ, it's that order that counts, not alphabet. I'm not sure where you put your Celts but if you used Celtia/Byzantium that's really the 5th column, which are also XXXs.

For building new DLL, if you just make small changes like this, within one file, you don't have make a full rebuild, just press F7 and it takes 1 min., assuming you did a full build before. 3 hours sounds like a lot for a full rebuild though, it takes me about 30 mins on a 3 year old desktop.
 
F7 is "Build Solution," which is what I've been using. I'm using the "Rebuild Solution" option this time to see what happens, but it doesn't appear to be any faster.

In any event, I made Carthage team 30, and now we have Carthage/Byzantium, and Celtia is team 6, where Carthage used to be. Still, I think the issue was the alphabetical one you described in CvRhyes.cpp

I'll try those modpath things you've suggested once the C++ is done cooking...perhaps the name is simply too long (I didn't know that was possible)...
 
no dice on the "delete the modpath and select a shorter name" method. grrrrrrrrrr.
 
ah, it was taking so long because I was using "clean solution" in between attempts. In any event, I've replaced the Byzantines' and Celtia's XXXs with the info for Celtia, as well as Carthage's. Recompiling with the new CvRhyes.cpp, even from scratch, produces no change. I don't understand where the game is getting the XXXs from if not there...
 
What civilization type are you using for your playable Celts (in WBSave) ? (I mean CIVILIZATION_???)
Where is that civilization located in the CivilizationInfos XML ?
That position in XML = column number in CvRhyes.cpp

No need to rebuild from scratch for this. Remember to copy the DLL to your Assets folder unless your MakeFile does it automatically (it doesn't by default).

As for the mod name, did you also change the name of the INI file (not the name inside) to match the folder?

Checklist:

- Folder name = MyMod
- INI file must be named MyMod.INI (name inside is for display only)
- In WBSave: ModPath=Mods/MyMod (but should work without it)
 
yes, changing those three things to match each other still produces the error for me.
 
OK that is the 7th civ in CvRhyes.cpp then.

As for the mod name I'm out of ideas, it's a most basic thing, you can make a new test mod with some random name to test it out.

BTW If changing the 7th civ in CvRhyes.cpp doesn't work then you're most likely not loading the correct DLL, like before. For any reason, possibly related to the folder problems, you're probably loading Rhye's original DLL, that's why you still see XXXs. Make sure you're actually copying the compiled DLL from CvGameCoreDLL/Final_Release to the Assets folder etc.
 
I am doing that, switching it from the final release folder and replacing the old dll. Rhye's original mod is no longer in my civ directory at all (since I have to call the one I'm working on by the same name). The dll I'm compiling is the only one there.
 
3) Finally, I've cut and pasted three UHVs from other civs, with appropriate and obvious modifications (such as names). Only the first UHV works, and I can't figure out why the other two don't. The three I've made are
a) build 5 barracks, 5 stables, and 5 duns by 200 AD (this one works, except that it seems to erase the accomplishment after 200AD, moving from 1/0 to 0/0)
b) control three cities in the British Isles by 200 AD (broken)
c) lose no cities before 600 AD (broken)
The issue with a is that the victory condition shares a slot with another UHV. This is why it goes from 1 to 0, as the other requirement isn't being met. With b you haven't defined the British Isles correctly (coordinates) - also see above. About c its a bit trickier, and to me it would seam that this UHV would always be achieved since the code for failing the UHV doesn't seem to be activated. (CvRFCEventManagerp is responsible for that, as it seems.) I'm sure its solvable, though...
 
This should take care of the two first UHVs.

Lines 136-137:
Code:
tBritishIslesTL = (47, 53)
tBritishIslesBR = (55, 61)

lines 669-673:
Code:
                                if (iGameTurn == i200AD):                                              
                                        if (self.checkOwnedArea(iCeltia, tBritishIslesTL, tBritishIslesBR, 3)):
                                                self.setGoal(iCeltia, [COLOR="Red"]1[/COLOR], 1)
                                        else:
                                                self.setGoal(iCeltia, [COLOR="Red"]1[/COLOR], 0)
I looked into the third UHV and it makes no sense to me. It should work just fine. How is it broke? What happens? Anything?
 
the problem with the third one may also be an issue I had resolved but had yet to test. Once I'm sure all the turn 154 stuff works i'll test that one.



**** just tested...eureka, the britishisles one works...now to test the other one and make sure the English spawn (they didn't before, but I think that's because I had their core coords messed up and had already built london and york myself)

thank you so much for your help so far. when i get back from class I'm going to test the third one and make sure the english show up. Also, does it have to be exactly three cities for this one, or at least three? When I asked Rhye, he replied, "no, just three," but I can take that either way...
 
the problem with the third one may also be an issue I had resolved but had yet to test.
I will stop looking for it then. :rolleyes:

**** just tested...eureka, the britishisles one works...now to test the other one and make sure the English spawn (they didn't before, but I think that's because I had their core coords messed up and had already built london and york myself)
Congrats! :king:

thank you so much for your help so far.
You're very welcome, I'm sorta testing my Python-fu by helping you figure this stuff out.

when i get back from class I'm going to test the third one and make sure the english show up. Also, does it have to be exactly three cities for this one, or at least three? When I asked Rhye, he replied, "no, just three," but I can take that either way...
I would say at least three, but I'll take a look just to be sure.

Hopefully you'll be able to get a beta version released soon. Then we could try to figure out some new UHVs and maybe another UP also? I'm not trying to take charge of this thing, but it sure if fun modding! :goodjob:
 
actually, given the Celtic tribes' role as mercenaries in Roman times, as well as Irish and Scottish gallowglasses and Wild Geese, I figured that the old Carthaginian UP based on mercenaries was perfect to keep.
 
So when I change the name, I get a series of python exception popups during the loading screen for the mod

---------------
File "<string>", line 1, in ?

File "<string>", line 52, in load_module

File "CvEventInterface", line 13, in ?

File "<string>", line 52, in load_module

File "CvRFCEventManager", line 6, in?

File "<string>", line 52, in load_module

File "CvRFCEventHandler", line 14, in ?

File "<string>", line 52, in load_module

File "RiseAndFall", line 132, in ?

AttributeError

:

'NoneType' object has no attribute 'getTeam'

<this one was blank>

Failed to load python module CvEventInterface

-------------------------

line 132 is teamNetherlands, that is, the first team beyond the 18 allowed by the original dll. This is driving me nuts that I'm having problems changing this name when I shouldn't be.
 
Baldyr - all the uhv's work. I'd like to tinker with that last one, however, so that instead of "lose no cities by 600AD it is lose no cities to the Romans or English by 1700 AD...that one is more historical (the Celts could be said to have held out until the Battle of the Boyne in 1690) and trickier to accomplish, provided the English spawn correctly and want to take over the British Isles...
 
They do spawn correctly. I made their core area smaller (only england instead of all of britain), but all the rest of the isles are still it's most highly desired colonization locations, so I can only assume that they will eventually try to squeeze out the Celts...excellent
 
Top Bottom