[Religion and Revolution]: Bugs and Todos

Hi ray,

please find attached a savegame (current SVN 580).

You can Play with autoplay but if you try to play a round manually the game will crash.

:confused:

Thanks, I will try to take a look. :thumbsup:

(But probably I will only get to thoroughly analyze next weekend.
I will go to bed quite early because I need to get up at 5am tomorrow morning.)

@Nightinggale:
If you could take a look before next weekend, that would be really great. :thumbsup:
Thus Schmiddie could continue testing the upcoming release.

Edit:

While debugging I already found out, that there is an "Integer Division by Zero" somewhere.
But when I tried to get to Visual Studio to break and analyze, Visual Studio crashed...

I will try again next weekend.
Should be possible to get to the point in the code that is causing the problem.

Edit 2:

It is this line here in CvCityAI.cpp :

Code:
iPercentWasted = 100 - (100 * std::max(0, iYieldOutput - iLoss)) / iYieldOutput;

I just don't know yet, why it is causing a division by zero now and did not do so earlier.
Will need to do a thorough analyzes what could have happen next weekend.

But don't worry, I will get this figured out and solved. :)

Edit 3:

Might be related to negative productivity modifiers by negative CityHealth.
or
Might be related in some way to the new performance improvments considering Yields.

I will need more time (next weekend) to figure out.
 
While working on a map, I noticed it was rather awckward to find wine in Colombia and red pepper in Canada. If that's the way, it's because:
  • plains + hills = red pepper
  • savannah + hills = wine

Shouldn't it be the opposite? Am I wrong or wouldn't it be more logic to see red pepper growing in tropical climate and wine in temperate/mediterranean climate?
 
Might be related to negative productivity modifiers by negative CityHealth.
Precisely. Here is what happens:
In CvCityAI::AI_professionValue it goes:
  1. if (iYieldOutput == 0)
  2. {
  3. return 0;
  4. }
  5. iYieldOutput *= getBaseYieldRateModifier(eYieldProducedType);
  6. iYieldOutput /= 100;
The city is Providence, eYieldProducedType is YIELD_SILVER, iYieldOutput is 1 at line 1.

getBaseYieldRateModifier returns iModifier + 100 and iModifier is -1 due to city health.
This mean iYieldOutput becomes 99 in line 4.
At line 5, iYieldOutput becomes 99/100 = 0.
We now have a variable, which is 0 after a check for 0 as the following code crashes if it is 0.

Fixing this bug could be to just add a new check for 0, but I feel like it could be covering other issues. First of all is it a good design to reduce at least one yield the moment the city has -1 health? Maybe we should add 50 to iYieldOutput between line 5 and 6 to apply normal rounding rules rather than always down.

Another issue is that it should match the code elsewhere where actual production is calculated. This mean if rounding is changed here, it should likely be changed elsewhere as well.... or is human players also relying on AI code for this? In fact it looks like a lot of code could need reviewing because it looks like vanilla code can't handle negative production modifiers.

I'm not committing any fix for this right now because a fix is as much a design decision as it is a crash avoidance issue.
 
This bug reported here from Schmiddie is now fixed. :)
(Bug existed only in internal working revision in SVN.)

New revision available in SVN. (for team and partners)

It was indeed related to negative production modifiers from negative CityHealth.

@Schmiddie:
Thanks for reporting the bug and providing a savegame.
(Savegames really help with analyzing.)

@Nightinggale:
Thanks for also analyzing the bug.
 
@Schmiddie:

Please take a look at the new graphics of the Master Vintager in the Immigration Queue. (see 2nd screenshot)
He is much too little compared to other units.

The same for the Renowned Medic. (see screenshot)
 
New revision available in SVN.
I fixed an issue / a bug in XML balancing for Improvments.

Because of wrong <RiverSideYieldChanges> real strange things happened when Improvments were built on Plots that had Rivers.

e.g.
1 Coffee or 1 Sugar suddenly being available on Terrain Grasland. (when Plantation was built)
1 Barley suddenly getting available on Savannah. (when Farm was built)
...

It looked really ugly and was actually quite stupid considering gameplay and authenticity.

----

The strange thing about this bug:

It seems to already have been introduced in Release 1.9 and we had more than 1.200 people downloading that release.
Still nobody ever reported the issue ... :confused:

Well, I don't have time to play the mod myself anymore.
Thus I also cannot do intensive testing by playing.

If people don't report issues / bugs, they won't get fixed. :dunno:
 
I found a bug regarding Port Royal

I made a group of a ship of the line and a pirate frigate. I clicked on goto Port Royal and the group went to a Europe access plot. Then the bug occurred: the ship of the line left the map and left the pirate frigate behind.

A few turns later the ship of the line arrived in Port Royal and then it was stuck. I clicked on sailing back and nothing happened. I consider that less of a bug because it shouldn't be there in the first place.

This happened in a multiplayer game and I haven't tried to recreate it in singleplayer. I haven't looked at the code either due to being busy with other stuff. I guess will do that eventually if nobody else looks into it.

It seems to already have been introduced in Release 1.9 and we had more than 1.200 people downloading that release.
Still nobody ever reported the issue ... :confused:
The weirdest incident in this regard was faulty compiler settings where a program only worked for people who had installed a specific compiler at a specific location. (not related to colo modding). This setup presumably crashed for more or less everybody who tried except the developers who happened not to have a computer without a compiler. Still it took something like 400 downloads and two months before it was reported :confused:

Non-coding people tend to view programmers as all knowing gods meaning naturally they know how the code works and how it is broken. This mean they will not post bug reports because "they already know".

The reason why I didn't report it is because I simply didn't notice. Presumably 1200 downloads doesn't mean 1200 people noticed, but yeah, somebody likely noticed and didn't report it.
 
I found a bug regarding Port Royal

I made a group of a ship of the line and a pirate frigate.

The bug has already been reported / is already known. :)

If you group ships that can sail to Port Royal with ships that usually can't and send them to Port Royal, you will have ships that are stuck.
(You will be able to sell those ships that are stuck though.)

I did not bother to fix it, because it is so unimportant / rare.
(Since I never group ships that way, the bug also does not occur to me.)

Edit:
Yeah I know, even rare bugs are bugs and should be fixed. :blush:

I guess will do that eventually if nobody else looks into it.

Sure, if you like to fix that minor bug, go ahead. :thumbsup:
 
(You will be able to sell those ships that are stuck though.)
I don't want to sell a high level ship of the line :mad:

(Since I never group ships that way, the bug also does not occur to me.)
My pirate was heavily damaged and needed protection from frigates ASAP. Later when it started moving again it was the pirate frigate graphics on the map and then I sort of forgot about my ship of the line because I usually don't group pirates and non-pirates.
 
Hello all together,

first: this mod is really, really awesome :goodjob::goodjob::goodjob:

I found a bug when I play the game in multiplayer.

I played the game with a friend per lan.
To start a game works without problems. But after some hours we made a break and saved the game.

Then the next time we started the save-file. I was the host. My friend could join the lobby and i started the match. But then colonization crashed down on his computer.
We tried 4 or 5 different save files, but always the same problem.
Then he was the host and in this case on my computer Colo crashed.
We could rejoin the game but after 2-3 seconds again Colo crashed.

BR
ColoFan
 
@ColoFan:

I never play MP (LAN, Hotseat, ...) myself.
So I cannot analyze and fix that bug.

But maybe you could attach the savegame anyways.
Eventually somebody else will take a look. :dunno:

Did that happen only once (with that MP session) or did you experience the same problem again / regularly ?
(Because I know several people that play long lasting MP sessions with RaR without problems considering savegames.
Although they often play Hotseat.)
 
Thanks for your quick reply
I will upload a savegame later, in the actual savefiles we used our real names and dont want to upload it.
We tested it with two different matches (I dont know if you can call this already regulary :))
and for the first match we used 5-6 different safe files. auto-save and "usual" save files

I never play MP (LAN, Hotseat, ...) myself.
You should :) Its fun ;)
 
Sorry for 2nd post, but I informed my friend, that you need a savegame and he came immediately to me :D

The good message is that it worked today. We could play. For that reason I have no corrupted save file for you but we got AGAIN the error message from the last time.
Only Colo didnt crashed this time.



we keep in touch if it will happen again. We will start shortly a new match - for sure :)
BR
ColoFan
 
The good message is that it worked today.
We could play
...
we keep in touch if it will happen again. We will start shortly a new match - for sure :)

Ok, great. :)

...we got AGAIN the error message from the last time.
Only Colo didnt crashed this time.

That message does sound, like it is something that is not specifically related to the mod.

But to know for sure, we would need a savegame.
Although I could not analyze it myself anyways, since (as I already said) I don't play MP.
 
I never play MP (LAN, Hotseat, ...) myself.
So I cannot analyze and fix that bug.
I do play online once in a while, though I haven't done that with RaR 2.0 yet. I don't know of any issues with 1.9.

I have set up two virtual machines to test and debug network problems. However the one with the debugger decided to break the harddisk file a few days ago and it looks like it could take some time before I have it working again. In fact I think I have to delete the file and start all over installing and setting up everything :sad:

If I get a savegame I can try to figure out what goes wrong once I have my setup up and running again.
 
Hello everyone. :)

I have installed RAR 2.0 today, and it took 5 minutes for a mod to load. While everything else is just great (even better than in previous releases) , this loading time is quite annoying. Is there any way to speed up the load?

I suppose this question was already asked...
 
I have installed RAR 2.0 today, and it took 5 minutes for a mod to load. While everything else is just great (even better than in previous releases) , this loading time is quite annoying. Is there any way to speed up the load?

Get a faster system. :)
(64Bit system, SSD, strong graphic card, lots of RAM, several strong CPUs, ...)

RaR is loaded in less that 15s on my computer.
(I am really not kidding.)

No seriously, the first time loading a huge mod like RaR may take a while.
The second time should be already much faster due to caching effects.
(That is if you don't switch mods all the time.)

Especially the amount of graphics plays a role.
(And RaR has a lot of graphics.)

You could also check if virusscanner or unneeded other programms are running.

Otherwise there isn't really much you could do.
RaR is simply an incredibly huge mod with incredible amount of high quality graphics.

Edit:

I forgot to tell that loading the mod directly (with a shortcut) helps.
(It is much faster than first starting vanilla and then going to "Advanced" to load a mod.)

The Desktop icon is included in the mod.

My shortcut target looks like this:
C:\games\Colonization\Colonization.exe mod="\Religion_and_Revolution"

Edit 2:

And do not install the mod into the user profile in "My Games".
Use the /Mods directory in the installation path of the game.
(But that is so basic knowledge about Civ4/Civ4Col mods, that I probably didn't need to mention again.)
 
Get a faster system. :)
(64Bit system, SSD, strong graphic card, lots of RAM, several strong CPUs, ...)

RaR is loaded in less that 15s on my computer.
(I am really not kidding.)

No seriously, the first time loading a huge mod like RaR may take a while.
The second time should be already much faster due to caching effects.
(That is if you don't switch mods all the time.)

Especially the amount of graphics plays a role.
(And RaR has a lot of graphics.)

You could also check if virusscanner or unneeded other programms are running.

Otherwise there isn't really much you could do.
RaR is simply an incredibly huge mod with incredible amount of high quality graphics.

Ray,
Thanx as always. I started it without opened facebook (my bad) and it took about 1,5 minutes.

I have 1.8x2 GHz processor, 4MB of RAM, ATI Radeon 4600 graphic card and win 7 (64 bit) installed.

These are not the newest, but neither the outdated specs. Well, sorta... :mischief:

Anyway, how can I force the game to open the mod directly, without opening the standard Colonization game first?
 
Anyway, how can I force the game to open the mod directly, without opening the standard Colonization game first?

Create a shortcut of its own, as I have described here.

Or for beginners:

1. Simply copy the Vanila shortcut
2. Modify the "Target" as described
3. Give the new shortcut the icon contained in the mod to differentiate it visually: RaR_desktop_icon
 
I have installed RAR 2.0 today, and it took 5 minutes for a mod to load. While everything else is just great (even better than in previous releases) , this loading time is quite annoying. Is there any way to speed up the load?
You can try to pack the mod: http://forums.civfanatics.com/showthread.php?t=187699
It's not done by default as there can be sideeffects. For instance I have encountered that packing the files made a mod unable to even reach main menu on 32 bit while the 64 bit system loaded it just fine.

I haven't had any problems with a packed RaR on 64 bit, but I can't promise that you can be equally lucky in this regard.
 
Top Bottom