• Our friends from AlphaCentauri2.info are in need of technical assistance. If you have experience with the LAMP stack and some hours to spare, please help them out and post here.

MongooseMod SDK Stuff

Version 1.7 posted, somewhat more substantive update than last time, and hopefully I'm done now for a while hehe.

Added UpgradeCostTraitMod
Added ExperienceNeededCappingMod

Fixed AnimalMod: I'd made a mistake and not carried over to Warlords the part that makes animals not despawn when barbarians start. Good job catching that and letting me know guys; I'd hate to have to find these things on my own or anything. ;)

Edit -- Incidentally, it doesn't look like the unit models not respawning on heal thing is fixable with the code provided to us in the SDK. I'm not 100% positive yet but this seems to be something in the low-level graphics department we'll have to wait for an official patch on. Bleh.
 
Won't you please give back the 1.61 SDK-addons?
Without any support.
Not everybody wants to pay for a modification :(
 
Caesium said:
Won't you please give back the 1.61 SDK-addons?
Without any support.
Not everybody wants to pay for a modification :(
Okay, first of all I left that file up for several weeks after I first started posting Warlords versions. I figured anybody who still wanted it would get it during that time.

Second of all I don't even have the relevant zip or any of its component files anymore. Sorry. To be honest though I wouldn't really be happy leaving a version up with old content anyway... just not my style. I know that's not the answer you wanted to hear but Warlords really is a good product and imo well worth the price.

(Don't get me wrong, if I still had the files I *would* repost them for you, but it'd take at least a few hours and probably more like a day to recreate them from the current version and atm I'm rather exhausted heh.)
 
Alright, I'm going to give this another shot since it's a lot less work to maintain a public version of my SDK than a public version of my full mod.

This time I put all the new and updated stuff in their own sections at the top so I don't have to name it all here and then make you go find it buried in the list. Woohoo.

I'm sure some of this has already been done by the big mod teams but I haven't had time to keep up with their progress and I prefer to work solo anyway. If you find anything useful just please, please, please give me credit. All I ask. Thanks. :)
 
I haven't looked at the download yet, but I'm curious of something: When you provide the source code, do you provide the individual source files separate by mod, or do you integrate them all together? Let's say that I wanted to use only a handful of the mod comps that are included, but they overlap in the same source files ... will I need to go through the code manually to determine which lines of code are necessary for each modcomp that I want to include?

Otherwise, you've done a lot of work. Good job.
 
EDIT...
Oops, Just realised I posted this in the Warlords thread. This is intended for the BtS version. :blush:. (but then, the issue is probably relevant to both anyway)

As long as LunarMongoose hears me. ;)
Spoiler :

LakeSizeMod (CvArea.cpp)

Makes the definition of a lake scale with map size. With an XML Globals value of 4 which is what I use, lakes will become inland seas when greater than 4 tiles in size on Duel, up through greater than 16 tiles in size on Huge.

I implemented this feature in PIG Mod but I have a problem with it. On many maps now, there can be fresh water lakes of size larger than 9. On Huge, I think it's more than 20 tiles even.

The problem is, things like lighthouses, harbours, galleys etc. all can usually only be built in coastal cities because they have a hardcoded requirement of iMinAreaSize of 10. (For some reason, a drydock is unique, requiring 20 instead.)

IMO, one shouldn't be able to build lighthouses (for example) on fresh water lakes because it's having your cake and eating it too.

The fix I propose is as follows.

Code:
bool CvPlot::isCoastalLand(int iMinWaterSize) const
{
	PROFILE_FUNC();

	CvPlot* pAdjacentPlot;
	int iI;

	if (isWater())
	{
		return false;
	}
/*************************************************************************************************/
/** PIG Mod                                                                     PieceOfMind      */
/** BEGIN                                                                       v0.92            */
/*************************************************************************************************/
/** New code **/

// Mongoose LakeSizeMod BEGIN
// This "fix", written by PieceOfMind for PIG Mod, 28/02/10.
// Most buildings and units seem to have a minareasize of 10 hardcoded in their xml (drydock is 20).
// This fix ensures that if a body of water is a lake, a city connected to it is not necessarily considered coastal.
	int iWorldFactor = GC.getNumWorldInfos() - 1;
	int iLakeTiles = ((iWorldFactor + (GC.getMapINLINE().getWorldSize() * 3)) * GC.getDefineINT("LAKE_MAX_AREA_SIZE")) / iWorldFactor;
	if (iMinWaterSize <= iLakeTiles)
	{
		iMinWaterSize = iLakeTiles + 1;
	}
//
// Mongoose LakeSizeMod END		
	
/*************************************************************************************************/
/** PIG Mod                                                                     PieceOfMind      */
/** END                                                                         v0.92            */
/*************************************************************************************************/

	for (iI = 0; iI < NUM_DIRECTION_TYPES; ++iI)
	{
		pAdjacentPlot = plotDirection(getX_INLINE(), getY_INLINE(), ((DirectionTypes)iI));

		if (pAdjacentPlot != NULL)
		{
			if (pAdjacentPlot->isWater())
			{
				if (pAdjacentPlot->area()->getNumTiles() >= iMinWaterSize)
				{
					return true;
				}
			}
		}
	}

	return false;
}

I'm not all that familiar with this part of the code so if there's a better way to do this or if this will cause unforeseen problems maybe let me know?

It seems to be working as expected for me so far.
 
Back
Top Bottom