1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Help with space units?

Discussion in 'Civ4 - General Discussions' started by Sturmgewher88mm, Jan 11, 2016.

  1. Sturmgewher88mm

    Sturmgewher88mm Kaiser

    Joined:
    Sep 28, 2013
    Messages:
    388
    Gender:
    Male
    Location:
    石川琉球
    So I had the idea of making a space units mod. I figure that the best way to do it is to make a DOMAIN_SPACE but I don't know how to do that. The main units I want to make are satellites that kill units or destroy cities, but can't be attacked by any of the base units. I've already picked out some skins for units.

    http://forums.civfanatics.com/downloads.php?do=file&id=2536

    http://forums.civfanatics.com/downloads.php?do=file&id=2152

    http://forums.civfanatics.com/downloads.php?do=file&id=9306

    http://forums.civfanatics.com/downloads.php?do=file&id=2531

    Any tips or suggestions?
     
  2. vincentz

    vincentz Programmer

    Joined:
    Feb 4, 2009
    Messages:
    3,556
    Gender:
    Male
    Location:
    Denmark
    The easy :
    CIV4InvisibleInfos.xml
    Make a new Invisibility called SPACE.

    CIV4UnitInfos.xml
    Use the Gunship as a template
    Give the units <Invisible>INVISIBLE_SPACE</Invisible>
    Make units able to rangestrike (by giving them both <iCombat> and <iAirCombat> as well as <iAirRange>)
    <bOnlyDefensive> makes it so they cant attack directly (and be injured by spearmen)

    these should prolly also be 1:

    <bNoCapture>0</bNoCapture>
    <bRivalTerritory>0</bRivalTerritory>

    <bCanMoveImpassable>0</bCanMoveImpassable>
    <bCanMoveAllTerrain>0</bCanMoveAllTerrain>
    <bFlatMovementCost>0</bFlatMovementCost>
    <bIgnoreTerrainCost>0</bIgnoreTerrainCost>




    However... im pretty sure AI wont use them properly, which leads to the hard part SDK changes... Donno if you wanna go advanced? ;)
    Setting up a new domain would require tons of work in the gamecore.dll too
     
  3. Sturmgewher88mm

    Sturmgewher88mm Kaiser

    Joined:
    Sep 28, 2013
    Messages:
    388
    Gender:
    Male
    Location:
    石川琉球
    Thanks! I'll try it out and let you know how it goes :D
     
  4. Sturmgewher88mm

    Sturmgewher88mm Kaiser

    Joined:
    Sep 28, 2013
    Messages:
    388
    Gender:
    Male
    Location:
    石川琉球
    Spoiler :
    <UnitInfo>
    <Class>UNITCLASS_LOKI</Class>
    <Type>UNIT_LOKI</Type>
    <UniqueNames/>
    <Special>NONE</Special>
    <Capture>NONE</Capture>
    <Combat>UNITCOMBAT_AIR</Combat>
    <Domain>DOMAIN_LAND</Domain>
    <DefaultUnitAI>UNITAI_ATTACK</DefaultUnitAI>
    <Invisible>INVISIBLE_SPACE</Invisible>
    <SeeInvisible>INVISIBLE_SPACE</SeeInvisible>
    <Description>TXT_KEY_UNIT_LOKI</Description>
    <Civilopedia>TXT_KEY_TECH_SATELLITES_PEDIA</Civilopedia>
    <Strategy>TXT_KEY_UNIT_LOKI_STRATEGY</Strategy>
    <Advisor>ADVISOR_MILITARY</Advisor>
    <bAnimal>0</bAnimal>
    <bFood>0</bFood>
    <bNoBadGoodies>0</bNoBadGoodies>
    <bOnlyDefensive>1</bOnlyDefensive>
    <bNoCapture>1</bNoCapture>
    <bQuickCombat>0</bQuickCombat>
    <bRivalTerritory>1</bRivalTerritory>
    <bMilitaryHappiness>0</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>1</bNoDefensiveBonus>
    <bIgnoreBuildingDefense>1</bIgnoreBuildingDefense>
    <bCanMoveImpassable>1</bCanMoveImpassable>
    <bCanMoveAllTerrain>1</bCanMoveAllTerrain>
    <bFlatMovementCost>1</bFlatMovementCost>
    <bIgnoreTerrainCost>1</bIgnoreTerrainCost>
    <bNukeImmune>0</bNukeImmune>
    <bPrereqBonuses>0</bPrereqBonuses>
    <bPrereqReligion>0</bPrereqReligion>
    <bMechanized>0</bMechanized>
    <bSuicide>0</bSuicide>
    <bHiddenNationality>0</bHiddenNationality>
    <bAlwaysHostile>0</bAlwaysHostile>
    <UnitClassUpgrades/>
    <UnitClassTargets/>
    <UnitCombatTargets/>
    <UnitClassDefenders/>
    <UnitCombatDefenders/>
    <FlankingStrikes/>
    <UnitAIs>
    <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_SATELLITES</PrereqTech>
    <TechTypes>
    <PrereqTech>TECH_ROCKETRY</PrereqTech>
    <PrereqTech>TECH_ROBOTICS</PrereqTech>
    <PrereqTech>NONE</PrereqTech>
    </TechTypes>
    <BonusType>BONUS_ALUMINUM</BonusType>
    <PrereqBonuses/>
    <ProductionTraits/>
    <Flavors/>
    <iAIWeight>0</iAIWeight>
    <iCost>300</iCost>
    <iHurryCostModifier>0</iHurryCostModifier>
    <iAdvancedStartCost>400</iAdvancedStartCost>
    <iAdvancedStartCostIncrease>0</iAdvancedStartCostIncrease>
    <iMinAreaSize>-1</iMinAreaSize>
    <iMoves>30</iMoves>
    <bNoRevealMap>0</bNoRevealMap>
    <iAirRange>5</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>100</iCombat>
    <iCombatLimit>100</iCombatLimit>
    <iAirCombat>100</iAirCombat>
    <iAirCombatLimit>0</iAirCombatLimit>
    <iXPValueAttack>4</iXPValueAttack>
    <iXPValueDefense>2</iXPValueDefense>
    <iFirstStrikes>0</iFirstStrikes>
    <iChanceFirstStrikes>0</iChanceFirstStrikes>
    <iInterceptionProbability>0</iInterceptionProbability>
    <iEvasionProbability>0</iEvasionProbability>
    <iWithdrawalProb>0</iWithdrawalProb>
    <iCollateralDamage>0</iCollateralDamage>
    <iCollateralDamageLimit>0</iCollateralDamageLimit>
    <iCollateralDamageMaxUnits>0</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/>
    <DomainMods/>
    <BonusProductionModifiers/>
    <iBombRate>0</iBombRate>
    <iBombardRate>50</iBombardRate>
    <SpecialCargo>NONE</SpecialCargo>
    <DomainCargo>NONE</DomainCargo>
    <iCargo>0</iCargo>
    <iConscription>0</iConscription>
    <iCultureGarrison>0</iCultureGarrison>
    <iExtraCost>0</iExtraCost>
    <iAsset>5</iAsset>
    <iPower>20</iPower>
    <UnitMeshGroups>
    <iGroupSize>1</iGroupSize>
    <fMaxSpeed>1.75</fMaxSpeed>
    <fPadTime>1</fPadTime>
    <iMeleeWaveSize>1</iMeleeWaveSize>
    <iRangedWaveSize>1</iRangedWaveSize>
    <UnitMeshGroup>
    <iRequired>1</iRequired>
    <EarlyArtDefineTag>ART_DEF_UNIT_LOKI</EarlyArtDefineTag>
    </UnitMeshGroup>
    </UnitMeshGroups>
    <FormationType>FORMATION_TYPE_MACHINE</FormationType>
    <HotKey/>
    <bAltDown>0</bAltDown>
    <bShiftDown>0</bShiftDown>
    <bCtrlDown>0</bCtrlDown>
    <iHotKeyPriority>0</iHotKeyPriority>
    <FreePromotions>
    <FreePromotion>
    <PromotionType>PROMOTION_SENTRY</PromotionType>
    <bFreePromotion>1</bFreePromotion>
    </FreePromotion>
    <FreePromotion>
    <PromotionType>PROMOTION_BLITZ</PromotionType>
    <bFreePromotion>1</bFreePromotion>
    </FreePromotion>
    </FreePromotions>
    <LeaderPromotion>NONE</LeaderPromotion>
    <iLeaderExperience>0</iLeaderExperience>
    </UnitInfo>


    So far so good. Currently the satellites can attack each other but can't be attacked by other units (a space interceptor might come in handy). Not sure how the AI will handle them though since I'm mostly using what's already at hand.
     

Share This Page