how to tell difference between ship sub-types?

Moderator: Makail

Post Reply
User avatar
Dragonblade
Posts: 179
Joined: Sat Feb 27, 2010 12:54 am

how to tell difference between ship sub-types?

Post by Dragonblade » Tue Jan 24, 2012 7:51 am

Ok, so I've been poking around with the section files so I can make a mod, and I can't figure out a few things.

The big one is how to tell if a ship is a battlerider or a normal ship. (or battlecruiser/normalcruiser) The .section files are less than helpful on this point. lets take for example the drone and the assault shuttle. both are listed in the sections.xml as type="mission" and class="battlerider" yet they take very different slots on ships. Nothing, and I do mean nothing, in the section files tells it what kind of rider it is as far as I can tell. on some of the more advanced things, like heavy drones, have a required tech thing which I can believe tells the game what kind of rider it is, but the things you can start with like drones, assault shuttles, boarding pods and the like, don't. How does the game know if a section file is a bio-missile or a drone or assaultshuttle?

Also: lets say I want to make a battlerider ship with the blue armor layer, which they normally don't have. There doesn't seem to be a shipsection line that does that, it appears to be in the section.xml instead. (specifically, class="cruiser") but this then tells it to build as a cruiser and cannot be used as a battlerider, even though it requires the tech for battleriders. So maybe the tech link is not how to tell it what kind of sub-type the section is.

Anyone have any ideas how this works?

(and yes, I realize this is jumping the gun on modding considering how fast patches are coming out and there are no modding tools)
"Truth is relative."

User avatar
Rayp
Posts: 1516
Joined: Tue Aug 29, 2006 10:44 am

Re: how to tell difference between ship sub-types?

Post by Rayp » Tue Jan 24, 2012 2:27 pm

From what i understand, the type of battlerider is determined by it's class (destroyer, cruiser, dreadnaught), and the blue armor bonus is also tied to it.

User avatar
Dragonblade
Posts: 179
Joined: Sat Feb 27, 2010 12:54 am

Re: how to tell difference between ship sub-types?

Post by Dragonblade » Wed Jan 25, 2012 1:15 am

...not helpful and doesn't answer my question.

So I'm going to have to do this the hard, wall of text, way.

from "_sections.xml" in assets/base/factions/morrigi/sections.
<Section File="factions/morrigi/sections/br_drone.section" Type="Mission" Class="BattleRider"/>
<Section File="factions/morrigi/sections/br_boarding_pod.section" Type="Mission" Class="BattleRider"/>
<Section File="factions/morrigi/sections/br_msn_spinal.section" Type="Mission" Class="BattleRider"/>

from "br_drone.section" in assets/base/factions/morrigi/sections

Code: Select all

<ShipSection>
  <RealClass />
  <Title>@SECTIONTITLE_BR_DRONE</Title>
  <Description>@SECTIONDESC_BR_DRONE</Description>
  <AiType>
  </AiType>
  <ModelFile>factions\morrigi\models\Battle Riders\Drone.scene</ModelFile>
  <DamagedModelFile>
  </DamagedModelFile>
  <DamagedEffectFile>
  </DamagedEffectFile>
  <DestroyedModelFile>
  </DestroyedModelFile>
  <DestroyedEffectFile>
  </DestroyedEffectFile>
  <AmbientSound>
  </AmbientSound>
  <EngineSound>
  </EngineSound>
  <CameraDistanceFactor>1</CameraDistanceFactor>
  <Struct>35</Struct>
  <StructDamageAmount>0</StructDamageAmount>
  <DeathDamage>0</DeathDamage>
  <ExplosionRadius>0</ExplosionRadius>
  <Mass>175</Mass>
  <Top>0,0</Top>
  <Bottom>0,0</Bottom>
  <Side>0,0</Side>
  <Crew>0</Crew>
  <CrewRequired>0</CrewRequired>
  <Power>10</Power>
  <Supply>10</Supply>
  <ECM>0</ECM>
  <ECCM>0</ECCM>
  <ColonizerSpace>0</ColonizerSpace>
  <SavingsCost>150</SavingsCost>
  <ProductionCost>40</ProductionCost>
  <FtlSpeed>0</FtlSpeed>
  <NodeSpeed>0</NodeSpeed>
  <MissionTime>90</MissionTime>
  <CommandPoints>0</CommandPoints>
  <RepairPoints>0</RepairPoints>
  <TerraformingPoints>0</TerraformingPoints>
  <FreighterSpace>0</FreighterSpace>
  <Signature>0</Signature>
  <TacticalSensorRange>0</TacticalSensorRange>
  <StrategicSensorRange>0</StrategicSensorRange>
  <LaunchDelay>0</LaunchDelay>
  <DockingDelay>0</DockingDelay>
  <BattleRiderReserveSize>0</BattleRiderReserveSize>
  <StationType>
  </StationType>
  <StationLevel>0</StationLevel>
  <IsConstructor>False</IsConstructor>
  <IsFreighter>False</IsFreighter>
  <ConstructionPoints>0</ConstructionPoints>
  <IsPolice>False</IsPolice>
  <PsionicPowerLevel>0</PsionicPowerLevel>
  <SlaveCapacity>0</SlaveCapacity>
  <PreviewImage>
  </PreviewImage>
  <Acceleration>170</Acceleration>
  <RotationalAccelerationYaw>45</RotationalAccelerationYaw>
  <RotationalAccelerationPitch>45</RotationalAccelerationPitch>
  <RotationalAccelerationRoll>45</RotationalAccelerationRoll>
  <Decceleration>2.5</Decceleration>
  <LinearSpeed>375</LinearSpeed>
  <RotationSpeed>200</RotationSpeed>
  <Banks>
    <Bank>
      <Id>81828d7e-8b57-4b87-ada3-6a6b42a97cd5</Id>
      <TurretSize>Light</TurretSize>
      <TurretClass>Strafe</TurretClass>
      <WeaponGroup>
      </WeaponGroup>
      <DefaultWeapon>
      </DefaultWeapon>
      <FrameX>0</FrameX>
      <FrameY>0</FrameY>
      <Mounts>
        <Mount>
          <NodeName>turret_light_01</NodeName>
          <YawMin>-10</YawMin>
          <YawMax>10</YawMax>
          <PitchMin>-10</PitchMin>
          <PitchMax>10</PitchMax>
          <SectionFireAnimation>
          </SectionFireAnimation>
          <SectionReloadAnimation>
          </SectionReloadAnimation>
        </Mount>
        <Mount>
          <NodeName>turret_light_02</NodeName>
          <YawMin>-10</YawMin>
          <YawMax>10</YawMax>
          <PitchMin>-10</PitchMin>
          <PitchMax>10</PitchMax>
          <SectionFireAnimation>
          </SectionFireAnimation>
          <SectionReloadAnimation>
          </SectionReloadAnimation>
        </Mount>
        <Mount>
          <NodeName>turret_light_03</NodeName>
          <YawMin>-10</YawMin>
          <YawMax>10</YawMax>
          <PitchMin>-10</PitchMin>
          <PitchMax>10</PitchMax>
          <SectionFireAnimation>
          </SectionFireAnimation>
          <SectionReloadAnimation>
          </SectionReloadAnimation>
        </Mount>
      </Mounts>
    </Bank>
  </Banks>
  <RequiredTechs />
  <Modules />
  <ExcludedSections />
  <ExcludedTypes>
    <ExcludedType>
      <Name>Command</Name>
    </ExcludedType>
    <ExcludedType>
      <Name>Engine</Name>
    </ExcludedType>
  </ExcludedTypes>
  <PsionicAbilities />
  <WeaponGroups />
  <ShipOptionGroups />
</ShipSection>


from "br_boarding_pod.section" in assets/base/factions/morrigi/sections

Code: Select all

<ShipSection>
  <RealClass />
  <Title>@SECTIONTITLE_BR_BOARDING_POD</Title>
  <Description>@SECTIONDESC_BR_BOARDING_POD</Description>
  <AiType>
  </AiType>
  <ModelFile>factions\morrigi\models\Battle Riders\boarding_pod.scene</ModelFile>
  <DamagedModelFile>
  </DamagedModelFile>
  <DamagedEffectFile>
  </DamagedEffectFile>
  <DestroyedModelFile>
  </DestroyedModelFile>
  <DestroyedEffectFile>
  </DestroyedEffectFile>
  <AmbientSound>
  </AmbientSound>
  <EngineSound>
  </EngineSound>
  <CameraDistanceFactor>1</CameraDistanceFactor>
  <Struct>120</Struct>
  <StructDamageAmount>0</StructDamageAmount>
  <DeathDamage>0</DeathDamage>
  <ExplosionRadius>0</ExplosionRadius>
  <Mass>800</Mass>
  <Top>0,0</Top>
  <Bottom>0,0</Bottom>
  <Side>0,0</Side>
  <Crew>0</Crew>
  <CrewRequired>0</CrewRequired>
  <Power>10</Power>
  <Supply>10</Supply>
  <ECM>0</ECM>
  <ECCM>0</ECCM>
  <ColonizerSpace>0</ColonizerSpace>
  <SavingsCost>0</SavingsCost>
  <ProductionCost>0</ProductionCost>
  <FtlSpeed>0</FtlSpeed>
  <NodeSpeed>0</NodeSpeed>
  <MissionTime>120</MissionTime>
  <CommandPoints>0</CommandPoints>
  <RepairPoints>0</RepairPoints>
  <TerraformingPoints>0</TerraformingPoints>
  <FreighterSpace>0</FreighterSpace>
  <Signature>0</Signature>
  <TacticalSensorRange>0</TacticalSensorRange>
  <StrategicSensorRange>0</StrategicSensorRange>
  <LaunchDelay>0</LaunchDelay>
  <DockingDelay>0</DockingDelay>
  <BattleRiderReserveSize>0</BattleRiderReserveSize>
  <StationType>
  </StationType>
  <StationLevel>0</StationLevel>
  <IsConstructor>False</IsConstructor>
  <IsFreighter>False</IsFreighter>
  <ConstructionPoints>0</ConstructionPoints>
  <IsPolice>False</IsPolice>
  <PsionicPowerLevel>0</PsionicPowerLevel>
  <SlaveCapacity>0</SlaveCapacity>
  <PreviewImage>
  </PreviewImage>
  <Acceleration>150</Acceleration>
  <RotationalAccelerationYaw>45</RotationalAccelerationYaw>
  <RotationalAccelerationPitch>45</RotationalAccelerationPitch>
  <RotationalAccelerationRoll>45</RotationalAccelerationRoll>
  <Decceleration>0</Decceleration>
  <LinearSpeed>200</LinearSpeed>
  <RotationSpeed>75</RotationSpeed>
  <Banks />
  <RequiredTechs />
  <Modules />
  <ExcludedSections />
  <ExcludedTypes>
    <ExcludedType>
      <Name>Command</Name>
    </ExcludedType>
    <ExcludedType>
      <Name>Engine</Name>
    </ExcludedType>
  </ExcludedTypes>
  <PsionicAbilities />
  <WeaponGroups />
  <ShipOptionGroups />
</ShipSection>


from "br_msn_spinal.section" in assests/base/factions/morrigi/sections

Code: Select all

<ShipSection>
  <RealClass />
  <Title>@SECTIONTITLE_BR_MSN_SPINAL</Title>
  <Description>@SECTIONDESC_BR_MSN_SPINAL</Description>
  <AiType>
  </AiType>
  <ModelFile>factions\morrigi\models\Battle Riders\spinal_BR.scene</ModelFile>
  <DamagedModelFile>
  </DamagedModelFile>
  <DamagedEffectFile>
  </DamagedEffectFile>
  <DestroyedModelFile>
  </DestroyedModelFile>
  <DestroyedEffectFile>
  </DestroyedEffectFile>
  <AmbientSound>
  </AmbientSound>
  <EngineSound>
  </EngineSound>
  <CameraDistanceFactor>1</CameraDistanceFactor>
  <Struct>480</Struct>
  <StructDamageAmount>0</StructDamageAmount>
  <DeathDamage>0</DeathDamage>
  <ExplosionRadius>0</ExplosionRadius>
  <Mass>3900</Mass>
  <Top>5,3</Top>
  <Bottom>5,3</Bottom>
  <Side>5,2</Side>
  <Crew>5</Crew>
  <CrewRequired>2</CrewRequired>
  <Power>20</Power>
  <Supply>15</Supply>
  <ECM>0</ECM>
  <ECCM>0</ECCM>
  <ColonizerSpace>0</ColonizerSpace>
  <SavingsCost>12000</SavingsCost>
  <ProductionCost>1650</ProductionCost>
  <FtlSpeed>0</FtlSpeed>
  <NodeSpeed>0</NodeSpeed>
  <MissionTime>0</MissionTime>
  <CommandPoints>0</CommandPoints>
  <RepairPoints>0</RepairPoints>
  <TerraformingPoints>0</TerraformingPoints>
  <FreighterSpace>0</FreighterSpace>
  <Signature>0</Signature>
  <TacticalSensorRange>6000</TacticalSensorRange>
  <StrategicSensorRange>0</StrategicSensorRange>
  <LaunchDelay>0</LaunchDelay>
  <DockingDelay>0</DockingDelay>
  <BattleRiderReserveSize>0</BattleRiderReserveSize>
  <StationType>
  </StationType>
  <StationLevel>0</StationLevel>
  <IsConstructor>False</IsConstructor>
  <IsFreighter>False</IsFreighter>
  <ConstructionPoints>0</ConstructionPoints>
  <IsPolice>False</IsPolice>
  <PsionicPowerLevel>0</PsionicPowerLevel>
  <SlaveCapacity>0</SlaveCapacity>
  <PreviewImage>
  </PreviewImage>
  <Acceleration>0</Acceleration>
  <RotationalAccelerationYaw>45</RotationalAccelerationYaw>
  <RotationalAccelerationPitch>45</RotationalAccelerationPitch>
  <RotationalAccelerationRoll>45</RotationalAccelerationRoll>
  <Decceleration>0</Decceleration>
  <LinearSpeed>0</LinearSpeed>
  <RotationSpeed>35</RotationSpeed>
  <Banks>
    <Bank>
      <Id>3a3254e6-c81a-43ae-94c4-a2b99410be31</Id>
      <TurretSize>Light</TurretSize>
      <TurretClass>Standard</TurretClass>
      <WeaponGroup>
      </WeaponGroup>
      <DefaultWeapon>
      </DefaultWeapon>
      <FrameX>0</FrameX>
      <FrameY>0</FrameY>
      <Mounts>
        <Mount>
          <NodeName>turret_light_01</NodeName>
          <YawMin>-35</YawMin>
          <YawMax>100</YawMax>
          <PitchMin>-5</PitchMin>
          <PitchMax>80</PitchMax>
          <SectionFireAnimation>
          </SectionFireAnimation>
          <SectionReloadAnimation>
          </SectionReloadAnimation>
        </Mount>
        <Mount>
          <NodeName>turret_light_02</NodeName>
          <YawMin>-100</YawMin>
          <YawMax>35</YawMax>
          <PitchMin>-5</PitchMin>
          <PitchMax>80</PitchMax>
          <SectionFireAnimation>
          </SectionFireAnimation>
          <SectionReloadAnimation>
          </SectionReloadAnimation>
        </Mount>
      </Mounts>
    </Bank>
    <Bank>
      <Id>5b3bff78-8be9-421d-826f-74ebcb796a86</Id>
      <TurretSize>Heavy</TurretSize>
      <TurretClass>Spinal</TurretClass>
      <WeaponGroup>
      </WeaponGroup>
      <DefaultWeapon>
      </DefaultWeapon>
      <FrameX>64</FrameX>
      <FrameY>0</FrameY>
      <Mounts>
        <Mount>
          <NodeName>turret_heavy_01</NodeName>
          <YawMin>-5</YawMin>
          <YawMax>5</YawMax>
          <PitchMin>-5</PitchMin>
          <PitchMax>5</PitchMax>
          <SectionFireAnimation>
          </SectionFireAnimation>
          <SectionReloadAnimation>
          </SectionReloadAnimation>
        </Mount>
      </Mounts>
    </Bank>
  </Banks>
  <RequiredTechs>
    <Tech>
      <Name>BRD_BattleRiders</Name>
    </Tech>
  </RequiredTechs>
  <Modules />
  <ExcludedSections />
  <ExcludedTypes>
    <ExcludedType>
      <Name>Command</Name>
    </ExcludedType>
  </ExcludedTypes>
  <PsionicAbilities />
  <WeaponGroups />
  <ShipOptionGroups>
    <ShipOptionGroup>
      <ShipOptions>
        <ShipOption>
          <Name>IND_Polysteel</Name>
        </ShipOption>
        <ShipOption>
          <Name>IND_MagnoCeramic_Latices</Name>
        </ShipOption>
        <ShipOption>
          <Name>IND_Quark_Resonators</Name>
        </ShipOption>
      </ShipOptions>
    </ShipOptionGroup>
    <ShipOptionGroup>
      <ShipOptions>
        <ShipOption>
          <Name>IND_Reflective</Name>
        </ShipOption>
      </ShipOptions>
    </ShipOptionGroup>
  </ShipOptionGroups>
</ShipSection>

All 3 are classed as battleriders and typed as mission sections. There are some cosmetic differences, like the model and the description, and some numerical differences such as armor and acceleration, and the drone has some guns, and the spinal can have an engine section. But what in there says "I AM A DRONE, I LAUNCH FROM THE DRONE TURRET AND FLY AROUND SHOOTING THINGS" and "I AM A BOARDING POD, I LAUNCH FROM THE BOARDING POD TURRET AND CAN CAPTURE ENEMY SHIPS" or "I AM A DESTROYER BATTLERIDER AND MUST BE BUILT INDEPENDENTLY FROM SHIPS AND THEN ATTACHED TO A CARRIER" ??
"Truth is relative."

User avatar
Rayp
Posts: 1516
Joined: Tue Aug 29, 2006 10:44 am

Re: how to tell difference between ship sub-types?

Post by Rayp » Wed Jan 25, 2012 5:11 am

Dragonblade wrote:...not helpful and doesn't answer my question.

So I'm going to have to do this the hard, wall of text, way.


I can't be more "helpful" than that. My best guess is that part of it is still hardcoded.

User avatar
rimbimbambo
Kerberos
Posts: 440
Joined: Sat Oct 08, 2011 8:42 pm

Re: how to tell difference between ship sub-types?

Post by rimbimbambo » Thu Feb 09, 2012 11:03 pm

The impenetrable armor layers are hard coded (And attached to the class) - I'll move these to the ship editor and files before we release the tools.

Also, the section only dictates which list the sections are supposed to show up in. Generally, the maximum number of sections for a ship are 3, being the mission, command, and engine sections. We use the mission sections as the center piece to build from - so any single sections ships should be a mission section (so they show up in the mission list at bare minimum).

What you want to do is use the RealClass -

At the moment, there's a mix of a naming convention, combat AI, and the real class that are dictating how ships are attached to other ships. It has to do with a problem with some legacy code that should have been removed at the start of the project and wasn't - I'll have to come back to this to allow you guys to properly use this the way it is intended - but when it works we will use the RealClass.

Hope that helps.

User avatar
Alehandr WS
Posts: 703
Joined: Sat Sep 29, 2007 7:05 am

Re: how to tell difference between ship sub-types?

Post by Alehandr WS » Tue Feb 21, 2012 3:56 pm

rimbimbambo wrote:The impenetrable armor layers are hard coded (And attached to the class) - I'll move these to the ship editor and files before we release the tools.

Pardon me (because i've already asked this once), but to clarify this once and for all - when the modding tools will be released we will be able to change number of impenetrable armor layers? If yes, then would it be section-specific, or whole class-wide?

Post Reply

Return to “Modding”

Who is online

Users browsing this forum: No registered users and 3 guests