Jump to content


Photo

XML Coding For Newbies: Hardpoint coding


  • Please log in to reply
5 replies to this topic

#1 Longleaf

Longleaf
  • Project Team
  • 233 posts
  •  I have blue text ?

Posted 14 August 2009 - 08:19 AM

Ok so i thought i would make a thingy to help new modders out so here is my hard point coding part.

Here we have a complete hardpoint code for an extra massdriver on the Vengeance.


<HardPoint Name="HP_VENGEANCE_MASS_DRIVER_1">
<Type> HARD_POINT_WEAPON_MASS_DRIVER </Type>
<Is_Targetable>Yes</Is_Targetable>
<Is_Destroyable>Yes</Is_Destroyable>
<Tooltip_Text>TEXT_WEAPON_MASS_DRIVER</Tooltip_Text>
<Health>300.0</Health>

<Death_Explosion_Particles> Large_Explosion_Space_Empire </Death_Explosion_Particles>
<Death_Explosion_SFXEvent>Unit_Hardpoint_Mass_Driver_Death</Death_Explosion_SFXEvent>

<Attachment_Bone>MUZZLEA_00</Attachment_Bone>
<Collision_Mesh>MUZZLEA_00</Collision_Mesh>
<Damage_Decal>MUZZLEA_00</Damage_Decal>
<Damage_Particles>MUZZLEA_00</Damage_Particles>



<Fire_Bone_A>MUZZLEA_00</Fire_Bone_A>
<Fire_Bone_B>MUZZLEA_00</Fire_Bone_B>
<Randomize_Between_Fire_Bones> No </Randomize_Between_Fire_Bones>
<Fire_Cone_Width>45.0</Fire_Cone_Width>
<Fire_Cone_Height>150.0</Fire_Cone_Height>

<Fire_Projectile_Type>Proj_Vengeance_Mass_Driver</Fire_Projectile_Type>
<Fire_Min_Recharge_Seconds>3.0</Fire_Min_Recharge_Seconds>
<Fire_Max_Recharge_Seconds>4.0</Fire_Max_Recharge_Seconds>
<Fire_Pulse_Count>4</Fire_Pulse_Count>
<Fire_Pulse_Delay_Seconds>0.2</Fire_Pulse_Delay_Seconds>
<Fire_Range_Distance>1700.0</Fire_Range_Distance>

<Fire_SFXEvent>Unit_Anti_Air_Fire</Fire_SFXEvent>

<Fire_Inaccuracy_Distance> Fighter, 60.0 </Fire_Inaccuracy_Distance>
<Fire_Inaccuracy_Distance> Bomber, 55.0 </Fire_Inaccuracy_Distance>
<Fire_Inaccuracy_Distance> Transport, 20.0 </Fire_Inaccuracy_Distance>
<Fire_Inaccuracy_Distance> Corvette, 10.0 </Fire_Inaccuracy_Distance>
<Fire_Inaccuracy_Distance> Frigate, 5.0 </Fire_Inaccuracy_Distance>
<Fire_Inaccuracy_Distance> Capital, 25.0 </Fire_Inaccuracy_Distance>
<Fire_Inaccuracy_Distance> Super, 30.0 </Fire_Inaccuracy_Distance>
</HardPoint>


Here are some of the most important part the code containers.
<HardPoint Name="HP_VENGEANCE_MASS_DRIVER_1">
</HardPoint>
What are these used for ? to tell it were the hardpoint code starts and ends.
Hardpoint type.

<Type> HARD_POINT_WEAPON_MASS_DRIVER </Type>
This tells it what kind of hardpoint we are coding.

<Is_Targetable>Yes</Is_Targetable>

Weather we can see it or not just put No if you do not want it to be targetable .

<Is_Destroyable>Yes</Is_Destroyable>

Weather we can destroy it or not just put No if you do not want it to be able to be destroyed.

<Tooltip_Text>TEXT_WEAPON_MASS_DRIVER</Tooltip_Text>

It's text string name.

<Health>300.0</Health>
It's health do not go over board like a number like 188761.

<Death_Explosion_Particles> Large_Explosion_Space_Empire </Death_Explosion_Particles>
It's Death Particles.

<Death_Explosion_SFXEvent>Unit_Hardpoint_Mass_Driver_Death</Death_Explosion_SFXEvent>
It's Death Sound.

All of the fowling bits are on bones on the model.

<Attachment_Bone>MUZZLEA_00</Attachment_Bone>
Were we see the hardpoint.

<Collision_Mesh>MUZZLEA_00</Collision_Mesh>
It's Collision Mesh i do not know much about this one.

<Damage_Decal>MUZZLEA_00</Damage_Decal>
Not needed but it tells it were to find the damage marks on the model.

<Damage_Particles>MUZZLEA_00</Damage_Particles>
We do not need this one either it tells it were to find the sparks and smoke on the model.

<Fire_Bone_A>MUZZLEA_00</Fire_Bone_A>
Were the projectile comes from.

<Fire_Bone_B>MUZZLEA_00</Fire_Bone_B>
Were the projectile can come from as a B point.

<Randomize_Between_Fire_Bones> No </Randomize_Between_Fire_Bones>
Weather to randomize between hardpoint firing or fire one after the other.

That concludes or bone section.

Other stuff.

<Fire_Cone_Width>45.0</Fire_Cone_Width>
<Fire_Cone_Height>150.0</Fire_Cone_Height>
If i only knew what these do :p .

Weapon part.

<Fire_Projectile_Type>Proj_Vengeance_Mass_Driver</Fire_Projectile_Type>
The projectile we are firing.

<Fire_Min_Recharge_Seconds>3.0</Fire_Min_Recharge_Seconds>
Projectile's min Firing delay.

<Fire_Max_Recharge_Seconds>4.0</Fire_Max_Recharge_Seconds>
Projectile's Max firing delay.

<Fire_Pulse_Count>4</Fire_Pulse_Count>
The amount of shots we want to fire before a brake.

<Fire_Pulse_Delay_Seconds>0.2</Fire_Pulse_Delay_Seconds>
How rapid the shots are fired.

<Fire_Range_Distance>1700.0</Fire_Range_Distance>
How far it can target other units.

<Fire_SFXEvent>Unit_Anti_Air_Fire</Fire_SFXEvent>
The firing sound.

Now for the last bit the accuracy ratings.
<Fire_Inaccuracy_Distance> Fighter, 60.0 </Fire_Inaccuracy_Distance>
<Fire_Inaccuracy_Distance> Bomber, 55.0 </Fire_Inaccuracy_Distance>
<Fire_Inaccuracy_Distance> Transport, 20.0 </Fire_Inaccuracy_Distance>
<Fire_Inaccuracy_Distance> Corvette, 10.0 </Fire_Inaccuracy_Distance>
<Fire_Inaccuracy_Distance> Frigate, 5.0 </Fire_Inaccuracy_Distance>
<Fire_Inaccuracy_Distance> Capital, 25.0 </Fire_Inaccuracy_Distance>
<Fire_Inaccuracy_Distance> Super, 30.0 </Fire_Inaccuracy_Distance>

And if you want to add a model just use this line.

<Model_To_Attach>(Insert Model Name)</Model_To_Attach>


There you have it you coded your first hardpoint have fun coding more please fell free to ask questions.

Edited by haylay, 14 August 2009 - 10:00 PM.


#2 Digz

Digz

    title available

  • Division Leaders
  • 1,070 posts
  • Location:London, England
  • Projects:Petrolution
  • Division:Petrolution
  • Job:Division Leader

Posted 14 August 2009 - 10:38 AM

In this guide, would you mind posting what a Hardpoint actually is, as for a 'newbie' modder, they may not know :p

#3 Longleaf

Longleaf
  • Project Team
  • 233 posts
  •  I have blue text ?

Posted 14 August 2009 - 09:55 PM

R i suppose i should do that.
EDIT: I Added it to petrolution.net and made it a bit easier to understand.

Edited by haylay, 15 August 2009 - 12:09 AM.


#4 Digz

Digz

    title available

  • Division Leaders
  • 1,070 posts
  • Location:London, England
  • Projects:Petrolution
  • Division:Petrolution
  • Job:Division Leader

Posted 17 August 2009 - 01:47 PM

Ah nice, I'll take a lo ok :p

#5 Longleaf

Longleaf
  • Project Team
  • 233 posts
  •  I have blue text ?

Posted 18 August 2009 - 11:34 PM

what should my next one be on coding a complete space unit(Ouch that would take some time) Of coding projectiles ?

#6 Wethewax

Wethewax
  • New Members
  • 1 posts

Posted 20 June 2019 - 10:54 AM

Newb here with a question about hardpoint swapping. Could I adapt the code to put mass drivers on the Interceptor Frigate, or is it not that simple?


Edited by Wethewax, 20 June 2019 - 10:55 AM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users