[MOD] Medieval: Conquests

I encountered a major issue. My laptop can't start M:C :badcomp:
Thinking the issue is related to it being 32 bit (it's from 2004) I removed Medieval2.FPK. At least that made it go into the main menu, but the game crashes when it loads a savegame. Presumably it tries to access the movie.

I guess the easy solution would be to have a 1 kB FPK file to use on old systems instead of the 700 MB file. Presumably we will get more movies and that file would be needed for each. Maybe we should also reconsider the movies as the game loads a lot faster without Medieval2.FPK.

The hard solution would be to write code to detect if the files are present and not try to play them if they are missing. I vote for the easy solution.

Either way right now I'm on the road and without M:C :cry:

The laptop plays TAC just fine and it has a minor graphical glitch with RaRE (still 100% playable). It's not like expecting M:C to work would be outrageous. Also I planned on using my laptop to test network games, so we better figure out how to get it to work.

Will somebody try to make a small "fake" movie?
 
Will somebody try to make a small "fake" movie?

Actually, the Medieval2.FPK is a packed file that contains all the new graphics. Without it the game will not run. The movies can not be packed and are in assets/art/movies. Where does the game hang up?

Edit: packing the art speeds up load times
 
This should be all the C++ code for modders. If you don't plan to mod it just delete it.

thanks
but why is it so long to move a unit ?
my pc is not a new one but I did not see this kind of problem with other mods of colonization or civ
I am not talking of waiting time between turns, I am used to that; I am refering to to difficulty of moving in one turn
do I have to make adjustments?
 
thanks
but why is it so long to move a unit ?
my pc is not a new one but I did not see this kind of problem with other mods of colonization or civ
I am not talking of waiting time between turns, I am used to that; I am refering to to difficulty of moving in one turn
do I have to make adjustments?

That I am not sure about as no one has mentioned this before. You could try disabling some of the graphic options. We have an update planned soon as Nightinggale has been working on addressing game performance that may help with this issue so stay tuned:)
 
Actually, the Medieval2.FPK is a packed file that contains all the new graphics. Without it the game will not run. The movies can not be packed and are in assets/art/movies.
Oh. Good to know. Maybe I should decompress it and see what it actually contain. It also explains the crash when loading savegames.

Where does the game hang up?
It enters main menu, but the actual menu fails to show up. It's just the background and the music playing. At first I suspected a python bug, but no python errors shows up in the log.
Maybe the huge amount of new graphics overflows somewhere. I should try with a debug build at some point, or at least with asserts on.

Edit: packing the art speeds up load times
Read that, but temporally forgot about it. Maybe I should try to make one for RaRE. It takes ages to load.

Also I'm back (best case scenario for time away from home happened). It turned out that I would never have had any time for M:C anyway. It still didn't solve the question about how I'm supposed to test network games without the laptop though. The problem should still be fixed (if possible).
 
Also I'm back (best case scenario for time away from home happened). It turned out that I would never have had any time for M:C anyway. It still didn't solve the question about how I'm supposed to test network games without the laptop though. The problem should still be fixed (if possible).

Glad your back I'm back too. I use to play it on my laptop before I handed it down to my daughter but it worked fine then on low graphic settings, now I have a Mac and it has all kinds of errors with mods. My wife has a laptop though I may can try it on that when she isn't looking and test it out at some point.
 
now I have a Mac and it has all kinds of errors with mods.
The mac version doesn't use dll files. This mean either you have to use the windows version (through wine, virtualization or bootcamp) or figure out how to compile for mac.

EDIT: just looked up the SDK for mac and it turns out the porters decided to compile the content of the dll into the main application. This mean it's impossible to mod without access to the entire sourcecode for the entire game, which isn't released for obvious reasons. This makes the mac version severely limited and using the windows version on mac appears to be the best choice. Stupid but true. Aspyr severely floors their reputation in my point of view for this mistake. I could have accepted the need to recompile for mac, but not this. The ability to make xml files, which works on windows only doesn't help at all. However that has to do with the windows version accepting incorrectly formatted files while the mac version is more strict with XML rules. In a sense the windows version is to blame for that one.

Personally I think I will recommend a full version of windows to run colo in if you mod the DLL yourself and bootcamp is the fastest option and is also free of virtualization bugs, though it's the approach which needs a full Windows license and reboots. It really is a tradeoff depending on what you want to do as being able to run the game directly from OSX is not bad either.
 
yeah i came to the conclusion a long time ago, if you want to play games don't use a mac... it is just not worth it, and usually the games are way more expensive too!
It's kind of sad as it has nothing to do with the OS itself. It's a business choice and/or lack of coder skills. Go get open source games and they work just as well on mac as on windows or linux for that matter and they share file formats meaning stuff like mods automatically works on all supported platforms.

Writing portable software is not harder than writing software in general, but it needs developers who actually cares for their product. It appears that the lack of dll support on mac is most likely due to a development plan, which aimed at releasing the game as quick as possible, nomatter how much would be sacrificed to get there. It's not supposed to take long to make as the windows code is already designed to do so. It would likely end up as a framework instead of a dll, but professional mac coders should know how to make something like that.
[offtopic]
 
Nightinggale
Quote:
Originally Posted by Kailric View Post
Actually, the Medieval2.FPK is a packed file that contains all the new graphics. Without it the game will not run. The movies can not be packed and are in assets/art/movies.
Oh. Good to know. Maybe I should decompress it and see what it actually contain. It also explains the crash when loading savegames.

Here's a link to the FPK PakBuild utility: http://forums.civfanatics.com/showthread.php?t=136023
FWIW it does seem to me that mods load faster from a single FPK than multiple files, but I don't know that anyone's proven this.

edit: BTW what python file generates the city screen? I was looking into a custom cityscreen for this mod but can't find where it runs from :confused:
 
Here's a link to the FPK PakBuild utility: http://forums.civfanatics.com/showthread.php?t=136023
FWIW it does seem to me that mods load faster from a single FPK than multiple files, but I don't know that anyone's proven this.
http://forums.civfanatics.com/showthread.php?t=187699
"Dandrae found a solution that allowed the mod to load in a few second instead of a few minutes. He packed all of the art files into a single fpk file. This article will cover the process of doing that for your mods to decrease the load times."

Silly thing is that I read all of that thread and then I kind of forgot about it when I guess I was supposed to use it :blush:

edit: BTW what python file generates the city screen? I was looking into a custom cityscreen for this mod but can't find where it runs from :confused:
screens/CvMainInterface.py
I think it's in there (not 100% sure). It's a collection of a lot of stuff, which I would have liked to see in multiple files.
 
screens/CvMainInterface.py
I think it's in there (not 100% sure). It's a collection of a lot of stuff, which I would have liked to see in multiple files.

Yeah, that's where it's at and I agree it's a pain trying to short out the cityscreen stuff.

And using pak files defiantly speeds up load times and also, back when I was first creating this mod and before I created a pak file I started having issues where the game would randomly not even start up. That all went away when I created the pak file.

Anyway, I am working on fixing some of the issues. I am making Lodges and Strongholds kill animals and bandits up to one space out around them. Making it so serfs and slaves (or units with the bPreventTraveling tag) can only move in player owned territory. And also make it so your ships want sit idle when you tell them to travel to the spice route.
 
@Nightinggale

I am enjoying the improvements you made. I like the new Domestic Advisor changes. We should make it so that you can click on the Native villages and that centers the map. That way you don't have to search around for that village as it took me a bit to find the village with a Cotton Planter just searching by its name.

I made it so lodges and strongholds kill bandits and I haven't had any problems with animals or bandits either in my current game. I am going to add a new XML tag so that lodges only kill animals and strongholds kill both.

I also am going to make the Silk Road a Ship route has well with access on the North and South Europe tiles.
 
I am enjoying the improvements you made. I like the new Domestic Advisor changes.
I think you are giving me credit for something I didn't do and you failed to credit me for what I actually did.

The changes to domestic advisor happened like this:
  1. Robert Surcouf made a lot of changes in (RaR)
  2. I added the unit being taught at natives (RaR)
  3. I changed hardcoded values into being generated at runtime (RaRE)
  4. I added the total production screen (RaRE)
  5. I copied the file and modified it to make it work in M:C
  6. I copied it back to RaRE and modified it to ensure it still works there
As you can see Robert Surcouf is responsible for the GUI and most of what you see, not me. However I more or less touched all the lines doing so to make it adapt to whatever the XML files throws at it while still displaying the same (except that I fixed a few minor bugs)
I did step 3 mainly because step 4 was impossible to do without it. At that time each page had a hardcoded number and because order mattered I had to change several places quote a lot for each newly added page. As I would have to do that every single time I wanted to add something I decided to rewrite the page handling into something where order doesn't matter. The result turned out to be generic enough to allow me to move it into M:C, though some stuff needed to be recoded into being a bit more generic.

I think I proofed that I reached my goal with generic coding and adapting to XML files by the fact that RaRE and M:C uses identical python files while the pages still look different ingame to match the differences in those two mods. For instance the file checks for inventions in XML and if they are present, then it will add an invention column in the general screen. Column width is modified to adjust to the number of displayed columns, not the actually count of known columns in the python file.

This will hopefully allow coding new features for both mods at once with little or no extra work.

We should make it so that you can click on the Native villages and that centers the map. That way you don't have to search around for that village as it took me a bit to find the village with a Cotton Planter just searching by its name.
Already planned. I stated that I wanted to add it in RaR and ray said "why?" and I ended up making RaRE instead containing everything I talked about for RaR except for this particular feature.

I also wonder about tradable yields. Natives says something like "we desperately need X, but we can also use Y and Z". The native screen only shows X, not Y and Z. Adding those appears to be a good idea, but I haven't figured out how to do that in a decent way. Most likely the player has a huge amount of yield X and wants to sell it. Setting a filter to remove all settlements which will not buy it seems like a good idea. The question is how to actually code it.

There is one bug in the new domestic advisor. The buildings pages are borked, though the problem exist in 2.0 as well. The icon in the top of the columns doesn't match what buildings appear in the rows. I haven't looked into it, but I suspect that the python code is fine and that the bug is actually due to wrong order of buildings in XML. When I noticed I also noticed I didn't introduce the bug and decided to ignore it at that time. After that I kind of forgot about it and forgot to mention it here. It's not a serious problem as the buildings does show up and the player can get the needed info. It just would be nice if the icons and buildings would match. They do in RaRE.
 
I also wonder about tradable yields. Natives says something like "we desperately need X, but we can also use Y and Z". The native screen only shows X, not Y and Z. Adding those appears to be a good idea, but I haven't figured out how to do that in a decent way. Most likely the player has a huge amount of yield X and wants to sell it. Setting a filter to remove all settlements which will not buy it seems like a good idea. The question is how to actually code it.

Well, I mainly meant to say thanks for the work you did. Regardless of who orginally wrote it you merged it all into M:C:goodjob:

In M:C there is no Y and Z in the conversations with Natives. This may be something that is in RaR but it sounds like something cool to add.

There is one bug in the new domestic advisor. The buildings pages are borked, though the problem exist in 2.0 as well.

Yes, I know about this bug and just haven't looked into it yet:crazyeye:
There is also a bug if you click on a city while in Domestic Advisor it zooms to the city but the city resource table has errors. You can fix this by changing cities then going back to the first city but it's still a pain.

I am about to push some changes as mentioned..

-Lodges now auto hunt Animals out to 1 space
-Strongholds and Towers now kill animals and bandits out to 1 space
-Silk Road is now a sea Route and is access from either North or South seas
-Spice Route is now accessible from the East or West seas
-Squires no longer require Feudalism to train to nobles. They do have to work creating Fealty however to graduate to Nobles.
-Manor Court building now requires a Manor
 
In M:C there is no Y and Z in the conversations with Natives. This may be something that is in RaR but it sounds like something cool to add.
Maybe I imagined this feature :confused:
However I would like to see it ingame :lol:

Yes, I know about this bug and just haven't looked into it yet:crazyeye:
It's not like it's a serious bug or anything. However if the order of buildings needs to be changed in XML, then loading old savegames will break unless CvPlayer::read() is updated to convert old savegames. Nobody said it should be easy to fix.
Btw I favor being able to load old savegames as much as possible. Breaking that ability should only be done if there is no other choice.
 
I've been thinking about a mechanism for allowing supply and demand to realistically shape local prices, while allowing plenty of flexibility to balance these features however is desired using just XML. Here are the ideas I've come up with, let me know what you think! :gold::king::gold:

Where iBuyPrice is the current buying price in that city, and the already existing variables below come from CIV4YieldInfos.xml:
iBuyPriceLow : minimum buying price of that yield
iBuyPriceHigh : maximum buying price of that yield
iPriceChangeThreshold : price sensitivity of that yield (how many units you'd need to sell to drive the price down to iBuyPriceLow, or how many units you'd need to buy to drive the price up to iBuyPriceHigh)
iSellPriceDifference : difference between buying and selling prices (may work best to convert this to a percentage rather than a fixed integer?)

Whenever a yield is bought from a city during trade, call the following function, thus raising the local price by a degree proportional to the amount bought, never exceeding iBuyPriceHigh.
iBuyPrice = min(iBuyPriceHigh, (iBuyPrice+(iBuyPriceHigh - iBuyPrice)*(iUnitsBought/iPriceChangeThreshold)))
At the end of the turn, add up the Demand from local units/buildings (based on Androrc's mod), and call the above function using this demand as iUnitsBought; thus generating upward support for prices based on local demand.

Whenever a yield is sold to a city during trade (or sold via its Market/Tradingpost building at the end of the turn), call the following function, thus lowering the local price by a degree proportional to the amount sold, never less than iBuyPriceLow.
iBuyPrice = max(iBuyPriceLow, (iBuyPrice-(iBuyPrice - iBuyPriceLow)*(iUnitsSold/iPriceChangeThreshold)))

iSellPrice can be updated after each transaction as follows:
if using iSellPriceDifference as a percentage margin: iSellPrice = iBuyPrice*(1+iSellPriceDifference)
if using iSellPriceDifference as an absolute margin: iSellPrice = iBuyPrice+iSellPriceDifference

The basic effects should be that local prices drift down slightly if you're earning lots of gold from selling a certain yield to a city via trade or Trading Post/Market; and drift up slightly as the city generates demand for that yield (especially if that demand goes unfulfilled by selling). The price sensitivity and min/max price for each good can be set as desired. Special markets like Spice Route could get their own set of modifiers to adjust min/max price of certain goods for their unique situation, and cities with high Prosperity can get a bonus to the Demand they generate, building higher prices and profits there. Overall it would be a cool way to generate realistic and subtle shifts in local markets in response to supply/demand, so you can benefit by satisfying your citizens' demand through good strategy, without having to micromanage to an artificially precise limit like "demands exactly 3 Cigars per turn". :king::cool:
 
Here's a little something I've been working on for the city screen :D .. a medieval art background for the generic scroll (I gave it a slight "faded" effect to not clash with the overlying building/profession displays too much). Let me know if you like it, or think it might look better more faded or even monochromatic, perhaps like a Dürer woodcut.

My eventual plan is to develop one version for each of Castle, Town, and Monastery, so you'll automatically know which kind of settlement you're viewing :king: (I'd done a similar thing with the Tech and "Earth" screen backgrounds in 2071 so Alien and Earthling players have a different view).

First I'd just need to know how to obtain the settlement type using a python call from CvMainInterface.py, then I should be able to set up custom backgrounds with a simple if statement. :king:
 

Attachments

  • Civ4ScreenShot0032.JPG
    Civ4ScreenShot0032.JPG
    180.4 KB · Views: 79
Back
Top Bottom