Enabling tech trades immediately and allowing to change civs multiple times

dnewhous

Chieftain
Joined
Oct 27, 2006
Messages
63
There are a couple of restrictions that really bother me.

Tech trading is forbidden to starting civs with alphabet for an arbitrary number of turns at the beginning. I would like to eliminate this restriction.

I can't switch civs multiple times. The switches that I would like to make are Egypt->Carthage->Rome.

If I switch to Carthage, I do not get the option to switch to Rome.

I understand these changes will require a recompilation. Could someone just point out where to start looking to make the changes?
 
It's only the trade techs thingy that requires to recompile the DLL. I've seen the guide here recommended quite often, it seems to be the most up-to-date. Tell me when you've managed to get the compiler running, we can then find out where exactly to make the changes.

The civ switch thing appears to be completely Python, so you can change it rather easily. It's actually two "rules" you have to take care of:

1) One that prohibits you from switching more than once.
2) One that prohibits you from switching between civs that spawn to close to one another (should be an issue for Carthage/Rome)

You can turn off (1) by opening Assets\RiseAndFall.py and search for "def getAlreadySwitched". You'll find that snippet of code:
Code:
        def getAlreadySwitched( self ):
                scriptDict = pickle.loads( gc.getGame().getScriptData() )
                return scriptDict['bAlreadySwitched']
Either delete it or comment it out (# at the beginning of all lines) and replace it with:
Code:
	def getAlreadySwitched( self ):
		return False

For (2), search for "tDifference" in the same file. You'll see a list of numbers associated with the civilizations in chronological order. These numbers mean that if you play the civ belonging to entry x, you can't switch to the following x civilizations. Setting all these numbers to 0 should take care of your problem here.

Please mind that I didn't test these modifications, so I can't guarantee everything works out without side effects.
 
Tell me when you've managed to get the compiler running, we can then find out where exactly to make the changes.

I've got the compiler running. If I wanted to use brute force I suppose I could use BeyondCompare on every source file until I found the difference that inhibits tech trading.
 
Okay, then look for CvTeamAI::AI_techTrade and remove the two if clauses after "Rhye - start (no trading the first turns, for the exploit)".
 
Thanks. What exactly is the exploit? Seams to me more like Rhye doesn't like certain playing styles and is trying to force people to play the game a certain way.
 
I guess it's because it's possible to vassalize a newly-born civ by mass-gifting techs to get it both friendly and comparatively weak in its beginning turns.
 
One defect has been introduced - the wait at end of turn functionality no longer works, which only happens after switching to a new civilization.

While I'm at this, is how would I change the starting position of Egypt? Change the position of Carthage's 2nd city? I mean, without actually playing the civs.
 
Kindof related; how hard is it to erase the erase-on-spawn thing, where newborn civs automatically raze cities at or around their spawn tile?
 
One defect has been introduced - the wait at end of turn functionality no longer works, which only happens after switching to a new civilization.

While I'm at this, is how would I change the starting position of Egypt? Change the position of Carthage's 2nd city? I mean, without actually playing the civs.
That defect has always been there when you switched civilizations. Save and reload your game and it should go away.

Starting positions are in Consts.py, the tCapitals tuple specifically.

You can try to influence the AI city placement by editing the settler maps in CvRhyes.cpp.
 
Kindof related; how hard is it to erase the erase-on-spawn thing, where newborn civs automatically raze cities at or around their spawn tile?

I've only had that happen when my city is right next to where they want to spawn. Since you can't have two cities right next to each other, and that rule makes a lot of sense, I don't see a possible workaround.

Something else that annoys me -

if I capture a city with a worker and sleeping ships, they all go into oblivion. I think I should get any worker or settler and the loser should get to keep his ships - ejected outside the city. The game frequently pushes my ships around if I have them anchored next to another civ's cultural border.

If you put Egypt's capital one tile to the north of the default starting location it will develop into a truly awe inspiring city. I played Egypt well enough to give them 500 culture by turn 84 and the capital is well defended enough that they can dust 4 legions like bunt cake (city walls are the magic trick). The coastal city isn't worth the trouble without the capital, it will get squeezed between the Egyptian and Greek cultural borders.

The best part of taking Carthage early game is you get a free worker out of it. The worst part is that North African cities are poor and take too much effort to defend once the barbarian migrations really get going. Maybe trying to make something out of a city in southern Italy is the better idea after all. Carthage's 2nd city, if it's built one tile to the west of the default location, can develop into a good city once you can build windmills.
 
Well, it's possible to flip the already existing city to the new civ instead. Edead does it for the Ottomans and Mamluks in SoI, and the Byzantines in DoC work that way as well.
 
You can try to influence the AI city placement by editing the settler maps in CvRhyes.cpp.

Uh, roughly speaking, does a higher number mean they are more or less likely to build at a particular site? What is the significance of the number 20?

Then I just have to figure out which numbers correspond to which map tile. It would probably behoove me to write a program to parse the .cpp file if I figure out the system. Someone must understand it, the position of Greece's cities has shifted a little from the installed version of Rhye's.

Also, I do no like the way military unit treachery is handled when spawning new civs. If I wanted to make it so that the 50/50 chance is rolled only if the unit is in a city that decides to leave my empire despite my choice to keep the city, is that doable? Otherwise, I'd like to just keep all of my units, regardless.
 
By the time you are finished with rfc you will have a completely new mod dnewhous :lol:
 
Uh, roughly speaking, does a higher number mean they are more or less likely to build at a particular site? What is the significance of the number 20?
Yes. 20 means sea, 3 otherwise unsettlable (peak, marsh). The AI also does not settle on tiles with a value of less than 90.

Then I just have to figure out which numbers correspond to which map tile. It would probably behoove me to write a program to parse the .cpp file if I figure out the system. Someone must understand it, the position of Greece's cities has shifted a little from the installed version of Rhye's.
No need to write such a program, simply select the whole settler map matrix and paste it into a table calculation program like MS Excel or Open Office Calc.

Also, I do no like the way military unit treachery is handled when spawning new civs. If I wanted to make it so that the 50/50 chance is rolled only if the unit is in a city that decides to leave my empire despite my choice to keep the city, is that doable? Otherwise, I'd like to just keep all of my units, regardless.
Well, currently, only units that are inside the new civ's core are affected. Your change would basically open up even more ways of exploitation, because your armies besieging recently flipped cities would be safe.

Anyway, it's probably easy to insert a condition like
Code:
if gc.getMap().plot(unit.getX(),unit.getY()).isCity():
into the flipping code.
 
By the time you are finished with rfc you will have a completely new mod dnewhous :lol:

I'll have a modmod.

One issue at at time.

As currently written, I can't send a scout from Egypt to Carthage without an escort.

Where is barbarian generation at?

Come to think of it - I've noticed that the AI likes to generate an army of barbarians around goodie huts as well, and that definitely wasn't true in the default version of Rhye's. I want to turn that off, too. If I can't figure out how to be subtle about it, I'd like to remove the barbarian state altogether.

Rhye's has made workers the most useful scouts, they have 2 movement and don't inspire the game to generate more barbarians at every step. I disocvered this while playing Ethiopia which starts off with 3 of them. I'd like barbarian generation to work for every unit like it does for workers.
 
I don't know in the slightest what you're talking about. Afaik barbarians are only created on a "in certain turns" basis.
 
Including animals? The random generation function, createBarbarianUnits, has been modified from BTS so it only generates animals.
 
Does anyone know what the difference is between getImprovementType and getRevealedImprovementType?
 
Back
Top Bottom