Jump to content
Sign in to follow this  
medys

help with adding weapon for infantry?

Recommended Posts

Hi,

 

I'm trying to make a little mod for CnC Tiberium Wars and I want to give several grenades to Riflemen and I don't know how :-/

 

I have managed to create a custom grenade called "GDIRifleSoldierGrenade" I have 2 files for that:

WeaponTemplate_GDIRifleSoldierGrenade.xml

WeaponTemplate_GDIRifleSoldierGrenadeWarhead.xml

 

I've managed to add those grenades as a secondary weapon to Riflemen so they either shoot rifles or throw grenades. Actually they always throw grenades becouse grenades cause more damage :)

 

What I want to do is that they simmply throw a grenade sometimes (variable reload time or smth..) but always shoot rifles. I mean something like PitBull mortar or Mamooth missiles...

 

I tried:

 

<WeaponSetUpdate

id="ModuleTag_WeaponSetUpdate">

<WeaponSlotHardpoint

AllowInterleavedFiring="false"

ID="1"

InterleavedStyle="INTERLEAVE_FIRST_AVAILABLE"

WeaponChoiceCriteria="PREFER_MOST_DAMAGE">

<Weapon

Ordering="PRIMARY_WEAPON"

Template="GDIRifleSoldierRifle" />

</WeaponSlotHardpoint>

<WeaponSlotHardpoint

ID="2"

<Weapon

Ordering="PRIMARY_WEAPON"

Template="GDIRifleSoldierGrenade" />

</WeaponSlotHardpoint>

</WeaponSetUpdate>

 

but I get an error: "The XML is not valid: not-well formed (invalid token): line 867, column 20

Share this post


Link to post

The problem is that you've made part of the XML invalid. Specifically, on line 867, so you could go there with your text editing window. I can spot a missing closing > (I highlighted it for you):

<WeaponSlotHardpoint

ID="2">

<Weapon

Ordering="PRIMARY_WEAPON"

Template="GDIRifleSoldierGrenade" />

</WeaponSlotHardpoint>

</WeaponSetUpdate>

 

but I get an error: "The XML is not valid: not-well formed (invalid token): line 867, column 20

That should fix it.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×