[MOD] Medieval: Conquests

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:

I have attempted something like this myself but did not ever come up with something I liked. I do want this in the game though so keep up the efforts:goodjob:! The three city types the player uses are these...

Code:
CITYTYPE_COMMERCE
CITYTYPE_MONASTERY
CITYTYPE_OUTPOST

I believe the city types all work correctly in the Python as in this example...
Code:
iCityType = pHeadSelectedCity.getCityType()
if (iCityType == MedCityTypes.CITYTYPE_MONASTERY):

I already added a map icon (like the little city icons on the world map that show the defense, fealty, and whether the city has weapons, armor and such) that shows the type of city; commerce is a gold pile, Monastery is the hands praying, and Outpost is a star I think.

I also want to change the city scape sounds for when the city screen is up. You have any monk sounds for a monastery?

I reviewed your "Local Supply/Demand for cities" and will spend some more time going over it before I give feedback.
 
Ok cool. I corrected a few typos from my original post & will post the updated version here:
Spoiler :
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".
The main issue I'd see with this (or any other system for price change) is that in vanilla, the smallest possible price change of 1 gold ends up being extremely large in percentage terms for many goods with low price per unit (less than 5 or so, where the smallest possible movement is 20%). And if a given transaction isn't big enough to move the price by at least 1 unit, its effects won't be stored unless we make some special remainder variable to store it. The easiest fix for both of these would probably be to "inflate" overall price levels by a set amount so small/gradual price adjustments become possible. The vanilla system seems pretty crude with a large random component, so almost anything would be an improvement! :p
I also want to change the city scape sounds for when the city screen is up. You have any monk sounds for a monastery?
Yeah I probably do have plenty of good monk sounds around somewhere lol :crazyeye: I'm not sure from where in the code the AudioSoundScapes are triggered, but if you get Monasteries to trigger a new <ScriptID> tag I'd probably be able to make a Soundscape for it.
 
Yeah I probably do have plenty of good monk sounds around somewhere lol :crazyeye: I'm not sure from where in the code the AudioSoundScapes are triggered, but if you get Monasteries to trigger a new <ScriptID> tag I'd probably be able to make a Soundscape for it.

The game already has a soundscape for different citysize types. All we have to do is add in a new city size called Monastery in the CIV4EraInfos and then edit the
Code:
CitySizeTypes CvCity::getCitySizeType() const
to return CITYSIZE_MONASTERY for the monks:) This is my theory however, getting things to work exactly like you want is usually harder than it looks :blush::mad::cry::sad::crazyeye::lol::eek::p:)
 
@orlanth

Well looking over the Orcs mod I like the idea. The changes that you propose would require each city to have its own price modifier for each good and then to make the system not so tedious it would need a means for the player to track those prices. This would require another Python screen. All of which would be doable of course given the time.

I want to add a bit more to the trade/economy. I like having two sea routes. Land routes would simply be created manually when a player discovers a village that offers a Good that they desire, like Spice is now. I have been studying ancient trade routes and have come up with some ideas. There was several main trade routes; The Spice Route, The Silk Road, the Tea Road, the Incense Route, and Amber Route being a few.

What I am thinking of doing is Having two off the map sea routes and then potentially three land routes. The land routes would work as follows; there would be three main Unique Trade Goods the are produced according to latitude. For example Amber in the North, Tea Central, and Incense in the south. If a player's kingdom was in the south they would have to build roads to connect seaports and villages to create a manual (meaning the player has to move units around and no off the map traveling like Europe is now) Trade Route for that good. These special goods would have unique uses and bonuses for your kingdom.

Also, the player would still be able to access the Trade Fair which would be the fastest to travel but not the best deals. I am however complicating merging in my forts mod. That mod adds in the CvPlotGroups function that allows the ability to check if a group of plots are connected via a trade route or road. Then say, if the player has a trade route connected to several Amber selling cities the total amount in those cities would appear at the Trade Fair. That way once you have a trade route set up you can just travel to the Trade Fair to purchase those rare goods until they run out.

OR!!!... As you connect Cities by trade route the game would generate new Trade Routes that you can travel on. For example; you connected three foreign cities with your trade route with the farthest one named Paris. The game generates a trade route called the Paris Road (or you can rename it). Then your peddlers, while standing in your city, have a new button called Travel the Paris Road. That command would work like the Trade Screens now except the goods for buy and sale and the prices in the screen would be the actual amounts that are in those three cities.

Anyway, that's my grand idea:)

Edit:
@orlanth
I just now realized the Androrc the Orc had two economy mods. The "Europe Price Recovery" and the "Domestic Market". I just now have seen the "Domestic Market" and will have to review it. I am thinking this one is the mod you was referring too in your post?
 
I fixed up the Trading League trading perk. It was grossly imbalanced and did not function correctly. Now when you complete Trading League you should receive your initial gold bonus. Then the Trading Advisor icon will display the amount of Trading Points you earn each turn. This figure is based on the number of Trade Relations you have as well as the number of Trading Posts you have built in Native Villages. Trading Leagues can help balance out high Tithe Rates at end game but even the Trading League earnings are Taxed by the Papacy:mad::)

I have fixed a few other issues and still need to fix a few more like Ships can load into a Peddler unit (they carry bottomless sacks). When I get those done I'll post another update.
 
I have fixed a few other issues and still need to fix a few more like Ships can load into a Peddler unit (they carry bottomless sacks).
Must be viking peddlers :lol:
http://news.bbc.co.uk/2/hi/uk_news/380273.stm

I saw this move in a documentary on TV. However naturally it is too interesting for youtube :p

EDIT: found another video. Smaller ship, but still it's a ship. It's 11 minutes into the video

I guess I should watch all of it myself. Neil Oliver appears to make up for his flawed remarks about vikings in "A history of Scotland". First he told that what was written about the Scotsmen were written by others and as such is biased against them. Then he took the monks' descriptions of the vikings as fact because for some reason that was unbiased :eek:
 
Must be viking peddlers :lol:

Well there you go. That will be the Viking special ability:) Seriously, maybe that could be a option added for longboats, they can move one space at a time across flat land.

Well, I couldn't stay away and made another push. This time I added different colored plots for Spice Route and Silk Road. And sadly for the moment Peddlers can't carry ships anymore:(

My next fix will be in the Spice Route screen; when you Summon a ship it appears at one of your cities but I want it to appear in the Spice Route screen just like in the Europe screen. I'll have to add in some extra code for that to workout properly.

Edit: I need to get on youtube and watch some this cool stuff. I didn't realize there was so many full length videos.
 
Kailric - Was just posting in another thread that I may be "falling in love" with M:C as the base for playable natives. :D

I really like M:C and may just have to make a batch of civ icons and flagDecals for you >_<
 
Kailric - Was just posting in another thread that I may be "falling in love" with M:C as the base for playable natives. :D

I really like M:C and may just have to make a batch of civ icons and flagDecals for you >_<

That's cool as there is still a slew of art that needs to be added. Yeah, I've been play testing lately and I just can't put it down. I keep getting that "just one more turn" sydrome:) I haven't designed M:C to be Native Playable Friendly but I would be able to help you make it so more than any other mod. As I stated in one of your threads natives in M:C are more like Minor Civs, just part of the playing field. They are not Natives in the sense of The New World. Each of these Minor civs could actually be major players and some was for a time. But you could mod things different of course:)
 
As I have been playing, I have become more convinced that what you have done with the natives and land starts is already very close to my idea of playable natives. The mechanism you have for specialists to come into a settlement is almost exactly what I had in mind for the playable natives.

I feel almost stupefied that you've already hammered out the bulk of what I was thinking. I should have played M:C before I started flapping my lips >_<

As for the art I was talking about, I did some Internet research and crawled through all my Civ4 downloads and came up with this:

attachment.php


It seems red and gold/yellow (I guess more properly gules & or) were popular colors for the Medieval class-conscious set.
 

Attachments

  • MedTechAtlas.png
    MedTechAtlas.png
    104 KB · Views: 316
As I have been playing, I have become more convinced that what you have done with the natives and land starts is already very close to my idea of playable natives. The mechanism you have for specialists to come into a settlement is almost exactly what I had in mind for the playable natives.

I feel almost stupefied that you've already hammered out the bulk of what I was thinking. I should have played M:C before I started flapping my lips >_<

As for the art I was talking about, I did some Internet research and crawled through all my Civ4 downloads and came up with this:

It seems red and gold/yellow (I guess more properly gules & or) were popular colors for the Medieval class-conscious set.

Those look sweet! If you want to change the appropriate files and summit them I'll get them into the next update. Some of the city names could also be redone. I know I did some work on that but IIRC there was still some more to do as there are still Native American city names.

I've added a new feature- Sense the Dark Age world the player starts in is so Hostile I've made it so the first Military Units require Tools instead of Weapons that is Infantry and Archers now require Tools. I figured a spear was just as easy to make as a hammer. Also, some Professions now require "Training" those being Missile Units, Knights, and Heavy Units. Training, at the moment, just means they have to be Experienced or have gained a level. Veterans, Scouts, Huntsman, and Wily Traders (they picked up a thing or two in their travels) all start as being Trained.
 
Great news.

Medieval Tech is now on git and you have the ability to get the newest version. Naturally this mean less tested code, but it also mean faster access to bug fixes and new features.

The github project page: https://github.com/Nightinggale/Medieval_Tech

For everybody not used to git I made a bat file to take care of what needs to be done. All you have to do is to doubleclick the bat file and it will download the newest version and then copy Art, Sounds and FPK files from Medieval Tech 2.0.
It will update instead of installing if it's already installed meaning one file is enough for both.

It will need git, but luckily I found a portable version of git, meaning it should work without installing it. Download it and put the directory in My Games\Sid Meier's Civilization IV Colonization. Rename it to PortableGit (remove the version).
Git downloads (remember to pick a portable version)

OUTDATED VERSION
New version is available here: http://forums.civfanatics.com/showpost.php?p=12667625&postcount=4
 

Attachments

Great news.

Medieval Tech is now on git and you have the ability to get the newest version. Naturally this mean less tested code, but it also mean faster access to bug fixes and new features.
Ok cool. :goodjob: I was able to download it using TortoiseGit. To load I guess I should also add the FPK file from Kailric's main download?

Yes those are some great flags drjest. I'm glad to hear you are going ahead with trying playable natives using M:C. :king::goodjob: With the techtree, emigration feature, and trade between local cities and internal Markets playing a more important role rather than just "Sail to Europe", I'm hoping those could make playable natives a lot more achievable.

BTW I'm not sure how well the AI currently knows how to use the trade features; is it able to send traders to other colonies or the special markets like Silk Road? I've never seen AI send any trade missions to my colonies and wonder how they're able to make $. :confused:

Edit:
@orlanth
I just now realized the Androrc the Orc had two economy mods. The "Europe Price Recovery" and the "Domestic Market". I just now have seen the "Domestic Market" and will have to review it. I am thinking this one is the mod you was referring too in your post?
Yep thats right.. The basic idea would be to reuse the Domestic Market feature where citizens/buildings can create local Demand for yield types; but instead of automatically consuming exactly X units per turn like in the original modcomp, the sum of local Demand could add upward support for local prices at the end of the turn. That way you can't repeatedly sell all your yields to the nearest city & will be rewarded for seeking out better markets that demand what you're producing. :king: You'd also get rewarded from accumulating "higher class" citizens that demand better goods if you can also fulfill those demands with your sales via Market/Tradingpost. As you mention this would need Domestic Advisor to show a table of prices for each city. (Maybe prices for barbarian cities are only visible to the Advisor when you have a Trading Post there.) The XML values could be adjusted with playtesting so there are fairly subtle/gradual and moderate effects on local prices that create some interesting realism while avoiding the tedium of always needing to ship precise numbers of goods per turn to multiple cities, which many felt became somewhat of a problem with the original modcomp.
 
@Kailric:

Both ModComps from Androrc Domestic Markets and Europe Price Recovery have been integrated in RaR.

Europe Price Recovery was adapted to RaR almost unchanged.

But Domestic Markets has been enhanced and improved.
So if you want to adapt it, the best place to look at is RaR.
(Sources, XML, Python and Buttons.)
 
Everyone's invited to join The Trade League with this new wonder movie. Set sail for the Hansa & let's earn some guilders! :gold::king::gold:

edit: did u notice those big wooden hamster-wheel apparatuses at the docks toward the end? I guess they were used for unloading cargo at the time of the Hanseatic League, I wonder what those are called?

whenever you're tired of your current job, be thankful you're not churning away at the docks in 13th-century Lübeck! :lol: :crazyeye:
 
Ok cool. :goodjob: I was able to download it using TortoiseGit. To load I guess I should also add the FPK file from Kailric's main download?
Yes. TortoiseGit is able to use the source made by the bat file. I think I will update the bat file to use TortoiseGit if available to avoid having multiple versions of git.

The good part about the bat file is that it copies the needed files on it's own.

edit: did u notice those big wooden hamster-wheel apparatuses at the docks toward the end? I guess they were used for unloading cargo at the time of the Hanseatic League, I wonder what those are called?
Threadwheels. The concept is quite old. The Romans used them to drain mines in Spain.
 
Hmm very interesting! I'm looking at the wiki links for British prison treadwheels and The Experiment, a horse powered boat. :cool:

Harbour crane might be a good building for coastal cities since it seems those were important. Perhaps it could increase storage capacity and boost local demand, & reuse the crane nif graphic from the Civ4 Quarry improvement.
 
Great news.

This is great news, Nightinggale, and we all thank you for that! I updated this first post with this information.

BTW I'm not sure how well the AI currently knows how to use the trade features; is it able to send traders to other colonies or the special markets like Silk Road? I've never seen AI send any trade missions to my colonies and wonder how they're able to make $. :confused:

Well, at the moment the AI stays broke. They spend their money as soon as they get it it seems. I aim to change this. At the moment the AI still trades with the default Europe as normal but I aim to change this as well, it's one of the next biggest updates when we get all the basics worked out, fun, and bug free. And thanks so much for the new Trade League video! I have seen those big wheel cranes before but never noticed they were human hamster wheels! :lol:

@Kailric:
Both ModComps from Androrc Domestic Markets and Europe Price Recovery have been integrated in RaR.
Europe Price Recovery was adapted to RaR almost unchanged.
But Domestic Markets has been enhanced and improved.
So if you want to adapt it, the best place to look at is RaR.
(Sources, XML, Python and Buttons.)

Thanks, ray! I did not know this. I'll play around with it when I get the chance. I really like how you all documented and organized RaR so well. M:C would be a mess for anyone to try and take a part of it out because I didn't differentiate between my own updates and features. That was more work than I cared to do by myself.
 
I don't know if it's been posted before. I haven't taken the time to read every post in the 30 pages of this thread. But I have been experiencing random crashes of M:C.

There's no pattern to it that I can see, just at some point, it will happen. I can always restart from the latest auto-save and it will be fine for a while, then sooner or later, it crashes again.

It always happens during a Go To command. I am guessing that there is something in the Routing AI that is wonky. I think that is the problem because I see really weird routing choices displayed for the Wily Trader, Huntsman, and Scout when I issue a Go To command. It seems almost like they use the same AI as a ship, cutting one way and then the other. Sometimes avoiding roads altogether.

Also, I am not sure if it is by design, but I notice the ships cutting through land tiles, sometimes even if there is no river on the edge of the tile. Earlier I had a carrack cross a three tile mountain range, which put me in mind of the Ship That Sails Over Land And Sea from the Elric books. :D
 
I don't know if it's been posted before. I haven't taken the time to read every post in the 30 pages of this thread. But I have been experiencing random crashes of M:C.

There's no pattern to it that I can see, just at some point, it will happen. I can always restart from the latest auto-save and it will be fine for a while, then sooner or later, it crashes again.

It always happens during a Go To command. I am guessing that there is something in the Routing AI that is wonky. I think that is the problem because I see really weird routing choices displayed for the Wily Trader, Huntsman, and Scout when I issue a Go To command. It seems almost like they use the same AI as a ship, cutting one way and then the other. Sometimes avoiding roads altogether.

Also, I am not sure if it is by design, but I notice the ships cutting through land tiles, sometimes even if there is no river on the edge of the tile. Earlier I had a carrack cross a three tile mountain range, which put me in mind of the Ship That Sails Over Land And Sea from the Elric books. :D

No, this bug has not be reported yet. Are you playing the Git version or the "Official Version" with the 2.0a patch? Can you send us a saved game where these errors/crashes like the ships cutting through land tiles and also where a crash happens as soon as you hit the Next Turn. I haven't noticed this in my own play testing lately either as far as the crashes go but I have noticed some odd path finding now that I think about it. When ever I tell a Worker to build a road path he almost never builds it in the tiles I want, almost like he chooses the roughest terrain possible. We was sill having problems of Animals/Bandits randomly taking over villages. If that happens it usually causes a crash.

And if you do decide to convert M:C into a Playable Natives Colonization mod I"ll help you with that. I would wait though until we have the current features refined and bugs stamped out. Androrc the Orc's UnitArtStyles is in this mod so It makes it easier to add new Civilizations with diverse art. Anyway, once M:C is good to go you could set up a Git account for your mod like Nightinggale has done and that way it would be amazingly easier for me to help you make the natives playable.

And yes, spelling is fun.
 
Back
Top Bottom