A bug

pku_dwest

Chieftain
Joined
Feb 18, 2008
Messages
88
When I load my save file, all techs can not be traded now.
Here are the screenshots and the savefile.
When I played the game, I can trade techs.

But after I load the save file, it looks that all techs can not be traded.
 

Attachments

  • Civ4ScreenShot0089.JPG
    Civ4ScreenShot0089.JPG
    108 KB · Views: 315
  • Charlemagne AD-0760 Turn 65.CivBeyondSwordSave
    220.2 KB · Views: 94
  • Civ4ScreenShot0172.JPG
    Civ4ScreenShot0172.JPG
    71.5 KB · Views: 354
what causes this bug?

We wanted to make it so that you cannot trade technology for 10 turns after they have been researched. I tried to make the it so that each tech would remember its own research date. Then it was a misunderstanding with the way Firaxis made the save/load code on how things would be saved/loaded. Basically every time you save/load, the tech data resets to "no trade allowed".
 
We wanted to make it so that you cannot trade technology for 10 turns after they have been researched. I tried to make the it so that each tech would remember its own research date. Then it was a misunderstanding with the way Firaxis made the save/load code on how things would be saved/loaded. Basically every time you save/load, the tech data resets to "no trade allowed".

Ohh, I knew something was strange with tech trade, though didn't even realize all tech trade is disallowed on save/load :eek:
How did you solve it? I mean, do we still have that 10 turn trade ban for each new tech?
 
Ohh, I knew something was strange with tech trade, though didn't even realize all tech trade is disallowed on save/load :eek:
How did you solve it? I mean, do we still have that 10 turn trade ban for each new tech?

I had to change how I was saving the founding dates for techs, I had to put it in another array and save/load it from CvGame as opposed to CvTechInfo. For some reason, CvTechInfo has the proper read/write functions implemented, but they never get called. Now everything works right, the techs cannot be traded for 10 turns and the founding dates are properly saved/loaded.
 
Can you give a hotfix for it?

Unfortunately no. There has already been too many changes to the .dll file to backport the fix and even with the fix, you would have to start a new game.

The next version of RFCEurope should be out in a few days, as soon as AbsintheRed finishes the new map and we run some balance test runs.
 
Back to the bug.
After 10 turns I load a savefile, can the tech be traded?

No, every time you reload, you cannot trade the techs anymore. You can only trade techs that have been discovered since the last load AND you have waited 10 turns for them.

If this is causing big issues for you, you can use the WorldBuilder to give yourself the tech that you would have traded.
 
I think the bug is based on that the date of dicovering a tech can not be saved correctly so there are 2 cases:
1. the date is refreshed after loading, then techs may be traded 10 turn after load;
2. the date is lost, then techs can never be traded.
I have checked case 2 seems to be the fact, so it is a little er.....:sad:
 
I think the bug is based on that the date of dicovering a tech can not be saved correctly so there are 2 cases:
1. the date is refreshed after loading, then techs may be traded 10 turn after load;
2. the date is lost, then techs can never be traded.
I have checked case 2 seems to be the fact, so it is a little er.....:sad:

It is case 2. I already fixed it for the next release, it is just too much work to backport it. Sorry it is causing issues, but it is OK to use the World Builder.
 
I am hoping myself, but it will probably not happen.

We can release it tomorrow, most things getting along pretty nicely
Currently working on the the core and normal areas in the consts.py and adjusting all the indy/barb spawns in the barbs.py, otherwise the python files are up to date
Most settler and war maps are also in good shape already, will probably upload all of them tonight

So the only huge remaining thing is the city name maps, and that won't be final for quite a long time...
Anyway, city names are actually aesthetic changes, so I don't mind if the next release have them totally off
 
Just a hotfix for the tech trade bug.

Add those techs to yourself (and the civ you would have traded with) in the WorldBuilder
 
We can release it tomorrow, most things getting along pretty nicely
Currently working on the the core and normal areas in the consts.py and adjusting all the indy/barb spawns in the barbs.py, otherwise the python files are up to date
Most settler and war maps are also in good shape already, will probably upload all of them tonight

So the only huge remaining thing is the city name maps, and that won't be final for quite a long time...
Anyway, city names are actually aesthetic changes, so I don't mind if the next release have them totally off

We cannot make a release with completely broken balance. I need to do some test runs at least on the AI to make sure they behave in a reasonably historic way.
 
Top Bottom