Seite 27 von 32 ErsteErste ... 17232425262728293031 ... LetzteLetzte
Ergebnis 391 bis 405 von 473

Thema: Debug-Dll

  1. #391
    Civ4 BASE Coder Avatar von rucivfan
    Registriert seit
    10.07.11
    Ort
    Antarktika
    Beiträge
    19.124
    Im Base-Mod gibt es den Fehler nicht.

    Dort steht aber auch ein neueres Datum bei den BBAI-Kommentaren.
    Gut, besser, BASE. BASE ist eine Modifikation für Civilization IV: Beyond the Sword, die wie eine größere Erweiterung nah am Originalspiel verbleiben soll.

  2. #392
    Moderator Avatar von Kathy
    Registriert seit
    11.10.07
    Beiträge
    18.237
    War dann vermutlich schon korrigiert.

  3. #393
    Moderator Avatar von Kathy
    Registriert seit
    11.10.07
    Beiträge
    18.237
    So, damit scheint die kritische Stelle überstanden, danke noch einmal vielmals. Aber es treten bestimmt noch viele Fehler auf.

  4. #394
    Moderator Avatar von Kathy
    Registriert seit
    11.10.07
    Beiträge
    18.237
    Das obere ist der problematische Katamaran. Das untere Bild ist das Ausliegerboot, das sollte keine Probleme machen, da es eigentlich alle Trireme.kf-Dateien enthalten sollte. Zumindest ist es in meinem Verzeichnis komplett, ansonsten einfach mal die Animationen dorthin kopieren, damit es keinen Ärger macht.

    Edit: Crosspost-Landesmeisterschaft...

  5. #395
    Moderator Avatar von Kathy
    Registriert seit
    11.10.07
    Beiträge
    18.237
    Ich habe einen neuen Assert:

    Stack:
    > CvGameCoreDLL.dll!CvUnitAI::AI_guardCity(bool bLeave=false, bool bSearch=true, int iMaxPath=1) Zeile 10713 + 0x3d Bytes C++
    CvGameCoreDLL.dll!CvUnitAI::AI_collateralMove() Zeile 3319 + 0xe Bytes C++
    CvGameCoreDLL.dll!CvUnitAI::AI_update() Zeile 280 C++
    CvGameCoreDLL.dll!CvSelectionGroupAI::AI_update() Zeile 275 + 0x13 Bytes
    CvGameCoreDLL.dll!CvPlayerAI::AI_unitUpdate() Zeile 1478 + 0xd Bytes C++
    CvGameCoreDLL.dll!CvGame::updateMoves() Zeile 6671 + 0x13 Bytes C++
    CvGameCoreDLL.dll!CvGame::update() Zeile 2087 C++
    Civ4BeyondSword.exe!00415321()
    [Unten angegebene Rahmen sind möglicherweise nicht korrekt und/oder fehlen, keine Symbole geladen für Civ4BeyondSword.exe]
    KernelBase.dll!7762af21()
    Civ4BeyondSword.exe!006846f7()
    Civ4BeyondSword.exe!00411a7d()
    Civ4BeyondSword.exe!00686bc8()
    Civ4BeyondSword.exe!004d6f46()
    Civ4BeyondSword.exe!008f497f()
    kernel32.dll!764733aa()
    ntdll.dll!77df9f72()
    ntdll.dll!77df9f45()
    Civ4BeyondSword.exe!00790074()
    Civ4BeyondSword.exe!00790074()
    Civ4BeyondSword.exe!0078006f()
    Civ4BeyondSword.exe!0078006f()
    Civ4BeyondSword.exe!0078006f()
    Civ4BeyondSword.exe!0078006f()
    Civ4BeyondSword.exe!0064006e()
    Civ4BeyondSword.exe!0064006e()
    Civ4BeyondSword.exe!0069006c()
    Civ4BeyondSword.exe!0064006e()
    Civ4BeyondSword.exe!0064005f()
    Civ4BeyondSword.exe!0064005f()
    Civ4BeyondSword.exe!0075006c()
    Civ4BeyondSword.exe!0075006c()
    Civ4BeyondSword.exe!0075006c()
    Civ4BeyondSword.exe!0064002e()
    Civ4BeyondSword.exe!0064002e()
    Civ4BeyondSword.exe!0064002e()
    Civ4BeyondSword.exe!0064002e()
    Civ4BeyondSword.exe!0064002e()
    Civ4BeyondSword.exe!0064002e()
    Civ4BeyondSword.exe!0064002e()
    Civ4BeyondSword.exe!0064002e()
    Civ4BeyondSword.exe!0064002e()
    Civ4BeyondSword.exe!0064002e()
    Civ4BeyondSword.exe!0064002e()
    Civ4BeyondSword.exe!0073005f()
    Civ4BeyondSword.exe!0073005f()
    Civ4BeyondSword.exe!0064002e()
    Civ4BeyondSword.exe!0064002e()
    Civ4BeyondSword.exe!0064002e()
    Civ4BeyondSword.exe!0064002e()
    Civ4BeyondSword.exe!0064002e()
    Civ4BeyondSword.exe!0064006e()
    Civ4BeyondSword.exe!0064006e()
    Civ4BeyondSword.exe!0064006e()
    Civ4BeyondSword.exe!0064006e()
    1. Zeile:
    Code:
    bool CvUnitAI::AI_guardCity(bool bLeave, bool bSearch, int iMaxPath)
    {
    	PROFILE_FUNC();
    
    	CLLNode<IDInfo>* pUnitNode;
    	CvCity* pCity;
    	CvCity* pLoopCity;
    	CvUnit* pLoopUnit;
    	CvPlot* pPlot;
    	CvPlot* pBestPlot;
    	CvPlot* pBestGuardPlot;
    	bool bDefend;
    	int iExtra;
    	int iCount;
    	int iPathTurns;
    	int iValue;
    	int iBestValue;
    	int iLoop;
    
    	FAssert(getDomainType() == DOMAIN_LAND);
    	FAssert(canDefend());
    Dabei gilt:
    iBestValue = -858993460
    (auch in den anderen Variablen)
    bLeave = false, bSearch = true, iMaxPath = 1

    Code:
    void CvUnitAI::AI_collateralMove()
    {
    	PROFILE_FUNC();
    	
    	if (AI_leaveAttack(1, 20, 100))
    	{
    		return;
    	}
    
    	if (AI_guardCity(false, true, 1))
    	{
    		return;
    	}
    
    	if (AI_heal(30, 1))
    	{
    		return;
    	}
    
    	if (AI_cityAttack(1, 35))
    	{
    		return;
    	}
    
    	if (AI_anyAttack(1, 45, 3))
    	{
    		return;
    	}
    
    	if (AI_anyAttack(1, 55, 2))
    	{
    		return;
    	}
    
    	if (AI_anyAttack(1, 35, 3))
    	{
    		return;
    	}
    
    	if (AI_anyAttack(1, 30, 4))
    	{
    		return;
    	}
    
    	if (AI_anyAttack(1, 20, 5))
    	{
    		return;
    	}
    
    	if (AI_heal())
    	{
    		return;
    	}
    
    	if (!noDefensiveBonus())
    	{
    		if (AI_guardCity(false, false))
    		{
    			return;
    		}
    	}
    
    	if (AI_anyAttack(2, 55, 3))
    	{
    		return;
    	}
    
    	if (AI_cityAttack(2, 50))
    	{
    		return;
    	}
    
    	if (AI_anyAttack(2, 60))
    	{
    		return;
    	}
    Keine Variablen

    Code:
    		case UNITAI_COLLATERAL:
    			AI_collateralMove();
    			break;
    Was könnte da das Problem sein?

  6. #396
    Civ4 BASE Coder Avatar von rucivfan
    Registriert seit
    10.07.11
    Ort
    Antarktika
    Beiträge
    19.124
    Endweder eine Lufteinheit oder eine Schiffseinheit hat eine Stadtverteidigungs-KI oder Angriffs-KI.
    Gut, besser, BASE. BASE ist eine Modifikation für Civilization IV: Beyond the Sword, die wie eine größere Erweiterung nah am Originalspiel verbleiben soll.

  7. #397
    Moderator Avatar von Kathy
    Registriert seit
    11.10.07
    Beiträge
    18.237
    Könnte es auch eine Immobile-Einheit sein? Die benutze ich für verschiedene Geschützstellungen, die sich nicht bewegen können, aber Fernangriffe ausführen können. Die KI kommt damit allerdings nicht so klar.

  8. #398
    Civ4 BASE Coder Avatar von rucivfan
    Registriert seit
    10.07.11
    Ort
    Antarktika
    Beiträge
    19.124
    Das wäre auch möglihc. Daran habe ich jetzt nicht gedacht, wenn du die Domain meinst.
    Gut, besser, BASE. BASE ist eine Modifikation für Civilization IV: Beyond the Sword, die wie eine größere Erweiterung nah am Originalspiel verbleiben soll.

  9. #399
    Moderator Avatar von Kathy
    Registriert seit
    11.10.07
    Beiträge
    18.237
    Die Frage ist, wie ich mit diesem Problem dann umgehen sollte. Die KI benutzt die Einheiten bislang nicht, vermutlich wegen dieses Fehlers, um Fernangriffe auszuführen.

    Edit: So sehen die Einheiten in der UnitInfos.xml aus:
    Code:
    		<UnitInfo>
    			<Class>UNITCLASS_BALLISTENSTELLUNG</Class>
    			<Type>UNIT_BALLISTENSTELLUNG</Type>
    			<UniqueNames/>
    			<Special>NONE</Special>
    			<Capture>UNITCLASS_BALLISTA</Capture>
    			<Combat>UNITCOMBAT_FORTRESS</Combat>
    			<Domain>DOMAIN_IMMOBILE</Domain>
    			<DefaultUnitAI>UNITAI_ATTACK_AIR</DefaultUnitAI>
    			<Invisible>NONE</Invisible>
    			<SeeInvisible>NONE</SeeInvisible>
    			<Description>TXT_KEY_UNIT_BALLISTENSTELLUNG</Description>
    			<Civilopedia>TXT_KEY_UNIT_CANNON_PEDIA</Civilopedia>
    			<Strategy>TXT_KEY_UNIT_CANNON_STRATEGY</Strategy>
    			<Advisor>ADVISOR_MILITARY</Advisor>
    			<bAnimal>0</bAnimal>
    			<bFood>0</bFood>
    			<bNoBadGoodies>0</bNoBadGoodies>
    			<bOnlyDefensive>0</bOnlyDefensive>
    			<bNoCapture>0</bNoCapture>
    			<bQuickCombat>0</bQuickCombat>
    			<bRivalTerritory>0</bRivalTerritory>
    			<bMilitaryHappiness>1</bMilitaryHappiness>
    			<bMilitarySupport>1</bMilitarySupport>
    			<bMilitaryProduction>1</bMilitaryProduction>
    			<bPillage>0</bPillage>
    			<bSpy>0</bSpy>
    			<bSabotage>0</bSabotage>
    			<bDestroy>0</bDestroy>
    			<bStealPlans>0</bStealPlans>
    			<bInvestigate>0</bInvestigate>
    			<bCounterSpy>0</bCounterSpy>
    			<bFound>0</bFound>
    			<bGoldenAge>0</bGoldenAge>
    			<bInvisible>0</bInvisible>
    			<bFirstStrikeImmune>0</bFirstStrikeImmune>
    			<bNoDefensiveBonus>0</bNoDefensiveBonus>
    			<bIgnoreBuildingDefense>1</bIgnoreBuildingDefense>
    			<bCanMoveImpassable>0</bCanMoveImpassable>
    			<bCanMoveAllTerrain>0</bCanMoveAllTerrain>
    			<bFlatMovementCost>0</bFlatMovementCost>
    			<bIgnoreTerrainCost>0</bIgnoreTerrainCost>
    			<bNukeImmune>0</bNukeImmune>
    			<bPrereqBonuses>0</bPrereqBonuses>
    			<bPrereqReligion>0</bPrereqReligion>
    			<bMechanized>0</bMechanized>
    			<bSuicide>0</bSuicide>
    			<bHiddenNationality>0</bHiddenNationality>
    			<bAlwaysHostile>0</bAlwaysHostile>
    			<UnitClassUpgrades>
    				<UnitClassUpgrade>
    					<UnitClassUpgradeType>UNITCLASS_COASTALFORTRESS</UnitClassUpgradeType>
    					<bUnitClassUpgrade>1</bUnitClassUpgrade>
    				</UnitClassUpgrade>
    			</UnitClassUpgrades>
    			<UnitClassTargets/>
    			<UnitCombatTargets/>
    			<UnitClassDefenders/>
    			<UnitCombatDefenders/>
    			<FlankingStrikes/>
    			<UnitAIs>
    				<UnitAI>
    					<UnitAIType>UNITAI_ATTACK_AIR</UnitAIType>
    					<bUnitAI>1</bUnitAI>
    				</UnitAI>
    			</UnitAIs>
    			<NotUnitAIs/>
    			<Builds/>
    			<ReligionSpreads/>
    			<CorporationSpreads/>
    			<GreatPeoples/>
    			<Buildings/>
    			<ForceBuildings/>
    			<HolyCity>NONE</HolyCity>
    			<ReligionType>NONE</ReligionType>
    			<StateReligion>NONE</StateReligion>
    			<PrereqReligion>NONE</PrereqReligion>
    			<PrereqCorporation>NONE</PrereqCorporation>
    			<PrereqBuilding>NONE</PrereqBuilding>
    			<PrereqTech>TECH_KRIEGSMASCHINEN</PrereqTech>
    			<TechTypes>
    				<PrereqTech>TECH_ARITHMETIK</PrereqTech>
    			</TechTypes>
    			<BonusType>NONE</BonusType>
    			<PrereqBonuses/>
    			<ProductionTraits/>
    			<Flavors/>
    			<iAIWeight>0</iAIWeight>
    			<iCost>50</iCost>
    			<iHurryCostModifier>0</iHurryCostModifier>
    			<iAdvancedStartCost>90</iAdvancedStartCost>
    			<iAdvancedStartCostIncrease>0</iAdvancedStartCostIncrease>
    			<iMinAreaSize>-1</iMinAreaSize>
    			<iMoves>1</iMoves>
    			<bNoRevealMap>0</bNoRevealMap>
    			<iAirRange>1</iAirRange>
    			<iAirUnitCap>0</iAirUnitCap>
    			<iDropRange>0</iDropRange>
    			<iNukeRange>-1</iNukeRange>
    			<iWorkRate>0</iWorkRate>
    			<iBaseDiscover>0</iBaseDiscover>
    			<iDiscoverMultiplier>0</iDiscoverMultiplier>
    			<iBaseHurry>0</iBaseHurry>
    			<iHurryMultiplier>0</iHurryMultiplier>
    			<iBaseTrade>0</iBaseTrade>
    			<iTradeMultiplier>0</iTradeMultiplier>
    			<iGreatWorkCulture>0</iGreatWorkCulture>
    			<iEspionagePoints>0</iEspionagePoints>
    			<TerrainImpassables/>
    			<FeatureImpassables/>
    			<TerrainPassableTechs/>
    			<FeaturePassableTechs/>
    			<iCombat>6</iCombat>
    			<iCombatLimit>80</iCombatLimit>
    			<iAirCombat>2</iAirCombat>
    			<iAirCombatLimit>100</iAirCombatLimit>
    			<iXPValueAttack>4</iXPValueAttack>
    			<iXPValueDefense>2</iXPValueDefense>
    			<iFirstStrikes>2</iFirstStrikes>
    			<iChanceFirstStrikes>1</iChanceFirstStrikes>
    			<iInterceptionProbability>0</iInterceptionProbability>
    			<iEvasionProbability>0</iEvasionProbability>
    			<iWithdrawalProb>0</iWithdrawalProb>
    			<iCollateralDamage>100</iCollateralDamage>
    			<iCollateralDamageLimit>60</iCollateralDamageLimit>
    			<iCollateralDamageMaxUnits>1</iCollateralDamageMaxUnits>
    			<iCityAttack>0</iCityAttack>
    			<iCityDefense>0</iCityDefense>
    			<iAnimalCombat>0</iAnimalCombat>
    			<iHillsAttack>0</iHillsAttack>
    			<iHillsDefense>0</iHillsDefense>
    			<TerrainNatives/>
    			<FeatureNatives/>
    			<TerrainAttacks/>
    			<TerrainDefenses/>
    			<FeatureAttacks/>
    			<FeatureDefenses/>
    			<UnitClassAttackMods/>
    			<UnitClassDefenseMods/>
    			<UnitCombatMods/>
    			<UnitCombatCollateralImmunes>
    				<UnitCombatCollateralImmune>
    					<UnitCombatType>UNITCOMBAT_SIEGE</UnitCombatType>
    					<iUnitCombatCollateralImmune>1</iUnitCombatCollateralImmune>
    				</UnitCombatCollateralImmune>
    				<UnitCombatCollateralImmune>
    					<UnitCombatType>UNITCOMBAT_GESCHUETZ</UnitCombatType>
    					<iUnitCombatCollateralImmune>1</iUnitCombatCollateralImmune>
    				</UnitCombatCollateralImmune>
    			</UnitCombatCollateralImmunes>
    			<DomainMods/>
    			<BonusProductionModifiers/>
    			<iBombRate>0</iBombRate>
    			<iBombardRate>0</iBombardRate>
    			<SpecialCargo>NONE</SpecialCargo>
    			<DomainCargo>NONE</DomainCargo>
    			<iCargo>0</iCargo>
    			<iConscription>0</iConscription>
    			<iCultureGarrison>7</iCultureGarrison>
    			<iExtraCost>0</iExtraCost>
    			<iAsset>3</iAsset>
    			<iPower>8</iPower>
    			<UnitMeshGroups>
    				<iGroupSize>2</iGroupSize>
    				<fMaxSpeed>1.75</fMaxSpeed>
    				<fPadTime>1</fPadTime>
    				<iMeleeWaveSize>2</iMeleeWaveSize>
    				<iRangedWaveSize>2</iRangedWaveSize>
    				<UnitMeshGroup>
    					<iRequired>2</iRequired>
    					<EarlyArtDefineTag>ART_DEF_UNIT_BALLISTENSTELLUNG</EarlyArtDefineTag>
    				</UnitMeshGroup>
    			</UnitMeshGroups>
    			<FormationType>FORMATION_TYPE_MACHINE</FormationType>
    			<HotKey/>
    			<bAltDown>0</bAltDown>
    			<bShiftDown>0</bShiftDown>
    			<bCtrlDown>0</bCtrlDown>
    			<iHotKeyPriority>0</iHotKeyPriority>
    			<FreePromotions/>
    			<LeaderPromotion>NONE</LeaderPromotion>
    			<iLeaderExperience>0</iLeaderExperience>
    		</UnitInfo>
    		<UnitInfo>
    			<Class>UNITCLASS_COASTALFORTRESS</Class>
    			<Type>UNIT_COASTALFORTRESS</Type>
    			<UniqueNames/>
    			<Special>NONE</Special>
    			<Capture>UNITCLASS_BOMBARD</Capture>
    			<Combat>UNITCOMBAT_FORTRESS</Combat>
    			<Domain>DOMAIN_IMMOBILE</Domain>
    			<DefaultUnitAI>UNITAI_COLLATERAL</DefaultUnitAI>
    			<Invisible>NONE</Invisible>
    			<SeeInvisible>NONE</SeeInvisible>
    			<Description>TXT_KEY_UNIT_COASTALFORTRESS</Description>
    			<Civilopedia>TXT_KEY_UNIT_CANNON_PEDIA</Civilopedia>
    			<Strategy>TXT_KEY_UNIT_CANNON_STRATEGY</Strategy>
    			<Advisor>ADVISOR_MILITARY</Advisor>
    			<bAnimal>0</bAnimal>
    			<bFood>0</bFood>
    			<bNoBadGoodies>0</bNoBadGoodies>
    			<bOnlyDefensive>0</bOnlyDefensive>
    			<bNoCapture>0</bNoCapture>
    			<bQuickCombat>0</bQuickCombat>
    			<bRivalTerritory>0</bRivalTerritory>
    			<bMilitaryHappiness>1</bMilitaryHappiness>
    			<bMilitarySupport>1</bMilitarySupport>
    			<bMilitaryProduction>1</bMilitaryProduction>
    			<bPillage>0</bPillage>
    			<bSpy>0</bSpy>
    			<bSabotage>0</bSabotage>
    			<bDestroy>0</bDestroy>
    			<bStealPlans>0</bStealPlans>
    			<bInvestigate>0</bInvestigate>
    			<bCounterSpy>0</bCounterSpy>
    			<bFound>0</bFound>
    			<bGoldenAge>0</bGoldenAge>
    			<bInvisible>0</bInvisible>
    			<bFirstStrikeImmune>0</bFirstStrikeImmune>
    			<bNoDefensiveBonus>0</bNoDefensiveBonus>
    			<bIgnoreBuildingDefense>1</bIgnoreBuildingDefense>
    			<bCanMoveImpassable>0</bCanMoveImpassable>
    			<bCanMoveAllTerrain>0</bCanMoveAllTerrain>
    			<bFlatMovementCost>0</bFlatMovementCost>
    			<bIgnoreTerrainCost>0</bIgnoreTerrainCost>
    			<bNukeImmune>0</bNukeImmune>
    			<bPrereqBonuses>0</bPrereqBonuses>
    			<bPrereqReligion>0</bPrereqReligion>
    			<bMechanized>0</bMechanized>
    			<bSuicide>0</bSuicide>
    			<bHiddenNationality>0</bHiddenNationality>
    			<bAlwaysHostile>0</bAlwaysHostile>
    			<UnitClassUpgrades>
    				<UnitClassUpgrade>
    					<UnitClassUpgradeType>UNITCLASS_COASTALFORTRESS2</UnitClassUpgradeType>
    					<bUnitClassUpgrade>1</bUnitClassUpgrade>
    				</UnitClassUpgrade>
    			</UnitClassUpgrades>
    			<UnitClassTargets/>
    			<UnitCombatTargets/>
    			<UnitClassDefenders/>
    			<UnitCombatDefenders/>
    			<FlankingStrikes/>
    			<UnitAIs>
    				<UnitAI>
    					<UnitAIType>UNITAI_COLLATERAL</UnitAIType>
    					<bUnitAI>1</bUnitAI>
    				</UnitAI>
    				<UnitAI>
    					<UnitAIType>UNITAI_ATTACK</UnitAIType>
    					<bUnitAI>1</bUnitAI>
    				</UnitAI>
    			</UnitAIs>
    			<NotUnitAIs/>
    			<Builds/>
    			<ReligionSpreads/>
    			<CorporationSpreads/>
    			<GreatPeoples/>
    			<Buildings/>
    			<ForceBuildings/>
    			<HolyCity>NONE</HolyCity>
    			<ReligionType>NONE</ReligionType>
    			<StateReligion>NONE</StateReligion>
    			<PrereqReligion>NONE</PrereqReligion>
    			<PrereqCorporation>NONE</PrereqCorporation>
    			<PrereqBuilding>NONE</PrereqBuilding>
    			<PrereqTech>TECH_ALLOYS</PrereqTech>
    			<TechTypes>
    				<PrereqTech>TECH_BALLISTIK</PrereqTech>
    			</TechTypes>
    			<BonusType>NONE</BonusType>
    			<PrereqBonuses>
    				<BonusType>BONUS_COPPER</BonusType>
    				<BonusType>BONUS_IRON</BonusType>
    			</PrereqBonuses>
    			<ProductionTraits/>
    			<Flavors/>
    			<iAIWeight>0</iAIWeight>
    			<iCost>105</iCost>
    			<iHurryCostModifier>0</iHurryCostModifier>
    			<iAdvancedStartCost>90</iAdvancedStartCost>
    			<iAdvancedStartCostIncrease>0</iAdvancedStartCostIncrease>
    			<iMinAreaSize>-1</iMinAreaSize>
    			<iMoves>1</iMoves>
    			<bNoRevealMap>0</bNoRevealMap>
    			<iAirRange>2</iAirRange>
    			<iAirUnitCap>0</iAirUnitCap>
    			<iDropRange>0</iDropRange>
    			<iNukeRange>-1</iNukeRange>
    			<iWorkRate>0</iWorkRate>
    			<iBaseDiscover>0</iBaseDiscover>
    			<iDiscoverMultiplier>0</iDiscoverMultiplier>
    			<iBaseHurry>0</iBaseHurry>
    			<iHurryMultiplier>0</iHurryMultiplier>
    			<iBaseTrade>0</iBaseTrade>
    			<iTradeMultiplier>0</iTradeMultiplier>
    			<iGreatWorkCulture>0</iGreatWorkCulture>
    			<iEspionagePoints>0</iEspionagePoints>
    			<TerrainImpassables/>
    			<FeatureImpassables/>
    			<TerrainPassableTechs/>
    			<FeaturePassableTechs/>
    			<iCombat>16</iCombat>
    			<iCombatLimit>80</iCombatLimit>
    			<iAirCombat>2</iAirCombat>
    			<iAirCombatLimit>100</iAirCombatLimit>
    			<iXPValueAttack>4</iXPValueAttack>
    			<iXPValueDefense>2</iXPValueDefense>
    			<iFirstStrikes>1</iFirstStrikes>
    			<iChanceFirstStrikes>0</iChanceFirstStrikes>
    			<iInterceptionProbability>0</iInterceptionProbability>
    			<iEvasionProbability>0</iEvasionProbability>
    			<iWithdrawalProb>0</iWithdrawalProb>
    			<iCollateralDamage>100</iCollateralDamage>
    			<iCollateralDamageLimit>60</iCollateralDamageLimit>
    			<iCollateralDamageMaxUnits>4</iCollateralDamageMaxUnits>
    			<iCityAttack>0</iCityAttack>
    			<iCityDefense>0</iCityDefense>
    			<iAnimalCombat>0</iAnimalCombat>
    			<iHillsAttack>0</iHillsAttack>
    			<iHillsDefense>0</iHillsDefense>
    			<TerrainNatives/>
    			<FeatureNatives/>
    			<TerrainAttacks/>
    			<TerrainDefenses/>
    			<FeatureAttacks/>
    			<FeatureDefenses/>
    			<UnitClassAttackMods/>
    			<UnitClassDefenseMods/>
    			<UnitCombatMods>
    				<UnitCombatMod>
    					<UnitCombatType>UNITCOMBAT_NAVAL</UnitCombatType>
    					<iUnitCombatMod>100</iUnitCombatMod>
    				</UnitCombatMod>
    				<UnitCombatMod>
    					<UnitCombatType>UNITCOMBAT_MARINE</UnitCombatType>
    					<iUnitCombatMod>100</iUnitCombatMod>
    				</UnitCombatMod>
    				<UnitCombatMod>
    					<UnitCombatType>UNITCOMBAT_TRANSPORT</UnitCombatType>
    					<iUnitCombatMod>100</iUnitCombatMod>
    				</UnitCombatMod>
    			</UnitCombatMods>
    			<UnitCombatCollateralImmunes>
    				<UnitCombatCollateralImmune>
    					<UnitCombatType>UNITCOMBAT_SIEGE</UnitCombatType>
    					<iUnitCombatCollateralImmune>1</iUnitCombatCollateralImmune>
    				</UnitCombatCollateralImmune>
    				<UnitCombatCollateralImmune>
    					<UnitCombatType>UNITCOMBAT_GESCHUETZ</UnitCombatType>
    					<iUnitCombatCollateralImmune>1</iUnitCombatCollateralImmune>
    				</UnitCombatCollateralImmune>
    			</UnitCombatCollateralImmunes>
    			<DomainMods/>
    			<BonusProductionModifiers/>
    			<iBombRate>0</iBombRate>
    			<iBombardRate>0</iBombardRate>
    			<SpecialCargo>NONE</SpecialCargo>
    			<DomainCargo>NONE</DomainCargo>
    			<iCargo>0</iCargo>
    			<iConscription>0</iConscription>
    			<iCultureGarrison>7</iCultureGarrison>
    			<iExtraCost>0</iExtraCost>
    			<iAsset>3</iAsset>
    			<iPower>8</iPower>
    			<UnitMeshGroups>
    				<iGroupSize>1</iGroupSize>
    				<fMaxSpeed>1.75</fMaxSpeed>
    				<fPadTime>1</fPadTime>
    				<iMeleeWaveSize>2</iMeleeWaveSize>
    				<iRangedWaveSize>2</iRangedWaveSize>
    				<UnitMeshGroup>
    					<iRequired>2</iRequired>
    					<EarlyArtDefineTag>ART_DEF_UNIT_COASTALFORTRESS</EarlyArtDefineTag>
    					<LateArtDefineTag>ART_DEF_UNIT_COASTALFORTRESS_MODERN</LateArtDefineTag>
    				</UnitMeshGroup>
    			</UnitMeshGroups>
    			<FormationType>FORMATION_TYPE_MACHINE</FormationType>
    			<HotKey/>
    			<bAltDown>0</bAltDown>
    			<bShiftDown>0</bShiftDown>
    			<bCtrlDown>0</bCtrlDown>
    			<iHotKeyPriority>0</iHotKeyPriority>
    			<FreePromotions/>
    			<LeaderPromotion>NONE</LeaderPromotion>
    			<iLeaderExperience>0</iLeaderExperience>
    		</UnitInfo>
    Geändert von Kathy (06. September 2013 um 19:54 Uhr)

  10. #400
    Civ4 BASE Coder Avatar von rucivfan
    Registriert seit
    10.07.11
    Ort
    Antarktika
    Beiträge
    19.124
    Dazu habe ich keine Erfahrung. Wird seine Gründe haben. warum sie nicht durch Firaxis genutzt wurde.
    Gut, besser, BASE. BASE ist eine Modifikation für Civilization IV: Beyond the Sword, die wie eine größere Erweiterung nah am Originalspiel verbleiben soll.

  11. #401
    Moderator Avatar von Kathy
    Registriert seit
    11.10.07
    Beiträge
    18.237
    Firaxis hat viele Dinge nicht genutzt, die andere Modder eingebaut haben. Daher ist für mich die Frage, ob man es nicht nutzbar machen kann.

  12. #402
    Moderator Avatar von Kathy
    Registriert seit
    11.10.07
    Beiträge
    18.237
    So, die IMMOBILE-Geschütze werden nun auch von der KI zum Fernangriff genutzt, dank Rucivfan ist damit mein erstes SDK-Projekt erfolgreich. Werde nun ein neues Debug-Spiel starten müssen, um zu testen, ob damit auch dieser Fehler beseitigt ist.

  13. #403
    Moderator Avatar von Kathy
    Registriert seit
    11.10.07
    Beiträge
    18.237
    Ich hatte noch einmal ein Assert:
    Assert Failed

    File: CvSelectionGroupAI.cpp
    Line: 237
    Expression: false
    Message:

    ----------------------------------------------------------
    Hier der Stack:
    > CvGameCoreDLL.dll!CvSelectionGroupAI::AI_update() Zeile 237 + 0x39 Bytes C++
    CvGameCoreDLL.dll!CvPlayerAI::AI_unitUpdate() Zeile 1478 + 0xd Bytes C++
    CvGameCoreDLL.dll!CvGame::updateMoves() Zeile 6671 + 0x13 Bytes C++
    CvGameCoreDLL.dll!CvGame::update() Zeile 2087 C++
    Civ4BeyondSword.exe!00415321()
    [Unten angegebene Rahmen sind möglicherweise nicht korrekt und/oder fehlen, keine Symbole geladen für Civ4BeyondSword.exe]
    KernelBase.dll!7577af21()
    Civ4BeyondSword.exe!006846f7()
    Civ4BeyondSword.exe!00411a7d()
    Civ4BeyondSword.exe!00686bc8()
    Civ4BeyondSword.exe!004d6f46()
    Civ4BeyondSword.exe!008f497f()
    kernel32.dll!74b9336a()
    ntdll.dll!770f9f72()
    ntdll.dll!770f9f45()
    Civ4BeyondSword.exe!00790074()
    Civ4BeyondSword.exe!00790074()
    Civ4BeyondSword.exe!0078006f()
    Civ4BeyondSword.exe!0078006f()
    Civ4BeyondSword.exe!0078006f()
    Civ4BeyondSword.exe!0078006f()
    Civ4BeyondSword.exe!0064006e()
    Civ4BeyondSword.exe!0064006e()
    Civ4BeyondSword.exe!0069006c()
    Civ4BeyondSword.exe!0064006e()
    Civ4BeyondSword.exe!0064005f()
    Civ4BeyondSword.exe!0064005f()
    Civ4BeyondSword.exe!0075006c()
    Civ4BeyondSword.exe!0075006c()
    Civ4BeyondSword.exe!0075006c()
    Civ4BeyondSword.exe!0064002e()
    Civ4BeyondSword.exe!0064002e()
    Civ4BeyondSword.exe!0064002e()
    Civ4BeyondSword.exe!0064002e()
    Civ4BeyondSword.exe!0064002e()
    Civ4BeyondSword.exe!0064002e()
    Civ4BeyondSword.exe!0064002e()
    Civ4BeyondSword.exe!0064002e()
    Civ4BeyondSword.exe!0064002e()
    Civ4BeyondSword.exe!0064002e()
    Civ4BeyondSword.exe!0064002e()
    Civ4BeyondSword.exe!0073005f()
    Civ4BeyondSword.exe!0073005f()
    Civ4BeyondSword.exe!0064002e()
    Civ4BeyondSword.exe!0064002e()
    Civ4BeyondSword.exe!0064002e()
    Civ4BeyondSword.exe!0064002e()
    Civ4BeyondSword.exe!0064002e()
    Civ4BeyondSword.exe!0064006e()
    Civ4BeyondSword.exe!0064006e()
    Civ4BeyondSword.exe!0064006e()
    Civ4BeyondSword.exe!0064006e()
    Und die einzelnen Codeteile:
    Code:
    	if (isForceUpdate())
    	{
    		clearMissionQueue(); // XXX ???
    		setActivityType(ACTIVITY_AWAKE);
    		setForceUpdate(false);
    
    		// if we are in the middle of attacking with a stack, cancel it
    		AI_cancelGroupAttack();
    	}
    
    	FAssert(!(GET_PLAYER(getOwnerINLINE()).isAutoMoves()));
    
    	int iTempHack = 0; // XXX
    
    	bDead = false;
    	
    	bool bFailedAlreadyFighting = false;
    	while ((m_bGroupAttack && !bFailedAlreadyFighting) || readyToMove())
    	{
    		iTempHack++;
    		if (iTempHack > 100)
    		{
    			FAssert(false);
    			CvUnit* pHeadUnit = getHeadUnit();
    			if (NULL != pHeadUnit)
    			{
    				if (GC.getLogging())
    				{
    					TCHAR szOut[1024];
    					CvWString szTempString;
    					getUnitAIString(szTempString, pHeadUnit->AI_getUnitAIType());
    					sprintf(szOut, "Unit stuck in loop: %S(%S)[%d, %d] (%S)\n", pHeadUnit->getName().GetCString(), GET_PLAYER(pHeadUnit->getOwnerINLINE()).getName(),
    						pHeadUnit->getX_INLINE(), pHeadUnit->getY_INLINE(), szTempString.GetCString());
    					gDLL->messageControlLog(szOut);
    				}
    				
    				pHeadUnit->finishMoves();
    			}
    			break;
    		}
    iTempHack ist 101
    bFailedAlreadyFighting ist false
    bDead ist false

    Zeile 2:
    Code:
    void CvPlayerAI::AI_unitUpdate()
    {
    	PROFILE_FUNC();
    
    	CLLNode<int>* pCurrUnitNode;
    	CvSelectionGroup* pLoopSelectionGroup;
    	CLinkList<int> tempGroupCycle;
    	CLinkList<int> finalGroupCycle;
    	int iValue;
    
    	if (!hasBusyUnit())
    	{
    		pCurrUnitNode = headGroupCycleNode();
    
    		while (pCurrUnitNode != NULL)
    		{
    			pLoopSelectionGroup = getSelectionGroup(pCurrUnitNode->m_data);
    			pCurrUnitNode = nextGroupCycleNode(pCurrUnitNode);
    
    			if (pLoopSelectionGroup->AI_isForceSeparate())
    			{
    				// do not split groups that are in the midst of attacking
    				if (pLoopSelectionGroup->isForceUpdate() || !pLoopSelectionGroup->AI_isGroupAttack())
    				{
    					pLoopSelectionGroup->AI_separate();	// pointers could become invalid...
    				}
    			}
    		}
    
    		if (isHuman())
    		{
    			pCurrUnitNode = headGroupCycleNode();
    
    			while (pCurrUnitNode != NULL)
    			{
    				pLoopSelectionGroup = getSelectionGroup(pCurrUnitNode->m_data);
    				pCurrUnitNode = nextGroupCycleNode(pCurrUnitNode);
    
    				if (pLoopSelectionGroup->AI_update())
    				{
    					break; // pointers could become invalid...
    				}
    			}
    		}
    		else
    		{
    			tempGroupCycle.clear();
    			finalGroupCycle.clear();
    
    			pCurrUnitNode = headGroupCycleNode();
    
    			while (pCurrUnitNode != NULL)
    			{
    				tempGroupCycle.insertAtEnd(pCurrUnitNode->m_data);
    				pCurrUnitNode = nextGroupCycleNode(pCurrUnitNode);
    			}
    
    			iValue = 0;
    
    			while (tempGroupCycle.getLength() > 0)
    			{
    				pCurrUnitNode = tempGroupCycle.head();
    
    				while (pCurrUnitNode != NULL)
    				{
    					pLoopSelectionGroup = getSelectionGroup(pCurrUnitNode->m_data);
    					FAssertMsg(pLoopSelectionGroup != NULL, "selection group node with NULL selection group");
    
    					if (AI_movementPriority(pLoopSelectionGroup) <= iValue)
    					{
    						finalGroupCycle.insertAtEnd(pCurrUnitNode->m_data);
    						pCurrUnitNode = tempGroupCycle.deleteNode(pCurrUnitNode);
    					}
    					else
    					{
    						pCurrUnitNode = tempGroupCycle.next(pCurrUnitNode);
    					}
    				}
    
    				iValue++;
    			}
    
    			pCurrUnitNode = finalGroupCycle.head();
    
    			while (pCurrUnitNode != NULL)
    			{
    				pLoopSelectionGroup = getSelectionGroup(pCurrUnitNode->m_data);
    
    				if (NULL != pLoopSelectionGroup)  // group might have been killed by a previous group update
    				{
    					if (pLoopSelectionGroup->AI_update())
    					{
    						break; // pointers could become invalid...
    					}
    				}
    
    				pCurrUnitNode = finalGroupCycle.next(pCurrUnitNode);
    			}
    		}
    	}
    }
    iValue=18

    Zeile 3:
    Code:
    void CvGame::updateMoves()
    {
    	CvSelectionGroup* pLoopSelectionGroup;
    	int aiShuffle[MAX_PLAYERS];
    	int iLoop;
    	int iI;
    
    	if (isMPOption(MPOPTION_SIMULTANEOUS_TURNS))
    	{
    		shuffleArray(aiShuffle, MAX_PLAYERS, getSorenRand());
    	}
    	else
    	{
    		for (iI = 0; iI < MAX_PLAYERS; iI++)
    		{
    			aiShuffle[iI] = iI;
    		}
    	}
    
    	for (iI = 0; iI < MAX_PLAYERS; iI++)
    	{
    		CvPlayer& player = GET_PLAYER((PlayerTypes)(aiShuffle[iI]));
    
    		if (player.isAlive())
    		{
    			if (player.isTurnActive())
    			{
    				if (!(player.isAutoMoves()))
    				{
    					player.AI_unitUpdate();
    
    					if (!(player.isHuman()))
    					{
    						if (!(player.hasBusyUnit()) && !(player.hasReadyUnit(true)))
    						{
    							player.setAutoMoves(true);
    						}
    					}
    				}
    
    				if (player.isAutoMoves())
    				{
    					for(pLoopSelectionGroup = player.firstSelectionGroup(&iLoop); pLoopSelectionGroup; pLoopSelectionGroup = player.nextSelectionGroup(&iLoop))
    					{
    						pLoopSelectionGroup->autoMission();
    					}
    
    					if (!(player.hasBusyUnit()))
    					{
    						player.setAutoMoves(false);
    					}
    				}
    			}
    		}
    	}
    }
    player = {m_iStartingX=61 m_iStartingY=14 m_iTotalPopulation=25 ...}
    iI =6
    iLoop = 22

    Zeile 4:
    Code:
    void CvGame::update()
    {
    	PROFILE("CvGame::update");
    
    	if (!gDLL->GetWorldBuilderMode() || isInAdvancedStart())
    	{
    		sendPlayerOptions();
    
    		// sample generic event
    		CyArgsList pyArgs;
    		pyArgs.add(getTurnSlice());
    		CvEventReporter::getInstance().genericEvent("gameUpdate", pyArgs.makeFunctionArgs());
    
    		if (getTurnSlice() == 0)
    		{
    			gDLL->getEngineIFace()->AutoSave(true);
    		}
    
    		if (getNumGameTurnActive() == 0)
    		{
    			if (!isPbem() || !getPbemTurnSent())
    			{
    				doTurn();
    			}
    		}
    
    		updateScore();
    
    		updateWar();
    
    		updateMoves();
    
    		updateTimers();
    Ich muss sagen, ich verstehe immer noch nicht genug vom SDK.

  14. #404
    Civ4 BASE Coder Avatar von rucivfan
    Registriert seit
    10.07.11
    Ort
    Antarktika
    Beiträge
    19.124
    iTempHack dient dazu, eine Endlosrekursion zu verhindern. Deswegen meldet sich der FAssert. Sollte dort bleiben, aber ändern kannst du wohl nichts daran. Sonst hätte ich den Code auch schon geändert.
    Gut, besser, BASE. BASE ist eine Modifikation für Civilization IV: Beyond the Sword, die wie eine größere Erweiterung nah am Originalspiel verbleiben soll.

  15. #405
    Moderator Avatar von Kathy
    Registriert seit
    11.10.07
    Beiträge
    18.237
    Und welche Ursache hat diese Endlosrekursion? Ist die KI da mit ihren Auswahlmöglichkeiten überfordert und versucht zu viele Möglichkeiten, oder was passiert da? Kann man die Wahrscheinlichkeit für dieses Problem verringern? Lohnt sich das überhaupt?

Seite 27 von 32 ErsteErste ... 17232425262728293031 ... LetzteLetzte

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein
  •