Author Topic: Custom Statstrings not working as expected  (Read 3149 times)

Offline Ranakastrasz

  • Captain
  • ***
  • Posts: 53
    • View Profile
Custom Statstrings not working as expected
« on: June 07, 2016, 11:57:49 pm »
Tried to make a custom statstring file. However, it only seems to apply the first set. If I comment out the first set, it only shows the second set. Removing the spaces between the sets has no effect. I am unsure what the cause is.

Code: [Select]
statStrings:
 
 - string: "a0"
   firing: [0, 49]
 - string: "a1"
   firing: [50, 57]
 - string: "a2"
   firing: [58, 65]
 - string: "a3"
   firing: [66, 73]
 - string: "a4"
   firing: [74, 81]
 - string: "a5"
   firing: [82, 89]
 - string: "a6"
   firing: [90, 97]
 - string: "a7"
   firing: [98, 105]
 - string: "a8"
   firing: [106, 115]
 - string: "a9"
   firing: [116, ~]
   
 - string: "r0"
   reactions: [0, 49]
 - string: "r1"
   reactions: [50, 57]
 - string: "r2"
   reactions: [58, 65]
 - string: "r3"
   reactions: [66, 73]
 - string: "r4"
   reactions: [74, 81]
 - string: "r5"
   reactions: [82, 89]
 - string: "r6"
   reactions: [90, 97]
 - string: "r7"
   reactions: [98, 105]
 - string: "r8"
   reactions: [106, 115]
 - string: "r9"
   reactions: [116, ~]
   
 - string: "W" #weak. can only carry Rifle + clips OR Laser Rifle + grenade
   strength: [0, 19]
 - string: "w" #additional Medikit or Stun Rod or grenades possible
   strength: [20, 25]
 - string: "h" #heavy cannon or auto-cannon, each plus spare clip
   strength: [31, 40]
 - string: "H"  #can handle 4 Large Rockets + Launcher
   strength: [41, ~]
   
 - string: "C"
   bravery: [0, 10]
 - string: "c"
   bravery: [11, 30]
 - string: "b"
   bravery: [40, 59]
 - string: "B"
   bravery: [60, ~]
   
   
 - string: "x0"
   psiStrength: [0, 5]
 - string: "x1"
   psiStrength: [6, 14]
 - string: "x2"
   psiStrength: [15, 24]
 - string: "x3"
   psiStrength: [25, 34]
 - string: "x4"
   psiStrength: [35, 44]
 - string: "x5"
   psiStrength: [45, 54]
 - string: "x6"
   psiStrength: [55, 64]
 - string: "x7"
   psiStrength: [65, 74]
 - string: "x8"
   psiStrength: [75, 84]
 - string: "x9"
   psiStrength: [85, ~]
   
 - string: "s0"
   psiSkill: [0, 5]
 - string: "s1"
   psiSkill: [6, 14]
 - string: "s2"
   psiSkill: [15, 24]
 - string: "s3"
   psiSkill: [25, 34]
 - string: "s4"
   psiSkill: [35, 44]
 - string: "s5"
   psiSkill: [45, 54]
 - string: "s6"
   psiSkill: [55, 64]
 - string: "s7"
   psiSkill: [65, 74]
 - string: "s8"
   psiSkill: [75, 84]
 - string: "s9"
   psiSkill: [85, ~]
   

Offline Arthanor

  • Commander
  • *****
  • Posts: 2488
  • XCom Armoury Quartermaster
    • View Profile
Re: Custom Statstrings not working as expected
« Reply #1 on: June 08, 2016, 12:56:39 am »
If the statstring that is applied has more than one character, than anything following does not get applied.

You can do:
Code: [Select]
- string: "a"
  firing: [~,60]
- string: "A"
  firing: [61, ~]
- string: "r"
  firing: [~,60]
- string: "R"
  firing: [61, ~]

and then you will see ar, aR, Ar, AR, but you can't do what you did and see a1r3. However, you could do:


Code: [Select]
- string: "a"
   firing: [0, ~]
 - string: "0"
   firing: [0, 49]
 - string: "1"
   firing: [50, 57]
 - string: "2"
   firing: [58, 65]
 - string: "3"
   firing: [66, 73]
 - string: "4"
   firing: [74, 81]
 - string: "5"
   firing: [82, 89]
 - string: "6"
   firing: [90, 97]
 - string: "7"
   firing: [98, 105]
 - string: "8"
   firing: [106, 115]
 - string: "9"
   firing: [116, ~]
   
 - string: "r"
   reactions: [0,~]
 - string: "0"
   reactions: [0, 49]
 - string: "1"
   reactions: [50, 57]
 - string: "2"
   reactions: [58, 65]
 - string: "3"
   reactions: [66, 73]
 - string: "4"
   reactions: [74, 81]
 - string: "5"
   reactions: [82, 89]
 - string: "6"
   reactions: [90, 97]
 - string: "7"
   reactions: [98, 105]
 - string: "8"
   reactions: [106, 115]
 - string: "9"
   reactions: [116, ~]

in order to get what you want. Basically, print the letters independently regardless of stat, then the number to represent the stat.