Jump to content

Script Editing


CarlBar

Recommended Posts

I am not sure of the correct syntax for using - and + on multiline elements. But, having the - or + on the continuation lines (the ones after the backslash) "looks wrong". Before you try adding anything, just try removing something first. Change it so that you don't have any pluses, and the only place you have minuses is just before the SoldierRank word, and try only deleting the top two ranks. Do the abilities go away?

Link to comment
Share on other sites

Ok when i did that i got some weirdness, abilities not removed appeared duplicated, and not all where removed. Screenshot included.

 

http://i.imgur.com/TPOf9ON.jpg

 

 

I'm going to go away and try somthing else while you mull on that. But thanks for telling me about the purposes of backslash there, never encountered code like that before, it's always been either it doesn't care about lines, or everything on one line has to be physically on that line.

 

the code that produced the above for clarity.

 

 

  Reveal hidden contents

 

 

EDIT: Attempting to compress the code onto one physical line by collecting it together and removing the backslashes didn't work either :sad:. The result was it acted like the code wasn't there.

Edited by CarlBar
Link to comment
Share on other sites

It seems like your issue might be that you've kept the default Sharpshooter level progression definition intact and just added your desired level progression after it. That may be trying to input multiple values into the template where it's only expecting one. Have you tried building your config file to have only your abilities (deleting the first squaddie through colonel definitions in your class template)? To be fair, while I'd like to do some of this as well, I'm not even this far into modding, so I'm just going from what I think sounds logical and could be completely off base.

Link to comment
Share on other sites

I've had a lot of trouble getting - to work with multiline arrays like the MissionSchedules or ConfigurableEncounters in missions.ini. If you use a ! instead of - it will wipe out every single definition of the array, so you are completely clearing them that's one way to go. But I can't reliably use - and i'm not sure why.

Edited by Quaro
Link to comment
Share on other sites

Got it. It's both painfully simple and silly annoying.

 

First go to your "my documents/XCOM2" folder and then navigate from there to the copy of the configs stored there. The DefaultClass file there has the relevant code in single line formatting, (i'll post the complete file below anyway for people to use in case i'm lucky in mine having not updated). A bit of experimentation, (and a degree of DOH!), led me to realise it reads rank data in the order it finds the lines as it does not have any info on the slot it occupies rank wise. Which means it's an "as is" setup. That is it reads the lines in order. First line becomes the class promotion, second is first tier, (so Corporal rank), ability choice, third is second tier, (so Sergeant rank) choice, and so on and so forth. I also suspect this explains why i was seeing duplicates before. If there are insufficient entries it goes back to the start of the sequence and repeats. But thats an educated guess based on what i saw.

 

Thus if you want to edit this you have to tell it to remove the line/s you want removed and every line below it whichever line your removing that is furthest up the list.

 

Here is the code that actually worked, (i haven't confirmed fan fire but i'm pretty sure it works since all the others did):

[Sharpshooter X2SoldierClassTemplate]
-SoldierRanks=(  aAbilityTree=(	(AbilityName="PistolStandardShot",  ApplyToWeaponSlot=eInvSlot_SecondaryWeapon),             (AbilityName="Squadsight")             ),         aStatProgression=((StatType=eStat_Offense,StatAmount=10), (StatType=eStat_HP,StatAmount=1), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=0), (StatType=eStat_CombatSims,StatAmount=1)),       )
-SoldierRanks=(  aAbilityTree=(	(AbilityName="LongWatch", ApplyToWeaponSlot=eInvSlot_PrimaryWeapon),             (AbilityName="ReturnFire", ApplyToWeaponSlot=eInvSlot_SecondaryWeapon)             ),     aStatProgression=((StatType=eStat_Offense,StatAmount=4), (StatType=eStat_HP,StatAmount=0), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=0), (StatType=eStat_CombatSims,StatAmount=0)),       )
-SoldierRanks=(  aAbilityTree=(	(AbilityName="Deadeye", ApplyToWeaponSlot=eInvSlot_PrimaryWeapon),             (AbilityName="LightningHands", ApplyToWeaponSlot=eInvSlot_SecondaryWeapon)             ),         aStatProgression=((StatType=eStat_Offense,StatAmount=3), (StatType=eStat_HP,StatAmount=1), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=5), (StatType=eStat_CombatSims,StatAmount=0)),       )
-SoldierRanks=( aAbilityTree=(	(AbilityName="DeathFromAbove", ApplyToWeaponSlot=eInvSlot_PrimaryWeapon),             (AbilityName="Quickdraw")            ),           aStatProgression=((StatType=eStat_Offense,StatAmount=3), (StatType=eStat_HP,StatAmount=0), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=0), (StatType=eStat_CombatSims,StatAmount=0)),       )
-SoldierRanks=( aAbilityTree=(	(AbilityName="KillZone", ApplyToWeaponSlot=eInvSlot_PrimaryWeapon),             (AbilityName="Faceoff", ApplyToWeaponSlot=eInvSlot_SecondaryWeapon)            ),         aStatProgression=((StatType=eStat_Offense,StatAmount=2), (StatType=eStat_HP,StatAmount=1), (StatType=eStat_Strength,StatAmount=1), (StatType=eStat_Hacking,StatAmount=5), (StatType=eStat_CombatSims,StatAmount=0)),       )
-SoldierRanks=( aAbilityTree=(	(AbilityName="SteadyHands"),             (AbilityName="SharpshooterAim", ApplyToWeaponSlot=eInvSlot_PrimaryWeapon)     ),           aStatProgression=((StatType=eStat_Offense,StatAmount=2), (StatType=eStat_HP,StatAmount=0), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=0), (StatType=eStat_CombatSims,StatAmount=0)),       )
-SoldierRanks=( aAbilityTree=(	(AbilityName="InTheZone", ApplyToWeaponSlot=eInvSlot_PrimaryWeapon),             (AbilityName="FanFire", ApplyToWeaponSlot=eInvSlot_SecondaryWeapon)            ),           aStatProgression=((StatType=eStat_Offense,StatAmount=2), (StatType=eStat_HP,StatAmount=1), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=5), (StatType=eStat_CombatSims,StatAmount=0)),       )

+SoldierRanks=(  aAbilityTree=(	(AbilityName="PistolStandardShot",  ApplyToWeaponSlot=eInvSlot_SecondaryWeapon),             (AbilityName="Squadsight")             ),         aStatProgression=((StatType=eStat_Offense,StatAmount=10), (StatType=eStat_HP,StatAmount=1), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=0), (StatType=eStat_CombatSims,StatAmount=1)),       )
+SoldierRanks=(  aAbilityTree=(	(AbilityName="LongWatch", ApplyToWeaponSlot=eInvSlot_PrimaryWeapon),             (AbilityName="ReturnFireRebalance", ApplyToWeaponSlot=eInvSlot_SecondaryWeapon)             ),     aStatProgression=((StatType=eStat_Offense,StatAmount=4), (StatType=eStat_HP,StatAmount=0), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=0), (StatType=eStat_CombatSims,StatAmount=0)),       )
+SoldierRanks=(  aAbilityTree=(	(AbilityName="Deadeye", ApplyToWeaponSlot=eInvSlot_PrimaryWeapon),             (AbilityName="LightningHandsRebalance", ApplyToWeaponSlot=eInvSlot_SecondaryWeapon)             ),         aStatProgression=((StatType=eStat_Offense,StatAmount=3), (StatType=eStat_HP,StatAmount=1), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=5), (StatType=eStat_CombatSims,StatAmount=0)),       )
+SoldierRanks=( aAbilityTree=(	(AbilityName="DeathFromAbove", ApplyToWeaponSlot=eInvSlot_PrimaryWeapon),             (AbilityName="Quickdraw")            ),           aStatProgression=((StatType=eStat_Offense,StatAmount=3), (StatType=eStat_HP,StatAmount=0), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=0), (StatType=eStat_CombatSims,StatAmount=0)),       )
+SoldierRanks=( aAbilityTree=(	(AbilityName="KillZone", ApplyToWeaponSlot=eInvSlot_PrimaryWeapon),             (AbilityName="FaceoffRebalance", ApplyToWeaponSlot=eInvSlot_SecondaryWeapon)            ),         aStatProgression=((StatType=eStat_Offense,StatAmount=2), (StatType=eStat_HP,StatAmount=1), (StatType=eStat_Strength,StatAmount=1), (StatType=eStat_Hacking,StatAmount=5), (StatType=eStat_CombatSims,StatAmount=0)),       )
+SoldierRanks=( aAbilityTree=(	(AbilityName="SteadyHands"),             (AbilityName="SharpshooterAim", ApplyToWeaponSlot=eInvSlot_PrimaryWeapon)     ),           aStatProgression=((StatType=eStat_Offense,StatAmount=2), (StatType=eStat_HP,StatAmount=0), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=0), (StatType=eStat_CombatSims,StatAmount=0)),       )
+SoldierRanks=( aAbilityTree=(	(AbilityName="InTheZone", ApplyToWeaponSlot=eInvSlot_PrimaryWeapon),             (AbilityName="FanFireRebalance", ApplyToWeaponSlot=eInvSlot_SecondaryWeapon)            ),           aStatProgression=((StatType=eStat_Offense,StatAmount=2), (StatType=eStat_HP,StatAmount=1), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=5), (StatType=eStat_CombatSims,StatAmount=0)),       )

Also here's the class file i promised:

 

 

  Reveal hidden contents

 

 

 

 

I am having a few issues still related to my new script code not quite doing what i want, but i want to try and fix that myself, (i think i know how to workaround it it even if i'm not sure why it's doing what it is), if i need help i'll come post again :smile:.

Edited by CarlBar
Link to comment
Share on other sites

That is great. It does seem that you want to wipe out all the SoldierRank lines in the section. So like Quaro suggested, instead of the long lines with - you could try one short line with ! like this:

 

[Sharpshooter X2SoldierClassTemplate]

!SoldierRanks

+SoldierRanks={ ... your + lines here }

 

This will also be a little safer, in case a new game update makes a tiny change in the existing lines, such as even adding a space. I believe that will make - have no effect since it is no longer an *exact* match to your text.

Link to comment
Share on other sites

Ok i do need the help. Sorry for the constant stream of bugging you. Having the dreaded man flu is not helping my brain work either :(.

 

I've now got my new abilities in game. The full new script file is below:

 

 

  Reveal hidden contents

 

 

The abilities are in game but there are two issues, one minor one major.

 

The minor one is that all the localisation text is gone, no ability names, no ability descriptions and the fire weapon button is blank too when using them in mission.

 

Digging through it seems what i thought was the line in the script file referencing the appropriate section of the localisation file actually isn't, so what line sets it?

 

 

The Major one is cooldown related. Both an fire and Face off have had their action point cost code changed to match that of lightning hands, (so basically it's gone). So long as i leave their cooldown code unchanged this functions as expected. However the cooldown code does not, the cooldown becomes instant, (i.e. you can use it any number of times in the same turn). If i manually set the cooldown in the file instead of referencing the config variable it instead allows faceoff to be used after dashing, (which it can't be done if it references the config). Am i missing somthing in the lightning hands code, or just doing somthing wrong referencing the config?

 

 

 

Since it's obviously not that what line/s set the relevant references, (i've edited localisations before so i know in general terms how they work, but i don't know what acts as the referance)

Edited by CarlBar
Link to comment
Share on other sites

  • Recently Browsing   0 members

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