Bug Reports

ok got the latest version, merging now!

ah well, it is not save compatible, I think it is cause it has a new unit..

New Unit? I did create a new Treasure unit unique to the vikings. One that had to have a cargo space of 6 in order to transport to bring back the King offering to pay for transport but I thought it wasn't in that push. You could try removing the Plundered Treasure if that is it, in both UnitInfos and CivilizationInfos.
 
I am not sure, but I don't think trade posts are staying in tribes... are they supposed to, or can they be destroyed? it seems like everytime i go to a village I can build a trade post again...
Maybe you can build one even though there already is one due to a bug in the "can build" code or check if it is present code. The fact that you can build one isn't the same as the previous one is gone. I haven't checked anything for this reply. Just pointing out that such a bug could have multiple causes and that we shouldn't assume anything.
 
Maybe you can build one even though there already is one due to a bug in the "can build" code or check if it is present code. The fact that you can build one isn't the same as the previous one is gone. I haven't checked anything for this reply. Just pointing out that such a bug could have multiple causes and that we shouldn't assume anything.

Seems I recall this being an issue but I thought I fixed it, will have to check.

I am so frustrated at the moment. :mad: I was sometime between last night and this morning I mess up my on going civics screen work. I had stashed my worked to fix bugs and then merged it back. All seemed well but then I started having issues and could not resolve. So, I am back to a fresh start. I will have to manually add in my changes instead of a full merge of my stash because each time I merge the stash I have errors.

I see you changed a few files to Player.cpp and Player.h. It looks like just a few lines correct? I'll have to merge those changes into my files so they will all be up to date sense I have pulled those changes already.

I am going to start a branch for the Civics Screen code so I can revert back to if I have too.
 
I am so frustrated at the moment. :mad:
Me too. I though I was going to make a small test, but then I learned that it needs boost 1.35 or newer. Firaxis added boost 1.32. Not a problem I will just download a new version. I downloaded 1.55 (the newest), figured out how to compile it in a civ4 compatible way and started compiling it. I think it started two hours ago and it still isn't done :eek:

Test result: I can't use a newer boost unless I figure out a way to upgrade, which can be used by other people as well. The test failed before it even started :cry:

I see you changed a few files to Player.cpp and Player.h. It looks like just a few lines correct? I'll have to merge those changes into my files so they will all be up to date sense I have pulled those changes already.
I added "bool bUpdateCache = true" to CvPlayer::changeIdeasResearched() to allow changing a lot of civics in a row without cache updates and then you can either set the last one to true or call CvPlayer::updateInventionEffectCache(). That's a really minor update.

I am going to start a branch for the Civics Screen code so I can revert back to if I have too.
I think we branch way too little. We can always delete branches after they have been merged into master. Merging should no longer be a problem now that I fixed the line ending issue. Committing often in a branch will also allow sharing what goes on, which is a good thing when there is more than one person interested in what goes on.
 
I think we branch way too little. We can always delete branches after they have been merged into master. Merging should no longer be a problem now that I fixed the line ending issue. Committing often in a branch will also allow sharing what goes on, which is a good thing when there is more than one person interested in what goes on.

Well, I just started a new branch and pushed the changes. All I have done so far is added all the DLL files needed to work the new Civics Screen. I started the game and all is still well. I have to figure out where I went wrong before. Everything was fine, then all of a sudden when I would start the game I had no interface and could only see the terrain and my units. That is usually a python error but I could not figure out what I did wrong. Anyway, I'll add back things one at a time now to make sure I get it right. Be back after school :)
 
I checked into a bug report by Trade Winds and I found the infininate loop the unit is stuck in.

My Trader AI is attempting to load goods with the AI_collectGoods() function called in AI_transportTraderMove(). It is wanting to load some Wine but the pCity->getAutoMaintainThreshold(eYield) function is causing the amount to be a -8, and thus the while (!isFull()) can never be full filled.

The line if (eBestYield == NO_YIELD) is suppose to break the while loop if there are no yields, but it is returning a yield it just can not load the -8 amount.

There is only 12 wine in storage.

I am not sure exactly what is causing the -8 amount to start with, if it is my Trader code, or something else, or the feeder system. Sense I am not to familiar with the feeder system I'll turn this over to Nightinggale to check out. We should put a FAssert there to make sure the load amount is positive.

The log shows the last unit to move to be the below units, I used this info to track down the bug...

Code:
Player 12 Unit 87 (Saladin's Supply Train) moving from 29:11 to 28:11
Player 12 Unit 88 (Saladin's Grapes) moving from 29:11 to 28:11
Player 12 Unit 89 (Saladin's Grapes) moving from 29:11 to 28:11
 
I made a real fix for the loop bug. There are two ways to check threshold in a city:
CvCity::getMaintainLevel(eYield)
CvCity::getAutoMaintainThreshold(eYield)

The first tells the threshold set by the user. The other one can automatically increase if a building under construction needs it, but it can never be lower than what the user requested.

In the savegame, the first returned 0 and the latter 20. The looped trying to find the best yield used the first to find available yield while the pick up code use the latter. The first fix was to use the first when picking up, hence removing what feeder service wanted to hold on to. The real fix makes both use the latter and the loop will not set best yield to something feeder service will not give away.

Makes me wonder if there are other places where the wrong one is used.

Also I had to fix loading old savegames because the last Kailric commit broke that. At first I wasn't able to load the savegame in question :cringe:

For some odd reason I was able to push the savegame fix, but not the loop fix. I keep getting transmission errors :confused:
It will get there eventually.
Now the server no longer gives me time outs and I managed to push the fix.
 
Thanks for fixing that. Did you fix it for the Main branch, Civic branch or both? Yeah, sorry about the saved game. I didn't think about you not having the same version when I pushed. I need to get more familiar and in the habit of preserving saved games. I'm making so many commits so fast (as least by my standards) that I am just afraid I'd mess something up more than helping. Plus the system is not in any shape to really try to finish a game.
 
Kailric was there any recent changes to M:C specialbuildings or anything that could affect the line below? I'm trying to trace why 2071 interface isn't showing and the best I can figure out, it seems related to this python callback for List Index out of range in Line 1230 in Screens/CvMainInterface.py:

BuildingY = BUILDING_GRID[iSpecial][1] + STACK_BAR_HEIGHT
 
Two issues with the latest merge to master...

1. I unloaded M:C mod to test out land purchase costs in vanilla. When I did there was no Text appearing in my Vanilla Col. I deduced it could be related to the change Night made to text languages so I blindly navigated my way through the menu, turned off English and then turned it back on. When I went back to main menu all was correct.

Then when I restart M:C I get a crash at init XML, but then it I try again it loads just fine. Again, if I at anytime start Vanilla it always starts with no Text appearing and I have to feel my way to reset the languages.

2. bool CvPlayer::canHurry is always returning Negative and I can not hurry immigration. It is now setup with a jit array so I am not sure what needs to be done to adjust this.

I fixed a failed assert that I had caused in a Civics push and I also fixed the issue of Land Purchase prices increasing by leaps and bounds and pushed those change to master.
 
1. I unloaded M:C mod to test out land purchase costs in vanilla. When I did there was no Text appearing in my Vanilla Col. I deduced it could be related to the change Night made to text languages so I blindly navigated my way through the menu, turned off English and then turned it back on. When I went back to main menu all was correct.

Then when I restart M:C I get a crash at init XML, but then it I try again it loads just fine. Again, if I at anytime start Vanilla it always starts with no Text appearing and I have to feel my way to reset the languages.
I'm aware of this issue, but then I forgot about it.
CivilizationIV.ini said:
; English(0),French(1),German(2),Italian(3),Spanish(4) - Defaults to user-installed language
Language = 6647399
6647399 = 0x656E67 = 0x65 0x6E 0X67 = eng
It saves the 3 character ISO code for the language rather than index, meaning it will work with any language and any order. However when loading vanilla, it will not revert to 0.

I'm not really sure what to do about that as the problem isn't that our mod can't save the setting, but that nobody else can read what we write :think:

Maybe we should just save the index for vanilla languages, which would leave the problem to whoever adds a language, which isn't in vanilla. Poor solution, but likely better than the way it is right now.

2. bool CvPlayer::canHurry is always returning Negative and I can not hurry immigration. It is now setup with a jit array so I am not sure what needs to be done to adjust this.
Odd. I changed one type of array into another, but the precise data stored in the array should be the same :confused:
 
Odd. I changed one type of array into another, but the precise data stored in the array should be the same :confused:

Are you looking into this? I think I see what the problem is. Hurry infos are all set to true by default, but with your change they are set to false. So, we just need them set to true from the start. I am trying to remember how we did this as I remember having this issue on another variable..
 
I think I see what the problem is. Hurry infos are all set to true by default, but with your change they are set to false.
Not true, but close enough for me to figure out what went wrong.

Vanilla looked like this:
Code:
		FAssertMsg(m_paiHurryCount==NULL, "about to leak memory, CvPlayer::m_paiHurryCount");
m_paiHurryCount = new int [GC.getNumHurryInfos()];
for (iI = 0; iI < GC.getNumHurryInfos(); iI++)
{
	m_paiHurryCount[iI] = GC.getHurryInfo((HurryTypes) iI).isStarting() ? 1 : 0;
}
I re-introduced the loop (something, which shouldn't have disappeared in the first place :blush:)

I set the default to 1 and then it assigns 0 to hurry types that you don't start with.
https://github.com/Nightinggale/Medieval_Tech/commit/38f6eaad0d7df10c32fc7703786c9f6fa552436e

So, we just need them set to true from the start. I am trying to remember how we did this as I remember having this issue on another variable..
Check the link and you will remember :)
It is a very essential feature btw and a good one to remember.
 
1. I unloaded M:C mod to test out land purchase costs in vanilla. When I did there was no Text appearing in my Vanilla Col. I deduced it could be related to the change Night made to text languages so I blindly navigated my way through the menu, turned off English and then turned it back on. When I went back to main menu all was correct.

Then when I restart M:C I get a crash at init XML, but then it I try again it loads just fine. Again, if I at anytime start Vanilla it always starts with no Text appearing and I have to feel my way to reset the languages.
Fixed. Now CMC uses vanilla indexes to identify languages present in vanilla. This mean you may have to edit CivilizationIV.ini to change the language to 0.
 
Ok, my ships loose their cargo capacity on reload. This information along with other things isn't being saved any more so I assume this is suppose to be part of information that isn't saved but rather recounted on load. However, cargo capacity is not being recounted on reload.
 
Ok, my ships loose their cargo capacity on reload.
Fixed. Vanilla resets units to NO_UNIT and then load everything. I changed it to load ID and UnitType, then I call reset with those arguments. CvUnit::reset() sets some data if m_eUnitType != NO_UNIT. Cargo capacity is one of them. Cargo capacity modifiers are all promotions and all promotion effects are recalculated at the end of CvUnit::read().
 
Fixed. Vanilla resets units to NO_UNIT and then load everything. I changed it to load ID and UnitType, then I call reset with those arguments. CvUnit::reset() sets some data if m_eUnitType != NO_UNIT. Cargo capacity is one of them. Cargo capacity modifiers are all promotions and all promotion effects are recalculated at the end of CvUnit::read().


This is going to be tricky as I pulled the fix, but it wasn't updated in the DLL when I pulled so when I tested it there was still that bug. So, even though it said all was up to date I had to rebuild the dll and then commit/push the fixed dll.

We'll have to remember to pull all three each time and to push all three each time.
 
Back
Top Bottom