Quick Modding Questions Thread

We added a whole spawngroup mechanic in RifE; Using just xml (after the dll base is imported, of course) you can control when the group spawns, where it spawns, what spawns (can do an entire stack at once), etc. You can use python if necessary, can have unique spawns, can assign special promotions, can even spawn unitclasses rather than specific units (game will choose a random member of the class when it spawns; weighted towards the UU appropriate for the civ, but could be anything).

Full details here

Edit: Sounds similar to what C2C did, though I don't think either mod copied the other. :P
 
Espionage was removed in FfH's DLL, and we never reimplemented it (had some plans, for an eventual redesign, but it was extremely low on the priority list). Unfortunately, this means that while using either an FfH or RifE base you will be unable to implement espionage without modifying the DLL.

That said, DLL editing isn't really that hard, and IIRC blocking espionage wasn't a difficult thing; just a few edits. Our source code is just as open source as the rest of the mod, so you're free to edit it.

Thank you for this, i hate .dll changes (because i don't know to work with .dll), but how i see, i will must to learn .dll modding.

How much time is need for that? My experience with programing is zero.

Can i make first changes like adding new eras, units, building, etc, and when i finish with all, i will add espionage later?

What you think?

We added a whole spawngroup mechanic in RifE; Using just xml (after the dll base is imported, of course) you can control when the group spawns, where it spawns, what spawns (can do an entire stack at once), etc. You can use python if necessary, can have unique spawns, can assign special promotions, can even spawn unitclasses rather than specific units (game will choose a random member of the class when it spawns; weighted towards the UU appropriate for the civ, but could be anything).

Full details here

Edit: Sounds similar to what C2C did, though I don't think either mod copied the other. :P

I see that. And that is very interesting, improvements upgrades, improvements spawn units, its fantastic. Can i make some improvement like this example:
Ancient camp (spawn some warriors) upgrade to Classic camp (spawn axeman) upgrade to Medieval camp (spawn maceman) upgrade to Renaissance camp (spawn musketman) upgrade to Industrial Camp (spawn Rifleman) upgrate to some future camp (spawn some future marines or some future spaceships etc.).
 
Thank you for this, i hate .dll changes (because i don't know to work with .dll), but how i see, i will must to learn .dll modding.

How much time is need for that? My experience with programing is zero.

Can i make first changes like adding new eras, units, building, etc, and when i finish with all, i will add espionage later?

What you think?

Definitely add espionage later or get someone else to do it. If you have no programming experience then DLL changes would be extremely difficult. You have to program in C++ for the DLL.
 
Anyone have any ideas why this bit of python code would not work?

I get no exceptions.

Spoiler :
Code:
def onCityBuilt(self, argsList):
		if (AutologOpt.isLogCityFounded()):
			pCity = argsList[0]
			if pCity.getOwner() == CyGame().getActivePlayer():
				message = BugUtil.getText("TXT_KEY_AUTOLOG_CITY_FOUNDED", (pCity.getName(), ))
				Logger.writeLog(message, vColor="RoyalBlue")

			[COLOR="Red"]pPlot = CyMap().plot(city.getX(),city.getY())
			if pPlot.getFeatureType() == gc.getInfoTypeForString("FEATURE_VAULT"):
				iBuilding = gc.getInfoTypeForString("BUILDING_CAMP_FIRE")
				pCity.setNumRealBuilding(iBuilding,1)
			if not pPlot.getFeatureType() == gc.getInfoTypeForString("FEATURE_VAULT"):
				iBuilding = gc.getInfoTypeForString("BUILDING_SHELTER")
				pCity.setNumRealBuilding(iBuilding,1)[/COLOR]
 
Your indentation has the stuff in red all inside the "if (AutologOpt.isLogCityFounded()):". If you do not have that logging option turned on it will never run your new code. So reduce the indentation level of all of it by one tab.

Another bit of something that will not change whether or not it works, or even exactly what happens other than efficiency, but... Instead of your second "if blah blah blah" you should use an "else". This will not prevent it from working as-is, but it is inefficient. Also you must ask yourself this: does the "not" go with the result after the "==" operator is applied or does it go with the "pPlot.getFeatureType()" before the "==" is applied? OK, I'll give the answer: that will be fine since "==" has higher precedence so it will happen first. But I frequently forget the operator precedence and therefore almost always put in parenthesis to make sure it happens in the order I want. The question then becomes, did you know this or did you not even consider it?

Another consideration: are you sure the vault feature survives a city being built on it? By default, in regular BtS at least, a city wipes out any feature that is on the plot (forest, jungle, or flood plain in regular BtS). You can change that, but it is something you have to specifically do. Did you do anything to make it keep the feature?
 
ok cool, I wondered if it might be a problem with the above statement, as to the other parts of your code suggestions, I am clueless when it comes to python! :D someone else supplied me this code a long time ago :)

good point, I forgot to change the feature destroy option, need to go find that again! :D

EDIT: ok found it, fixed it and it all seems to be wroking wonderfully thankyou!
 
Definitely add espionage later or get someone else to do it. If you have no programming experience then DLL changes would be extremely difficult. You have to program in C++ for the DLL.

Thank you for advice. :)
 
Thank you for this, i hate .dll changes (because i don't know to work with .dll), but how i see, i will must to learn .dll modding.

How much time is need for that? My experience with programing is zero.

Can i make first changes like adding new eras, units, building, etc, and when i finish with all, i will add espionage later?

What you think?



I see that. And that is very interesting, improvements upgrades, improvements spawn units, its fantastic. Can i make some improvement like this example:
Ancient camp (spawn some warriors) upgrade to Classic camp (spawn axeman) upgrade to Medieval camp (spawn maceman) upgrade to Renaissance camp (spawn musketman) upgrade to Industrial Camp (spawn Rifleman) upgrate to some future camp (spawn some future marines or some future spaceships etc.).

I'd definitely get the easy stuff going first, and then move on to espionage.

And yes, the camp system you described should work pretty easily.
 
ok guys, can someone help me figure out the mechanics behind animal spawning, basically no animals are spawning in my mod and I have no idea why... My only guess is that I have somehow, somewhere along the way broken that mechanic, but I don't know how or where, I get no error messages, I have animal spawning on for all eras, but I just get no barbarians in my mod games....

Help!?!
 
Back
Top Bottom