Mod Component Requests Thread

Would it be possible to split bonus tiles in to 3 types:
1) Mineral: Iron, Gold, Gems, Coal, Aluminium, Uranium etc.
2) Vegetable: Wheat, Sugar, Incense etc.
3) Animal: Elephants, Horses, Sheep etc.

The idea would be to enable organic resources to be 'planted' on or 'introduced' to an appropriate terrain type once a civilisation had access to:
A) that bonus resource
B) 'Agriculture' or 'Animal Husbandry' respectively

Perhaps organic resources could also be:
- piliaged for a 1 time bonus to food/production
- razed to hurt oponents (re: Buffalo Bill & the american indians)
- spontaneously generated (based on proximity to a 'parent' bonus resource)
 
Would it be possible to split bonus tiles in to 3 types:
1) Mineral: Iron, Gold, Gems, Coal, Aluminium, Uranium etc.
2) Vegetable: Wheat, Sugar, Incense etc.
3) Animal: Elephants, Horses, Sheep etc.

The idea would be to enable organic resources to be 'planted' on or 'introduced' to an appropriate terrain type once a civilisation had access to:
A) that bonus resource
B) 'Agriculture' or 'Animal Husbandry' respectively

Perhaps organic resources could also be:
- piliaged for a 1 time bonus to food/production
- razed to hurt oponents (re: Buffalo Bill & the american indians)
- spontaneously generated (based on proximity to a 'parent' bonus resource)

Yes, this is possible.
 
Can anyone help me? Im sure you must be able to make it so that borders will be only on land in the minmap. It also makes the map look much more realistic like real maps
 
If you want it so badly, play Civ V. :joke: I believe someone already said it was impossible.
 
Is it possible for someone to code/script the following in Python or DLL:

For Rhyes and Fall, I am trying to code the vassalization system so that if a certain civilization become vassals of a certain civilization, then the following happens:

-That vassals shares 50% of its wealth (before researching) with the master.
-The vassal is forced to give all of its strategic and luxury resources to its master.

I would only like this to be applicable in the case of certain colonial civilizations like Canada (to Britain).

So is there anyway to make a conditional in Python which forces Canada to comply with the two statements above? And my second question is, is it possible to spawn a civilization as a vassal of another civilization?
 
1) You can do the 50% thingy via python.

2) Hmmmm.... I'll take a look at this

3) Yes, you would spawn the civ and then immediately force vassalize it via python.
 
Linkman,

What in your opinion would be a better way of adding colonies. By adding a new vassal type or scripting it via python? Which one is better worth the effort?

Just take into context that I plan on proposing this to be used for Latin American Colonies and the British Colonies from the 1700-onwards like Brazil, Australia, Mexico etc
 
I was just reading the code. Well in the DLL we have this: void CvDeal::doTurn()

That is called every turn so you can definitely add it there.

The "neater" option, I suppose, would be to add a new type of vassal- so vassals can have an attribute isAColony or something like that. Now in CvDeal.cpp, we have CvDeal::addTrades, which, well, adds trades. So in there we'd perform a check: Is the civ a colony? And if it is, set the vassal civ has having a trade to transfer the gold/ resources.

We also have CvTeam::canVassalRevolt, which checks if a vassal state can break free. So we can set it 'true' if certain conditions are met, whatever those conditions are that Leoreth/I may come up for our respective mods.

Lastly, in CvTeam::freeVassal (called when a vassal is freed) we'd have to change it so that colonies stop paying tribute and are set to war with the mother country.

The only hard part is AI coding.

In my opinion the DLL provides a cleaner solution than python, but is also more time consuming, but ultimately provides more functionality and prevents certain problems in the future (suppose in the future we need to check if a vassal is also a colony in the DLL... it's easier if we set it up now).

I'm going to send this to Leoreth as well.
 
The "neater" option, I suppose, would be to add a new type of vassal- so vassals can have an attribute isAColony or something like that. Now in CvDeal.cpp, we have CvDeal::addTrades, which, well, adds trades. So in there we'd perform a check: Is the civ a colony? And if it is, set the vassal civ has having a trade to transfer the gold/ resources.
Would we have to mod diplomacy or any of the other core game mechanics if we want to have this? Or is this just a "variable" to be distinguished in the DLL code.
The only hard part is AI coding.
By this do you mean how to teach it to declare independence; well we could always script that?
In my opinion the DLL provides a cleaner solution than python, but is also more time consuming, but ultimately provides more functionality and prevents certain problems in the future (suppose in the future we need to check if a vassal is also a colony in the DLL... it's easier if we set it up now).
How much time would it take for an experienced modder?

I'm going to send this to Leoreth as well.
That would be great :thumbsup: and thnx for helping.
 
I don't have the time to actually do something for you (and as every modder says, finding your way through this on your own is much more rewarding :D), but of course we can give you some pointers.
Would it be possible to split bonus tiles in to 3 types:
1) Mineral: Iron, Gold, Gems, Coal, Aluminium, Uranium etc.
2) Vegetable: Wheat, Sugar, Incense etc.
3) Animal: Elephants, Horses, Sheep etc.
Do you want this distinction to be relevant for anything else but for the new mechanic you describe below? Because then I'd say it's easier that the game doesn't "know" the difference, and you only tell it to your players.

The idea would be to enable organic resources to be 'planted' on or 'introduced' to an appropriate terrain type once a civilisation had access to:
A) that bonus resource
B) 'Agriculture' or 'Animal Husbandry' respectively
So you want a new worker option that creates resources? Since without modifying the display, all possible worker actions are made up of improvements, I suggest adding a dummy improvement for every resource you want to creatable (say, if you want your workers to be able to plant wheat, create IMPROVEMENT_WHEAT, for example). This improvement doesn't need to do anything, and doesn't need graphics, although I guess a button that resembles the resource it creates would make sense.

Then you can use Python's onImprovementBuilt (or similar, not completely sure) method to do the following:
- remove the dummy improvement from the plot
- place the associated bonus on the plot

Perhaps organic resources could also be:
- piliaged for a 1 time bonus to food/production
- razed to hurt oponents (re: Buffalo Bill & the american indians)
- spontaneously generated (based on proximity to a 'parent' bonus resource)
1 or 2 are a little complicated as I realize now, because the pillage button becomes only available when there's an improvement on the plot, but not for resources. Either you go to the lengths of creating a Python action button for this (might be too complicated for beginners), or leave the invisible dummy improvements in place so they can be "pillaged" (with clever text choices you might be able to make it look as if it's the resource that's targeted). Then you can handle the removal of the resource and other effects (like extra food) in the onImprovementPillaged method in Python.

It's a little easier if it's only intended for workers, because then you could go via dummy improvements again, for example HARVEST_ALL_CEREALS can be built on wheat, rice, corn and you handle the removal of these resources and the food bonus in onImprovementBuilt again.

The implementation of 3 in Python depends on how you want it to work exactly. For example, if you want to have a chance of 10% per turn that a random resource on the map "spreads" you could use the "onBeginGameTurn" method.
 
Hey, just a quick question:

Has anyone done anything interesting in regard to modifying corporations to make them a bit more interesting in the game.

Eg

Corporations with their own special buildings (sushi bars)
Corporations that require or are tied to a specific religion (Holy Water Inc)
Civ specific corporations (Champaign SA France)
A wonder that gives you a corporation (East India Company)
A corporation that gives you something you can trade (The Distillers Company -whiskey)
A corporation that spreads your culture (MacDonald’s)
A corporation who's executives removes other corporations
Corporations that that when present together increase there effect.
A corporation that is generated by a quest.
Unfriendly take over. Bombard the corporate HQ of an enemy with your execs. and wrest control of the corporation to one of your cities.
Corporate espionage. Use spies to, I dunno, assassinate enemy CEO's raising maintenance costs.

You know, that sort of stuff.

I love the idea of corporations, but I think the element of corporations could be made a little more dynamic. I have searched the site, but have found nothing.

Any help would be greatly appreciated! :)
 
Corporations with their own special buildings (sushi bars)
A wonder that gives you a corporation (East India Company)
A corporation that gives you something you can trade (The Distillers Company -whiskey)
These are easily possible using only XML (not sure about corporation from events).

Would be good if you're a little more precise on what you want to do for the others.
 
I know thatmost of these have been done and/or possible.
The HQ's are wonders, you just have to change the cost from negative one to desired production cost.
I know that there are wonders that give you resources, and a lot of corporations in the VIP mod by vincentz.
 
Well, I don't really want to make them, I'm far too nooby for that. ;)
I just wanted to know if there are mods that expand on the concept of corporations, and if there are, if someone could provide me with a link or two, because I can't seem to find them.
 
This is the VIP mod. Tell vincentz I sent you.
 
Do you have any experience with programming, especially in an object oriented manner? I knew some java, and since I have no patience for user manuals (I believe some people call them "tutorials") I dove right in and did my best. Occasionally I'd google a question, and I was always peppering Leoreth with questions. Only later did I start reading guides, after I understood some level of python. It's rather inefficient, impractical method, but I recommend it wholeheartedly :D. Well ok I regret wasting Leoreth's (and a few other people's) time. Provided you have some programming down, of course, and someone to bother with questions, you can take this route though. I'll take the latter role if you so desire. The good thing about this strategy is that you can start doing stuff immediately.

Otherwise, you have the standard route. Look up this online book: How to Think Like A Computer Scientist for Python. Great material. Once you've finished that, check modiki and the guides section of this forum and of apolyton for some nice stuff.

When you're ready to move on to SDK programming, look up that book above but type "in c ++" instead of "in python."
 
Back
Top Bottom