But even still, it's pretty much an abandoned project because I stopped playing Marathon and epic speed once I figured out the game is really designed for Normal speed and that's much more fun in my opinion anyway.
The problem is that these extra changes that are in MA cannot be done on-the-fly. I'm just making an educated guess here, but when you play the MA mod you must play at that new speed. If you play at a vanilla speed things will be skewed. There's no way to fix that short of playing a different mod.
For PIG, you could copy the entire PIG mod folder to a new folder inside the Mods folder and then copy the few things from MA that are missing (CIV4TechInfos.xml, CIV4BuildInfos.xml?, CIV4HurryInfos.xml?). Check the MA files against those in PIG to see what's missing. WinMerge will really help with that.
Okay, PieceofMind, I finished the tweak for cities settled on Forests and Jungles and it is working perfectly. It involves editing 3 files, CvCity.cpp, CvPlot cpp/h.
Here's the code:
Spoiler:
In
Code:
void CvCity::init(...)
...
CyArgsList argsList;
argsList.add(iX);
argsList.add(iY);
long lResult=0;
gDLL->getPythonIFace()->callFunction(PYGameModule, "citiesDestroyFeatures", argsList.makeFunctionArgs(), &lResult);
if (lResult == 1)
{
if (pPlot->getFeatureType() != NO_FEATURE)
{
pPlot->setFeatureType(NO_FEATURE);
}
}
Okay, now to make the variable do something. In CvPlot::doTurn() add this to the end
Code:
if (getExtraYieldTurns() > 0)
setExtraYieldTurns(getExtraYieldTurns() - 1);
else if (getExtraYieldTurns() < 0)
setExtraYieldTurns(getExtraYieldTurns() + 1);
And finally, in CvPlot::calculateYield(...), add the code to make it give extra yields:
Code:
CvPlot::calculateYield(...)
...
if (ePlayer != NO_PLAYER)
{
...
if ((getExtraYieldTurns() > 0 ) && (eYield == YIELD_PRODUCTION))
iYield++;
else if ((getExtraYieldTurns() < 0) && (eYield == YIELD_FOOD))
iYield++;
...
Now a brief explanation of what this code is actually doing. When you settle a city, it checks to see if there is a feature on the tile. If there is, it checks to see if it is a Forest or Jungle. If it is a forest, it calculate the hammers the player would have received if they had simply chopped the forest; same with the jungle. If it is a forest, it changes the plot's ExtraYieldTurns to the number of production it would have recieved, and each turn the tile counts down until it reaches zero; then the tile loses its extra . If It is a jungle, it sets the turn counter backwards, with a negative value, and if counts up to zero. This is just a trick to use one integer for two seperate events, so when the counter is negative, the tile gets an extra instead of .
Since this affects the read/write functions, this will break saves.
If you ever remove the FEATURE_FOREST or FEATURE_JUNGLE from your game, bad things will happen. However, I doubt you would, so I didn't check against that. If it bothers you, a simple != -1 check would prevent anything bad from happening if you did.
One last notable thing. If the city is razed before the counter reaches 0, the tile will still keep counting down, and the extra yield will still be there. I figured that the chances of this was remote, and that the effect of still counting down wasn't worth protecting against. If the player loses the city, I think the extra yield on that plot expiring is the least of their worries.
I think you are safe in assuming I won't be removing the forest or jungle feature in this mod.
I like the sound of the change and will definitely try it out. The only thing is, I don't want jungle providing extra . I think this is what you've done? When you clear a jungle in PIG Mod you don't get food but rather 1/3 of the hammers of chopping a forest.
Also, is there a visible counter to the player? I haven't read over the code precisely yet. If not, I'd wait til I play test it anyway before putting more work into it.
I've been playing with PIG mod and wanted to try out the Marathon Accelerated speed. The problem comes once I've built everything I possibly can with the current techs that I have. I always end up with absolutely nothing left to build unless I want to tank my economy by building a bunch of military units. To counter this I've been building military units and simply deleting them, which helps to keep my economy in check, but at the same time, is rather tedious and makes the game boring.
I recently read the description of the Marathon Accelerated stand-alone mod and the description says that mysticism should allow building research now instead of needing alphabet, however I just tried this out and with PIG Mod installed, at least, this is not true.
In addition to that, chopping/whipping is extremely overpowered while playing Marathon Accelerated. I think one population is worth around 120 hammer sand chopping a forest is worth 80 hammers (120 with mathematics), which is enough to build 3 or 4 military units in one turn.
Because of this, even if I have Bronze Working, I typically leave my workers sitting around idle because I don't want them to waste hammers by chopping forests when I have nothing worthwhile to build.
Not sure if this thread is the right place for these complaints, or if I should bring these over to the Marathon Accelerated thread, but since it's happening with PIG mod using the MA speed, I figured here would be the proper place. I guess I should try installing MA by itself and see how things go with just that to see whether PIG is the problem or if MA is just not implemented properly with the research building.
Aaroc, EF's comment below is spot on. The problem is that changing some features of the game only when a certain gamespeed is selected is difficult (I'm not even sure if it's possible actually). I did warn that the two new gamespeeds are not likely to be balanced yet.
Do you think it would be better if I simply removed the MA speed for now? I am fully aware of the problem of running out of things to build. If you really want to play the MA speed I would recommend merging in all of the assets of the MA mod, as EF also suggested. I forget if MA mod has a DLL but if it does, don't merge that in.
If you're lucky, you might even be able to merge in the MA mod assets without breaking your savegame compatibility so you can continue your game.
Good luck!
For the 1.0 release of PIG I am most probably going to remove the MA speed unless something can be done about the running out of things to build problem.
The problem is that these extra changes that are in MA cannot be done on-the-fly. I'm just making an educated guess here, but when you play the MA mod you must play at that new speed. If you play at a vanilla speed things will be skewed. There's no way to fix that short of playing a different mod.
For PIG, you could copy the entire PIG mod folder to a new folder inside the Mods folder and then copy the few things from MA that are missing (CIV4TechInfos.xml, CIV4BuildInfos.xml?, CIV4HurryInfos.xml?). Check the MA files against those in PIG to see what's missing. WinMerge will really help with that.
I think you are safe in assuming I won't be removing the forest or jungle feature in this mod.
I like the sound of the change and will definitely try it out. The only thing is, I don't want jungle providing extra . I think this is what you've done? When you clear a jungle in PIG Mod you don't get food but rather 1/3 of the hammers of chopping a forest.
For Jungles to give an extra hammer as well, just change the negative sign in the CvCity code I posted to a positive.
It's not displayed to the player (well it does show the extra yield on the map, but that's not what you mean); I though about adding it to the hover text for the settler button. Where would you like it?
Hmm, ideally it should be in the text for settling the city and also for the city hover text once the city is built. If people see their awesome city tile yield and then it disappears after perhaps 90 turns (e.g. on marathon, I forget how much a forest is worth) they might wonder why.
I just had a thought too. Should this require Bronze Working first? And for the jungle bonus, Iron Working? All you'd need to do is have a check in the code to prevent giving the yield if it can't actually be chopped yet with current technology.
Hmm, ideally it should be in the text for settling the city and also for the city hover text once the city is built. If people see their awesome city tile yield and then it disappears after perhaps 90 turns (e.g. on marathon, I forget how much a forest is worth) they might wonder why.
I just had a thought too. Should this require Bronze Working first? And for the jungle bonus, Iron Working? All you'd need to do is have a check in the code to prevent giving the yield if it can't actually be chopped yet with current technology.
BTW, you should be able to avoid any specific mention of Forest or Jungle in your code. CvBuildInfo has functions to tell a) if it clears the feature and b) what it yields. You may have to do some trickery to scan for a build that doesn't have an improvement but does clear features. That would also allow you to make your message generic ("%s1" instead of "Forest").
Look for "Pre-Chop" in BULL to see how I use those functions to make the feature work with PIG if it ever gets included in it without PoM needing to do anything. In fact, I modified my personal CIV4BuildInfos.xml to give yields from Jungles a la PIG, and it works great.
As for the implementation, I suspect you assigned the bonus yield to the CvPlot, right? If you attach it instead to CvCity, you solve the problem of the magical +1 on city ruins. It also would require less space in the saved games as there will be far fewer CvCity objects than CvPlots.
Oooh, that gives me an idea for BULL. When you hover over an action that will clear a Forest/Jungle, it should show you the cities that will lose or .
BTW, you should be able to avoid any specific mention of Forest or Jungle in your code. CvBuildInfo has functions to tell a) if it clears the feature and b) what it yields. You may have to do some trickery to scan for a build that doesn't have an improvement but does clear features. That would also allow you to make your message generic ("%s1" instead of "Forest").
Look for "Pre-Chop" in BULL to see how I use those functions to make the feature work with PIG if it ever gets included in it without PoM needing to do anything. In fact, I modified my personal CIV4BuildInfos.xml to give yields from Jungles a la PIG, and it works great.
As for the implementation, I suspect you assigned the bonus yield to the CvPlot, right? If you attach it instead to CvCity, you solve the problem of the magical +1 on city ruins. It also would require less space in the saved games as there will be far fewer CvCity objects than CvPlots.
No, I'm pretty sure that and affects from features are unaffected by cultural borders, just as you found with the from Forest Preserves.
What I mean is that when you place a Worker onto a Forest tile and hover over the Clear Forest action button, it would tell you which cities will suffer -1 from the loss of the Forest. Same for clearing Jungles and for building improvements that clear features.
This check only needs to happen when you settle or hover over the settle button, right? Also you should be able to use the feature present on the tile instead of looping over all features. But yes, you do need to loop over all of the build types. This list is small (20 or 30?). You can omit the check for route type since you only care that a) it doesn't build an improvement, b) it removes the feature on the tile, and c) it gives you . You can stop looping when you find the first non-zero value.
Code:
feature = plot.feature
for every build type
if it has no improvement
if it removes this plot's feature and gives production
found it, break!
Do you think it would be better if I simply removed the MA speed for now? I am fully aware of the problem of running out of things to build. If you really want to play the MA speed I would recommend merging in all of the assets of the MA mod, as EF also suggested. I forget if MA mod has a DLL but if it does, don't merge that in.
But yes, removing it from PIG is probably the best option.
On a different note, I really hope this idea about getting "free" extra hammer (no worker required) yield from settling on Forest and Jungles will be a optional mod and not on by default because I highly disagree something like this is 1. necessary and 2. beneficial to game play and 3. very likely to confuse non-PIG players that get talked into trying to mod. Lets try to stay away from changes that can make a big game play difference and that are not readily visible by reading the Unit/Building/Technology descriptions or otherwise easy to spot with the UI.
If you really want the yield that comes from the forest tile, chop it first or don't settle on it. This sounds like having the cake and eating it too.
MA consists of three XML files. I copied the PIG Mod to a new folder, PIG MA, copied the three XML files from MA to the new folder in the same place they were from the MA folder and all is well. Or at least nothing's breaking for now and I've gotten up to about 200 AD. Still storming Asia with Immortals though... seems a bit late to be doing so.
ETA: It might be a good idea to remove MA from the base PIG Mod, though. It's easy enough to enable MA by making a new folder and copying the files over as I did.
But yes, removing it from PIG is probably the best option.
On a different note, I really hope this idea about getting "free" extra hammer (no worker required) yield from settling on Forest and Jungles will be a optional mod and not on by default because I highly disagree something like this is 1. necessary and 2. beneficial to game play and 3. very likely to confuse non-PIG players that get talked into trying to mod. Lets try to stay away from changes that can make a big game play difference and that are not readily visible by reading the Unit/Building/Technology descriptions or otherwise easy to spot with the UI.
If you really want the yield that comes from the forest tile, chop it first or don't settle on it. This sounds like having the cake and eating it too.
It should be pretty easy to make it a game option actually. I still want to see it in use before making a final call on it. I am thinking changes like this one and perhaps some others will go in development releases and be tested for a little while before being accepted because they are of a more unnecessary nature.
Naturally EF and Afforess add things to mods. Here with PIG it's kinda more a case of keeping things out.
I think you had point 3. backwards by the way.
@Aaroc, the mod was given the name Marathon Accelerated presumably because the number of turns in the game is similar to marathon but the speed at which you can train units and make buildings is increased.
It is of course going to skew the game in many ways that are hard for me to tell you about without slogging through a long marathon game myself (something I don't usually like to do - Epic is already slow enough).
I haven't tried that mod, but I just read the description and see that the science rate was nearly halved. Marathon normally has beaker costs 300% of Normal's 100% (3 times the cost), whereas MA sets this to 560% (5.6 times).
The BULL issue with MP is being worked on I guess. I'm gonna trust EF or another BUG dev will find the cause there - otherwise removing BULL might be necessary and I don't want to have to do that. No pressure, EF!
BULL introduces the OOS error with attacking/unloading units. There is a drastic solution that supposedly works (removing the Safe Move feature) which I will probably just commit this weekend to be done with it. I still need someone to do some network multiplayer testing.
PoM/EF, I am confused in regards to the multiplayer OOS problem when unloading a bunch of units from ships.
The quotes lead me to believe that BULL was causing the problem but as far as I know BULL is not incorporated in PIG at this moment so what's actually the root cause and how can we fix it for the next release?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.