Bug Reports

I introduced a bug one of my last pushes were you no longer gain Trading Points after the first Trade Tech. I was attempting to remove all the old Vanilla Constitution code but removed to much:)
This is one reasons we shouldn't change stuff just before a release. The issue isn't what we intend to change, but rather what we change without intending to.

Technically I am thinking that initial trade routes only need to be set up once when the game initializes. The variable m_ba_TradeRouteTypes is saved so there is no need to reconfigure it on load up.
There are two design goals here, which clashes hard.
  1. recalculating on load to update correctly from XML changes
  2. enable trade screens by other means than civics
Obviously if we recalculate on load based on civics alone, we will lose any non-civic info in the array. Before we figure out how to fix this problem, we should figure out what we want the game to do.

The best solution I can think of is to make an allowed array just like with professions and all that. We can then give civics the option to add or remove enable points. This will allow something like a slave market trade screen, which is only enabled for civs, which picks the slavery civic.

As we would like to enable screens by moving on to plots, we have to have a bool array telling if you have reached an access plot. If this bool is true, then it will give you an enable score of +1 for that screen.

By only saving the "reached access plot" array, the actual allowed screen array can be recalculated correctly on load. That way it will update correctly to XML changes.


There are a few details to figure out, but overall the code for this approach is already there as we have the generic array enable code used by all the other arrays.




As for CvPlayer::init() vs CvPlayer::reset(). Reset is called by init() and read(). On the other hand init() seems to be called from the exe and we have little control of that one. Generally speaking we should write everything in reset(). It is my impression that if we set a variable in init, change it during the game and then load a savegame, it will not revert back to init state. However it will if it is set in reset. As the exe allocates the players at startup and reuse that memory between games, this is an important issue, which as far as I can tell only applies to players.
 
This is one reasons we shouldn't change stuff just before a release. The issue isn't what we intend to change, but rather what we change without intending to.

This was a needed change as the old vanilla Constitution code clashed with the new Civics code. If something is broke then it needs changed before you release.

The best solution I can think of is to make an allowed array just like with professions and all that. We can then give civics the option to add or remove enable points. This will allow something like a slave market trade screen, which is only enabled for civs, which picks the slavery civic.

Ok, that sounds like a great idea and we can add that after the release. I've moved the current initial set up to ::init and save/reload does not change your access to Spice Route anymore.
 
Maybe it would be a good idea to make the "discovered access plot" array now and save it. While it isn't needed for the next release, adding it now mean it will be available when loading with the next release. This will allow os to introduce recalculating screen access on load without breaking backward savegame compatibility. Worst case scenario is saving 8 bytes extra for each player, which is a minor waste if we end up not recalculating anyway.

Another thing. Are you pushing your changes? You write like you change code, but I haven't seen git updates in days. If I am to introduce this array, I better get the newest code or code updates will really be chaotic.
 
I haven't pushed anything yet as I found those two issues that I have just now worked out.

To your liking I am changing "Barbarian" text to something else. Vanilla naming scheme always puts the Profession first with the unit name in Parenthesis such as Warrior(Barbarian). I renamed Barbarian to Villager so now it reads Warrior(Villager). Perhaps "Outlying Villager" would fit better, but anything more than one word makes for a long name. So, I was thinking maybe when it comes AI opponents instead of using the "Profession(Unit Name)" scheme we simply use "Civilization Adjective Profession", so when you mouse over a foreign unit it will say, "Berber Warrior" or "Magyar Calvary".

Natives only have one unit basically, but the more advanced Civs have the Professionals. This may change however at some point where all Civs gain Professionals. But, does the player really benefit from seeing an AI name such as "Infantry(Master Blacksmith)"? How would the player even know what innate skills the unit had unless he struck up a conversation? So, I propose we change the naming scheme as mentioned above.

All that said I have another bug. When a city has a yield that is overflowing the city screen messes up. If the max storage for a city is 100 and say you have 100+ Tools, it still only shows 100 tools and you see graphical glitches and you can not move units around in the city. I just now discovered the factor that causing the issue with the overflow but I have not yet discovered what the underlying cause is.

Could you check to see if this bug is in the current git version. Just start a game and add an overflowing yield.

Edit: I found the culprit. In CvMainInterface.py we left a reference to YIELD_GRAIN and should be changed to luxury food:

if (iStored > pCity.getMaxYieldCapacity(i) and i != int(YieldTypes.YIELD_FOOD) and i != int(YieldTypes.YIELD_LUXURY_FOOD)):

I will push these changes...
 
Could you check to see if this bug is in the current git version. Just start a game and add an overflowing yield.

Edit: I found the culprit. In CvMainInterface.py we left a reference to YIELD_GRAIN and should be changed to luxury food:

if (iStored > pCity.getMaxYieldCapacity(i) and i != int(YieldTypes.YIELD_FOOD) and i != int(YieldTypes.YIELD_LUXURY_FOOD)):

I will push these changes...
I found the bug too and pushed the python fix 2 minutes and 57 seconds before you pushed :crazyeye:

I added a line more than you though, I added
Code:
## TODO: get rid of yield hardcoding
I highly suspect this line will cause problems for other mods. This is yet another reason to look into yields after next release.


Also I can add that the bug was caused by me renaming YIELD_GRAIN to YIELD_LUXURY_FOOD. I went though source code as well as XML to complete this change. However I missed a single line in python, which just tells how tricky it can be to rename something once introduced. We better use good names to begin with rather than changing later.
 
Ha ha, funny. We both fixed it. I had to merge in your comment. So, when we commit and push we still have to commit and push all three, Medieval_Conquest, Python, and sourceDLL correct?

When ever I commit and push Medieval_Conquest it shows the Python and sourceDLL folders as if they are being committed as well. But then when I look on SourceForge I don't see the changes in the folders. Its confusing, I think I need committed :crazyeye:
 
I found the bug too and pushed the python fix 2 minutes and 57 seconds before you pushed :crazyeye:

I keep telling you to get an instant messenger so we can instantly chat but you seem to fear having your identity discovered:eek: I am starting to think you are Royalty or something or an Alien perhaps hovering out near the dark side of the moon and just tapping into our network. As long as you like like modding makes no difference to me;)
 
Ha ha, funny. We both fixed it. I had to merge in your comment. So, when we commit and push we still have to commit and push all three, Medieval_Conquest, Python, and sourceDLL correct?
Yeah. I would like to push all 3 at the same time, but it would appear that it isn't possible. The makers of git figures that a hook for pushing would only modify local data anyway meaning people should do it manually outside of git. I don't quite get why as all hooks works on local data :confused:

When ever I commit and push Medieval_Conquest it shows the Python and sourceDLL folders as if they are being committed as well. But then when I look on SourceForge I don't see the changes in the folders. Its confusing, I think I need committed :crazyeye:
You push a reference to the newest revision of the submodules to M:C, but you don't push anything outside of the M:C repository. Submodules aren't ideal for our setup as it would appear that they are intended for read only access. The whole concept of having multiple repositories, which merge into a single project wasn't in the minds of the submodule developers. I will hopefully have updating working correctly at some point (pull also updates submodules correctly), but I currently see no way to avoid uploading each module individually.
 
Maybe it would be a good idea to make the "discovered access plot" array now and save it.
Done. It's not doing anything other than saving if a unit has ever entered a plot for EuropeTypes 1. As useless as it sounds, we might be really happy for this addition later on.

I am starting to think you are Royalty or something or an Alien perhaps hovering out near the dark side of the moon and just tapping into our network.
Oh man I have been found out and now I have to clear the minds of everybody :assimilate:
I'm an alien prince hiding on the dark side of the moon investigating how to exploit the planet as much as possible. My investigations have revealed that it is able to supply virtually endless supplies of stupidity. Sadly the value is fairly low as it is only useful for entertainment.
 
Hey, entertainment is one of the main human necessities, right up there with food, shelter, and clothing. But I did say "human" necessities, aliens don't apply perhaps.

Anyway, yeah I added two new attributes EuropeInfos.xml that do nothing at the moment but I planned to use in the future.

Anyway, about the changing the scheme. Is the one who changed the scheme suppose to update the DLL as well as it says something about, "if you are not the one who edited this"?
 
Anyway, about the changing the scheme. Is the one who changed the scheme suppose to update the DLL as well as it says something about, "if you are not the one who edited this"?
Yeah. I didn't plan on being a nanny for this feature. Run indent.pl to indent the files correctly and then update the DLL with the new checksums.
 
Oh man I forgot to get a screenshot or a saved game, but one of the Leaders just tried to get me to give him stirrup in exchange for anarchy! :D Worst Tech Trade Ever!!

Also my outlaw graduated to a free peasant, but only has one inner city production when I put him in my winery, does this mean he has become something else and jsut has the wrong display?

Another thing I just noticed, is when you you get the popup for 'ships waiting in europe' and you click it it brings up the motherland even when you can't access it. (I know it's not really a bug, but I thought I would mention it) My ship was actually in the spice route.

Oh I think something else I noticed happen was my noble got the 'honoured' promo without me having the civic feudalism.

Also I cannot seem to build a house with my prolific inventor

Also the 'minimum amount' for not selling locally does not seem to work, I have wine set to 300, but it keeps selling it locally.
 
When you try to change civics, if you don't have the bucks the interface tells you that. If there's some other reason you can push the button until your finger gets sore, but the button won't stay pushed and the interface doesn't tell you why. An example is changing from Anarchism to Sovreign Rule.
 
Once you've completed the Wheelbarrow civic, your workers are supposed to be able to build roads. The Prague worker doesn't seem to be able to build a road. Wait, that's slightly wrong--he can build a road in an tile that doesn't have one, but he can't build a road from a tile that has one to one that doesn't have one.
 

Attachments

Oh man I forgot to get a screenshot or a saved game, but one of the Leaders just tried to get me to give him stirrup in exchange for anarchy! :D Worst Tech Trade Ever!!
Right, it is a horrible trade. It actually beats my record, which is from call to power. One civ wanted to exchange horseback riding with zero G industry.

Also my outlaw graduated to a free peasant, but only has one inner city production when I put him in my winery, does this mean he has become something else and jsut has the wrong display?
I have mentioned a few times that it is silly that we have code for calculating yield production and then code to display yield production as it includes the risk of going out of sync. Since there is a risk that it goes out of sync, I can't tell if it is a display bug or something more severe.

Another thing I just noticed, is when you you get the popup for 'ships waiting in europe' and you click it it brings up the motherland even when you can't access it. (I know it's not really a bug, but I thought I would mention it) My ship was actually in the spice route.
There are a few issues with where ships go. Col2071 started off by putting immigrants in Europe and the ship sailed to the spice route, leaving all immigrants stranded. We actually plan to make the trade screens less hardcoded for next release and "ship waiting in $screenname" would fit very well in such an update.

Oh I think something else I noticed happen was my noble got the 'honoured' promo without me having the civic feudalism.
Did you have feudalism at some point?

Also I cannot seem to build a house with my prolific inventor
The build home feature could do with a GUI update. I hate the fact that it isn't clear what each unit will build. I think the issue in this case is that you need to be able to build the building in question and if I remember correctly you have to invent it first.

Also the 'minimum amount' for not selling locally does not seem to work, I have wine set to 300, but it keeps selling it locally.
It sells from the plotgroup and just writes the name of this first city in that group (thanks for reminding us of that issue). Are you sure you didn't connect cities A and B and it sells from B while displaying A?
 
Oh man I forgot to get a screenshot or a saved game, but one of the Leaders just tried to get me to give him stirrup in exchange for anarchy! :D Worst Tech Trade Ever!!

Yep, this is on my todo list to fix. Should be an easy fix.

Also my outlaw graduated to a free peasant, but only has one inner city production when I put him in my winery, does this mean he has become something else and jsut has the wrong display?

Ah, I bet the problem may be that Outlaws start with a Civilian promotion and when they are converted to a Free Peasant they still retain the Civilian promotion. So, this needs adjusted.

Oh I think something else I noticed happen was my noble got the 'honoured' promo without me having the civic feudalism.

Another thing on todo list is to check into this. But, all Elite units, Nobles, Commanders, etc start with the Honored promotion which allows them to be Knights under Feudalism. This should be documented better perhaps.

Also the 'minimum amount' for not selling locally does not seem to work, I have wine set to 300, but it keeps selling it locally.

Nightinggale pointed out the issue perhaps. The Demands part of the game isn't quite finished yet and needs look at.
 
A distiller in Vienna can't take up any profession inside the settlement. There's no indication why.

I've later guessed that you can't change professions when your civ is in anarchy.

You are correct. You can't join cities under Anarchy. This is the same as cities in Disorder under vanilla rules. You can mouse over the Anarchy symbol on the left of the screen for a description of what you can not do.

When you try to change civics, if you don't have the bucks the interface tells you that. If there's some other reason you can push the button until your finger gets sore, but the button won't stay pushed and the interface doesn't tell you why. An example is changing from Anarchism to Sovreign Rule.

I'm not quite understand this. Are you saying that it says you can "Proclaim Resolution" but it does nothing when you press the button?

Once you've completed the Wheelbarrow civic, your workers are supposed to be able to build roads. The Prague worker doesn't seem to be able to build a road. Wait, that's slightly wrong--he can build a road in an tile that doesn't have one, but he can't build a road from a tile that has one to one that doesn't have one.

I checked out the save and the worker seems to build roads just fine. What did you do to tick off all the barbarians as on the very next turn they all declare war on you? Workers will stop working if an enemy approaches so this may be your issue? I had to delete all the barbarian units in order for the Worker to continue to build roads.
 
Plot group sale:
Yep that probably explains why it was still selling then, although actually when i set london's wine to never sell it stopped selling, even though it was active in another town still..
Do plotgroups connect outside of borders? I have one town that has a gap from the rest and a road running to it, will this still be in the plot group?

Feudalism:
I am 90% sure I didn't have feudalism ever (although I had unlocked it), I just had the 'alert' pop up that my noble had been honoured in Town X. The being honoured part wasn't really a problem, it just depends if it was intended in design or not, as the feudalism civic says it is needed for 'honouring'.

House Building:
Yeah it would be good if it told you what it will build, at the moment it is just guess work based on speciality :D, but with the inventor, I had unlocked the tinker house, and got the inventor from tech, but then couldn't 'build his house' I could build it normally though.
 
Back
Top Bottom