Feedback and Suggestions

I started a 2.0g game using the standard dialogue, and the only map choices were Caribbean and A New World. Is this correct?

I'm going to try a custom game and see whether it allows me to choose the correct maps.

[EDIT] No, it doesn't.

Make sure your new maps are in the correct folder. One place is Documents\My Games\Sid Meier's Civilization IV Colonization\MODS\Medieval_Tech\PublicMaps

Just make sure where it says Medieval_Tech it says what you call the mod.

Or Program Files (x86)\2K Games\Firaxis Games\Sid Meier's Civilization IV Colonization\Mods\Medieval Tech 2.0\PublicMaps will work also.
 
Program Files (x86)\2K Games\Firaxis Games\Sid Meier's Civilization IV Colonization\Mods\Medieval Tech 2.0\PublicMaps will work also.
I would recommend against placing MOD files in Program Files if it can be avoided. It's easier to mess up if you have to look at two locations instead of one. Also putting files outside your homedir can cause permission problems.
 
I have experienced a bug a number of times where, when you load a person into a cart, the warehouse contents are suddenly turned into "big mystery" icons. I'm guess that this is a bug in the code you use to mask commodities that you don't have the tech for.

On that latter point, I never liked that. I'd rather see, for example, cotton even though I can't work with it.
 

Attachments

  • Bug.jpg
    Bug.jpg
    300.6 KB · Views: 161
I have experienced a bug a number of times where, when you load a person into a cart, the warehouse contents are suddenly turned into "big mystery" icons. I'm guess that this is a bug in the code you use to mask commodities that you don't have the tech for.

On that latter point, I never liked that. I'd rather see, for example, cotton even though I can't work with it.

Well, here it was not intended for units to travel in carts. So, that is a bug that you can still load units into carts.

Edit: I just tried this and the screen didn't mess up for me. Are you playing on a 32 bit system?
 
I have experienced a bug a number of times where, when you load a person into a cart, the warehouse contents are suddenly turned into "big mystery" icons. I'm guess that this is a bug in the code you use to mask commodities that you don't have the tech for.
I really hate that bug, but you managed to find a new way to trigger it. Btw did you manage to get git working and do you use the newest version?

On that latter point, I never liked that. I'd rather see, for example, cotton even though I can't work with it.
Somewhere in a distant future I would like to make two rows where the top one are raw materials and the bottom one are produced goods. Using this system we can use row to see source of yield while columns would show production lines. Hopefully that will make it faster to spot what you are looking for.

I would also like to add the ability to hide un-invented yields. No not a placeholder icon like now, but changing the size of each box to eat up the vacant space it would leave behind when it's hidden. The combo of those two would only work if you hide one from each row at the same time, which mean you will not invent a yield, you will invent the production line starting with that yield.

I haven't figured out what to do about weapons and stuff like that, which will not fit into that system.
 
I would also like to add the ability to hide un-invented yields. No not a placeholder icon like now, but changing the size of each box to eat up the vacant space it would leave behind when it's hidden. The combo of those two would only work if you hide one from each row at the same time, which mean you will not invent a yield, you will invent the production line starting with that yield.

Well, that was my original intention but the Python code was very difficult there and was beyond my understanding to change it at that time, prolly so even now :) So, anyway, that is why I just did the placeholder.
 
Well, that was my original intention but the Python code was very difficult there and was beyond my understanding to change it at that time, prolly so even now :) So, anyway, that is why I just did the placeholder.
If you tell me where it is, then maybe I will fix it some day. I kind of suspect I can reuse some of the code from domestic advisor. After all it's able to resize columns to make equal sized columns while the number of columns is set in XML. In other words it scales width to fit the number of "boxes" it has to draw.

My main problem in this issue is that I haven't found the right python code yet. Granted I haven't searched very hard, but still a brief search for it failed. I suspect that it's in CvMainInterface.py, but that file is full of all sorts of stuff and is poorly organized :crazyeye:
 
Make sure your new maps are in the correct folder. One place is Documents\My Games\Sid Meier's Civilization IV Colonization\MODS\Medieval_Tech\PublicMaps

Just make sure where it says Medieval_Tech it says what you call the mod.

In my setup E:\Roger's Documents\My Games\Sid Meier's Civilization IV Colonization\MODS\Medieval Tech 2.0\Assets\PublicMaps does contain a map called Medieval_Conquest. Do I need to rename that as Medieval_Tech. I'm not sure I'm understanding you correctly.

[Later:] The map wasn't seen in the \mods\medieval_tech\public maps folder nor in the user \public maps folder. It was only picked up when I put it in the Program Files(x86)\ ... \public maps folder. And it doesn't find it now when I use a custom game. The map is named "Medieval_Tech". Could this be a problem with .ini files, or elsewhere?

I think this qualifies as a bug of some sort. It could be my setup, but the mod has been using the correct map up to version 2.0g and it doesn't, now. I want a gold star. Kailric, could you find a gold star graphic for the bug reporters list instead of an asterisk? :)

[EDIT:] By the way, the naming of the mod as Medieval Conquest or Medieval Tech isn't consistent either way.
 

Attachments

  • Sma;ll Gold Star.jpg
    Sma;ll Gold Star.jpg
    8.7 KB · Views: 139
I think the Resource Table starts at line 754 in CvMainInterface.py -- I looked at it a couple of weeks ago, but it's rather arcane to me because I haven't figured out what all the variables mean.

There are a lot references to RESOURCE_TABLE_COLUMN_WIDTH in that group, so I think the game already does scaling on the fly.
 
I really hate that bug, but you managed to find a new way to trigger it. Btw did you manage to get git working and do you use the newest version?

I haven't figured out how to get the git version working. In my setup, it is requiring me to know more about PortableGit than I really want to know. One day, I'll gather the willpower to figure it out, but at the moment I can't help with debugging the development version. Sorry.
 
In my setup E:\Roger's Documents\My Games\Sid Meier's Civilization IV Colonization\MODS\Medieval Tech 2.0\Assets\PublicMaps does contain a map called Medieval_Conquest. Do I need to rename that as Medieval_Tech. I'm not sure I'm understanding you correctly.

No need to rename the maps. There are currently three supported maps found here http://forums.civfanatics.com/showthread.php?t=504145

Make sure those are copied into your PublicMaps folder. I think you said you had the steam version so look to where that is installed so you folder should look like the one in the screen shot...
pm.jpg

But, there should be a PublicMaps folder in your Documents under Colonization as you pointed out, that is all you need really. Put all the maps there then start the game if they don't show up then something is wrong.

Note: When naming maps there can be no spaces in the name or the game will not pick it up.


[EDIT:] By the way, the naming of the mod as Medieval Conquest or Medieval Tech isn't consistent either way.

Medieval_Tech was what I originally named it because it had a tech tree. Just haven't got around to changing it yet :)
 
370 turns into a 2.0g game, it's telling me I have 2 turns to win. The Pope hasn't declared yet. [Later:] And indeed the Pope won 2 turns later, without ever showing up and firing a shot! A miracle! :)

Ahh, that is because Reccared I started his conquest before you did, but he did not win in time, which should not have effected you but somehow it did. Right after he was defeated your pope declared war on you. Anyway, I will look into this, thanks.
 
If you tell me where it is, then maybe I will fix it some day. I kind of suspect I can reuse some of the code from domestic advisor. After all it's able to resize columns to make equal sized columns while the number of columns is set in XML. In other words it scales width to fit the number of "boxes" it has to draw.

My main problem in this issue is that I haven't found the right python code yet. Granted I haven't searched very hard, but still a brief search for it failed. I suspect that it's in CvMainInterface.py, but that file is full of all sorts of stuff and is poorly organized :crazyeye:

Yes, it is in CvMainInterface. The problem if IIRC was the all the yields where placed in an array and I couldn't figure out how to take out undiscovered yields and then place them back after they were discovered so I just "covered them up" with the "must be discovered art".

The code is here...
else:
Code:
				#pHeadSelectedCity = CyInterface().getHeadSelectedCity()
				ArtPath = ArtFileMgr.getInterfaceArtInfo("INTERFACE_BOX_MID").getPath()
				#if (CyInterface().isCityScreenUp()):
					#if not (pHeadSelectedCity.isNative()):
				DiscoverArtPath = ArtFileMgr.getInterfaceArtInfo("INTERFACE_DISCOVERY_MID").getPath()
				szDiscoverName = szName + "Discover"
				screen.addDrawControl(szDiscoverName, DiscoverArtPath, STACK_BAR_HEIGHT + (iYield * RESOURCE_TABLE_COLUMN_WIDTH), yResolution - BOTTOM_CENTER_HUD_HEIGHT + STACK_BAR_HEIGHT, RESOURCE_TABLE_COLUMN_WIDTH, BOTTOM_CENTER_HUD_HEIGHT - (STACK_BAR_HEIGHT * 3 / 2), WidgetTypes.WIDGET_RECEIVE_MOVE_CARGO_TO_CITY, -2, -1)
				self.appendtoHideState(screen, szDiscoverName, HIDE_TYPE_CITY, HIDE_LEVEL_NORMAL)
				#screen.hide(szDiscoverName)	
			screen.addDrawControl(szName, ArtPath, STACK_BAR_HEIGHT + (iYield * RESOURCE_TABLE_COLUMN_WIDTH), yResolution - BOTTOM_CENTER_HUD_HEIGHT + STACK_BAR_HEIGHT, RESOURCE_TABLE_COLUMN_WIDTH, BOTTOM_CENTER_HUD_HEIGHT - (STACK_BAR_HEIGHT * 3 / 2), WidgetTypes.WIDGET_RECEIVE_MOVE_CARGO_TO_CITY, -1, -1)
			self.appendtoHideState(screen, szName, HIDE_TYPE_CITY, HIDE_LEVEL_NORMAL)

and here...

Code:
if gc.getPlayer(ePlayer).canUnitBeTraded(iYield, UnitTravelStates.NO_UNIT_TRAVEL_STATE, UnitTypes.NO_UNIT):
						screen.show("YieldIcon" + str(iYield))
						szName = "BonusPane" + str(iYield) + "Discover"
						screen.hide(szName)
					else:
						screen.hide("YieldIcon" + str(iYield))
						szName = "BonusPane" + str(iYield) + "Discover"
						screen.show(szName)
						screen.moveToFront(szName)

It simply adds the new art to all the yields and then removes it if the yields are discovered. There is a better way of course just at the time I could not figure it out.
We can simply remove my added code here and the yields will show as normal with no more glitches.
 
I investigated a bit and found that code (before I saw you posted it :undecide:). I solved the problem right away, or so I thought. It appeared to work at first, then I discovered luxury food and it didn't show up. I saved and loaded and it appeared. It turns out that the code for generating the table is called when the game starts and never again :(

As a plan B I moved the whole table generating code into a function of it's own where it can be called whenever I want. It sort of work, but after doing that the table didn't go away when I left the city again. Clearly Firaxis didn't consider adding more yields after the game started. Having said that I'm not giving up that easily.

As a nice little bonus I figured out how to tell if the player has discovered which yields. Coding a few extra lines in domestic advisor and the undiscovered ones will go away. The difference is that the domestic advisor construction is called whenever you open the advisor meaning we have easy access to size setup, which can be modified during the game.

EDIT: the whole design appears to be really hardcoded against changing anything after the game starts. I don't think we will solve this problem.
 
Ahh, yeah, I remember encountering those problems now. The way the python works is, it loads all the art and then sets up a hide or show option. It seems to me we could use your function and set it up so that when the city screen is up it shows the yields when its down it hides them.
 
It seems to me we could use your function and set it up so that when the city screen is up it shows the yields when its down it hides them.
Tried that. Didn't work.

However reading what you just wrote gave me an idea. I'm not sure if it is a good one, but here goes:

The game makes the screen "ResourceTable" and hides it. Whenever you are in a colony it will show it and hide it again once you leave it. The problem is that the yields are hardcoded into it once it's generated including their X,Y coordinates on the screen and it looks like there is nothing we can do about it.

Now how about this:

We make "ResourceTable0" and "ResourceTable1". "ResourceTable0" is hardcoded to have no luxury food while "ResourceTable1" has luxury food. Both are hidden and the drawing code during the game picks "ResourceTable0" from the start and "ResourceTable1" once luxury food has been invented.

What should be done to get this to work is
  1. Make a function to tell if a yield is inventable (on/off)
  2. A loop or nested loops to generate all tables
  3. Some autonaming scheme (easy. Domestic Advisor has one, but we need one, which is more advanced than just page numbers)
  4. Colony screen drawing code needs a table selector

I'm not sure what will happen if we keep that number of hidden tables all the time. We would need 2^n tables where n is the number of invent-able yields. I don't know what kind of memory usage that would result in, or CPU usage for that matter. I tried to track down the functions I need to rely on, but they are in the exe, not the DLL and as such I don't know how they work. I searched because if they were in the DLL, I could change the C++ code to modify something, which are hardcoded right now. However that solution was too easy :(

Also I have been wondering about the domestic advisor. I can (easily?) remove uninvented yield columns, but then I started thinking about buildings. Is there a function to tell if building X is buildable for current player, or player X for that matter.
 
I'm not sure what will happen if we keep that number of hidden tables all the time. We would need 2^n tables where n is the number of invent-able yields. I don't know what kind of memory usage that would result in, or CPU usage for that matter. I tried to track down the functions I need to rely on, but they are in the exe, not the DLL and as such I don't know how they work. I searched because if they were in the DLL, I could change the C++ code to modify something, which are hardcoded right now. However that solution was too easy
Yeoww, that seems like tons of work Nightinggale! :eek: even for an Expert Coder and Journeyman Reformatter such as yourself! :p To save the coding work and memory or performance issues of all those alternate tables, I think having a single standard table per mod would actually be fine. This could have some advantages too in that modders could pre-arrange the yield layout so they intuitively made sense (ie maybe a 2-row yield similar to RaR placed by X and Y coordinates, with raw yields at the top and corresponsing processed ones at the bottom). Showing some spaces for unknown yields isn't necessarily a bad thing; in fact it might be good to leave the question-marked tiles and let their tooltip say something like "Luxury Food, requires research of Manorialism" rather than "requires research", that way they'd serve a useful purpose to let the player know what's coming. I do think it would be cool to remove/hide unknown yields/buildings from Advisor and other screens though if that's more feasible to do.
 
Yeoww, that seems like tons of work Nightinggale! :eek: even for an Expert Coder and Journeyman Reformatter such as yourself! :p
Journeyman is on hold at the moment. I changed goal so many times while coding that the code became messy. I plan on making a plan using pen and paper and then restart, possibly reusing some (not all) of that I coded so far.

As for a lot of coding for this. Not really. Selecting the right one would be:
szName = "ResourceTable"
for iYield in range(YieldTypes.NUM_YIELD_TYPES):
if yield can be invented:
if player can build yield:
szName = szName + str(iYield)​
This code is weird looking. It added some extra newlines I didn't write. Also it's a quote because the code tag made it even worse for some reason. Most likely the forum is not designed for python :lol:

Generating the screens would be a recursive function to go through all yields and add them to an array. Inventable yields would make the function call itself twice, one where it didn't add it to the array and one which did. The function will also generate the name. In the end the current table generation code is called where the only change is that it gets yield array and name as arguments instead of generating it itself.

Basically all this is reduced to getting a function getting if a yield can be invented or not.

To save the coding work and memory or performance issues of all those alternate tables, I think having a single standard table per mod would actually be fine.
I have been thinking about resource usage. CPU time would only take a hit when the game starts/is loaded and not by much. Memory usage is... well it depends on how it's stored. It's not unlikely that it is a bunch of pointers to sprites and coordinates for where to draw them (read: no real memory usage). However I don't think it will be a serious memory hug compared to the rest of the game. I did some memory testing on RaRE at one point and it used more than a gigabyte. Even if it holds a copy of the sprites for each table, we should still compare it to what else the game uses. I wonder if a single city use more memory than a table. In fact I think it does, though I can't tell for sure.

This could have some advantages too in that modders could pre-arrange the yield layout so they intuitively made sense (ie maybe a 2-row yield similar to RaR placed by X and Y coordinates, with raw yields at the top and corresponsing processed ones at the bottom). Showing some spaces for unknown yields isn't necessarily a bad thing; in fact it might be good to leave the question-marked tiles and let their tooltip say something like "Luxury Food, requires research of Manorialism" rather than "requires research", that way they'd serve a useful purpose to let the player know what's coming. I do think it would be cool to remove/hide unknown yields/buildings from Advisor and other screens though if that's more feasible to do.
This is a design decision. Personally I prefer to hide undiscovered stuff rather than tell where it will appear. Kind of like stone age settlers in Civ4 (or any other version) will hot have a button saying "railroad (not invented yet)".

However maybe it would be a good idea to implement two rows first and then consider what to do from there.
 
The game makes the screen "ResourceTable" and hides it. Whenever you are in a colony it will show it and hide it again once you leave it. The problem is that the yields are hardcoded into it once it's generated including their X,Y coordinates on the screen and it looks like there is nothing we can do about it.

Now that is hard to imagine that there is "nothing we can do about it". It may be so as I couldn't figure it out all that time ago. However, it "Seems like" we could scratch their code all together and come up with something that builds our resource table on the fly. Like whenever the city screens are up of course. There is a function for that "ifCityScreenIsUp" or something like that. There is also a "dirtybit" that reloads the main screen if i am not mistaken. IIRC in the Europe screen you could actually completely remove Yields from the order if they were not researched. Anyway, we should rebuild the whole MainScreen and separate the cities into its own screen :D
 
Back
Top Bottom