Modmodding Q&A Thread

Likely your path in the definition is wrong and the graphics cannot be found.
 
Check the path to your graphics for errors.
 
Is there a way to get the civ slot of independent 1 and 2 in the DLL? Are they always the second and third to last civ slot, or do I need to call some function? I know Python has slot(iCiv) but does the DLL have anything like that?
 
No, I haven't needed it so far.
 
Hey Leoreth! I am a relatively new civfanatics member (but a long time lurker) who recently got into this mod and is absolutely loving it (specially since we can't do spawns for CIV V or VI apparently). I just wanted to ask how I could go about changing the resource limit for corporations (the fact that they can only use 12 resources I believe). I tried looking in the companies document but could not find this, only info on land limitations for companies and limits on the number of cities that can have one company. Any advice would be appreciated!
 
You can find the limit in CvCity.cpp. Search for
Code:
int CvCity::getCorporationCommerceByCorporation(CommerceTypes eIndex, CorporationTypes eCorporation) const

In this function, you'll see
Code:
std::min(12, iNumBonuses)
in on of the lines. Change the 12 to change the limit. You do have to recompile the DLL for it to work.
(For me this is line 11476. I'm using the latest git version. On older version this line can be different because lines of code have been added/removed)


This reminds me of an idea I had a while ago but forgot about. I think it would be useful to add an XML-tag (<iMaxConsumableResources> or something) to CorporationInfos.xml to set the limit for each corporation individually. This would give us more options to balance the max yield/commerce bonus from corporations. A corporation could have a small max amount of consumable resources, but the yield/commerce bonus per resource is high. Or the other way around with each resource providing a little yield/commerce, but you can consume a lot of them. Especially on the new map with the new resource types and more resources in general.
(The corporation pedia and corporation advisor could show this limit somewhere)

EDIT:
Made a PR with the suggested changes.
 
Last edited:
Are you trying to load a mod scenario from the base game?
 
Also, don't report your failed attempts at modding in the bug reports thread. This is the thread for modding questions where people are happy to give help. If something doesn't immediately go the way you want it, it does not become a support case. I have noticed you theatrically making multiple posts/threads with liberal use of exclamation marks in the past. Nothing of that makes it likelier for you to receive help and it spams the forum. In the future, pick one (appropriate) place to ask your question, and be patient. If you include actual information such as a full description of what you did, and what you expected to happen, it becomes more likely for people to actually be able to help you.

Moderator Action: Posts moved.
 
No. I actually yesterday when i click "Play a Scenario" button it just closed instantly. This same thing happening to base game as well as the mods like yours.
So how does your problem relate to this mod?
 
So how does your problem relate to this mod?

So, here's story of what happen yesterday, which i also write down on a CIV 4 tech support forum.
Yesterday i was busying tried to make a VD modcomp for Merjin All civs mod for RFC DOC, at first it all went fine and all but then at 7:00 PM after i load a mod and when i tried to click a "Play a Scenario" it just closed instantly. At first i was like... What? So start all over again and i had same result. At first i thought that this only occurred with a Mod itself, but then i realize that this is also the same situation when i tried to click "Play a scenario" it just close instantly. I really don't know what to do at this point.

Altough the problem is it's not because of your mod and possibly not because of another RFC DOC mod that created by Merjin i believe. I think it could be a game itself.
 
Well, yeah. That really sounds like it has nothing to do with this mod. Maybe you edited the base game files by accident? I would try a fresh install.

The point is. If it's not an issue with this mod do not raise it in this subforum, especially not in the bug reports thread. I take bug reports seriously, so this is actively wasting my time.

The fact that you were trying to do something with DoC when this happened is immaterial. If my Ford breaks down when going to Best Buy for a Playstation I do not call Sony support, and I do not call Best Buy customer service. I get a mechanic. And I'm not your mechanic.
 
Edit the scenario file, then load with world builder. Be aware that changing the map size requires redoing all settler, war, region and city name maps.
 
Hey everyone! I'm back with another question. FIrst of all, I was wondering where we could change the resources each corporation grants. I'm thinking of essentially adding some gold to each corporation to make it more worthwhile to control large amounts of resources, which should help the colonial empires and resource rich regions hopefully. Second, I have to say that because I haven't coded in a long time I'm kind of stuck on just how to alter the files to make this work. I tried doing it in notepad, and when this failed tried with a text editor, but the resource limit seems to remain stagnant. I would love any assistance from people more experienced with this mod. Thanks everyone!
 
Hey everyone! I'm back with another question. FIrst of all, I was wondering where we could change the resources each corporation grants. I'm thinking of essentially adding some gold to each corporation to make it more worthwhile to control large amounts of resources, which should help the colonial empires and resource rich regions hopefully. Second, I have to say that because I haven't coded in a long time I'm kind of stuck on just how to alter the files to make this work. I tried doing it in notepad, and when this failed tried with a text editor, but the resource limit seems to remain stagnant. I would love any assistance from people more experienced with this mod. Thanks everyone!
First of all for adding a bonus to having a corporation you have to edit the XML/GameInfo/Civ4CorporationInfo.xml it's pretty simple and obvious once you open the file.
And I use notepad to edit xml, c++, and python files.
P.S. To edit python files I recommend using python, I sometimes do myself.
 
Back
Top Bottom