My BugFix for BeelineFishingBug

Rod

King
Joined
Sep 22, 2004
Messages
754
Location
Munich / Germany
Hello,

actually I was always annoyed that you can not beeline to Fishing directly and I remembered that I was very confused about this as a beginner in FFH , too. So yesterday evening (weekend and my girlfriend is off) I had a little time :) ...

... it was quite easy actually and just took me time for searching the needle in the haytray (do you say it like this in English ? I am no native speaker.)

The best thing is :

The solution is fully compatible with ALL your saved games !!

So this how my solution looks like :
BeelineFishing0002.JPG


and here we go :
(just copy and paste, use your Notepad (only xml and python files are affected) dont forget CTRL- for Find)

Spoiler :
in file :

\Assets\python\entrypoints\CvGameInterface.py

after line 201 :

Code:
	if eTech == gc.getInfoTypeForString('TECH_AWAKEN_THE_ANCIENTS'):
		if (pPlayer.getCivilizationType() != gc.getInfoTypeForString('CIVILIZATION_KURIOTATES') and pPlayer.getCivilizationType() != gc.getInfoTypeForString('CIVILIZATION_SHEAIM')):
			return True

include following line :

Code:
	if eTech == gc.getInfoTypeForString('TECH_SEAFARING'):
		if pPlayer.getCivilizationType() != gc.getInfoTypeForString('CIVILIZATION_LANUN'):
			return True

To make it more elegant we also have a look into :

\Assets\xml\text\CIV4GameText_FFH2.xml

and there we add the following lines :
Code:
    <TEXT>
        <Tag>TXT_KEY_TECH_SEAFARING_REQUIRES</Tag>
        <English>Seafaring Trait only available to Lanun Civilization</English>
        <French>Seafaring Trait only available to Lanun Civilization</French>
        <German>Seafaring Trait only available to Lanun Civilization</German>
        <Italian>Seafaring Trait only available to Lanun Civilization</Italian>
        <Spanish>Seafaring Trait only available to Lanun Civilization</Spanish>
    </TEXT>

Afterwards we replace in :

\Assets\xml\technologies\CIV4TechInfos.xml

the original lines 6314 till 6374
Code:
<TechInfo>
            <Type>TECH_SEAFARING</Type>
....

with the following lines (changes are in red)
Code:
<TechInfo>
            <Type>TECH_SEAFARING</Type>
            <Description>TXT_KEY_TECH_SEAFARING</Description>
            <Civilopedia>TXT_KEY_TECH_SEAFARING_PEDIA</Civilopedia>
            <Help></Help>
            <Strategy>TXT_KEY_TECH_SEAFARING_STRATEGY</Strategy>
            <Advisor>ADVISOR_GROWTH</Advisor>
            <iAIWeight>0</iAIWeight>
            <iAITradeModifier>0</iAITradeModifier>
            <iCost>-1</iCost>
            <Era>ERA_ANCIENT</Era>
            <FirstFreeUnitClass>NONE</FirstFreeUnitClass>
            <iFeatureProductionModifier>0</iFeatureProductionModifier>
            <iWorkerSpeedModifier>0</iWorkerSpeedModifier>
            <iTradeRoutes>0</iTradeRoutes>
            <iHealth>0</iHealth>
            <iHappiness>0</iHappiness>
            <iFirstFreeTechs>0</iFirstFreeTechs>
            <iAsset>0</iAsset>
            <iPower>0</iPower>
            <bRepeat>0</bRepeat>
            <bTrade>0</bTrade>
            <bDisable>0</bDisable>
            <bGoodyTech>0</bGoodyTech>
            <bExtraWaterSeeFrom>0</bExtraWaterSeeFrom>
            <bMapCentering>0</bMapCentering>
            <bMapVisible>0</bMapVisible>
            <bMapTrading>0</bMapTrading>
            <bTechTrading>0</bTechTrading>
            <bGoldTrading>0</bGoldTrading>
            <bOpenBordersTrading>0</bOpenBordersTrading>
            <bDefensivePactTrading>0</bDefensivePactTrading>
            <bPermanentAllianceTrading>0</bPermanentAllianceTrading>
            <bBridgeBuilding>0</bBridgeBuilding>
            <bIrrigation>0</bIrrigation>
            <bIgnoreIrrigation>0</bIgnoreIrrigation>
            <bWaterWork>0</bWaterWork>
            <iGridX>1</iGridX>
            <iGridY>12</iGridY>
            <DomainExtraMoves>
                <DomainExtraMove>
                    <DomainType>DOMAIN_SEA</DomainType>
                    <iExtraMoves>1</iExtraMoves>
                </DomainExtraMove>
            </DomainExtraMoves>
            <CommerceFlexible>
            </CommerceFlexible>
            <TerrainTrades>
            </TerrainTrades>
            <Flavors>
            </Flavors>
            [COLOR="Red"]<OrPreReqs>
	    </OrPreReqs>
            <AndPreReqs>
            </AndPreReqs>
            <Requires>TXT_KEY_TECH_SEAFARING_REQUIRES</Requires>[/COLOR]
            <Quote>TXT_KEY_TECH_FISHING_QUOTE</Quote>
            <Sound>AS2D_TECH_DING</Sound>
            <SoundMP>AS2D_TECH_DING</SoundMP>
            <Button>Art/Interface/Buttons/TechTree/Seafaring.dds</Button>
        </TechInfo>

and for the very hasty people here comes the download of the BugFix that has to be unzipped into your respective FFH folder. But in case you are using this download please backup your original files and scan the file for viruses before as I do not hold responsible for your problems afterwards.

(I scanned the file with NORTON ANTIVIRUS (Version from June 2006))

That is all ..

Please enjoy .. and to Kael :

Please include the Fix into 2.016k

My thanks to the incredible architecture of CivIV and the awesome coding of Team FFH
 
It's a haySTACK in English ;) I don't get the problem: you couldn't click on fishing to have the techtree calculate a path to it? Sounds pretty minor to me seeing how you only need exploration for it, but your fix does address an aesthetical issue.
 
It's a haySTACK in English ;) I don't get the problem: you couldn't click on fishing to have the techtree calculate a path to it? Sounds pretty minor to me seeing how you only need exploration for it, but your fix does address an aesthetical issue.

it is minor, but I am no developer by education and so I can only do the minor things currently (like searching in the haystacks :) ) , besides aesthetics matter for me and yes you are right it is catching two birds at once.. (is this expression rightly said ?? ;) )

I leave the major things to the big guys , you know :)
 
Thanks Rod, I added your fix into "Fire".
 
it is minor, but I am no developer by education and so I can only do the minor things currently (like searching in the haystacks :) ) , besides aesthetics matter for me and yes you are right it is catching two birds at once.. (is this expression rightly said ?? ;) )

I leave the major things to the big guys , you know :)
-
"edit"
looks good, if i read that correctly -ffh removed the code for having "or" prerequisits in the tech tree, and searfaring needed a civ based restriction for the lanun?
 
It does, the path's hidden by the tooltip box.

That's "killing two birds with one stone", by the way.
 
Basically I was testing exactly that at the beginning. I tinkered around with the Never-Tech in the xml files ('Or' - Prerequisites, Higher Costs than Exploration etc.)

Didnt work out.

Then I decided to simply research what team FFH had done with the other Hidden Techs, so then I found this list that is obviously checking the conditions. The rest was easy.. but i did not dig deeper into the code to check where they use this list.. it was not necessary.
 
Back
Top Bottom