Bug Report (English)

Building Roads inside and outside my borders worked in the 1390BC save, except for the 'magic' tiles... those removed the weapons.

Building the Forge worked in the 1110BC save. If I place a Road on one of the magic tiles, the resources are removed and finishing the Forge afterwards doesn't fix it.

The expanding city borders in the vanish1 save also remove the resources.

I don't seem to be able to get them back. :(

EDIT: Loading an even earlier save, the magic tiles lost their magic... so I maybe I won't have to start a new game :D (But I already have Forges in this one as well... I wonder where what went wrong)
 
Building Roads inside and outside my borders worked in the 1390BC save, except for the 'magic' tiles... those removed the weapons.

Building the Forge worked in the 1110BC save. If I place a Road on one of the magic tiles, the resources are removed and finishing the Forge afterwards doesn't fix it.

The expanding city borders in the vanish1 save also remove the resources.

I don't seem to be able to get them back. :(

EDIT: Loading an even earlier save, the magic tiles lost their magic... so I maybe I won't have to start a new game :D (But I already have Forges in this one as well... I wonder where what went wrong)

The old code can produce wrong results if there are two or more forges in the same network. And you may not notice the damage when it happens. The vector that stores the manufactured bonuses of the city can be set to the wrong value. And this vector controlls the number of possible production. If there is only one bonus of a type everything may seem okay although it's not.

We could repair your game but this would need a special DLL, a Python event and some new code. We would have to remove all bonuses in game and store them in vector. After that we would have to update all plotgroups and to reset them all. The next step is to reset all city consume and manufacture vectors. Next to add all removed bonuses again. And once again an overall plot update. Overall some 10.000.000 updates. That will take some time. But we would need just one game turn.

Is the game worth all the work?
 
The old code can produce wrong results if there are two or more forges in the same network. And you may not notice the damage when it happens. The vector that stores the manufactured bonuses of the city can be set to the wrong value. And this vector controlls the number of possible production. If there is only one bonus of a type everything may seem okay although it's not.

We could repair your game but this would need a special DLL, a Python event and some new code. We would have to remove all bonuses in game and store them in vector. After that we would have to update all plotgroups and to reset them all. The next step is to reset all city consume and manufacture vectors. Next to add all removed bonuses again. And once again an overall plot update. Overall some 10.000.000 updates. That will take some time. But we would need just one game turn.

Is the game worth all the work?

xD Okay, nevermind. No it's not. :D (Never imagined it was THIS complex)
I just noticed though that my Forges don't produce Iron Weapons... oh well I'll just restart. :)
Or maybe I'll find a save without Forges.

At least we now know where the error was. :D

EDIT: In a new game the Forge isn't producing anything. :S
Building Roads and expanding borders don't change that.
 
xD Okay, nevermind. No it's not. :D (Never imagined it was THIS complex)
I just noticed though that my Forges don't produce Iron Weapons... oh well I'll just restart. :)
Or maybe I'll find a save without Forges.

At least we now know where the error was. :D

EDIT: In a new game the Forge isn't producing anything. :S
Building Roads and expanding borders don't change that.

Don't make me mad. :crazyeye: What the hell is going wrong now? :cry:

And I've written a repair DLL. I'm trying to repair a save at the moment... :rolleyes:
 
:) Nice thanks... but you know... you really don't have to...


EDIT: As far as I can tell from your description... wouldn't that script+DLL be able to convert any savegame to the newest patch? Would of course be kind of cool.... and would promote early patching. :D
 
:) Nice thanks... but you know... you really don't have to...


EDIT: As far as I can tell from your description... wouldn't that script+DLL be able to convert any savegame to the newest patch? Would of course be kind of cool.... and would promote early patching. :D

If the DLL works it should be able to repair and convert all games that can be loaded with patch I/J. But what about the forge? Is there a new problem?

EDIT: Yes, I can transform save games. :) The transformation/repair turn took about 2 minutes for the save from #321. I have damaged it with an additional road that produced 10 weapons before. But you are right. Now the forge may produce nothing. Crazy. But it's late. I've got to sleep now. Tomorrow...
 
:D Surprise, surprise, surprise... :D

It was a little bit late last night. And I produced this damn ****


PHP:
...
if (getTeam() != NO_TEAM && !GET_TEAM(getTeam()).isBonusObsolete(iManufacturedBonusType) && (GC.getBonusInfo(iManufacturedBonusType).getTechReveal() == NO_TECH || GET_TEAM(getTeam()).isHasTech((TechTypes) GC.getBonusInfo(iManufacturedBonusType).getTechReveal())) && (GC.getBonusInfo(iManufacturedBonusType).getTechCityTrade() == NO_TECH || GET_TEAM(getTeam()).isHasTech((TechTypes) GC.getBonusInfo(iManufacturedBonusType).getTechCityTrade())))
{
	int iBonusCount = 0;
	if (pLoopCity->getManufacturedBonusTypesCounter(iManufacturedBonusType) < pLoopCity->getNumBuilding(eBuilding))
	{
		range(pLoopCity->getNumBonuses(iConsumedBonusType) - ((m_aiBonusCounterTemp[GC.getBuildingInfo(eBuilding).getConsumedBonusType(iL)] == MIN_INT) ? 0:pLoopCity->getManufacturedBonusTypesCounter(iManufacturedBonusType)),0,1);
	}

	if (iBonusCount > 0)
	{
		if (iManufacturedBonusType != iConsumedBonusType  && pLoopCity->getManufacturedBonusTypesCounter(iManufacturedBonusType) < pLoopCity->getNumBuilding(eBuilding))
		{
...

Have you seen the mistake? No? I forgot to set iBonusCount to the result of the range. That's why the forge may produce nothing. :crazyeye:

But with this little change to

PHP:
...
if (getTeam() != NO_TEAM && !GET_TEAM(getTeam()).isBonusObsolete(iManufacturedBonusType) && (GC.getBonusInfo(iManufacturedBonusType).getTechReveal() == NO_TECH || GET_TEAM(getTeam()).isHasTech((TechTypes) GC.getBonusInfo(iManufacturedBonusType).getTechReveal())) && (GC.getBonusInfo(iManufacturedBonusType).getTechCityTrade() == NO_TECH || GET_TEAM(getTeam()).isHasTech((TechTypes) GC.getBonusInfo(iManufacturedBonusType).getTechCityTrade())))
{
	int iBonusCount = 0;
	if (pLoopCity->getManufacturedBonusTypesCounter(iManufacturedBonusType) < pLoopCity->getNumBuilding(eBuilding))
	{
		iBonusCount = range(pLoopCity->getNumBonuses(iConsumedBonusType) - ((m_aiBonusCounterTemp[GC.getBuildingInfo(eBuilding).getConsumedBonusType(iL)] == MIN_INT) ? 0:pLoopCity->getManufacturedBonusTypesCounter(iManufacturedBonusType)),0,1);
	}

	if (iBonusCount > 0)
	{
		if (iManufacturedBonusType != iConsumedBonusType  && pLoopCity->getManufacturedBonusTypesCounter(iManufacturedBonusType) < pLoopCity->getNumBuilding(eBuilding))
		{
...

we are back to business.

And as it seems I'm now also able to offer a special repair DLL that can repair broken save games from patch I and also earlier patch versions! Maybe I even can repair all broken games. If you can load your save I should be able to repair your save. :)

But the repair turn takes some time. Everything up to +10 minutes to the usual game turn time is absolutly normal! But we need just one turn and most of the time it should be done in two minutes. Try it.

I'll finish my AI teaching and when it's done I'll offer patch J and a repair patch with instructions. I think it's done in 9 hours.

Oh, and have you seen it? The new code is also prepared to work with multiple production buildings like in CCV 3. Maybe it will be useful one day... :rolleyes:
 
Wow, sounds great. :goodjob:
Can't wait to repair my saves and try patch J. :D

You can already repair it. But patch J will still need some minutes. It's finished but I'm packing the files at the moment and have to upload them. And you know that will take about one hour. And the instructions must be updated and the new repair tool must be uploaded too. But the AI is fine now. Had a look at ten different game starts and all were :goodjob:.
 
:hmm: Building roads still messes with the resource number. :(
I updated my savegame with the repair DLL, and then loaded the repaired savegame with the I+ DLL.
Placing Roads inside my borders adds 6 to my 6 weapons (but just once), placing Roads outside my borders after that removes the 6 again and brings the total number back to the correct amount. :S

First save is before the repair, second one after.
 
I hadnt fully patched to 3.19. sry for the lame-o Q.

I can't get this (or the other 2 mods I've tried) to work since getting a new computer running win 7 64-bit. Is this a known issue I don't know about? thanks!
 
I can't get this (or the other 2 mods I've tried) to work since getting a new computer running win 7 64-bit. Is this a known issue I don't know about? thanks!

I also use Win7 64bit and it works fine... did you run it as administrator?
 
@bonta
Please test the attached save. I've tried to repair it. I hope something went wrong on your side. Before the repair the number of weapons will increase with new roads inside your border. After the repair all values seem to be correct and new roads do nothing to the number of weapons on my machine.

Is the save for you okay now too?
 

Attachments

:hmm: Interesting.... no it doesn't work on my machine... I think I'll reinstall CCV... maybe during one of the many patches something went wrong...
So hopefully it's all just a problem on my side. :D
 
:hmm: Interesting.... no it doesn't work on my machine... I think I'll reinstall CCV... maybe during one of the many patches something went wrong...
So hopefully it's all just a problem on my side. :D

Believe me. I feel the same. :please:
 
Reinstalled with CCV H++ /J and still not working... weird... I don't get it. :crazyeye:

Does anyone else get this? Or is it just my machine? :D
 
In a new game I had two instances of resource vanishing... I placed two cities, one of them on Iron, gave me all ancient and classic techs... "build" 2 Forges... but they weren't yet connected via tradenet because of one tile of coast that was not revealed... when I revealed it in with the mapedit, the Iron Weapons vanished.... then I added Copper, a Mine and a Road and everything was fine again (2 each). Then I wanted to additionally connect both cities via Road... the first Road I placed outside my borders caused another vanish. :(

And now I wonder whether all those bugs I reported were just the imagination of my computer. :D
 
I don't know what has happend. Your code and my code should do the same. I'll try a downgrade of my version and upload it again. :dunno:
 
Okay, it's done. I've downgraded my personal version so that it should be equal and compatible with 4.29H++. So there is still a chance to repair and update old games. It's called now 4.30 although some planed elements of the 4.30 version are not included. Sorry, but those are not finished or not compatible.

I hope you will find no bugs in my personal version again. But please notice that the Repair Tool is new too!!! You must run the routine again. It's just a chance...

CCV 4.30 will be online in 1 hour from now.

EDIT: Online. :please:
 
Back
Top Bottom