Imperialism Mod

knuckledragger

Chieftain
Joined
Oct 23, 2015
Messages
63
As an extension to this thread:

http://forums.civfanatics.com/showthread.php?t=557624

Basically, there is some interest in using the Medieval Conquests Mod in extending the timeline of Civ4Col into the Age of Imperialism. In extending this mod, I thought using the mechanics for the games Imperialism I and Imperialism II from SSI would be suitable to use as a design template.

I am not a programmer; I only have experience in modding Paradox game text files. However, I am good at grunt work. That said, I edited the yield files from the dll to add the following new yields in addition to the yields from M:C):

@ Lib.Spi't: Feel free to add more yields from WHM...

Spoiler :
YIELD_FOOD,
YIELD_LUXURY_FOOD,
YIELD_HIDES,
YIELD_CATTLE,
YIELD_SHEEP,
YIELD_WOOL,
YIELD_LUMBER,
YIELD_STONE,
YIELD_SILVER,
YIELD_SILK,
YIELD_SPICES,
YIELD_COTTON,
YIELD_BARLEY,
///Knuckledragger change YIELD_GRAPES to YIELD_FRUIT
YIELD_FRUIT,
///Knuckledraggere
YIELD_ORE,
YIELD_CLOTH,
YIELD_COATS,
YIELD_ALE,
YIELD_WINE,
YIELD_TOOLS,
YIELD_WEAPONS,
YIELD_HORSES,
YIELD_LEATHER_ARMOR,
YIELD_SCALE_ARMOR,
YIELD_MAIL_ARMOR,
YIELD_PLATE_ARMOR,
YIELD_TRADE_GOODS,
YIELD_HAMMERS,
YIELD_BELLS,
YIELD_CROSSES,
YIELD_EDUCATION,
///TKs Invention Core Mod v 1.0
YIELD_IDEAS,
YIELD_CULTURE,
YIELD_GOLD,

///TKe
///Knuckledraggers added yields.
YIELD_CANNED_FOOD,
YIELD_TIMBER,
YIELD_COAL,
YIELD_OIL,
YIELD_STEEL,
YIELD_HARDWARE,
YIELD_ARMAMENTS,
YIELD_FUEL,
YIELD_GEMS,
YIELD_CLOTHES,
YIELD_ALUMINUM,
YIELD_PAPER,
YIELD_FURNITURE,
YIELD_COPPER,
YIELD_TIN,
YIELD_GRAIN,
YIELD_BRONZE,
YIELD_MACHINE_PARTS,
YIELD_TOBACCO,
YIELD_CIGARS,
YIELD_SUGAR,
YIELD_SPIRITS,
///Knuckledraggere


Here are some proposed dependencies:

1 Coal+ 1 Iron +1 METALWORKER (or other profession)+Steel Mill= 1 Steel
1 Copper+ 1 Tin + 1 METALWORKER (or other profession)+ Forge (New Building)= 1 Bronze (for Cannon, Tools, wooden ships?)

1 (or 2) Timber + 1 Labor + 1 Lumber Mill= 1 Paper or 1 Lumber
(1 Fruit AND 1 Grain OR 1 Cattle OR 1 Fish)+ 1 Labor+ 1 Cannery= 1 Canned Food
1 Lumber + 1 Bronze+ 1 Labor + 1 (Name of plant???)=1 Furniture
2 Steel+1 expert labor+ 1 Metal Works=1 Armaments OR 1 Hardware

********Just look at the picture I uploaded one post below*********


1 ORE + 1 blacksmith building + 1 Labor= 1 Iron?
(I need to add Iron to YIELDS in addition to ORE)


***USE existing M:C content?***
(1 Cotton OR 1 Wool)+ 1 Labor+ 1 Weaver's Shop= 1 Cloth

Use vanilla Civ4Col formula for Tobacco into Cigars.
Use vanilla Civ4Col formula for Sugar into Rum (change Rum name into Spirits? Yes, I know spirits are not made from Sugar...)

Thoughts?

(sourceMOD dll files uploaded)
 

Attachments

  • sourceMOD_edit.rar
    3.5 KB · Views: 276

Attachments

  • Imperialism - quick reference card.jpg
    Imperialism - quick reference card.jpg
    60.9 KB · Views: 811
Just concentrate on MOD_Yields.h for now. The python interface turned out to be mostly useless and will likely die eventually.

BaseCheckYieldGroup::checkXML is to catch desyncs between DLL and xml and is actually autogenerated. There is a perl script to do just that.

There are some yield groups in MOD_Yield_Check.h. Their main purpose is to help the AI figure out how to handle each yield. That's not really important to set up until the main setup is complete.
 
Just concentrate on MOD_Yields.h for now.

Will do. I will merge some yields from WHM and await further suggestions.

How about if I use this tutorial in the meantime:

http://forums.civfanatics.com/showthread.php?t=317419

to these units

http://forums.civfanatics.com/showthread.php?t=373307

from Civ4 into Civ4Col? If used, I want to credit the mod creator.

Have a good day, Nightinggale.



@Androrc the Orc: Just looked at this:

http://forums.civfanatics.com/showthread.php?t=353513

Nice work! Especially like the inventions.:goodjob:
 
Well, A lot of yields were designed to be for Terrain Specific Areas.

I think these were those:
Europe: Barley, Ale
Middle East: Herbs, Spices
Africa: Ivory, Carved Ivory, Gems
Asia: Jade, Carved Jade, Silk Worm, Silk
America: Sugar, Rum, Dye, Cotton?

Then there are thoses that were connected with the Ancient(and pre Imperial) and Modern Eras:
Ancient:
Stone
Stone Tools
Stone Weapons
Leather Armour
Bronze Weapons
Bronze Armour
Iron Tools (I think these were just tools to keep the AI happy but can't remember how I wrangled it)
Iron Weapons (depends how far back you want to go for weapons upgrades)
S Armour (Iron)
C Armour (Iron)

P Armour (Steel) (Maybe keep, again it depends where your troop equipment starts from could be for elite types)

Modern Era:
Oil
Plastic
Rubber
Silicon
Electronics
Aluminium
Fuel
Ceramics
Appliances
Cars (These were going to be a late Industrial Product for sale)
Modern Cars
Computers
Power Tools
Rockets
Guided Missiles
Modern Armour

Steel Weapons (Keep?)
Steam Engines (keep)
Tailored Clothing (maybe keep)
Household Goods (Maybe Keep)
Artillery Parts (keep?) can be used for boats and tanks as well.
Muskets (Keep?)
Rifles (Keep?)
Automatic Weapons(Keep?)
(These weapons depend on how sophisticted you want troop manufacture(Equipment) to be)
Engine Parts (For Tanks)
Armour (For Tanks)

Aerial Parts(Maybe Keep Though I think in my plans for early aircraft(Bi/Tri-plane) used less sophisticated yields)


Also Four kinds of food designed to generate more kinds of units throughout the eras:
Food
Luxury Food
Rich Food
Tinned Food

You also had th 'upgrades' or some things like:
Wooden Goods
Cut Stone
These were designed to be retools in the classic era from basic stone and wood for feeding into stuff like bows shields, castles, concepts made of 'concrete(Lots of Cut Stone)' as well as househld goods. (All to keep as many yields alive as possible throughout all eras)

You also had the Animal and Animal Products:
Sheep -> Wool
Cattle -> Leather
That would feed into various goods down the line.

A lot of the Modern Goods were designed to reuse as many of the old resources as possible.
Tin, Copper, etc.
Making the player 'retool' their factories to take old yields and turn them into new shiny products in order to keep making money.
A lot of that concept will be less necessary as you have less eras and 'retoolings' to go through as an Imperial Era Player.
Probably just the jump from Imperial to Industrial goods.

Also many later goods required the 'foreign' materials like silk for tailored clothes, meaning you had to in some way have trade/colonies in order to make the best stuff.
 
Well, A lot of yields were designed to be for Terrain Specific Areas.

I think these were those:
Europe: Barley, Ale
Middle East: Herbs, Spices
Africa: Ivory, Carved Ivory, Gems
Asia: Jade, Carved Jade, Silk Worm, Silk
America: Sugar, Rum, Dye, Cotton?

Then there are thoses that were connected with the Ancient(and pre Imperial) and Modern Eras:
Ancient:
Stone
Stone Tools
Stone Weapons
Leather Armour
Bronze Weapons
Bronze Armour
Iron Tools (I think these were just tools to keep the AI happy but can't remember how I wrangled it)
Iron Weapons (depends how far back you want to go for weapons upgrades)
S Armour (Iron)
C Armour (Iron)

P Armour (Steel) (Maybe keep, again it depends where your troop equipment starts from could be for elite types)

Modern Era:
Oil
Plastic
Rubber
Silicon
Electronics
Aluminium
Fuel
Ceramics
Appliances
Cars (These were going to be a late Industrial Product for sale)
Modern Cars
Computers
Power Tools
Rockets
Guided Missiles
Modern Armour

Steel Weapons (Keep?)
Steam Engines (keep)
Tailored Clothing (maybe keep)
Household Goods (Maybe Keep)
Artillery Parts (keep?) can be used for boats and tanks as well.
Muskets (Keep?)
Rifles (Keep?)
Automatic Weapons(Keep?)
(These weapons depend on how sophisticted you want troop manufacture(Equipment) to be)
Engine Parts (For Tanks)
Armour (For Tanks)

Aerial Parts(Maybe Keep Though I think in my plans for early aircraft(Bi/Tri-plane) used less sophisticated yields)


Also Four kinds of food designed to generate more kinds of units throughout the eras:
Food
Luxury Food
Rich Food
Tinned Food

You also had th 'upgrades' or some things like:
Wooden Goods
Cut Stone
These were designed to be retools in the classic era from basic stone and wood for feeding into stuff like bows shields, castles, concepts made of 'concrete(Lots of Cut Stone)' as well as househld goods. (All to keep as many yields alive as possible throughout all eras)

You also had the Animal and Animal Products:
Sheep -> Wool
Cattle -> Leather
That would feed into various goods down the line.

A lot of the Modern Goods were designed to reuse as many of the old resources as possible.
Tin, Copper, etc.
Making the player 'retool' their factories to take old yields and turn them into new shiny products in order to keep making money.
A lot of that concept will be less necessary as you have less eras and 'retoolings' to go through as an Imperial Era Player.
Probably just the jump from Imperial to Industrial goods.

Also many later goods required the 'foreign' materials like silk for tailored clothes, meaning you had to in some way have trade/colonies in order to make the best stuff.

Delete all troop equipment save weapons (pre gunpowder) and armaments (post)?

Dumb question, but can yields be used to purchase units?

Scrounging the site for units to convert. Sadly, this is not downloadable, but very cool:

http://forums.civfanatics.com/showthread.php?t=214344

Edit: Update: It appears that many of a mod's assets are packed into a 'fpk' file and thus encrypted. Just like .bin files for Diablo II. The modmakers want their work protected, and I respect that. Therefore, I will focus on vanilla Civ4.
 
I played M:C again to remember why I got upset with CivEffects. Now I remember. My units get promoted with 0 XP and I can build all improvements from the start (oops). I tried debugging, but realised I should improve the debugging tools before fixing the bug.

Because of this, my next goal is to autogenerate C++ header files based on XML data. I'm writing it here because it affects yields too. The future perl script will then generate the C++ header files automatically. This mean just one file to edit... well two, because I'm not fixing that yields are currently in both yields and units. When yields are in a transport, they turn into a unit, which is being transported and that unit has the yield graphics and name. That might actually be good to mention here. I plan on auto adding yields to units at some point, but CivEffects takes priority.

The reason why I want to generate the header files from XML now is because it has the nice added bonus of telling the names to the debugger. This mean when reading content of variables at runtime, it will write YIELD_FOOD instead of 0. Food isn't that tricky, but when it says it's yield 18, then you have to think or research to figure out which yield it actually is. It will be much easier if the debugger tells the name automatically. The same goes for all the other xml files. Figuring out what unit 42 is can be quite a hassle.

to these units

http://forums.civfanatics.com/showthread.php?t=373307

from Civ4 into Civ4Col? If used, I want to credit the mod creator.
Be aware that there is an issue with colours between BTS and colo when it comes to the 3D models. Conversion is possible and in fact shouldn't be tricky. Some people have done it multiple times, but I'm not one of them. This mean yes, you can use any unit for any version of civ4, but it might involve a bit more work than just copying the file.

Another thing. Have you figured out how to compile? You can't use the files you edited now unless you end up compiling them yourself. That's why the last two pages on the wiki are important, even for people not modding C++. In fact you need the compiler to use the updated code provided by other people because there is no way I'm compiling a DLL for each mod each time I change something.
 
Edit: Update: It appears that many of a mod's assets are packed into a 'fpk' file and thus encrypted. Just like .bin files for Diablo II. The modmakers want their work protected, and I respect that. Therefore, I will focus on vanilla Civ4.
They are not encrypted or even compressed. Instead they are just packed into a single file. This reduce the overhead of OS filehandlers when loading the mod at game start. Using packed files will take you to the main menu significantly faster.

Tools:
http://forums.civfanatics.com/showthread.php?t=136023

There is one problem with packed files though. They aren't git friendly as git will store an entirely new packed file if even just one file inside changed. Allowing git to access the files individually use less disk space/bandwidth and provides a better log. There are also issues with packed files like M:C crashes at startup on 32 bit systems with packed files, but starts just fine with unpacked files. Since the startup speed is significantly improved, this topic is an eternal debate/argument/(fight).
 
I played M:C again to remember why I got upset with CivEffects. Now I remember. My units get promoted with 0 XP and I can build all improvements from the start (oops). I tried debugging, but realised I should improve the debugging tools before fixing the bug.

Because of this, my next goal is to autogenerate C++ header files based on XML data. I'm writing it here because it affects yields too.

Progress is definitely good.


The future perl script will then generate the C++ header files automatically. This mean just one file to edit... well two, because I'm not fixing that yields are currently in both yields and units. When yields are in a transport, they turn into a unit, which is being transported and that unit has the yield graphics and name. That might actually be good to mention here. I plan on auto adding yields to units at some point, but CivEffects takes priority.

Can Civ4Col use yields to create units? I am assuming yes, but this would streamline this.

The reason why I want to generate the header files from XML now is because it has the nice added bonus of telling the names to the debugger. This mean when reading content of variables at runtime, it will write YIELD_FOOD instead of 0. Food isn't that tricky, but when it says it's yield 18, then you have to think or research to figure out which yield it actually is. It will be much easier if the debugger tells the name automatically. The same goes for all the other xml files. Figuring out what unit 42 is can be quite a hassle.

With everything else you are doing, yes it can.


Be aware that there is an issue with colours between BTS and colo when it comes to the 3D models. Conversion is possible and in fact shouldn't be tricky. Some people have done it multiple times, but I'm not one of them. This mean yes, you can use any unit for any version of civ4, but it might involve a bit more work than just copying the file.

I just plan on following the tutorial and asking the community for help. We will see how it goes. I will just use vanilla Civ4 units.


Another thing. Have you figured out how to compile? You can't use the files you edited now unless you end up compiling them yourself. That's why the last two pages on the wiki are important, even for people not modding C++. In fact you need the compiler to use the updated code provided by other people because there is no way I'm compiling a DLL for each mod each time I change something.

I do not plan to use the files anytime soon. I am in the information gathering stage. When you give the green light on CivEffects, I will learn how to compile.

Did you look at the Client States Mod from BtS 3.19? I think it would be very useful in the Imperialism mod, but would it be easily workable from a C++ side?
 
Yields are used to turn 1 type of unit into another like.
That's a poor way to explain it :p

Each unit has a profession. Some are stuck at NO_PROFESSION (like ships or wild animals) while some can turn into citizens and work in buildings. As a general rule, any unit, which can join a city as population use professions while units, which can't become city population can't get professions.

However some professions are outside, like workers, scouts and so on. Professions are stored in the unit/professions xml and they can have a cost. Say a profession requires 50 tools, then the unit will consume 50 tools from the city on the same plot as the unit when changing into that profession. Changing to a new profession will move the tools back to the city and then it will take yields to match the new profession.

This mean most units has both a unit type and a profession type. The usefulness depends on the combo, like expert lumberjack unit provides a production bonus to lumberjack profession and veteran soldier unit gives combat bonus to combat professions. However if you want to (or have to due to an emergency), you can give soldier profession to your lumberjacks. They will not get a unit bonus, but they do get the standard abilities from the profession.

Another way to turn yields into units is to build them in the city. Instead of building buildings, you can build units. This is constructed units, which can't have professions, but unlike human units, they can have special abilities like moving on water. A constructed unit requires a certain amount of hammers and when this goal has been reached, the unit is build and the yield costs is removed from the city. Naturally if the yields aren't present, then the unit will not appear.

I think that pretty much covers how to turn yields into units.
 
What do you mean by can yields be used to purchase units?

Money is used on the trade screen to buy units.

Yields are used to turn 1 type of unit into another like.

Civilian + 50 Muskets = Musketman
Civilian + 50 Tools = Worker
Civilian + 50 Muskets + 50 Cloth = Guardsman

Etc. or whatever.

Ok. I got my Civs confused. Been flipping between Imperialism II, Civ4 and Civ4Col in the last few days...
 
Do you mean Imperialism II or Victoria 2? I love them both but from the Canned Food etc I'm thinking Victoria 2 :queen:

In Victoria 2, I love how each of the citizen types demands/consumes different goods, and these get automatically distributed through regional and global markets, with the resulting balance adjusting their prices realistically based on net supply vs demand while avoiding any micromanaging of shipping. Using the Medieval Conquest mod code base could be perfect for this, for its features of Domestic Economy consumption demand (and potentially the feature of distribution through regional Plotgroups).
 
Oh Orlanth showed up :D
Now I know at least one person with the knowledge of how to import bts graphics is around (unless he forgot how he did it :p)

Yeah I think the M:C engine should be quite good for a mod like this. It will not be a remake because there are plenty of differences. However it can capture the spirit and some concepts and make a completely new and interesting game.
 
Do you mean Imperialism II or Victoria 2? I love them both but from the Canned Food etc I'm thinking Victoria 2 :queen:

Imperialism II (with the First Imperialism thrown in at the end of Imp 2 period). I figured it would be simpler to implement.

In Victoria 2, I love how each of the citizen types demands/consumes different goods, and these get automatically distributed through regional and global markets, with the resulting balance adjusting their prices realistically supply and demand while avoiding any micromanaging of shipping.

This is referred to the POPs system on the Paradox forums.

Using the Medieval Conquest mod code base could be perfect for this, for its features of Domestic Economy consumption demand (and potentially the feature of distribution through regional Plotgroups).

Hell, if you or Nightenggale could code the POPs system (and the Crisis systems from Vic II), that would be amazing. However, I think that may be too much. In fact, it was a boatload for Paradox with a much larger team.

I am not a coder, but grunt work is my specialty. What I lack in skill, I make up for in time (as long as wifey is happy lol). WHEN I run into problems porting units from Civ4, could you help? Or, if you choose to assist in this, I can do other grunt work as needed.
 
Now I know at least one person with the knowledge of how to import bts graphics is around (unless he forgot how he did it :p)

It's not hard to do so IIRC. There is a (by now very old) tutorial teaching how to do that step-by-step. There are some (user-made) units which unfortunately don't work when being converted, but the huge majority does.
 
The POPs system is actually almost kind of available in Col. (M:C) (Obviously not exact, different scales and all)

Spoiler :

You should be able to make an 'upper' and 'lower' class thanks to the two foods system.
Food makes poor people and Luxury Food makes rich people.
Civics can change what a food type spawns.
So Poor food could spawn a Labourer 'lower class' under one law and a Artisan 'middle class' under another.
I think you can set an upgrade path to different units when they have education as well.

I don't know how this works in the code because I did not learn that far yet, but M:C currently has things like:
Page-->Squire-->Noble when they work in certain buildings like a Palace or school.
Recruit-->Cavalryman-->Commander (something like that it has been awhile)

So assuming that all this is true(Which I think it is) and code flexible(In xml Which I think it is) you could have the POPs system (almost) exactly. (I forget all the details of it but)

You could have something like this:
Food spawns Homeless.
Put to work Inside town becomes Labourer.
Put to work Outside town becomes Farmer.
Certain Civics could make them instantly spawn as one or the other.

Another Civic change and Food could spawn a 'Middle Class' Like this:
Food Spawns Unemployed.
Put to work makes Artisan. (These could perhaps then be educated to be Masters of various jobs like lower class things such as mining, farming, resource gathering. Maybe?)
Put to work in a Factory makes Craftsman (These could be made masters in factory jobs or manufacturing like Gunsmith, Clothmaker, etc.)

This would represent increased production (and then wealth) by cultivating an educated middle class, having craftsmen would make factories much more efficient.

You then have Clerks. (We have Law(WIP) and Fealty yields that increase efficiency)
Clergy (We have religion and technology research already)
I can't remember how these are created in the POPs system other than spending on the budget screen?

There are Soldiers and Officers? I can't remember how they are effected/created in V2.

(We have talked about the difference in Fealty and Law in M:C, I don't know where we got to with it, but at one point I think I suggested that law should affect production efficiency and fealty affect troop strength. (Currently all handled by Fealty I think.)
So in a new systems officers would produce fealty. I think it is called leadership in V2)

Then the Upper Class is made by Luxury Food and would be either Nobles or Capitalists depending perhaps on Civics. Nobles could be good at Fealty and Capiitalists good at Law.
(Or some other rules)

Civics can also be given a maintenance cost in M:C like X per turn gold, fealty, law, or (I think) any other yield (this may be limited to 'Virtual' Yields. The ones that you can't transport, like research, crosses and those already mentioned. You would need Night or Kailric to answer that)

So you would need certain productivity within those important areas (education, science, admin, etc.) to use the 'middle class' civics, etc.


A lot there so I put it in a spoiler to keep the place looking tidy!
 
Hell, if you or Nightenggale could code the POPs system (and the Crisis systems from Vic II), that would be amazing.

We have a feature in M:C already that sets this up to some extent to allow Units and Building to demand/consume goods. It isn't used at the moment however, but any "PoPs" system could use this as a basis perhaps.

I was left to do the XML coding for this feature but couldn't find a balance that I liked so have put that on hold.

Anyway, great to see a new modder about causing a stir on the forums. I have about three weeks of obligations I need to take care of but after that I plan on revisiting M:C.

I've never played any of the Imperialism games but from your description its set in the World Wars era. I would love to see a World War II mod for Civ4Col so I'm all for it. My first priority would be to work on M:C though once I do start.

Again, nice to meet you knuckledragger.
 
Top Bottom