RFC Epic/Marathon

A good question really - apparently it doesn't do anything apart from what just said :p The disbanding you have to do on your own. I originally used to kick mercenaries, because at least in SoI I'd get negative gold rather than lose units, I eventually fixed it in another way though.
 
Well, I can delete units. What is the order they are deleted by default? (I think I'll add some options to the scenario maker here, but I still need default values.)
 
Least valuable units are disbanded first, and the formula is complicated (CvPlayer::disbandUnit), but it's already exposed as CyPlayer::disbandUnit(bool bAnnounce). This disbands a single, least valuable unit, with an announcement or not.

Normally when on strike, the game calls this function X times per turn, where X = number of strike turns / 2, or until you can pay the maintenance.
 
So, I can just replicate that with CyPlayer.disbandUnit() then? And I get the number of units with CyPlayer.getStrikeTurns() / 2? (Nothing happens on the first turn of strike, right? Integer division takes care of this.)
 
All correct (should always be disbandUnit(True) ); here's the full loop if you want to mimic it, calculateGoldRate is exposed as well, just changeStrikeTurns isn't (it wouldn't help any though, since it doesn't trigger the strike alone, only negative gold does).

Code:
	bStrike = false;

	if (getGold() < 0)
	{
		setGold(0);

		if (!isBarbarian() && (getNumCities() > 0))
		{
			bStrike = true;
		}
	}

	if (bStrike)
	{
		setStrike(true);
		changeStrikeTurns(1);

		if (getStrikeTurns() > 1)
		{
			iDisbandUnit = (getStrikeTurns() / 2); // XXX mod?

			for (iI = 0; iI < iDisbandUnit; iI++)
			{
				disbandUnit(true);

				if (calculateGoldRate() >= 0)
				{
					break;
				}
			}
		}
	}
	else
	{
		setStrike(false);
	}
 
I couldn't get it to work with CyPlayer.getStrikeTurns() so I guess I'll just have the scenario maker specify how many units should be disbanded. And I'll also add a random option. :eek:

edit: Also, I can't get rid of the message (bAnnounce). :confused:
 
Yes, if you use all the appriopriate tools: setCivName, setFlag and setCivilizationType, and setLeader if needed.
I can't seem to find CyPlayer.setCivName() - or any other method for setting the name - in the API. :confused: Or does it need to be exposed in the DLL also?
 
You shouldn't use getStrikeTurns (it's read-only and wouldn't have the desired effect anyway), but handle strike turns internally, yeah. And to make it clear, the DLL loop increases this counter every turn, meaning you lose more and more units the longer your units are on strike.

setCivName is Rhye's method used for dynamic civ names, already exposed, in CyPlayer class:
CyPlayer::setCivName (std::wstring szNewDesc, std::wstring szNewShort, std::wstring szNewAdj)

Only problem is that Rhye's dynamic civ names mechanism in the DLL will override this, so it is necessary to override them in turn (every time the civics change I guess, or maybe even more often?). EDIT: at least for the major civs, Celtia/Byzantium aren't changed ofc.
 
The dynamic names for Celtia/Byzantium, by the way - how are those handled? Are they connected to the CyPlayer or to the CivilizationTypes index?

Also, for PyPlayer.setFlag() - what would be a valid file/path? For example? (I struggle with file paths with Python/CivIv.)
 
The dynamic names for Celtia/Byzantium, by the way - how are those handled? Are they connected to the CyPlayer or to the CivilizationTypes index?

Celtia/Byzantium and other minor civs: they aren't handled at all, so you can change their names freely and not worry about RFC changing them back.

Also, for PyPlayer.setFlag() - what would be a valid file/path? For example? (I struggle with file paths with Python/CivIv.)

It may be a typo, but just to make it clear, we are talking about CyPlayer not PyPlayer. Here's an example from SoI:

Code:
gc.getPlayer(iPlayer).setFlag("Art/Interface/TeamColor/FlagDECAL_Delhi.dds")
 
Hmmm, I can see setCivDesc not working here despite being exposed, not sure what's the deal really. Although setCivilizationType changes the name as well.

EDIT: No, silly me, it works, it's setCivName :hammer2:
 
Code:
gc.getPlayer(iPlayer).setFlag("Art/Interface/TeamColor/FlagDECAL_Delhi.dds")
Ok, this is what I need then. I guess I could shorten it down to the actual file name then:
Code:
def setFlag(pPlayer, flag):
    pPlayer.setFlag("Art/Interface/TeamColor/" + flag)
But then the actual art needs to be in \Mods\RFCMarathon\Assets\ right? Or will the path be valid for \Sid Meier's Civilization 4\Assets\, \Warlords\Assets\ and \Beyond the Sword\Assets\ also?
Spoiler :
And yeah, it was a typo. :lol:
 
It just replaces the path normally taken from XML, so it searches in the mod's and all three games' folders for the flag.
 
Hello fellow rfc gamers.
Why is africa not one continent? At the moment I am ethiopia and i have built the great wall and the statue of liberty in Niwt-rst(egypt) and my cities from around center of africa and downwards are not affected by neither of these wonders + my automated workers wont work both south and north africa ! This is extreamly frustrating as it is very unrealistic and it ruins the fun of dominating africa!
 
Hello fellow rfc gamers.
Why is africa not one continent? At the moment I am ethiopia and i have built the great wall and the statue of liberty in Niwt-rst(egypt) and my cities from around center of africa and downwards are not affected by neither of these wonders + my automated workers wont work both south and north africa ! This is extreamly frustrating as it is very unrealistic and it ruins the fun of dominating africa!

This is a question for the main RFC forum really, but to my limited knowledge, for various gameplay reasons, Egypt lies in the "Mediterreanean" continent (until the Middle Ages I think). This way the Ancient Mediterreanean civs are in one zone for expansion and warfare purposes. Later continents are shifted around for the colonial era etc.
 
I actually think I saw something relating to this in the code once. It made little sense to me, thats all I can say... (It was in the official version, by the way, but I trust that code is intact in this incarnation.)
 
Continents borders were made variable because that is the way civ works. For some reason, the AI cannot think intercontinental, so it has a hard time to make an intercontinental strategy, for example the Turks have a hard time assaulting Constantinople. Other examples are Rome and Carthage, Egypt and Arabia, even Russia and Siberia. To solve this, several invisible continental changes were made, like Constantinople being Asian for some time, and Egypt not being African. AFAIK, there is no map where all those shifts can be seen, so I cannot tell where the precise borders are.
 
Continent borders were made by Rhye because otherwise Europe, Asia and Africa would be the very same continent. Though, I think that wonders should work in your whole "connected empire" despite continents (so wonder in Rome affects Roman Carthage if Rome controls Greece, Syria, Egypt...) but it would have to be programmed by quite experienced modder.
 
Actually Northern Africa belongs to Asia from the start to finish. Rhye made it that way, so that Arabia and later Ottomans would expand into their historical territory; northern African coast. The only tile (that I know of) switching continents is the Constantinople tile. Before Turkey spawns it changes from Europe to Asia.
 
Top Bottom