JustRevolutions for 3.19

Tholish

Emperor
Joined
Jul 5, 2002
Messages
1,344
Location
Japan
I'm trying to isolate the Revolution_Mod from RevolutionDCM 2.1. Here's what I'm doing.

I have a compiling VC++2005 project that produces a standard Civ 3.19 DLL and it copies of it work to produce functional modified DLLs. I used it to make updated Civ Changer and Autoplay DLLs. I have the sources for RevDCM 2.51. I have WinMerge. I open standard and RevDCM versions of both files in WinMerge and transfer the Revolution segments of every file into the copy of the standard file. Then I Rebuild the now modified copy of the Civ 3.19 SDK. I build a mod around the dll from final release, merging the python and xml as well as I can from RevDCM 2.51 and see if it works.

So I did that, and it's not going to be simple. I carefully transferred all Revolultion_Mod blocks in all files (except I took the one block contained by CyCityInterface2 and put it at the end of CyCityInterface1 since the regular BtS 319 doesn't have it.)

This thing compiles up to CvGame.cpp, then can't find a whole bunch of functions and variables. I suppose these functions and variables are new to RevDCM and shared, thus not found inside either Revolution_Mod blocks or standard 3.19 files. Thus, to do this I would have to track down each of these and put it in:


Spoiler:
Spoiler :
1>CvGame.cpp(6463) : error C2065: 'pLoopArea' : undeclared identifier
1>CvGame.cpp(6463) : error C2227: left of '->getCitiesPerPlayer' must point to class/struct/union
1> type is ''unknown-type''
1>CvGame.cpp(6464) : error C2227: left of '->getNumCities' must point to class/struct/union
1> type is ''unknown-type''
1>CvGame.cpp(6464) : error C3861: 'pLoopArea': identifier not found, even with argument-dependent lookup
1>CvGame.cpp(6470) : error C3861: 'pLoopArea': identifier not found, even with argument-dependent lookup
1>CvGame.cpp(6478) : error C2065: 'eBestUnit' : undeclared identifier
1>CvGame.cpp(6479) : error C2679: binary '!=' : no operator found which takes a right-hand operand of type 'UnitTypes' (or there is no acceptable conversion)
1>CvGame.cpp(6479) : error C3861: 'eBestUnit': identifier not found, even with argument-dependent lookup
1>CvGame.cpp(6481) : error C3861: 'eBestUnit': identifier not found, even with argument-dependent lookup
1>CvGame.cpp(6497) : error C2065: 'pLoopUnit' : undeclared identifier
1>CvGame.cpp(6497) : error C2065: 'iLoop' : undeclared identifier
1>CvGame.cpp(6497) : error C3861: 'pLoopUnit': identifier not found, even with argument-dependent lookup
1>CvGame.cpp(6497) : error C3861: 'pLoopUnit': identifier not found, even with argument-dependent lookup
1>CvGame.cpp(6497) : error C3861: 'iLoop': identifier not found, even with argument-dependent lookup
1>CvGame.cpp(6499) : error C2227: left of '->isAnimal' must point to class/struct/union
1> type is ''unknown-type''
1>CvGame.cpp(6499) : error C3861: 'pLoopUnit': identifier not found, even with argument-dependent lookup
1>CvGame.cpp(6501) : error C2227: left of '->kill' must point to class/struct/union
1> type is ''unknown-type''
1>CvGame.cpp(6501) : error C3861: 'pLoopUnit': identifier not found, even with argument-dependent lookup
1>CvGame.cpp(6510) : error C2601: 'CvGame::createAnimals' : local function definitions are illegal
1>CvGame.cpp(6595) : error C2601: 'CvGame::updateWar' : local function definitions are illegal
1>CvGame.cpp(6628) : error C2601: 'CvGame::updateMoves' : local function definitions are illegal
1>CvGame.cpp(6686) : error C2601: 'CvGame::verifyCivics' : local function definitions are illegal
1>CvGame.cpp(6700) : error C2601: 'CvGame::updateTimers' : local function definitions are illegal
1>CvGame.cpp(6714) : error C2601: 'CvGame::updateTurnTimer' : local function definitions are illegal
1>CvGame.cpp(6744) : error C2601: 'CvGame::testAlive' : local function definitions are illegal
1>CvGame.cpp(6754) : error C2601: 'CvGame::testVictory' : local function definitions are illegal
1>CvGame.cpp(7064) : error C2601: 'CvGame::testVictory' : local function definitions are illegal
1>CvGame.cpp(7164) : error C2601: 'CvGame:rocessVote' : local function definitions are illegal
1>CvGame.cpp(7298) : error C2601: 'CvGame::getIndexAfterLastDeal' : local function definitions are illegal
1>CvGame.cpp(7304) : error C2601: 'CvGame::getNumDeals' : local function definitions are illegal
1>CvGame.cpp(7310) : error C2601: 'CvGame::getDeal' : local function definitions are illegal
1>CvGame.cpp(7316) : error C2601: 'CvGame::addDeal' : local function definitions are illegal
1>CvGame.cpp(7322) : error C2601: 'CvGame::deleteDeal' : local function definitions are illegal
1>CvGame.cpp(7328) : error C2601: 'CvGame::firstDeal' : local function definitions are illegal
1>CvGame.cpp(7334) : error C2601: 'CvGame::nextDeal' : local function definitions are illegal
1>CvGame.cpp(7340) : error C2601: 'CvGame::getMapRand' : local function definitions are illegal
1>CvGame.cpp(7346) : error C2601: 'CvGame::getMapRandNum' : local function definitions are illegal
1>CvGame.cpp(7352) : error C2601: 'CvGame::getSorenRand' : local function definitions are illegal
1>CvGame.cpp(7358) : error C2601: 'CvGame::getSorenRandNum' : local function definitions are illegal
1>CvGame.cpp(7364) : error C2601: 'CvGame::calculateSyncChecksum' : local function definitions are illegal
1>CvGame.cpp(7469) : error C2601: 'CvGame::calculateOptionsChecksum' : local function definitions are illegal
1>CvGame.cpp(7494) : error C2601: 'CvGame::addReplayMessage' : local function definitions are illegal
1>CvGame.cpp(7511) : error C2601: 'CvGame::clearReplayMessageMap' : local function definitions are illegal
1>CvGame.cpp(7524) : error C2601: 'CvGame::getReplayMessageTurn' : local function definitions are illegal
1>CvGame.cpp(7538) : error C2601: 'CvGame::getReplayMessageType' : local function definitions are illegal
1>CvGame.cpp(7552) : error C2601: 'CvGame::getReplayMessagePlotX' : local function definitions are illegal
1>CvGame.cpp(7566) : error C2601: 'CvGame::getReplayMessagePlotY' : local function definitions are illegal
1>CvGame.cpp(7580) : error C2601: 'CvGame::getReplayMessagePlayer' : local function definitions are illegal
1>CvGame.cpp(7594) : error C2601: 'CvGame::getReplayMessageText' : local function definitions are illegal
1>CvGame.cpp(7608) : error C2601: 'CvGame::getReplayMessageColor' : local function definitions are illegal
1>CvGame.cpp(7623) : error C2601: 'CvGame::getNumReplayMessages' : local function definitions are illegal
1>CvGame.cpp(7630) : error C2601: 'CvGame::read' : local function definitions are illegal
1>CvGame.cpp(7857) : error C2601: 'CvGame::write' : local function definitions are illegal
1>CvGame.cpp(8012) : error C2601: 'CvGame::writeReplay' : local function definitions are illegal
1>CvGame.cpp(8024) : error C2601: 'CvGame::saveReplay' : local function definitions are illegal
1>CvGame.cpp(8030) : error C2601: 'CvGame::showEndGameSequence' : local function definitions are illegal
1>CvGame.cpp(8123) : error C2601: 'CvGame::getReplayInfo' : local function definitions are illegal
1>CvGame.cpp(8128) : error C2601: 'CvGame::setReplayInfo' : local function definitions are illegal
1>CvGame.cpp(8134) : error C2601: 'CvGame::hasSkippedSaveChecksum' : local function definitions are illegal
1>CvGame.cpp(8147) : error C2601: 'CvGame::logMsg' : local function definitions are illegal
1>CvGame.cpp(8157) : error C2601: 'CvGame::addPlayer' : local function definitions are illegal
1>CvGame.cpp(8200) : error C2601: 'CvGame::isCompetingCorporation' : local function definitions are illegal
1>CvGame.cpp(8224) : error C2601: 'CvGame::getPlotExtraYield' : local function definitions are illegal
1>CvGame.cpp(8237) : error C2601: 'CvGame::setPlotExtraYield' : local function definitions are illegal
1>CvGame.cpp(8277) : error C2601: 'CvGame::removePlotExtraYield' : local function definitions are illegal
1>CvGame.cpp(8295) : error C2601: 'CvGame::getPlotExtraCost' : local function definitions are illegal
1>CvGame.cpp(8308) : error C2601: 'CvGame::changePlotExtraCost' : local function definitions are illegal
1>CvGame.cpp(8332) : error C2601: 'CvGame::removePlotExtraCost' : local function definitions are illegal
1>CvGame.cpp(8344) : error C2601: 'CvGame::getVoteSourceReligion' : local function definitions are illegal
1>CvGame.cpp(8357) : error C2601: 'CvGame::setVoteSourceReligion' : local function definitions are illegal
1>CvGame.cpp(8383) : error C2601: 'CvGame::getShrineBuildingCount' : local function definitions are illegal
1>CvGame.cpp(8396) : error C2601: 'CvGame::getShrineBuilding' : local function definitions are illegal
1>CvGame.cpp(8423) : error C2601: 'CvGame::changeShrineBuilding' : local function definitions are illegal
1>CvGame.cpp(8471) : error C2601: 'CvGame::culturalVictoryValid' : local function definitions are illegal
1>CvGame.cpp(8481) : error C2601: 'CvGame::culturalVictoryNumCultureCities' : local function definitions are illegal
1>CvGame.cpp(8486) : error C2601: 'CvGame::culturalVictoryCultureLevel' : local function definitions are illegal
1>CvGame.cpp(8496) : error C2601: 'CvGame::getCultureThreshold' : local function definitions are illegal
1>CvGame.cpp(8507) : error C2601: 'CvGame::doUpdateCacheOnTurn' : local function definitions are illegal
1>CvGame.cpp(8545) : error C2601: 'CvGame::getVoteSelection' : local function definitions are illegal
1>CvGame.cpp(8550) : error C2601: 'CvGame::addVoteSelection' : local function definitions are illegal
1>CvGame.cpp(8692) : error C2601: 'CvGame::deleteVoteSelection' : local function definitions are illegal
1>CvGame.cpp(8697) : error C2601: 'CvGame::getVoteTriggered' : local function definitions are illegal
1>CvGame.cpp(8702) : error C2601: 'CvGame::addVoteTriggered' : local function definitions are illegal
1>CvGame.cpp(8712) : error C2601: 'CvGame::addVoteTriggered' : local function definitions are illegal
1>CvGame.cpp(8746) : error C2601: 'CvGame::deleteVoteTriggered' : local function definitions are illegal
1>CvGame.cpp(8751) : error C2601: 'CvGame::doVoteResults' : local function definitions are illegal
1>CvGame.cpp(8973) : error C2601: 'CvGame::doVoteSelection' : local function definitions are illegal
1>CvGame.cpp(9076) : error C2601: 'CvGame::isEventActive' : local function definitions are illegal
1>CvGame.cpp(9089) : error C2601: 'CvGame::initEvents' : local function definitions are illegal
1>CvGame.cpp(9100) : error C2601: 'CvGame::isCivEverActive' : local function definitions are illegal
1>CvGame.cpp(9117) : error C2601: 'CvGame::isLeaderEverActive' : local function definitions are illegal
1>CvGame.cpp(9134) : error C2601: 'CvGame::isUnitEverActive' : local function definitions are illegal
1>CvGame.cpp(9150) : error C2601: 'CvGame::isBuildingEverActive' : local function definitions are illegal
1>CvGame.cpp(9166) : error C2601: 'CvGame:rocessBuilding' : local function definitions are illegal
1>CvGame.cpp(9177) : error C2601: 'CvGame:ythonIsBonusIgnoreLatitudes' : local function definitions are illegal



Guess what. Not gonna do it. Tried to just merge the 1.65 code in too but unsurprisingly that didn't work either, though for other reasons.


Any advice?
 
Im very limited in C++ but i have merged a few mods together to make my own custom one to play with. I think i can help a bit...

"Local function definations are illegal", i know this error and took a lot of my time:lol: If you have used winmerge it probably copied a } or { somewhere and caused all the code to mess up. Open both Vanilla and RevDCM CvGame.cpp and copy and paste code manually and carefully.

"Identifier not found", i have had that error. It may be caused by not copying the code inside CvGame.h or another file where that identifier is declared. Best to open all the files inside RevDCM sources and search all open files for that code to see where you missing it.

I was going to add Revolution to my custom mod that I play with but i read Revoultions is deeply intergrated with BetterAI, and BetterAI causes huge turn time duration on my computer :(
 
I found where winmerge lost a } (in the middle of a block?) and took it out and that file compiled, then went on and another one did the same, only different problem. It just couldn't find a variable. Problem wasn't in that one. Probably another block somewhere. I'll clearly have to do exactly what you say. Better yet, I may just go back to a much older version of Rev. Something old and small enough that I can hope to actually understand it all.
 
I found where winmerge lost a } (in the middle of a block?) and took it out and that file compiled, then went on and another one did the same, only different problem. It just couldn't find a variable. Problem wasn't in that one. Probably another block somewhere. I'll clearly have to do exactly what you say. Better yet, I may just go back to a much older version of Rev. Something old and small enough that I can hope to actually understand it all.

Im interested in a standalone 3.19 Revolution, so I have a suggestion. If it is possible to isolate Revolution from RevDCM without better AI, I'll merge half the source files and you do the other half? I think its too time consuming for one person to do all the files :lol:
 
I've merged all of them. I've also tried inserting the Revolution_Mod blocks from version 1.65 for 3.17, and that has issues.

EDIT:
Obviously the 165 version is going to be a mess. The 319 version might be sloppy too. But I carefully redid it all (will post later) and still had problems. Then I realized : Doh! You need Autoplay and ChangeCiv. They are integral to Revolutions. So I put those in, just 7 files to merge.

Now there are problems with GameTextMgr, looking for pPlotCity. This is found outside a modified block on line 3688 and at several other places and it looks like it is being declared there, but transferring the line alone doesn't work. Using the RevDCM version of GameTextMgr minus non Rev modifications gets a whole new laundry list.

Still trying.
 
I finally got something that compiles. Haven't put it with Python and XML to make a working mod. Didn't document my fixes either. Your makefile may vary if you have a different setup.

Had to include small parts of BetterBtsAI and add CyCityInterface2 to the Makefile. Also had to cut out a block marked Revolution Mod (Debug), to no yet visible ill effect. Also there was one conditional statement, in Player.cpp I believe, that couldn't find a pointer (pPlotCity I think) and I chose not to try to track down why. Instead I just cut out the condition and made the consequences happen regardless. It was something to do with AI behavior. I think new civs might declare war more easily or less easily, not sure which.

I was trying stuff. Anyway, here are the sources.

EDIT: attached sources removed--the are included in the mod, and here's a link.

http://forums.civfanatics.com/downloads.php?do=file&id=13239

ANOTHER EDIT: OK, this loads and doesn't crash, but doesn't work perfectly. I need to change some of the python files so the ini is found. And, after autoplaying through several games, I see that new civs are never created. I have to find where this is done and what's wrong with it and fix it. Unless someone happens to know.
 
Back
Top Bottom