Thunderbrd
C2C War Dog
Makes more sense on a tech than it usually would on a building I guess.
int CvPlayer::getPower() const
{
return std::max(0, ((m_iPower + m_iTechPower + m_iUnitPower) / 100));
}
int CvPlayer::getTechPower() const
{
return std::max(0, (m_iTechPower/100));
}
int CvPlayer::getUnitPower() const
{
return std::max(0, (m_iUnitPower/100));
}
I've been trying to find where this is exposed to the player in the Demographics and Graphs Screen, but I'm still clueless where this takes place.However, getPower AND getUnitPower appear in CyPlayerInterface1.cpp, and getPowerHistory appears in CyPlayerInterface2.cpp. Correct me if I'm wrong, but aren't the Cy files the ones that deal with the communication between the DLL and Python? If so, does this open the possibility of Python being the one handling these values?
These *.cpp files are c++ source code.
They are here, so modders can mod DLL files.
Also nice find
Wonder if its possible to mess around with life expancy.
I guess, that equation should be changed:Yeah I know about c++ files, I was referring to Cy prefixed files, which seem to be where we expose c++ functions from the DLL to .py files so they can use these functions.
About Life Expectancy, yeah we can mess with that. By checking where I found this stuff in python, Life Expectancy is measured like this:
/ (
+
) * 100
Spoiler :Byand
I mean the total value from all cities together
It is multiplied by 100 to become a 2 digit integer.
This is funny because this means a Life Expectancy of 100 is currently impossible, because there is no way to have 0. Also, it's truly impossible to achieve a Life Expectancy superior to 100, unless we have negative
Maybe this aspect could use some changes, if the mod goes well beyond RL current time
Have you been given modding privilege on the SVN yet?
I'd be OK with you changing the life expectancy formula however you see fit.
I am in complete agreement with everything you just said here.I don't think anyone is working on trade routes at the moment, it would be great if you looked into it. If you see anything that you feel is ineffective, plain stupid, or seemingly incompletly thought through; bring it up for discussion and we'll hammer out better souloutions together. By "we" I mean you, the C2C team, and anyone else that can contribute.
Have you been given modding privilege on the SVN yet?
I'd be OK with you changing the life expectancy formula however you see fit.
I think I did. Didn't you send me your sourceforge username for that purpose? PM it to me again and I'll confirm.I remember TBrd saying something about this, but I don't remember if modding privilege was given to me. About the formula, if someone has anything in mind like raxo2222 did a while ago, please post here so we can discuss (or open another thread if it seems needed). I'll take a look into it later today or tomorrow, so if everything goes well, tomorrow we may have a better formula for Life Expectancy already working in the latest SVN.
Things have been going very slowly at points on this building costing project since I've lost a lot of time to mod and have been needing to spend more time on some other things so as to help find a better sense of emotional balance (I'm never giving up, just have needed a break here and there as this is one exhausting journey!) So I'm sure you'll be able to stay ahead of me... but even if you didn't, I could give you a different frontier to work on and I can always include your step in this documentation assembly line as I go if needbe. So no stress man. As I've always said, I just appreciate what help you provide when you can provide it.@TB
FYI, I'll be leaving for a 2 week vacation soon so I won't have time to start working on any more buildings until I'm back
I have some ideas coming together too for resource access locally vs across trade routes and national trade agreements that both simplify and deepen things so as to answer to some game balance problems but those thoughts are still percolating. It would certainly be something to work it the picture if we are spending some time re-evaluating some trade mechanism details.
I don't remember, but my svn username is spirictum with no capital letters at allI think I did. Didn't you send me your sourceforge username for that purpose? PM it to me again and I'll confirm.
Go ahead. Let's expand this discussion then. I tend to agree with you on your assessment of optimal is costly and perhaps not even the best method. I've always wanted to give the player access to hard changing the route assignment as well, especially with the Outbreaks and Afflictions in play so they can strategically avoid infected cities.May I open a thread for that? I wish we can think this more in reimagining then simply recalibration of the process. Right now we have a system that allocates the best Trade Routes to the best cities, making it an almost perfect algorithm for maxing the total output of Trade Routes. Not only this seems unreal for much of the timeline of the mod's gameplay, but also incurs in a deep nest of loops, which means a lot of time consumed just to evaluate the best trade routes possible.
Are you sure they are their own rogues stationed in the city? If you can be sure in the way you're looking, like through WB or something, then yeah, the problem is those rogues don't have rogue AI types. Somehow rogues were allowed to qualify for filling another role entirely, possibly city defense. I've not seen an example of this taking place ever but I suppose it could and if it were not uncommon for some reason, then it could account for some other meltdown situations we've seen.
Yes, I used World Builder, as long as that is accurate, then the rogues in the city were friendly rogues, not enemy or barbarian. They all said they were owned by Arabia and the city was too.
Ah.. yeah that's definitely a sign of a severe problem in the AI somewhere.
The first thing to do would be to setup visual studio for compiling a DLL. It's getting to be so long ago that I did this that I can hardly guide anyone through the process.So, I'd like to help with this mod. I've done C++ and other programming. I found a bug related to the AI and the criminal units, and I was wondering where to start. I found the "CvTeamAI" .cpp and .h files that seem to do with AI calculations, but I'm not sure how or when these files get compiled to be used by the game.
There are numerous problem spots. I'll let others bring up what they can see that might work for an introduction first. My focus is on harder areas but maybe DH has some mop up projects he could use your help with?I'd like to help with the Mod. I've been playing C2C for years now and I've finally got some time on my hand to work on it. I've done both Python and C++ (though mainly Python) for my degree, but i could also help with more general stuff (XML, balancing tests, whatever is needed really except for graphics). Is there some kind of general TODO list or could someone maybe point me to a smallish thing that needs to be done to get some feel for this?
If the others do not have a specific thing to do for me, I'd like to start on some rebalancing for both pollutions, if that is ok with you all. Right now some values dont make sense to me (i.e. a bonfire giving the same as a factory) and id like to shift the focus of the earlier pollution a bit more towards water since historically notable river pollution came ages before notable air pollution effects. (Part of that would be also buffing the anti-water pollution buildings since we have actually become quite good at managing that by now). As a stretch goal maybe some positive effects for high negative values of pollutions?