The Modding Q&A Thread

Baldyr can you go on gmail chat now by any chance?
I'm there now, but I won't be up for long, I'm afraid. :p

Also how do I get a civ to be a vassal of another civ from the civs spawn? I thought it was in the World Builder file, but I can't find any reference to it :(
That would involve programming. If you're gonna do it in Python you use the CyTeam.setVassal() method - its included in the API.
 
Can someone please upload the python folder from vanilla BtS? I've accidentally overwritten it with the one from RFC and i can't find my disc to reinstall it anymore. So now i can't play any other mod properly:(
 
Can someone please upload the python folder from vanilla BtS? I've accidentally overwritten it with the one from RFC and i can't find my disc to reinstall it anymore. So now i can't play any other mod properly:(

Here (and 10 chars as well).
 

Attachments

Is stability python only or also SDK?

also, I am trying to merge the BonusCommerceModifier mod (available here: http://forums.civfanatics.com/showthread.php?t=336730&highlight=BCM+mod&page=2) with a stock SDK from Asaf's tutorial and I am getting this:

Spoiler :
1>c:\Documents and Settings\user\Desktop\CvGameCoreDLL\CvGame.h(513) : error C2143: syntax error : missing ';' before '*'
1>c:\Documents and Settings\user\Desktop\CvGameCoreDLL\CvGame.h(513) : error C2071: 'CvGame::CvArtInfoBuilding' : illegal storage class
1>c:\Documents and Settings\user\Desktop\CvGameCoreDLL\CvGame.h(513) : error C2501: 'CvGame::getBuildingArtInfo' : missing storage-class or type specifiers
1>c:\Documents and Settings\user\Desktop\CvGameCoreDLL\CvGame.h(513) : warning C4183: 'getBuildingArtInfo': missing return type; assumed to be a member function returning 'int'
1>NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual C++ Toolkit 2003\bin\cl.exe"' : return code '0x2'
1>Stop.
1>Project : error PRJ0019: A tool returned an error code from "Performing Makefile project actions"
1>Build log was saved at "file://c:\Documents and Settings\user\Desktop\CvGameCoreDLL\Release\BuildLog.htm"
1>CvGameCoreDLL - 5 error(s), 1 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


the only files in the BCM source are CvCity.h, CvCity.cpp, CvCityAI.cpp, CvGameTextManager.cpp, CvInfos.h and CvInfos.cpp

the CvGame.h file in the error message compiles just fine with the regular files.
 
Stability seems to be a straight Python implementation.
 
Is stability python only or also SDK?

It's python only, though the DLL contains functions that display stability information in leaderboard tooltip (info is obtained through python interface, i.e. CvScreenInterface.py).

also, I am trying to merge the BonusCommerceModifier mod (available here: http://forums.civfanatics.com/showthread.php?t=336730&highlight=BCM+mod&page=2) with a stock SDK from Asaf's tutorial and I am getting this:

Looks like some typo, i.e. check the first error for a missing semi-colon. BCM is included in SoI and there was no problems with it.
 
I'm compiling a dll for a rhye's modmod.

I started with rhye's files, added my own CvRyhes.cpp and CvRhyes.h.

compiled many times and got rid of many bugs to do with working with my civs and map, nothing deleted, just commented out, no problems

I am now getting a different kind of error as follows:

Code:
CvCity.obj : error LNK2019: unresolved external symbol "public: int __thiscall CvHandicapInfo::getDistanceMaintenancePercentByID(enum PlayerTypes)const " (?getDistanceMaintenancePercentByID@CvHandicapInfo@@QBEHW4PlayerTypes@@@Z) referenced in function "public: int __thiscall CvCity::calculateDistanceMaintenanceTimes100(void)const " (?calculateDistanceMaintenanceTimes100@CvCity@@QBEHXZ)

anyone know where that info needs to be?

EDIT: managed to get rid of many errors but not this:

Code:
CvCityAI.obj : error LNK2001: unresolved external symbol "public: virtual enum BuildingTypes __thiscall CvCityAI::AI_bestBuilding(int,int,bool,enum AdvisorTypes)" (?AI_bestBuilding@CvCityAI@@UAE?AW4BuildingTypes@@HH_NW4AdvisorTypes@@@Z)

I found the reference in CvCity.h but its not part of Rhye's changes

and this:

Code:
CvDLLButtonPopup.obj : error LNK2019: unresolved external symbol "public: void __thiscall CvGameTextMgr::setTimeStr(class CvWString &,int,bool)" (?setTimeStr@CvGameTextMgr@@QAEXAAVCvWString@@H_N@Z) referenced in function "private: bool __thiscall CvDLLButtonPopup::launchLaunchPopup(class CvPopup *,class CvPopupInfo &)" (?launchLaunchPopup@CvDLLButtonPopup@@AAE_NPAVCvPopup@@AAVCvPopupInfo@@@Z)

occurs a few times but again doesn't seem to be part of Rhye's changes.
 
You download the multiplayer version of the mod?

Because unless you're a professional programmer you won't be able to shape the regular RFC version into a multiplayer version of your own.
 
I just want to set it up so there can be more than one human civ at a time. That's the only problem I was aware of for making RFC multiplayer. What other ones are there for a hotseat game?
 
I have my Rhye's and Fall of the Classical World running and the auto-play for the later civs works but it also says "You have been defeated" at the bottom of the screen. This doesn't end the game, you can play on once the auto-play finishes and you get the right units in the right place at the right time. In python I am running stability, rise and fall, barbs and plague but not victory, unique powers, religions or congresses. There are no python exceptions up until the point where "You have been defeated" appears. Can anyone give me a clue where to look for the problem?
 
Yeah, you read the actual exception. That'll give you a clue. Care to share it with us?

Most likely you messed something up when you disabled all those mod concepts.
 
Sorry I realize I communicated that really badly.

the "You have been defeated" shows up before the python exceptions, ie its on the screen from the instant it comes up whereas the python exceptions do not happen until turns later. there are bugs in "onCityAcquired" and some references to techs, units, civs and leaders to change.

does something in the victory python prevent the late starting civs from being defeated when they have no units or cities? I ask that because I am not running that module at all.
 
The premature defeat thing is a dead giveaway that the mod is - somehow - broken. And you didn't try to change spawn dates or change the player setup in the actual scenario?

Perhaps you could start all over and only disable one feature/module at a time. Because then it will be easy to pinpoint what change actually breaks the mod.
 
well the thing is I'm not defeated, it just says so on the screen. the game doesn't end, I can play on, so that looks like maybe just the text on the screen is wrong. the victory screen looks like it should, it doesn't say I'm defeated. also if I build a city, open the city screen and then close it, or if I open diplomacy with another civ and come back to the main screen, the "You are defeated" is gone.
 
I've encountered an awkward error. The game (my modmod) crashes for no apparent reason. I decided to check what's going on but couldn't figure it out. Then I started to remove cities in WB. When I tried to remove one independent city (Hanjing) I got an python exception (unidentifiable C++ exception) and the population of the city fell to 0 but the city remained. I've loaded previous save, deleted the city in WB and everything was fine. Until I got the same crash, this time caused by barbarian L(h)asa. I have no idea what can cause the error (0 food consumption due to trade routes which reduce it? But changing population to 2 didn't prevent the crash). If anyone has an idea I would be grateful :)
 
did you try making a debug dll? perhaps your trade route/food thing is causing the game to attempt to perform an illegal or weird math operation? I got a crash to desktop when I tried to give mounted units -50% city attack, since the the 50% is 50% of the defenders strength I sometimes had the AI attacking with negative combat strength which crashed the game.
 
Back
Top Bottom