Dawn of Civilization - an RFC modmod by Leoreth

Status
Not open for further replies.
I ran two starts with Aztecs and everything seems fine. Again, I must ask you if that happened repeatedly. If so, you'd help me much in activating Python exceptions and reproducing the problem (there should be an error message then).


I didn't mention that it was on the Marathon game length. I tried this twice with the same result. What do you need me to do?

I think I just got unlucky with Christanity on those few games. Nonetheless, I've seen Islam, Buddhism and Hinduism spreading through Europe as far as France and Carthage more often than with normal RFC. Could just be me, though.
 
So I have to get through the 3000 BC Marathon autoplay until 1200 AD? Oh my ;)

Here's what I meant might be helpful:
An unrelated request
Everyone playing this modmod would really help me fixing its problems in activating Python exceptions. To do so, open the _Civ4Config file in your BtS folder and search for the line "HidePythonExceptions". Then set the number after it to 0, so that it reads:
Code:
; Set to 1 for no python exception popups
HidePythonExceptions = 0
Now everytime an error occurs, there will be a window that reports the line of code causing it.

Edit: I can take a look at the religion spread percentages again; the chance for Buddhism and Hinduism should be very remote.
 
Now I think about it, Hindu Carthage isn't that peculiar - it only has to get as far as Sur now, after all. Its probably just one of those things.

Edit: I'll set my PC to run through it again this afternoon.
 
When playing as Spain I noticed one small mistake. Since you changed the terrain, turning some mountains into hills i'm guessing the city where I spotted the mistake had a name picked from a generic list.

In the top-left corner of the iberian peninsula is La Coruña. right next to it to the right was a mountain and then immediately to the right of that is Santander. When settling between Santander and La Coruña (where the mountain used to be) I get a city named Murcia - murcia is city in southern spain! The most appropriate city name for that spot I believe, should be oviedo, which is the capital city of asturias, asturias is right between la coruña (capital of the same name) and Cantabria (of which santander is the capital).

Is there any way I can quickly fix this on my game?
 
Rename the city ingame :mischief:

Seriously though, open Assets\Python\CityNameManager.py. The line you're looking for should be 1053. Scroll right until you find "La Coruna", "-1", "Santander", [...]. Replace the "-1" with "Oviedo" or any other name you like. I will fix it for the next version as well, of course.

I also had the same problem with Marathon Aztecs, by the way. Not sure what the cause is yet.
 
I'm currently having trouble implementing the stability display feature correctly, so if there's someone with passing knowledge of Python function calls in the SDK, please take a look at the spoiler :)
Spoiler :
I'm trying to edit the CvGameTextMgr.cpp file to display a tile's stability in the mouseover text. That involves checks if the current plot is within the core and normal area of the active player's civ. The problem is, currently it returns "Core Area" for every land plot, whether it is really in the core area or not. It seems that the respective Python functions that determine if a tile is in Normal/Core don't return anything to the SDK at all. Best take a look at the code now:
Code:
            long result = -1;
            long result2 = -1;
	    CyArgsList argsList;
	    argsList.add(pPlot->getX());
	    argsList.add(pPlot->getY());
	    argsList.add(GC.getGameINLINE().getActivePlayer());
	    gDLL->getPythonIFace()->callFunction(PYRFCUtilsModule, "isCorePlot", argsList.makeFunctionArgs(), &result);
	    long iCore = (long)result;

	    if (pPlot->getPlotType() == PLOT_OCEAN)
	    {
	        szString.append("Ocean");
	    }
	    else if (iCore != 0)
	    {
	        szString.append("Core Area");
	    }
	    else
	    {
	        int iSettlerValue = GET_PLAYER(GC.getGameINLINE().getActivePlayer()).getSettlersMaps(pPlot->getX(), pPlot->getY());
	        CyArgsList argsList2;
	        argsList2.add(pPlot->getX());
                argsList2.add(pPlot->getY());
                argsList2.add(GC.getGameINLINE().getActivePlayer());
                gDLL->getPythonIFace()->callFunction(PYRFCUtilsModule, "isNormalPlot", argsList2.makeFunctionArgs(), &result2);
                long iNormal = (long)result2;

                if (iNormal == 1 && iSettlerValue >= 400)
                {
                    szString.append("Peripheral Area");
                }
                else
                {
                    szString.append("Foreign Area");
                }
	    }

        szString.append(NEWLINE);
The two Python functions I call are defined in RFCUtils.py, which is of course already included into CvDefines.h.
Code:
    def isCorePlot(self, x, y, iCiv):
        if (x >= con.tCoreAreasTL[iCiv][0] and x <= con.tCoreAreasBR[iCiv][0] and y >= con.tCoreAreasTL[iCiv][1] and y <= con.tCoreAreasBR[iCiv][1]): # and not (x, y) in con.tExceptions[iCiv]):
            return 1
        else:
            return 0

    def isNormalPlot(self, x, y, iCiv):
        if (x >= con.tNormalAreasTL[iCiv][0] and x <= con.tNormalAreasBR[iCiv][0] and y >= con.tNormalAreasTL[iCiv][1] and y <= con.tNormalAreasBR[iCiv][1]): # and not (x, y) in con.tNormalAreasSubtract[iCiv]):
            return 1
        else:
            return 0
From my tests I've found out that the value of "result" always stays -1, although the functions can only return 0 or 1. This is why I guess there's an error with the function call itself. Does anybody see my mistake?
 
It seems that the call function never happens, and result stays at default value. I did the province stability display using the registered PYScreensModule, as this is what Rhye uses. RFCUtils won't work as an interface, all the functions are wrapped in a class. Maybe if you put them out it will work, or maybe just scrap it and use the working solution, i.e. EntryPoints/CvScreensInterface.

Also,
Code:
long iNormal = (long)result2;
is redundant (not sure the conversion is needed, but I used int instead, just because Firaxis does it ;) )
 
Thanks leoreth, fixed the name thing.

I have another question, reading through the readme and the change logs in the updates to the mod, I noticed you mentioned that you opened up a way for vikings to reach north america via galley. However, I tried that as vikings, in the beginning of the game I went to the WB and revealed all tiles, exited the WB, then selected a galley and pressed g (go-to mode) and there was no way I could get to north america or cross the ocean, I even tried placing a galley from the wb above ireland, and no dice, I could not even get to Iceland - where the vikings settled in 874!

I would appreciate it if you could help with this, maybe I am doing something wrong?
 
Thanks leoreth, fixed the name thing.

I have another question, reading through the readme and the change logs in the updates to the mod, I noticed you mentioned that you opened up a way for vikings to reach north america via galley. However, I tried that as vikings, in the beginning of the game I went to the WB and revealed all tiles, exited the WB, then selected a galley and pressed g (go-to mode) and there was no way I could get to north america or cross the ocean, I even tried placing a galley from the wb above ireland, and no dice, I could not even get to Iceland - where the vikings settled in 874!

I would appreciate it if you could help with this, maybe I am doing something wrong?

You need cities all along the way. You can cross ocean inside cultural borders.
 
Thanks for your quick help embryodead, this is one of those occasions where I learn that quickly putting things together doesn't always work out :)
I'll try to use your suggested approach.
(By the way, the unnecessary type converts and other clumsinesses are basically artifacts of my attempts to find the problem).

rigo92, as already said some pages before, building a galley and sailing for the Americas doesn't work. I'm reluctant to spoil the complete method, because I don't want to deny you the fun figuring it out. It's not too contrived. Two hopefully not too specific hints: think about which tiles a galley can enter, and from where the Vikings historically sailed to Vinland.

Crosspost edit: now you ruined my obscure hints, thwump. :cry: But basically, that's it. :)
 
You can research compass and turn that tile into coast, though.

If you can get it before 840, much better.

EDIT: From line 660 of CvRFCEventHandler.py:

Code:
if (argsList[0] == con.iCompass):
    if (iPlayer == con.iVikings):
        gc.getMap().plot(49, 62).setTerrainType(con.iCoast, True, True)
 
Actually it was possible to sail to Americas with a galley in regular RFC too. I haven't tried it with the latest patch, so I don't know has Rhye disabled it. However, that method is a bit more complicated.
 
I've seen a strategy once that involved a great artist to expand the culture of Reykjavik, move a galley to its borders and then gift the city away to a civ that you have no OB with. The galley will be pushed to the "other side" of Greenland. It was basically an exploit, so I decided to open up a little less cumbersome method.
 
wait so your actually going to make it possible for you to get to the America's in a galley?? :lol:
 
The Vikings didn't exactly sail to Vinland in a galleon, you know? :rolleyes:
 
I've seen a strategy once that involved a great artist to expand the culture of Reykjavik, move a galley to its borders and then gift the city away to a civ that you have no OB with. The galley will be pushed to the "other side" of Greenland. It was basically an exploit, so I decided to open up a little less cumbersome method.

Yeah, that's what I meant. However, I think your style will be better.
 
The Vikings didn't exactly sail to Vinland in a galleon, you know? :rolleyes:

ok I guess that makes sense, although I have still never really liked that UHV, as although it is proven that they got their first, it is not something which they were really known for doing, I think a better one would be something similar to RFC Europe, for example own a city in Scotland, Ireland, N. France and Sicily by...., I like that UHV much better

But UHV's aside, I guess it makes sense to have a "secret corridor" for the viking ships to go through, I just wouldn't want the English, or others exploiting it to.
 
The exploit is already unnecessary (I consider the city-gifting to be the exploit, not using culture to bypass ocean tiles).

I was also concerned that other civs could exploit the route (basically everyone can settle on Iceland), so I used marshes and the "cape" feature to block them from everything else but Newfoundland. The only civ that can still abuse it is Spain to fulfill their UHV that way, and I'm already thinking about specifically excluding that area from their victory conditions. Although the bigger problem with Spain is that it's way easier to build a settler in Tenochtitlan after you conquered the Aztecs, but still.
 
Status
Not open for further replies.
Back
Top Bottom