Modding Battlescape

I did not dare to touch the planets yet, but i exchanged the Bomber.xml with the Armormite.xml (renamed to Bomber.xml of course) and got to fly it around. It works great, though the ship is definitely not finetuned for atmospheric flight. The only thing i had to adjust are the external cameras, and after some fiddling i got a good setup, posted for you to use:

 <Cameras>
        <Camera>
            <!-- chase camera behind ship -->
            <LookAt X="0" Y="0.010" Z="0" />
            <ViewPosition X="0" Y="0.025" Z="-0.060" />
            <MaxAge>1.0</MaxAge>
        </Camera>
        <Camera>
            <!-- front view -->
            <LookAt X="0" Y="0.010" Z="0" />
            <ViewPosition X="-0.003845" Y="0.045" Z="0.080" />
            <MaxAge>0.1</MaxAge>
        </Camera>
        <Camera>
            <!-- left side view -->
            <LookAt X="0" Y="0.010" Z="0.01" />
            <ViewPosition X="-0.046181" Y="0.015" Z="0.01" />
            <MaxAge>0.1</MaxAge>
        </Camera>
        <Camera>
            <!-- right side view -->
            <LookAt X="0" Y="0.010" Z="0.01" />
            <ViewPosition X="0.046181" Y="0.015" Z="0.01" />
            <MaxAge>0.1</MaxAge>
        </Camera>
        <Camera>
            <!-- top view -->
            <LookAt X="0" Y="0" Z="0.01" />
            <ViewPosition X="0" Y="0.07" Z="0.008" />
            <MaxAge>0.1</MaxAge>
        </Camera>
        <Camera>
            <!-- bottom view -->
            <LookAt X="0" Y="0" Z="0.01" />
            <ViewPosition X="0" Y="-0.06" Z="0.008" />
            <MaxAge>0.1</MaxAge>
        </Camera>
    </Cameras>

AS ALWAYS: BACKUP ANYTHING YOU TOUCH AND USE AT OWN RISK!

Pictures:





7 Likes

I should however note that modifying config files only affects you, and you only. Other players still see you flying with the bomber. Also, none of these ships ( armormite, hades, hauler etc… ) are planned to be flyable in the final game.

Jea, and everyone else also flys whatever you changed the bomber to.

Camera setup for the Hades:

( Do NOT try to fly the Hades in atmosphere without tweaking its flight properties - it is as airodynamic as it looks. )

    <Cameras>
        <Camera>
            <LookAt X="0" Y="0.015" Z="0" />
            <ViewPosition X="0" Y="0.030" Z="-0.060" />
            <MaxAge>1.0</MaxAge>
        </Camera>
    <Camera>
            <!-- front view -->
            <LookAt X="0" Y="0.010" Z="0" />
            <ViewPosition X="-0.003845" Y="0.025" Z="0.055" />
            <MaxAge>0.1</MaxAge>
        </Camera>
        <Camera>
            <!-- left side view -->
            <LookAt X="0" Y="0.010" Z="0" />
            <ViewPosition X="-0.046181" Y="0.015" Z="0" />
            <MaxAge>0.1</MaxAge>
        </Camera>
        <Camera>
            <!-- right side view -->
            <LookAt X="0" Y="0.010" Z="0" />
            <ViewPosition X="0.046181" Y="0.015" Z="0" />
            <MaxAge>0.1</MaxAge>
        </Camera>
        <Camera>
            <!-- top view -->
            <LookAt X="0" Y="0" Z="0.001" />
            <ViewPosition X="0" Y="0.05" Z="0.003" />
            <MaxAge>0.1</MaxAge>
        </Camera>
        <Camera>
            <!-- bottom view -->
            <LookAt X="0" Y="0" Z="0.001" />
            <ViewPosition X="0" Y="-0.05" Z="0.003" />
            <MaxAge>0.1</MaxAge>
        </Camera>
    </Cameras>

Pictures:





3 Likes

Top and bottom view added to the Bomber:

        <Camera>
            <!-- top view -->
            <LookAt X="0" Y="0" Z="-0.0015" />
            <ViewPosition X="0" Y="0.018" Z="-0.0025" />
            <MaxAge>0.1</MaxAge>
        </Camera>
        <Camera>
            <!-- bottom view -->
            <LookAt X="0" Y="0" Z="0.001" />
            <ViewPosition X="0" Y="-0.02" Z="0.003" />
            <MaxAge>0.1</MaxAge>
        </Camera>


3 Likes

The Hauler can not be flown with its original collision and settings, because you would intersect with the hangar and be stuck. Therefore, the following is the collision and flight settings of the Bomber, mixed with the model and truster FX of the Hauler, plus custom camera setup:

( Gives you a nice feel of how capital ships in atmosphere COULD look, if they were to be a thing. )

<ActorConfig>
    <Actor>
        <Object Mesh="Ships/SFC-Hauler/SM_SFC_Hauler" >
            <LOD Level="1" Mesh="Ships/SFC-Hauler/SM_SFC_Hauler" />
            <LOD Level="2" Mesh="Ships/SFC-Hauler/SM_SFC_Hauler" />
            <LODPower>4.0</LODPower>
            <RejectionSize>0.01</RejectionSize>
            <Material Override="true" />
            <ThrusterModel ConfigFile="$Dev/config/thrusters/HaulerThrusters.xml" >
                <LightsInheritVisibility>false</LightsInheritVisibility>
                <ParticlesInheritVisibility>true</ParticlesInheritVisibility>
                <ActivateDistance>4.0</ActivateDistance>
            </ThrusterModel>
            <PhysicsBody Type="Box" >
                <SidesSize X="0.0130572394" Y="0.00619271863" Z="0.0164060071" />
                <Offset X="0" Y="0" Z="0" />
                <Mass>1.0</Mass>
                <Collisions>true</Collisions>
            </PhysicsBody>
        </Object>
    </Actor>
    <Physics>
        <RampUpFactor>4.0</RampUpFactor>
        <LinearThrust X="0.055" Y="0.045" Z="0.075" />
        <RotationThrust X="0.003" Y="0.004" Z="0.004" />
        <RotationFriction>0.00005</RotationFriction>
        <MaterialType>Metal</MaterialType>
        <Drag X="1" Y="2" Z="0.1" />
    </Physics>
    <Parameters>
        <CockpitIntensityScale>1.0</CockpitIntensityScale>
        <EmissiveIntensity>50000.0</EmissiveIntensity>
        <MainThrustersEmissiveIntensity>100000.0</MainThrustersEmissiveIntensity>
        <EnergyRechargeRate>10.0</EnergyRechargeRate>
        <EnergyTurboCost>15.0</EnergyTurboCost>
        <TurboThrustRate>2.5</TurboThrustRate>
        <TurboInitialBoost>6.0</TurboInitialBoost>
        <TurboTimerDecay>2.0</TurboTimerDecay>
    </Parameters>
    <Cameras>
        <Camera>
            <!-- chase camera behind ship -->
            <LookAt X="0" Y="0.1" Z="0" />
            <ViewPosition X="0" Y="0.221755" Z="-0.646077" />
            <MaxAge>1.0</MaxAge>
        </Camera>
        <Camera>
            <!-- front view -->
            <LookAt X="-0.05" Y="-0.15" Z="0.00" />
            <ViewPosition X="-0.15" Y="0.35" Z="1.55" />
            <MaxAge>0.1</MaxAge>
        </Camera>
        <Camera>
            <!-- left side view -->
            <LookAt X="0" Y="0.002260" Z="0.45" />
            <ViewPosition X="-0.95" Y="0.006053" Z="0.45" />
            <MaxAge>0.1</MaxAge>
        </Camera>

        <Camera>
            <!-- right side view -->
            <LookAt X="0" Y="0.002260" Z="0.45" />
            <ViewPosition X="0.95" Y="0.006053" Z="0.45" />
            <MaxAge>0.1</MaxAge>
        </Camera>
        <Camera>
            <!-- top view -->
            <LookAt X="0" Y="0" Z="0.4025" />
            <ViewPosition X="0" Y="1.5" Z="0.4015" />
            <MaxAge>0.1</MaxAge>
        </Camera>
        <Camera>
            <!-- bottom view -->
            <LookAt X="0" Y="0" Z="0.401" />
            <ViewPosition X="0" Y="-1.5" Z="0.403" />
            <MaxAge>0.1</MaxAge>
        </Camera>
    </Cameras>
    <Weapons>
        <Hardpoint SocketName="s_gun_left" >
            <Muzzle ParticleSystem="Particles/Weapons/Muzzleflashes/Effect/100_Muzzleflash_20mm" SizeScale="0.25" Offset="0.0010" />
            <Shot ParticleSystem="Particles/Weapons/IBSProto/Effects/100_Projectile_20mm" SizeScale="15.0" />
            <Hit ParticleSystem="Particles/Weapons/IBSProto/Effects/100_Explosion_Burst_small" SizeScale="0.20" />
            <Sound Name="ibs_railgun_small_medium_01_0" Randomized="5" />
            <Frequency>0.20</Frequency>
            <ShotOffset>0</ShotOffset>
            <ShotSpeed>4.0</ShotSpeed>
            <ShotLifeTime>3.0</ShotLifeTime>
            <ShotColor X="1" Y="0.6" Z="0.2" />
            <ShotIntensity>20000000.0</ShotIntensity>
            <Damage>15.0</Damage>
        </Hardpoint>
        <Hardpoint SocketName="s_gun_right" >
            <Muzzle ParticleSystem="Particles/Weapons/Muzzleflashes/Effect/100_Muzzleflash_20mm" SizeScale="0.25" Offset="0.0010" />
            <Shot ParticleSystem="Particles/Weapons/IBSProto/Effects/100_Projectile_20mm" SizeScale="15.0" />
            <Hit ParticleSystem="Particles/Weapons/IBSProto/Effects/100_Explosion_Burst_small" SizeScale="0.20" />
            <Sound Name="ibs_railgun_small_medium_01_0" Randomized="5" />
            <Frequency>0.20</Frequency>
            <ShotOffset>0</ShotOffset>
            <ShotSpeed>4.0</ShotSpeed>
            <ShotLifeTime>3.0</ShotLifeTime>
            <ShotColor X="1" Y="0.6" Z="0.2" />
            <ShotIntensity>20000000.0</ShotIntensity>
            <Damage>15.0</Damage>
        </Hardpoint>
    </Weapons>
</ActorConfig>

Pictures:






10 Likes

I just added two cameras to Bomber.xml to take screenshots without the hull.

        <Camera>
            <!-- No Hull Forward-->
            <LookAt X="0" Y="0" Z="1" />
            <ViewPosition X="0" Y="0" Z="0.010733" />
            <MaxAge>1.0</MaxAge>
        </Camera>
        <Camera>
            <!-- No Hull Backward-->
            <LookAt X="0" Y="0" Z="-1" />
            <ViewPosition X="0" Y="0" Z="-0.010733" />
            <MaxAge>1.0</MaxAge>
        </Camera>


7 Likes

Incase someone wants to mess around with the experimental clouds, its actually quite easy to enable. Just go to the terrestrial.xml in the <installfolder>\Dev\Projects\Infinity Battlescape\Config\planets\ directory. There should be a Cloud-element. Just set the state to “true” like so:

<Planet>
    .
    .
    .
    <Cloud State="true">
        <Altitude Value="15.0" />
    </Cloud>
    .
    .
    .
</Planet>

You can probably copy the Cloud-element to other planets xml as well and maybe have several layers with different Altitude values, though I haven’t tested it yet.

I have to say, the experimental clouds indeed don’t look too good when just flying around. Still here are some result screenshots:

11 Likes

Oeh, good to know, I’m going to enable them too.
I think it’s looks better, even only experimental.

Have you seen any difference in lighting on the planet surface?

3rd Edit:

After setting the true value for clouds in the XML file, the terrestial planet is gone.
At least, it is still physically there, I crashed into it, but it’s invisible.
After resetting values still gone, so i’m reinstalling the game now.

Could someone do a beginner tutorial on I:B modding? Would be very much appreciated.

2 Likes

I think most of the differences were just in my head :stuck_out_tongue:. The clouds are probably “cosmetic” and aren’t taken into account in the lighting. At least the clouds don’t cast a shadow. The planet surface felt a bit darker though. That or I might just have been close to the dark side.

That’s weird. Were the rings still there? Perhaps something was blocking the game from reading the xml-file? It’s a good idea to make a copy of all the files you change so it is easy to revert back to the originals.

Found what was wrong.
It was in the program I used to edit the xml files.
Now I use just wordpad, modding is working fine.

Still trying to get oceans to work.

How did you change the position of the galaxy? I tried changing ClientConfig, but with no effect. Is it elsewhere?

        <Galaxy State="true">
            <Position X="-9840.79" Y="-114350.63" Z="-28648.67"/>
            <Rotation X="-0.1" Y="0.3" Z="0.8" W="0.7"/>
            <DensityFile>$Dev/Galaxy/GalaxyDensity.tga</DensityFile>
            <Seed>0</Seed>
        </Galaxy>

I believe the position is your location in their galaxy bitmap that is referenced. If you use a large value for the Y-position, you will be located off of the galactic plane itself (I used the above Y-position). Otherwise, you’ll just be looking at the galactic band from a different location within the galaxy and it’ll look very similar. It might look exceptionally different if you try to place yourself at the center of the galaxy where it should be brighter and have a higher concentration of stars.

1 Like

I did try enabling them too, but with little success. Even after changing the foam-texture path to point to the correct(?) place, the game still complained about not able to compile materials/textures (can’t remember the exact error). Setting the foam state to false allowed the game to start but I at least couldn’t find any oceans. The game did crash (runtime error) while flying over the planet. As the game has been very stable before, I thought the crash might have been because I got close to an ocean, but who knows. Still would be cool to get the ocean workin, even if the devs IIRC said the performance of the oceans wasn’t “practical”.

Anyone have a number for how much larger the gas giant is than the terrestrial world? I want to scale all the numbers for the rings up for it to check and see if i can swap them over onto the world that makes sense to have them. :wink:

The planetary radiuses are in the config files IIRC, the gas giant was jupiter sized.

1 Like

I just realized i could check that way, but thanks for the confirmation!
also… That wasn’t a no! :smiley:

*Edit, I borked on working out the numbers, but it really was as easy as copy&paste to move the rings to a different planet! I feel like this is the start of something real beautiful as far as modding goes and it’s only going to get better.

5 Likes

I wasn’t editing the right ClientConfig…

Some fun with the GalaxyDensity image

Black picture (empty galaxy):

The HDR is a bit low, but unsurprisingly space is way darker

Still, we can see white dots/blobs. AFAICT, those are star clusters, whose density is independent from the star density (IIRC they make a halo all around the galaxy, not just sitting in the disc)

Here is what the galactic core looks like

And here is what the opposed side looks like

Here is what it looks like from outside the galaxy

5 Likes

Naiba tried to change the colour of the gas giant. Eventually we found out that you also have to change the atmosphere, as it heavily changed the colour coming from the underlying cloud layer. I just equalized the atmosphere colour so it would be white.

<Atmosphere State="true" >
    <Thickness Value="300.0" />
    <BetaR Red="0.00015" Green="0.00015" Blue="0.0015" />
    <HR Value="64.0" />
    <BetaMSca Red="0.02" Green="0.02" Blue="0.02" />
    <BetaMEx Red="0.022" Green="0.022" Blue="0.022" />
    <HM Value="1.2" />
    <G Value="0.75" />
</Atmosphere>
<Cloud LayerID="1" State="true" Transparent="false" >
    <Altitude Value="0.0" />
    <RotationSpeed Value="-0.00025" />
    <NoiseScale X="1.25" Y="12.0" Z="1.35" />
    <NoiseOffset X="3.5612" Y="3.5612" Z="3.5612" />
    <MeanColor Red="0.01" Green="0.2" Blue="0.001" />
    <ColorVariance Red="0.1" Green="0.002" Blue="0.001" />
    <Persistence Value="0.9" />
    <Recursions Value="5" />
    <Deform Scale="32.0" Strength="0.25" />
</Cloud>

Made a small error:
Red=“0.00015” Green=“0.00015” Blue=“0.00 0 15”

Here you can see how much the atmosphere changes the end result. Above is without the zero I forgot to add, below is with properly white atmosphere without any colour “falsification”.

Trying to escape the acid sea.

6 Likes

After seeing the cloud post, I poked around and managed to enable oceans. Not sure if anyone has posted about that yet, forgive me if so! :stuck_out_tongue:

In “Dev\Projects\Infinity Battlescape\Config\planets\terrestrial.xml” change the following block from:

<Ground State="true" >
    <Patch TexRes="512" />
    <SeaLevel Value="0.0" />
    <Slope Power="1.0" />
    <Fractal Altitude="0.25" Slope="0.3" />
    <Biome TexRes="2048" />
</Ground>
<Ocean State="false" >
    <DeepColor Red="0.00175" Green="0.0035" Blue="0.0105" />
    <ShallowColor Red="0.0075" Green="0.030" Blue="0.0112" />
    <Spectrum TimeScale="0.5" Amplitude="1.0" Wind="600.0" />
    <Foam State="true" ParamX="-1.0" ParamY="0.99" ParamZ="30.0" ParamW="0.01" Intensity="0.3" Texture="$Textures/Foam.png" />
</Ocean>

to:

<Ground State="true" >
    <Patch TexRes="512" />
    <SeaLevel Value="0.3" />
    <Slope Power="1.0" />
    <Fractal Altitude="0.25" Slope="0.3" />
    <Biome TexRes="2048" />
</Ground>
<Ocean State="true" >
    <DeepColor Red="0.00175" Green="0.0035" Blue="0.0105" />
    <ShallowColor Red="0.0075" Green="0.030" Blue="0.0112" />
    <Spectrum TimeScale="0.5" Amplitude="1.0" Wind="600.0" />
    <Foam State="false" ParamX="-1.0" ParamY="0.99" ParamZ="30.0" ParamW="0.01" Intensity="0.3" Texture="$Textures/Foam.png" />
</Ocean>

i.e. change:

  • SeaLevel value to 0.3 (there is a comment containing this value in the provided file, if you don’t know how to uncomment it just ignore it and change 0.0 to 0.3)
  • Ocean state should be set to true
  • Foam State should be set to false (the game will first crash if you do not move the Foam.png file up a directory/change the path for the foam, and then crash for other reasons I have not diagnosed if you do that and still leave foam enabled)

Some screenshots:

9 Likes

This is what I get with ocean height at 0.2

14 Likes