Mod-Modders Guide to Fall Further

Cool, thanks. I reran patch H & did see some .cpp extensions fly by, so I replaced all the source again, same compile errors.

Most are loops where int isn't specified before the var; there's one flat out error though in CVUnitAI.::AI_spreadCorporation(), line 9766:

bool bHasHQ = (GET_TEAM(getTeam()).hasHeadquarters((CorporationTypes)iI));

iI is invalid at this point, as we've broken out of the loop - it should be

bool bHasHQ = (GET_TEAM(getTeam()).hasHeadquarters(eCorporation));


Anyway, I've fixed all the compile errors locally, got it to compile & link, but my save game won't load, I get a heap corruption on load & an invalid procedure error, so I have to assume that what I've compiled isn't matching up with the official patch H compile - which circles me back to whether I've got the right source again.

(FYI, I'm building with VS 2005 enterprise)
 
I'll attach my code as of this moment. There are a few minor differences in this and what we would release if we patched right this minute, mostly personal notes and debugging adjustments. Also it is VERY much not the same as what the last patch uses for the DLL. But nothing really new is added, so it should be compatible.


Anyway, compiles fine for me, so if this doesn't compile nicely for you, then you might well already be finding out issues. (You have successfully compiled a Civ DLL before, right? They require 2003 libraries and whatnot, so you need to have a Makefile to force 2005 to use 2003 lingo)


EDIT: Just checked out the Corporation one. While technically you should use eCorporation at that point, it isn't COMPLETELY wrong to use iI, since they ran a BREAK command when they found an iI which worked. But I still prefer to have eCorp used so it is more certainly stable/reliable for future edits.
 

Attachments

Cool, I'll try your source next, but I think it's all on my end right now:

I didn't look closely at the entire modder's guide links. So yeah, I was trying to use the native 2005 compiler, which is why that eCorporation line balked. The 2003 compiler is apparently more lax & lets it slide; newer compilers flag it as an error (which it is - technically, an int declared within the lifetime of a for loop only is valid for the lifetime of that scope - using it outside the loop is considered to be 'undefined'. If the int had been declared above the loop, its lifetime would have been legit...).

Anyway, I've since found the docs with the latest makefile for BTS 3.17, and I'm recompiling the world with it - I suspect that's probably what will set me straight.

Cheers
 
Maybe this is what I need too. Codeblocks keeps having heart attacks when I try to compile before I even make any changes...
 
Maybe this is what I need too. Codeblocks keeps having heart attacks when I try to compile before I even make any changes...

Possibly. Here's the latest doc on how to configure everything:

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

And I'm attaching a new makefile, as there are two new source files that needed to be included for FF to compile/link. Also, I've made a couple other tweaks:

1) The debug target now links against the release version of boost - Civ fails to launch if it tries to load both versions (ie if your mod is using the debug version, and the main app loads the release version, it'll flat out die with a python load failure msg.)

2) I've modified the /out: to point to my c:\program files\Firaxis\... <etc> folder so that the mod gets copied to the /FF/assets/ location after building. If you're using a different install location than default, you'll need to modify it.
 

Attachments

Is there a way to block construction of a building, based on the presence of another building?

If you can't do it in the xml on a tag, you can do it in python with some simple scripting in the cannotbuild list. Or maybe it's cannotconstruct.
 
Will isCitySelected check to be sure that the building I'm checking for is in the selected city?

Edit: Actually, cyCity.hasActiveBuilding looks like it will work quite a bit better....

This is the code I have, haven't tested it quite yet as I'm not done with the XML side. Hoping it works.

Code:
if pPlayer.getCivilizationType() == gc.getInfoTypeForString('CIVILIZATION_MALAKIM'):	
	if eBuilding == gc.getInfoTypeForString('BUILDING_STABLE_CAMEL')	
		if (pCity->hasActiveBuilding((BuildingTypes)GC.getInfoTypeForString("BUILDING_STABLE"))):
			return True
	if eBuilding == gc.getInfoTypeForString('BUILDING_STABLE'):
		if (pCity->hasActiveBuilding((BuildingTypes)GC.getInfoTypeForString("BUILDING_STABLE_CAMEL"))):
			return True

Edit: And of course it doesn't work... Removes my interface.
 
Will isCitySelected check to be sure that the building I'm checking for is in the selected city?

Edit: Actually, cyCity.hasActiveBuilding looks like it will work quite a bit better....

I don't understand hasActiveBuilding, therefore I fear and loathe it.

Perhaps if pCity.getNumBuilding(gc.getInfoTypeForString('BUILDING_GIANT_GILA_STABLE')) > 0: sort of thing?
 
That was what I was using first, but doesn't that apply to the civilization as a whole rather than an individual city?

Hmm... maybe it was "getNumRealBuildings"... Try it. I hear there are ways to do other than trial and error, but I think they involve reading... :) (If xienwolf is a "code monkey" I was trying to figure out what I am. I think I'm a "code lemur." Or perhaps a tarsier.)
 
Any idea why I keep getting error when the compiler tries to compile the CVGameCore.rc? The only way to compile the .dll is if I exclude the .rc from compilation.
I checked the res.exe ... command in a command prompt and i get the response "improper use of res.exe ...etc". However, the command seems valid.
Not that it is not playable, just feeling there should be way to compile with it.
 
.rc is a codeblocks thing, so should be in your folder if you use Codeblocks, but should not be included in your project (reasonably certain). Project should be 2 .inl files, and otherwise nothing but .h and .cpp files.

unresolved externals frequently means you need to do a complete recompile instead of a quick build.


getNumActiveBuildings should just ignore any building which has gone Obsolete (which base Civ does to some wonders after a certain Tech is learned). But all of the functions check just the city (getNum might throw you off, but it really is just checking the city if you ask the city to tell you the value)
 
Hi!
I'm trying to create a little pack of leaders in order to add some diversity for some civs; namely those which have only one leader. So, I was wondering if I could get more information about the Austrin, the Archos, and all the other FF civs; or is all the infos in the pedia?

I would also like to know if there is any warning/note about lore-modmodding? I mean, how am I free to add things to lore? I'm not sure how to ask the question. Let's take an example: it is said that the Archos are from an insignificant tribe (south or north of another civilization iirc); because they're from FF, they don't have a role in FFH scenarios (well, many FFH civs don't get a great role either). So, they seem to have little history. Would it be possible, for me, to, say, add a leader and, thus, a bit of history to the Archos? Or even to write down some of their traditions, habits, etc?

Sorry if I'm not clear enough. I just don't know how much freedom I (and others) have lorewise. Since it's the work of others, I would feel bad to... huh... "break" it.

Well, if anything, I would like to know if there is more lore on the FF civs, please :)
 
Sorry if I'm not clear enough. I just don't know how much freedom I (and others) have lorewise. Since it's the work of others, I would feel bad to... huh... "break" it.

Well, if anything, I would like to know if there is more lore on the FF civs, please :)

As always - you're as free as you like as a modder. No-one will even mind if you choose to add Ronald McDonald as a new Balseraph leader, though they might not bother downloading it :)

====

The only thing to take into account is that if you do write something that is contradicted elsewhere in the lore - someone *will* notice it sooner or later (the players love their lore :D) - so it's best to make sure you've read as much as possible before starting.

====

If there's any specific aspects of the new civs that you're interested in, or an idea that you'd like to run past the lore as I imagine it - let me know. More important that specific lore though are the themes...
 
More important that specific lore though are the themes...
I think I get what you mean... But, just in case (I'm a very unsure person), would you mind explain further? In what themes are more important than lore? How would you illustrate this (with, say, an example where lore takes over theme and vice-versa)?
 
Back
Top Bottom