Small bug fixes

onedreamer

Dragon
Joined
Oct 21, 2004
Messages
6,580
Location
Torino - Italia
well not really, since gold and elephants are very likely to come in groups of 2-3.


The difference in GreySaber's code is that instead of using Civ Names he used spawn dates. So the Rise and Fall functions are called by dates I guess. The problem of adding many resources is the use of a "for" cycle. Can it be done in another way ? "if" ?
 

onedreamer

Dragon
Joined
Oct 21, 2004
Messages
6,580
Location
Torino - Italia
ok this is funny: if I use GreySaber's code in RFCUtils the play now button is greyed out and if I start a custom game I'll be defeated at turn 0... what gives ?
 
Joined
Sep 21, 2007
Messages
4,878
well not really, since gold and elephants are very likely to come in groups of 2-3.

Yeah, that's why I said close to the spawn site, e.g. immediate surrounding 8 blocks of tile, and there could be a condition that said that once 1 resource is turned, ignore the rest. (see the British/Japan code for sheep)
 

onedreamer

Dragon
Joined
Oct 21, 2004
Messages
6,580
Location
Torino - Italia
you can use getBonusType, but I don't see a condition in the British/Japan part that will change only one ?

Also, did anyone seriously test these fixes ?
These are my findings:

- AP's code doesn't work: wheat and cows are still on mountains.
- GreySaber's code greys out the play now button and you loose at turn 1 if you try a custom game.
- GreySaber's logic isn't as he intended I believe, since 3000 BC civs are born both before 2250BC and 650BC, they should get both marble and stone, but they won't because the first of the 2 considered resources will fill up all available plots for the second.
 

onedreamer

Dragon
Joined
Oct 21, 2004
Messages
6,580
Location
Torino - Italia
I fixed the resources on peak stuff. I had to use getPlot. Attached the files.

edit: I forgot to update the condition for England & Japan, you can do easily yourself. Btw this condition almost never kicks in: I've seen only once Japan on a island, most of the times on a peninsula, or on the mainland just at the far east of Asia. Same thing about England, except I haven't seen it on an island even once.
 

Attachments

  • Peakfix.rar
    22.1 KB · Views: 112

Corm

Prince
Joined
Feb 1, 2007
Messages
438
Location
Edinburgh, Scotland
I fixed the resources on peak stuff. I had to use getPlot. Attached the files.

edit: I forgot to update the condition for England & Japan, you can do easily yourself. Btw this condition almost never kicks in: I've seen only once Japan on a island, most of the times on a peninsula, or on the mainland just at the far east of Asia. Same thing about England, except I haven't seen it on an island even once.

Nice one. Fix seems to work. Thanks dreamer dude.

Just as an aside I have had a lot of Japan and England starts on a separate Island. Also had the Netherlands and Portugal start on a separate island too (what was essentially the British Isles).
 

GreySaber

Chieftain
Joined
Jan 10, 2006
Messages
6
Location
Nova Scotia, Canada
- GreySaber's code greys out the play now button and you loose at turn 1 if you try a custom game.
- GreySaber's logic isn't as he intended I believe, since 3000 BC civs are born both before 2250BC and 650BC, they should get both marble and stone, but they won't because the first of the 2 considered resources will fill up all available plots for the second.

For the first, I was somewhat concerned about this, as I had it happen a few times as I was testing, and as I said, I have made other mods, so I wasn't sure it would work for everyone. Sorry. =(

Second, if you note the "con.lCivGroups" the first one is group 2, the second group 0, so they actually pull different groups of Civs. Group 0 is iGreece, iRome, iVikings, iSpain, iFrance, iEngland, iGermany, iRussia, iNetherlands, iPortugal while Group 2 is iEgypt, iBabylonia, iPersia, iArabia, iTurkey. Group 0 is mainly the Euros, which is used for the cows. Hence why Khmer or Maya don't get them from the original code (different group).

As for setting the birth to = 3000BC, it caused the game to hang up. So I went with less then, based on the first date set in the Consts.py that wasn't 3000BC.
 

onedreamer

Dragon
Joined
Oct 21, 2004
Messages
6,580
Location
Torino - Italia
but the problem is that the function isn't called for the first 4 civs. It's called from iBabylonia+1, which means Greece.
 

onedreamer

Dragon
Joined
Oct 21, 2004
Messages
6,580
Location
Torino - Italia
I have attached:

- Peak fix (peakfix.zip), including cPickle (thanks Musicfreak). You can just overwrite Musicfreak's patch with these files.

- Updated Persian and Roman city lists (City.zip), includes cPickle.

- Some XML modifications that will allow:
building of pastures in jungle (no prereqs, doesn't remove the jungle -- for pigs).
building of plantation for rice (calendar, removes the jungle, +1 food).
oasis reverted back to 3 food, 2 commerce.

I made these changes to take care of otherwise awful starts in jungles and deserts, the random map script terrain shouldn't be as harsh as the fixed map.
 

Attachments

  • Peakfix.zip
    53.6 KB · Views: 101
  • City.zip
    35.3 KB · Views: 167
  • XML.zip
    10.4 KB · Views: 101

Lone Wolf

Deity
Joined
Dec 4, 2006
Messages
9,908
I still get the Native Conquerors. Apparently, the lCivBioOldWorld and lCivBioNewWorld in Consts.py are not used for determining who gets the Conquerors. (There is iBarbarian in lCivBioOldWorld both in RFC Regular and Random, but nobody gets Barbarian Conquerors).

So far, you can just replace all the references to Natives in Barbs.py to Barbarians. BTW, what is stuff like

# city coordinates, spawn 1st turn and retries
lUr = [77, 38, 0, 0] #3000BC
lJerusalem = [73, 38, 0, 0] #3000BC
lBabylon = [76, 40, 0, 0] #3000BC
lSusa = [79, 40, 0, 0] #3000BC
lTyre = [73, 40, 0, 0] #2700BC #turn10
lKnossos = [69, 39, 13, 0] #2600BC
lHattusas = [73, 43, 34, 0] #2000BC
...

is doing in RFC RAND Barbs.py?
 
Top Bottom