Snoopy/Dale unofficial patch

Ok man, sorry to spam your thread like this, but I got the mod combined with my personal mod and was all hyped to spend the night playing a game when this problem popped up.. So its been my focus for the night.

First, I gave each UnitInfo an iBerthSize tag of 1 and every Unit having the tag defined fixed the problem and the game worked normally.

Also, I think this...
Code:
// returns false if the unit is killed
bool CvUnit::setTransportUnit(CvUnit* pTransportUnit)
{
	CvUnit* pOldTransportUnit = getTransportUnit();

	// PatchMod: Berth Size START
    int iCargoSize = getUnitInfo().getBerthSize();
	if (iCargoSize < 1 || iCargoSize > getUnitInfo().getRequiredTransportSize())
	{
        int iCargoSize = getUnitInfo().getRequiredTransportSize();
	}
    // PatchMod: Berth Size END
..would be saffer. Just in case some one enters an iBerthSize larger then the iRequiredTransportSize, or lower then 1.

Anyway, my game works now. I'm off to play a game. :king:

Thanks for this. Changing the code now (good pick up). I'm a little to optomistic of people sometimes. ;)

I've got it working correctly now too. Dunno why this one doesn't like not being defined in xml. Oh well. :)
 
Version 1.01 has been posted which resolves the mentioned "starting units" issue. Please update to this new version.

Thanks. :)
 
BTW, if you would like to try my and Snoopy's BALANCE mod, then have a look at our PatchMod which is in the creation sub-forum. You'll also find some other modders are also publishing their own BALANCE mods to provide other solutions to the BALANCE issues. :)

I am impatiently waiting for the next update of your PatchMod, and that is certainly not criticism but a sincere compliment. Even so, move your butt! ;)
 
Awesome, glad to hear its fixed. Yea, I also don't understand why some of them don't mind not being xml defined and other tags just seem to freak out about it. :lol:
 
Found a bug. In the GameTextMgr's setBasicUnitHelp function.
Code:
	if (kUnitInfo.getRequiredTransportSize() > 1)
	{
		for (int i = 0; i < GC.getNumUnitInfos(); ++i)
		{
			CvUnitInfo& kTransportUnitInfo = GC.getUnitInfo((UnitTypes) i);
			if (kTransportUnitInfo.getCargoSpace() >= kUnitInfo.getRequiredTransportSize())
			{
			    szBuffer.append(NEWLINE);
				szBuffer.append(gDLL->getText("TXT_KEY_UNIT_CARGO", kTransportUnitInfo.getTextKeyWide()));
			}
		}
	}

The problem, in the unmodded game, appears if you set iRequiredTransportSize of 2 on a Unit, like say the Cannon. When you then look at the Unit's Pedia page or Flying Help Text it will say that the Unit can be transported by the Wagon Train.

For those that don't already see the problem, they don't check the kTransportUnitInfo's Special Cargo Type.

This seems to work well..
Code:
	if (kUnitInfo.getRequiredTransportSize() > 1)
	{
		for (int i = 0; i < GC.getNumUnitInfos(); ++i)
		{
			CvUnitInfo& kTransportUnitInfo = GC.getUnitInfo((UnitTypes) i);
			if (kTransportUnitInfo.getCargoSpace() >= kUnitInfo.getRequiredTransportSize())
			{
			    // PatchMod: ? START
			    if (kTransportUnitInfo.getSpecialCargo() != NO_SPECIALUNIT && kUnitInfo.getSpecialCargo() != kTransportUnitInfo.getSpecialCargo())
			    {
			        continue;
			    }
				// PatchMod: ? END
				szBuffer.append(NEWLINE);
				szBuffer.append(gDLL->getText("TXT_KEY_UNIT_CARGO", kTransportUnitInfo.getTextKeyWide()));
			}
		}
	}

Real simple, just added a if to check if the Transport has a Special Cargo Type set and that the Unit is that Special Cargo Type.. and if that is true then skip to the next Transport Unit Info in the list.

Not a big deal, but definetly a bug. :goodjob:
 
Thanks for the tip! Will add it to the list to add in. :)
 
Well, I'm back to work on my JTradeRoutes Mod, and I happen across another bug.

In CvDLLWidgetData.cpp...
Code:
void CvDLLWidgetData::parseAssignTradeRoute(CvWidgetDataStruct &widgetDataStruct, CvWStringBuffer &szBuffer)
{
	CvUnit* pUnit = GET_PLAYER(GC.getGameINLINE().getActivePlayer()).getUnit(widgetDataStruct.m_iData1);
	if (pUnit != NULL)
	{
		if (pUnit->getGroup()->isAssignedTradeRoute(widgetDataStruct.m_iData2))
		{
			szBuffer.assign(gDLL->getText("TXT_KEY_ASSIGN_ROUTE"));
		}
		else
		{
			szBuffer.assign(gDLL->getText("TXT_KEY_UNASSIGN_ROUTE"));
		}
	}
}

..should be..
Code:
void CvDLLWidgetData::parseAssignTradeRoute(CvWidgetDataStruct &widgetDataStruct, CvWStringBuffer &szBuffer)
{
	CvUnit* pUnit = GET_PLAYER(GC.getGameINLINE().getActivePlayer()).getUnit(widgetDataStruct.m_iData1);
	if (pUnit != NULL)
	{
		if (pUnit->getGroup()->isAssignedTradeRoute(widgetDataStruct.m_iData2))
		{
		    // PatchMod: ? START
			//szBuffer.assign(gDLL->getText("TXT_KEY_ASSIGN_ROUTE"));
			szBuffer.assign(gDLL->getText("TXT_KEY_UNASSIGN_ROUTE"));
		    // PatchMod: ? END
		}
		else
		{
		    // PatchMod: ? START
			//szBuffer.assign(gDLL->getText("TXT_KEY_UNASSIGN_ROUTE"));
			szBuffer.assign(gDLL->getText("TXT_KEY_ASSIGN_ROUTE"));
		    // PatchMod: ? END
		}
	}
}

To see it in the unmodded game, start a game, give your self a two Cities and a Wagon Train. Set up a Trade Route and go into the Trade Routes Page in the Domestic Advisor. If the Trade Route is Assigned, the button says it will Assign it, if the Trade Route is Unassigned, the button will say it will Unassign it. :king:
 
:lol: Good pick up!
 
Not sure, if this is a (known) bug or not. After reloading my saved game, AI missions are counted as mz missions, so I get converted natives from THEIR missions. I never set up a single one whole game.
 
Yeah, that was posted on another forum. Thanks. :)
 
New bugs (from bug and tech support forum):

- King maintains blockades after WoI (unconfirmed)
- Privateers can't enter enemy territory (unconfirmed)

The King maintaining blockades after WoI is a bug, and is fixed for 1.02. The privateers CAN enter enemy territory so it is not a bug. :)
 
Version 1.02 has been posted which resolves all known bugs up to today (18th Oct) unless specified. Please update to this version.

See the first post of this thread for details.

Thanks. :)
 
i'm not sure if this is the right place to bring this up. I'm only playing Col for a short time now. Somethings that I would like to see patched or modded are 1) if the natives give up a settlement due to cultural borders, shouldn't there be a native convert out of it? Or at the least I'd like my missionary back. 2) I think the rate of new colonists and the costs of "buying" them is a little too high for the amount of money in the game. I know you don't want to make it too easy, but right now it feels a little too hard. 3) The kings demands seem to come awfully quickly. 4) Where are the indian raids from Col I? Feels odd that they are gone.

Thanks for your efforts. :goodjob:
 
Domestic Advisor Trade Route Management Problem.

This is a really useful tool in the Domestic Advisor but when I get lots of routes and need to scroll the screen (current game 19 routes and 8 transports) I can't select the transports when I scroll them onto the screen. I don't see anyone else report this....

And thanks for all your work so far Dale.
 
Difficult to replicate, no pattern/reason found yet. * Unit Cycling Bug where cycling stops (reload fixes)

Thanks to a poster at Apolyton, a pattern has been found, replicate and the bug found. It is a definite code error. :)

Fixed and will appear in the next version.

This just leaves the WB placing rivers on map edge crash, which an ex-Firaxian confirmed is in the EXE. :(
 
Top Bottom