Final Frontier Plus

I must say that I recompiled SDK adding cloaking promotions and some things here and there, but there are:

Code:
bool CyUnit::isStarbase()
{
	return m_pUnit ? m_pUnit->isStarbase() : false;
}
in CyUnit.cpp

and

Code:
	bool isStarbase();
in CyUnit.h


What's wrong?
 
I guess, like deanej, I missed a file in the source folder.

In order to actually expose the functions to python, you need to add them to CyUnitInterface1 as well.

To expose it, you need to add this to that file (with appropriate indentation added, of course).

Code:
.def("isStarbase", &CyUnit::isStarbase, "bool ()")
 
Did you mean "CyInfoInterface1.cpp"? Because there's no CyUnitInterface. I don't know the roles of every file yet so it would be nice to know. I will try to "expose" it to python in that file I mentioned and report my results. Thank you very much for your quick answer :).

P.S. I guess you add it in "CvUnitInfo" class in CyInfoInterface1.cpp?


P.P.S. A side question: I don't see any iGoldCost mention in the Cy* files. Does it mean that it's not accessible via python? It may explain why I failed during one of my tests.

P.P.P.S. Also shouldn't it be .def("isStarbase", &CyUnitInfo::isStarbase, "bool ()") ? Without "info" it gives me compiler error.
 
Now it's weird.

There is:
Code:
.def("isStarbase", &CvUnitInfo::isStarbase, "bool ()")						//Added in Final Frontier SDK: TC01

in CyUnitInterface1. What else can be wrong then?

P.S. I see, there is CyUnitInterface1.cpp, it's just not in the SDK folder because you didn't include it. Are there other things in CyUnitInterface1.cpp which you have but forgot to include (no file)? Like max/min barbarian start era and culture range?
 
OK, isStarBase issue is solved, thank you!

Another weird thing: Star Fortress says it adds 50% defense, but when I put it in my "40%" defense system, I get 330% defense!

Also I tried to make "missile base" buildings (buildable on each planet) which give 5% defense each. I've built them on 4 planets so it should turn my 40% defense into 60%. But I still get 40%. Help meh please :D.
 
The defense from buildings doesn't add to the cultural defense - it replaces it if it is higher. The buildings all add together before the comparison, so 5% from each of 4 of your missile bases = 20% which is less than the cultural 40% so you get 40%.

I seem to remember that this has been changed to be additive with cultural defense in some mods, but it still works this way in FF and, almost certainly, in FF+ (I don't remember it being different in my test games).

As to why it would jump to 330%, I don't know. Make sure your star fortress's iDefense tag is still set to 50.
 
It is 50, so it's weird.

OK I will check how to make the cultural defense to be added to the building defense.

I've got another trouble: my invisible HN ships which are bOnlydefensive replace enemy ships. Is there a way to allow them to coexist on one tile? It's weird how I can push enemy force out of my borders :).
 
OK, I will just block the movement via python then. Haha, I speak like "pro". Just... Now it's time to figure out how to make it. I am still a newbie :p. Well at least I know where to place it.
 
I realize that this is not a bug thread, but I found some strange errors when I tried to merge this into my mod.
>First, if I include the dll the game crashes before loading the main menu, but I get some of the main menu music.
>If I don't include the dll, the game loads up fine, but I get scads of python errors (due to the missing dll) and a completly bombing city screen interface, absolutly nothing shows up. I don't believe I saw any python issues on my behalf. The game logs are helpless, all they told me was that WinApp Failed, exiting, and then Civ.exe is exiting; which of course I already knew.
 
I realize that this is not a bug thread, but I found some strange errors when I tried to merge this into my mod.
>First, if I include the dll the game crashes before loading the main menu, but I get some of the main menu music.
>If I don't include the dll, the game loads up fine, but I get scads of python errors (due to the missing dll) and a completly bombing city screen interface, absolutly nothing shows up. I don't believe I saw any python issues on my behalf. The game logs are helpless, all they told me was that WinApp Failed, exiting, and then Civ.exe is exiting; which of course I already knew.

My first question, as always, is: does regular Final Frontier Plus work for you?

If you include the DLL, are you including relevant schema files as well? That is, all schema files found in the mod folder? Because if I included them, I changed them, and while I know you can have tags in the schema and not in the DLL, I'm not so sure about the other way around.


Feel free to use this as a bug thread (for FF+ in general, of course, but also for merging it into other mods). It's not like we have a forum that I could create such a thread...

...perhaps we should try to get such a forum?
 
Yes, regular FF+ works, I'll have to check the schema again quick.
EDIT: Yup, regular FF+ works, but merged mod with FF+dll crashes, all python files that would affect the main menu were repaced.
 
Hey TC01! In the post #126 there was an error reported that buildings are on planets but not on the list to the left.

I use "standard" method (in CvSolarSystem.py) to add free buildings to a homeworld (it originally lists nutrition facility and mining facility) and new buildings are added to a planet but do not appear on the left.
 
Sorry but I need a major help.

Today I started Civ4 as usually and when I load my mod I get this:

Spoiler :


And it does not go away, I mean it spams errors endlessly.

Yesterday everything was OK. I tried to open older versions of the mod and I have the same issue although it was OK before.

P.S. I've got this error in Final Frontier and MOO2Civ too! But not in Star Trek... Which is totally weird.

Some forum search showed that it may be related to some ArtDefine error or another stupid XML bug, but I don't know why is it everywhere but StarTrek... I think I will have to reinstall Civ4 but it will take some real time... If you encountered such error before I would really love to get some help. If not, I don't know :( .
 
Hi,

This mod is really cool, but is there any plan to add any more features/variety? Or is there another mod that does this to Final Frontier?

Cheers,
 
Deon: Check out my mod, I removed all python exception, which I believe MoO2 and B5 didn't. I don't know why FF is giving exceptions.
Trappisto: I don't know of any mods that simply add extra features but there are quite a few sci-fi space mods out there. There are:
Deanej Star Trek mod:
http://forums.civfanatics.com/forumdisplay.php?f=310
Babylon 5 mod:
http://forums.civfanatics.com/showthread.php?t=261551
Jeelens Master of Orion2 mod:
http://forums.civfanatics.com/forumdisplay.php?f=354
And of course, my mod, sort of based on Farscape:
http://forums.civfanatics.com/showthread.php?t=319896

If I forgot anyone's, let me know.
 
Deon: Check out my mod, I removed all python exception, which I believe MoO2 and B5 didn't. I don't know why FF is giving exceptions.
Trappisto: I don't know of any mods that simply add extra features but there are quite a few sci-fi space mods out there. There are:
Deanej Star Trek mod:
http://forums.civfanatics.com/forumdisplay.php?f=310
Babylon 5 mod:
http://forums.civfanatics.com/showthread.php?t=261551
Jeelens Master of Orion2 mod:
http://forums.civfanatics.com/forumdisplay.php?f=354
And of course, my mod, sort of based on Farscape:
http://forums.civfanatics.com/showthread.php?t=319896

If I forgot anyone's, let me know.

Ok, Thanks a lot. :)
 
Deon: Check out my mod, I removed all python exception,

This is not an issue with my mod because yesterday it gave no exceptions. I reinstalled BTS and it fixed the issue. It means that I corrupted some vanilla files.

I am still interested in this:
Hey TC01! In the post #126 there was an error reported that buildings are on planets but not on the list to the left.

I use "standard" method (in CvSolarSystem.py) to add free buildings to a homeworld (it originally lists nutrition facility and mining facility) and new buildings (mag lev network) are added to a planet but do not appear on the left.



Were you able to assign building spawning via python properly?
 
Hi,

This mod is really cool, but is there any plan to add any more features/variety? Or is there another mod that does this to Final Frontier?

Cheers,

Yes, there is. In fact, if you look at the 1.4 changelog in the first post, I'm going to be adding some new techs, buildings, promotions, and also add unique buildings and units for all civilizations.

This is not an issue with my mod because yesterday it gave no exceptions. I reinstalled BTS and it fixed the issue. It means that I corrupted some vanilla files.

I am still interested in this:

Hey TC01! In the post #126 there was an error reported that buildings are on planets but not on the list to the left.

I use "standard" method (in CvSolarSystem.py) to add free buildings to a homeworld (it originally lists nutrition facility and mining facility) and new buildings are added to a planet but do not appear on the left.

Were you able to assign building spawning via python properly?

If you want to add a building to a city, you need to do this:

Code:
pCity.setNumRealBuilding(iBuilding, pCity.getNumRealBuilding(iBuilding)+1)
pPlanet.setHasBuilding(iBuilding)

pCity is obviously the city. pPlanet is the planet you want to assign the building to.

"iBuilding" is an integer (really a buildingtypes enumerator in the SDK, but that's not important) that represents the order of the building in CIV4BuildingInfos.xml. To get it, use gc.getInfoTypeForString('BUILDING_WHATEVER')

The second argument in setNumRealBuilding() is the number of that building you want to have in the city. Normally this would be a 0 or a 1. But in Final Frontier, you usually want to use "pCity.getNumRealBuilding(iBuilding)" plus or minus one (because you can have multiple buildings). So in this case it's +1.

You can't just add the building to a planet or the city, you must do both.

Now... addBasicBuildingsToBestPlanet(pSystem), which I think is what you are talking about, does this:

Code:
def addBasicBuildingsToBestPlanet(pSystem):
	
	pPlot = CyMap().plot(pSystem.getX(), pSystem.getY())
	pCity = pPlot.getPlotCity()
	
	iNutritionFacility = CvUtil.findInfoTypeNum(gc.getBuildingInfo,gc.getNumBuildingInfos(),'BUILDING_NUTRITION_FACILITY')
	iMiningFacility = CvUtil.findInfoTypeNum(gc.getBuildingInfo,gc.getNumBuildingInfos(),'BUILDING_MINING_FACILITY')
	
	pCity.setNumRealBuilding(iNutritionFacility, pCity.getNumRealBuilding(iNutritionFacility) + 1)
	pCity.setNumRealBuilding(iMiningFacility, pCity.getNumRealBuilding(iMiningFacility) + 1)
	
	iBestPlanetIndex = getBestPlanetInSystem(pSystem)
	
	# Free buildings on the homeworld
	pPlanet = pSystem.getPlanetByIndex(iBestPlanetIndex)
	pPlanet.setHasBuilding(iNutritionFacility, true)
	pPlanet.setHasBuilding(iMiningFacility, true)

You notice that it both adds the buildings to the city and adds them to the best planet. So you need to do both too.
 
Top Bottom