Jump to content

The web based (extended) Perk Tree mod generator(s)


Bertilsson

Recommended Posts

There are indeed two different ways to access the soldier classname string.

 

The first is via a nested structure in XGStrategySoldier, m_kSoldier.kClass.strName. This is where the particular subclass name is stored. The function XGStrategySoldier.GetClassName returns this string.

 

The second is by directly accessing the localization file array via a call such as:

class'XGLocalizedData'.default.SoldierClassNames[GetClass()]

This will return the x/y type of name.

 

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

 

One key thing to remember regarding the 8 classes in Long War is that from a technical sense we didn't really add any classes. The data structures still store just the four base classes from vanilla. Each class is split into 2 subclasses based on the first perk selected.

 

This means that there are only four config localization variables for classname strings. These four strings are defined as the x/y string containing both subclass namestrings separated via the "/".

 

This is split into the two parts and a single name is selected in XGStrategSoldier.SetClass -- this happens just after the first regular perk is selected. The code that does this is pretty straightforward:

            ParseStringIntoArray(class'XGLocalizedData'.default.SoldierClassNames[GetClass()], SplitStr, "/", true);
            m_kSoldier.kClass.strName = SplitStr[Option];

The root string is split into an array of substrings (in this case always 2). The particular substring to use is defined by the switch/case statement over perk selection earlier in SetClass.

 

However, the full x/y string name is used to describe reward soldiers, since they don't have a squaddie perk selected yet.

 

In theory each class could be split into 3 subclasses (since the perk UI support three perk choices at once) but the later perk tree (in EU) only supports 4 total perk choices per rank. Not to mention that there really aren't enough perks to support 12 distinct classes.

 

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

 

However it's not clear what's happening in the above screenshot. A question:

1) Do the soldier subclass names display correctly in the Barracks? (if yes that indicates that SetClass is correctly splitting/assigning the root class string).

 

If the (1) above is yes then it appears to be an issue with how the XGChooseSquadUI class is filling out the classname field to pass to the actionscript (however in my LW 2.12beta5 it is using XGStrategySoldier.GetClassName(), which should be correct).

 

If the (1) above is no then the issue is likely in the SetClass function (which is pretty likely since Bertillson is modding it now). Somehow the change would be causing the splitstring/assign code to not work properly.

Link to comment
Share on other sites

  • Replies 61
  • Created
  • Last Reply

Top Posters In This Topic

Actually, I just tested using Long War 2.12 beta 4 and I can't reproduce it...

 

In barracks I can't see any class at all (I'm assuming that is due to XP and stuff is shown instead).

In loadout screen I see properly separated sub-classes once squaddie ability is selected.

 

Edit: The test I did was to change all class defining perks to something different via the web tool for Long War to see if the latest addition to the generated mod is indeed working, which was true.

Edited by Bertilsson
Link to comment
Share on other sites

Hm...

I'm going to re-install Long War and see if that fixes the problem.

 

Update: So I was apparently on an older version of Long War. Updated to 2.12 beta 5 and made changes using Bertilsson's web tool and everything's hunky-dory now.

Edited by eld10
Link to comment
Share on other sites

  • 4 weeks later...

Ability trees have been very much changed under the hood in EW (MEC's added and all perks moved to text form in ini-file, perks changed, etc) so I don't expect to update the current perk-related web tools for Enemy Within.

 

For enemy unknown I expect that it will be possible to roll back to patch 4 very soon so I don't really see any need to update for Enemy Unknown either.

 

Enhanced/extended perk trees mod is one of amineris babys and while I can't speak for her, I would be surprised if it wasn't on the list of things she will look into, but equally surprised if it is anywhere near the top of that list.

Link to comment
Share on other sites

Ability trees have been very much changed under the hood in EW (MEC's added and all perks moved to text form in ini-file, perks changed, etc) so I don't expect to update the current perk-related web tools for Enemy Within.

 

For enemy unknown I expect that it will be possible to roll back to patch 4 very soon so I don't really see any need to update for Enemy Unknown either.

 

Enhanced/extended perk trees mod is one of amineris babys and while I can't speak for her, I would be surprised if it wasn't on the list of things she will look into, but equally surprised if it is anywhere near the top of that list.

What (which?) .ini(s) would that be?

 

All I really want to do is to allow the Major Rank to have two perks instead of just one, since One-rank Major have a tendency to really screw you over with Training Roulette on.

Link to comment
Share on other sites

What (which?) .ini(s) would that be?

All I really want to do is to allow the Major Rank to have two perks instead of just one, since One-rank Major have a tendency to really screw you over with Training Roulette on.

Not sure if it is still DefaultGameCore.ini or some other ini... But unless you plan to break it free from the .exe you can just do this to change it:

Resource hacker --> XComEW.exe --> RCData --> 1020 --> 1033 --> Modify perk trees very close to bottom --> Press Compile --> Press Save --> Done.

 

BUT the ini has no support for changing the number of perks available at any rank, only to change which perks are assigned to rank/class.

 

So you still need to wait for someone to create a mod similar to amineris enhanced/extended perk tree mod..

Link to comment
Share on other sites

I have a plan on how this is going to be configured once I get back to creating actual mods and not just mod tools (unless someone else jumps in first, which wouldn't hurt my feelings at all!).

 

The soldier perk tree are defined in the DGC.ini as structures designed to contain exactly the 1 / 2 / 2 / 2 / 2 / 1 / 2 perk structure in the vanilla game:

SoldierPerkTrees=(SoldierType=eSC_Assault,		Squaddie=ePerk_RunAndGun, Corporal1=ePerk_Aggression, Corporal2=ePerk_TacticalSense, Sergeant1=ePerk_CloseAndPersonal, Sergeant2=ePerk_LightningReflexes, Lieutenant1=ePerk_RapidFire, Lieutenant2=ePerk_Flush, Captain1=ePerk_BringEmOn, Captain2=ePerk_CloseCombatSpecialist, Major=ePerk_ExtraConditioning, Colonel1=ePerk_KillerInstinct, Colonel2=ePerk_Resilience)
SoldierPerkTrees=(SoldierType=eSC_Support,		Squaddie=ePerk_SmokeBomb, Corporal1=ePerk_CoveringFire, Corporal2=ePerk_Sprinter, Sergeant1=ePerk_SmokeAndMirrors, Sergeant2=ePerk_FieldMedic, Lieutenant1=ePerk_FocusedSuppression, Lieutenant2=ePerk_Revive, Captain1=ePerk_CombatDrugs, Captain2=ePerk_DenseSmoke, Major=ePerk_DeepPockets, Colonel1=ePerk_Sentinel, Colonel2=ePerk_Savior)
SoldierPerkTrees=(SoldierType=eSC_HeavyWeapons,	Squaddie=ePerk_FireRocket, Corporal1=ePerk_TracerBeams, Corporal2=ePerk_BulletSwarm, Sergeant1=ePerk_FocusedSuppression, Sergeant2=ePerk_ShredderRocket, Lieutenant1=ePerk_RapidReaction, Lieutenant2=ePerk_HEATAmmo, Captain1=ePerk_DangerZone, Captain2=ePerk_Grenadier, Major=ePerk_WillToSurvive, Colonel1=ePerk_Mayhem, Colonel2=ePerk_Rocketeer)
SoldierPerkTrees=(SoldierType=eSC_Sniper,		Squaddie=ePerk_PrecisionShot, Corporal1=ePerk_SquadSight, Corporal2=ePerk_SnapShot, Sergeant1=ePerk_DamnGoodGround, Sergeant2=ePerk_Gunslinger, Lieutenant1=ePerk_BattleScanner, Lieutenant2=ePerk_DisablingShot, Captain1=ePerk_Opportunist, Captain2=ePerk_Executioner, Major=ePerk_LowProfile, Colonel1=ePerk_DoubleTap, Colonel2=ePerk_InTheZone)
SoldierPerkTrees=(SoldierType=eSC_Mec,			Squaddie=ePerk_Barrage, Corporal1=ePerk_AutoThreatAssessment, Corporal2=ePerk_AdvancedFireControl, Sergeant1=ePerk_DamageControl, Sergeant2=ePerk_XenobiologyOverlays, Lieutenant1=ePerk_OneForAll, Lieutenant2=ePerk_JetbootModule, Captain1=ePerk_ExpandedStorage, Captain2=ePerk_RepairServos, Major=ePerk_Overdrive, Colonel1=ePerk_ReactiveTargetingSensors, Colonel2=ePerk_AbsorptionFields)

Vanilla has 5 entries -- one for each class (which includes MEC).

 

The good news is that SoldierPerkTrees is a dynamic array and so can be sized up easily by just adding more entries in the DGC.ini. The vanilla code simply steps through the SoldierPerkTrees array until it finds the first member that matches the desired soldier type.

 

To extend this I plan on stripping down the usage of each line so that it contains only a single perk at each rank (e.g. only Corporal1 will contain data, not Corporal2)

 

With this system the SoldierPerKtree parsing code would be changed to find the n-th array element matching the soldier type in order to retrieve the n-th perk option. Basically would look like :

SoldierPerkTrees=(SoldierType=eSC_Assault, ... // perk option 0 for Assault
SoldierPerkTrees=(SoldierType=eSC_Assault, ... // perk option 1 for Assault
SoldierPerkTrees=(SoldierType=eSC_Assault, ... // perk option 2 for Assault
SoldierPerkTrees=(SoldierType=eSC_Support, ... // etc
SoldierPerkTrees=(SoldierType=eSC_Support, ...
SoldierPerkTrees=(SoldierType=eSC_Support, ...
SoldierPerkTrees=(SoldierType=eSC_HeavyWeapons, ...
SoldierPerkTrees=(SoldierType=eSC_HeavyWeapons, ...
SoldierPerkTrees=(SoldierType=eSC_HeavyWeapons, ...
SoldierPerkTrees=(SoldierType=eSC_Sniper, ...
SoldierPerkTrees=(SoldierType=eSC_Sniper, ...
SoldierPerkTrees=(SoldierType=eSC_Sniper, ...
SoldierPerkTrees=(SoldierType=eSC_Mec, ...
SoldierPerkTrees=(SoldierType=eSC_Mec, ...
SoldierPerkTrees=(SoldierType=eSC_Mec, ... 

Note that this opens a lot of other customization options by allowing an unbounded number of perks per class.

 

For example:

  • Could make perks available for each soldier randomized (differently than training roulette)
    • For example, Assault could have 5 perk choices defined per rank, and each assault would get 2 (or 3) randomly selected perks at each rank
  • Can make completely different perk trees for the subclasses in Long War
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...