Page 1 of 1

Problem: Edits to Troops [Solved]

Posted: Wed Apr 15, 2015 4:15 am
by TheJynxedOnes
Hello, I've recently started messing around with editing maps and wanted to take a stab at making small changes to existing troops. I watched a series of videos by a member here and have been able to do most things I want. Until I tried editing troops. I went simple and just wanted to change the amount of ammo the Super Battle Droid has for it's Rocket.

I made a new map, went into the Assets/sides folder and copied the "cis" folder to the "Sides" folder in my new map. Opened the file "cis_inf_default_rifleman" in notepad++ and changed this:

Code: Select all

WEAPONSECTION = 3
WeaponName     	= "cis_weap_inf_wrist_rocket"
WeaponAmmo     	= 3
WeaponChannel  	= 1
to this

Code: Select all

WEAPONSECTION = 3
WeaponName     	= "cis_weap_inf_wrist_rocket"
WeaponAmmo     	= 5
WeaponChannel  	= 1
I went to test it and nothing changed. I've tried several other small edits, like changing secondary weapons, ammo of other weapons. From what I've read and watched I thought I was doing it the right way. Any help would be wonderful. Thank you in advance.

Re: Problem: Edits to Troops

Posted: Wed Apr 15, 2015 7:56 am
by Bob
Did you load your custom side in the LUA?
You know,

Code: Select all

     ReadDataFile("dc:SIDE\\yoursidenamehere.lvl",
etc.

Re: Problem: Edits to Troops

Posted: Wed Apr 15, 2015 8:13 am
by thelegend
Also don't forget to copy the common folder into your side's folder because you didn't mention it in your first post. It's in the same folder as the cis, rep, all...folders.

Re: Problem: Edits to Troops

Posted: Wed Apr 15, 2015 8:26 am
by AnthonyBF2
Or in your map script, after scriptpostload, you can add SetClassProperty("cis_inf_rifleman", "WeaponAmmo1", 5)

You don't need to use dc: + plus new side if all you want to do is increase some ammo or swap guns.

You can use SetClassProperty for a ton of things.

Re: Problem: Edits to Troops

Posted: Thu Apr 16, 2015 12:49 am
by TheJynxedOnes
Bob wrote:Did you load your custom side in the LUA?
You know,

Code: Select all

     ReadDataFile("dc:SIDE\\yoursidenamehere.lvl",
etc.
Turns out I deleted the colon after "dc" and hadn't noticed. Everything is working fine now.