Seite 1 von 1

Min per Empire - Reimplementierung

Verfasst: Sonntag 18. August 2013, 17:47
von Vuto
Wäre es möglich Min per Empire zu reimplementieren? Das (viel unkompliziertere) Min per System funktioniert ja ganz gut.

Ich habe mal zusammengetragen welche Veränderungen (unter anderem) nötig wären:
In System.cpp nach Zeile 2769 einfügen:

Code: Alles auswählen

	// Min. X Gebäude von ID im Imperium
	if (building->GetMinInEmpire() > 0)
	{
		int nCount = globals->GetCountGlobalBuilding(m_sOwnerOfSystem, building->GetRunningNumber());
		if (nCount < building->GetMinInEmpire())
			return FALSE;
	}
Und in System.cpp Zeile 2120 "|| pInfo->GetMinInEmpire() > 0" einfügen. (Löscht aus Gebäudeliste bei Eroberung)


BotEDoc.cpp Zeile 1924-1929:

Code: Alles auswählen

				if (atoi(data[20]) > 0)
				{
					CString s;
					s.Format("Error in Buildings.data: Building \"%s\": \"Min in empire\" is not supported in this version!", info.GetBuildingName());
					AfxMessageBox(s);
				}
müsste ersetzt werden durch:

Code: Alles auswählen

				if (atoi(data[20]) > 0 && atoi(data[21]) = atoi(data[0]))
				{
					CString s;
					s.Format("Error in Buildings.data: Building \"%s\": ID from \"min in empire\" must not be the same as the building id", info.GetBuildingName());
					AfxMessageBox(s);
				}
Nach Zeile 2761 in der SystemMenuView.cpp einfügen:

Code: Alles auswählen

		// min X mal von ID pro Imperium
		if (b->GetMinInEmpire().Number > 0)
		{
			s.Format("%d",b->GetMinInEmpire().Number);
			g->DrawString(CComBSTR(CLoc::GetString("MIN_PER_EMPIRE",FALSE,s,pDoc->GetBuildingName(b->GetMinInEmpirem().RunningNumber))), -1, &Gdiplus::Font(CComBSTR(fontName), fontSize), r, &fontFormat, &fontBrush);
			r.Y += 22;
		}
BuildingInfo.h nach Zeile 99 einfügen:

Code: Alles auswählen

NumberOfID GetMinInEmpire() const {return m_MinInEmpire;}
Die GlobalBuildings.cpp+.h müssten auch noch angepasst werden und vermutlich auch noch ein paar weitere Codestellen.


Habt ihr überhaupt Interesse an Min per Empire? Also ich könnte mir einige gute Gebäudekombinationen vorstellen.

Re: Min per Empire - Reimplementierung

Verfasst: Sonntag 18. August 2013, 18:39
von rainer
a) wenn's funktioniert, immer her damit :)

b) bin schon auf deine Gebäude-Ideen gespannt

c) habe hier http://birth-of-the-empires.de/wiki/ind ... dings.data (Zeile 20+21) nochmal aktualisiert, und zwar den Post (COMMIT 68025), als Puste es deaktiviert hatte (interner Bereich). Außerdem steht unter Zeile 20 schonmal ein Beispiel, was es mit min per Empire überhaupt auf sich haben könnte.