Jump to content

New classes in EW


tsanford01

Recommended Posts

After extensive reading here on the forums it appeared to me the classes were defined in DGC.ini..so, I added a couple of dummy classes and played through a couple of missions ranking up rookies..on closer inspection it seems the classes are set through a switch/case function in XGStrategySloder.SetSoldierClass in xcomstrategygame.upk. The referenced function is a switch/case as previously explained with only 6 cases i assume 4 for regular soldiers, 1 for psi, and 1 Mec anyone have any insight or input that i might find useful to add classes?

 

 

 

 

Link to comment
Share on other sites

One of the issues with adding full on new classes in EU was that each class had it's own function defining its perk tree. In EW this has been changed so that each class's perk tree is stored in a dynamic array read in from the DGC.ini. So now in theory additional perks could be defined for new classes.

 

However, there is a bit more to a soldier class than just the perk.

 

Each class has:

1) Stat progression

2) Weapon access limitations

3) Each of the four base classes generates a different core ability when converted to MEC.

4) Localization strings

 

In particular the class name string is going to remain troublesome in EW as it did for the 8 subclasses in Long War. The soldier classname strings are defined in XGLocalizedData in XComStrategyGame.upk :

const localized string SoldierClassNames[ESoldierClass]

This is not a dynamic array but is a static array sized to the number of classes defined in the ESoldierClass enum.

 

For Long War I got around this by packing both subclass names into the root class, such has 'Gunner/Rocketeer' as the string for SoldierClassName[eSC_Heavy]. The SetClass function would then split the string at the '/' character and allow for selection of left or right part based on the subclass selection.

 

I think that will have to be used in EW as well to add more classes in general : packing multiple names into a single string and breaking it apart.

 

-------------

 

Other places I see that would have to be updated to support additional classes:

1) SetSoldierClass -- has switch/case statement that assigns weapon type, grants weapons, etc

2) LevelUp -- has switch/case over 'switch(m_kSoldier.kClass.eType)' as each class's stat progression varies with class. Some of this is handled in DGC.ini, but not all.

3) XGStorage.GetInfinitePrimary -- has 'switch(kSoldier.GetClass())' that defines what the unlimited weapon type is for each class.

4) XGStorage.IsClassEquippable -- determines what gear is equippable to what class, based on class enum value

Link to comment
Share on other sites

 

Amineri..you are an angel my dear...I thank you for all your efforts... I knew it wouldnt be as easy as just adding a class. I was just pushing boundaries I know there are many more thing that go into making a class i was just curious(the mother of knowledge) if it would select my dummy classes from the .ini.

 

Apparently the answer is heck no..but i did learn something so all is not lost.

 

 

 

 

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...