Author Topic: Statstring Roles - adds soldier roles rather than abbreviated stas  (Read 6125 times)

Offline kikimoristan

  • Commander
  • *****
  • Posts: 649
    • View Profile
This is a simplified version of  Warboy's custom statstrings mod.

This system only shows exceptional soldiers and therefore all other unlisted soldiers are below average/have nothing to contribute to the team hence useable as meat shield.

I modified this a tad bit adding Assault and heavy variant of mobile roles and changed a few stats here and there. Units are now organized by classes. Also changed to show high psi strength rather than low psi strength.


Before roles you may see the following (only two statstring abbreviations in this mod):
S = psi strength 60+
P = psi skill 40+

Roles

/Elite : jack of all trades master of all. your best soldier
health 30+
strength 40+
reactions 60+
firing 60+
stamina 60+

---- accuracy/long range class ----
There is no heavy variant for ranged roles because they should not get too close to combat. Ideally a sniper carries lots of ammo and high acc ranged weapon and no explosives or melee weaponry.

/Snipr (Sniper)  : a marskman with great reaction fire
firing: 70+
reactions: 60+

/Mksmn (Marksman): great aim
firing: 70+

--- mobile tanks class ----
These are mobile units that can also tank and carry a lot. Ideally used as scouts or mules. Perfect for carrying extra ammo for the team, a stun rod or even a high explosive pack. Add a heavy armor and they can body block for weaker essential units.

/HvySct (Heavy Scout) : higher reaction assault unit
reactions: 50+
stamina: 60+
tu: 60+

/HvyAsslt (Heavy Assault) :  low reaction mobile unit best at getting in close and personal .
reactions: 49-
stamina: 70+ <stamina is great to get in shoot and get out
tu: 60+

/HvySupp (Heavy Support) : most trusted unit to carry a medi-kit as he/she is the least likely to panic
bravery: 70+
stamina: 60+
tu: 50+ <decent tu to help out

--- mobility class -----
Mobile units good for hit and run tactics.

/Sct (Scout) : higher reaction assault unit
reactions: 50+
stamina: 60+
tu: 60+
health: 30+
strength: 40+

/Asslt (Assault) :  low reaction mobile unit best at getting in close and personal .
reactions: 49-
stamina: 70+ <stamina is great to get in shoot and get out
tu: 60+
health: 30+
strength: 40+

/Supp (Support) : most trusted unit to carry a medi-kit as he/she is the least likely to panic
bravery: 70+
stamina: 60+
tu: 50+ <decent tu to help out
health: 30+
strength: 40+

--- tank/heavy class ---
Plain heavy tough unit with no other special aptitudes.

/Hvy (Heavy) : good at carrying things and tanking . ideally you'd want him/her with heavist armor going in first
health: 30+
strength: 40+

--- specialty class ---
These are more of a niche type units that can use thrown or melee weaponry.

/Spclst (Specialist) : someone who doesn't need to stick with conventional weapons with decent tu, stamina and good at throwing and h2h combat
stamina: 60+ < get in get out
tu: 50+ <get in get out
strength : 40+
melee: 70+
throwing: 70+

/Grndr (Grenadier) : can throw things accurately
strength: 40+
throwing: 70+

/Melee :  this unit is more about getting in melee mode (only useful in tftd)
stamina: 60+ < get in get out
tu: 50+ <get in get out
strength : 40+
melee: 70+


Let me know what you think
« Last Edit: August 17, 2015, 09:28:16 pm by tollworkout »

Offline Warboy1982

  • Administrator
  • Commander
  • *****
  • Posts: 2337
  • Developer
    • View Profile
    • Email
Re: Statstring Roles MOD - adds soldier roles rather than abbreviated stas
« Reply #1 on: August 17, 2015, 12:44:26 pm »
no offense, but it looks like a "lite" version of this:
https://openxcom.org/forum/index.php/topic,2204.0.html

Offline kikimoristan

  • Commander
  • *****
  • Posts: 649
    • View Profile
Re: Statstring Roles MOD - adds soldier roles rather than abbreviated stas
« Reply #2 on: August 17, 2015, 12:46:11 pm »
no offense, but it looks like a "lite" version of this:
https://openxcom.org/forum/index.php/topic,2204.0.html

it is a lite version of that

Offline Warboy1982

  • Administrator
  • Commander
  • *****
  • Posts: 2337
  • Developer
    • View Profile
    • Email
Re: Statstring Roles - adds soldier roles rather than abbreviated stas
« Reply #3 on: August 17, 2015, 01:27:52 pm »
ah.

Offline Foxhound634

  • Colonel
  • ****
  • Posts: 174
    • View Profile
Re: Statstring Roles - adds soldier roles rather than abbreviated stas
« Reply #4 on: September 23, 2015, 02:43:31 am »
Ok so i've tried to create my own ruleset for the statstring abbreviations (see attached), and many failed attempts later, the current one is inspired by another user on the forum (Simon i think). Anyway, everything is fine when i take it step by step, adding string, testing, adding string, testing etc. Then after adding another string, suddenly only one string works in-game (The SCT. in this case) or none of them at all (as in they don't show up). I've tried listing the required stats in different orders, i've tried listing the strings in order by attribute (such as all strength requirements first, then reactions, then bravery etc.), i've tried listing the strings in order by the highest number of required stats first, but i just can't figure out why. My current suspicion is that the game somehow stops searching for qualifying strings when one has been found, and that i don't know how to get around this. Can someone please help and tell me that i'm making a really simple mistake?
« Last Edit: September 23, 2015, 02:46:17 am by Foxhound634 »

Offline yrizoud

  • Commander
  • *****
  • Posts: 1018
    • View Profile
Re: Statstring Roles - adds soldier roles rather than abbreviated stas
« Reply #5 on: September 23, 2015, 11:06:45 am »
The way you defined your "tiers" of a class, a soldier can have too good a stat to fit in one tier (say, sct-adv), but an other stat is too low to fit in the next tier. So he will not qualify for the role at all.

You may want to put all MASter roles first, and then all EXPert, etc. in order of descending requirements (roles that requires many stats before roles that require less of them), but set all upper range to 'infinite' (~), ex:
Code: [Select]
  - string: "SCT-EXP."
stamina: [81, ~] # instead of [81, 95]
    reactions: [81, ~] # instead of [81, 100]
tu: [71, ~] #instead of [71, 78]

Offline Foxhound634

  • Colonel
  • ****
  • Posts: 174
    • View Profile
Re: Statstring Roles - adds soldier roles rather than abbreviated stas
« Reply #6 on: September 24, 2015, 12:05:15 am »
You may want to put all MASter roles first, and then all EXPert, etc. in order of descending requirements (roles that requires many stats before roles that require less of them)

I already tried that at an earlier point, but i did it again now, no change

, but set all upper range to 'infinite' (~)

That's how i started out doing it, but with my problems i went away from that, just to be sure. I have done it like that again, no change. Try the updated attachment out for yourself, but i can't for the life of me figure out what's wrong

Offline R1dO

  • Colonel
  • ****
  • Posts: 374
    • View Profile
    • Email
Re: Statstring Roles - adds soldier roles rather than abbreviated stas
« Reply #7 on: September 24, 2015, 01:33:15 am »
Hmm ...
I've opened your original file, and immediately my editor started to yell about the usage of tabs inside a yaml file.

For your convenience i've attached the same file, with tabs converted to spaces (and corrected indentation).
Could you please check if this solves your problem?

If it still doesn't, please try removing all empty lines between the definitions. Just to be sure.

Offline Foxhound634

  • Colonel
  • ****
  • Posts: 174
    • View Profile
Re: Statstring Roles - adds soldier roles rather than abbreviated stas
« Reply #8 on: September 24, 2015, 04:37:33 am »
...tabs converted to spaces (and corrected indentation).
Could you please check if this solves your problem?

Well spank my tits and call me sally, it fucking worked! I use Notepad++ and it didn't yell at me ever...so much for the extra ++

Anyway thanks a lot, i knew it would be something stupidly simple :)

Offline hellrazor

  • Commander
  • *****
  • Posts: 1992
  • Deep Ruleset Digger & Bughunter
    • View Profile
    • Github Account
Re: Statstring Roles - adds soldier roles rather than abbreviated stas
« Reply #9 on: September 24, 2015, 07:26:02 am »
I use these here:

Offline R1dO

  • Colonel
  • ****
  • Posts: 374
    • View Profile
    • Email
Re: Statstring Roles - adds soldier roles rather than abbreviated stas
« Reply #10 on: September 24, 2015, 11:44:41 am »
...
Anyway thanks a lot, i knew it would be something stupidly simple :)

No problem.
May i ask what you used as a reference for your changes (for example, comments in the original file or a web-page like Rulesets (OpenXcom))?

niculinux

  • Guest
Re: Statstring Roles - adds soldier roles rather than abbreviated stas
« Reply #11 on: September 27, 2015, 01:19:49 pm »
Very very nice, especially it des not require a separated executable!!!!!!!!!!  8)