OpenXcom Forum

Modding => Released Mods => XPiratez => Topic started by: legionof1 on April 28, 2016, 02:41:11 am

Title: Dojo mechanic question
Post by: legionof1 on April 28, 2016, 02:41:11 am
Anyone know what the rate of stat gain is? I'm trying to  work out a comparison with my average combat gains.
Title: Re: Dojo mechanic question
Post by: Dioxine on April 28, 2016, 09:51:50 am
100-x% chance to increase each trainable stat each midnight (usually by 1-3 I think?), where x is the current stat value.
Title: Re: Dojo mechanic question
Post by: legionof1 on April 28, 2016, 10:48:30 am
thks
Title: Re: Dojo mechanic question
Post by: Meridian on April 28, 2016, 10:53:06 am
100-x% chance to increase each trainable stat each midnight (usually by 1-3 I think?), where x is the current stat value.

increase by 1 only
Title: Re: Dojo mechanic question
Post by: Zharkov on April 28, 2016, 11:45:13 am
100-x% chance to increase each trainable stat each midnight (usually by 1-3 I think?), where x is the current stat value.

Is this 100%-x% (as of the stat cap) or flat 100-x%?
Title: Re: Dojo mechanic question
Post by: Meridian on April 28, 2016, 12:00:56 pm
Flat 100, subject to change in the future
Title: Re: Dojo mechanic question
Post by: Solarius Scorch on April 28, 2016, 12:19:49 pm
I am playing with the idea of relatively low caps for the dojo, for example 70; you'd have to participate in battles to get above that.
Title: Re: Dojo mechanic question
Post by: Dioxine on April 28, 2016, 12:22:50 pm
70 is pretty crappy for Melee & Firing, while being max-out for Strength and Health :)
Title: Re: Dojo mechanic question
Post by: Meridian on April 28, 2016, 12:23:28 pm
I am playing with the idea of relatively low caps for the dojo, for example 70; you'd have to participate in battles to get above that.

Yes, that's what I am thinking of... quick training, but only to certain level.
Title: Re: Dojo mechanic question
Post by: Solarius Scorch on April 28, 2016, 12:24:10 pm
70 is pretty crappy for Melee & Firing, while being max-out for Strength and Health :)

I know, right? :P
That's why I'm only thinking about this stuff for now!
Title: Re: Dojo mechanic question
Post by: x60mmx on April 28, 2016, 11:04:33 pm
I'd be totally cool with 70.  I find that to be my minimum for melee, where-as 60 is where I find reactions and firing and throwing to become reliable.  Would be nice to incubate poor recruits into something more than a meat shield reliably.  I would't expect a training facility to turn lame recriits into badasses, just whip them into shape so I can use them as soldiers.
Title: Re: Dojo mechanic question
Post by: Meridian on April 29, 2016, 12:21:08 am
I know, right? :P
That's why I'm only thinking about this stuff for now!

Of course, each skill would have its own cap, not all the same.
Title: Re: Dojo mechanic question
Post by: new_civilian on April 29, 2016, 12:34:52 pm
I actually prefer the dojo system the way it is now, it allows you to replace gals in the lategame without eternally carrying around rookies. The dojos appear rather late in the game, Dioxine did a good job here imo. If they would appear right at the beginning a cap would maybe be plausible, yes, but only then.
Title: Re: Dojo mechanic question
Post by: Meridian on April 29, 2016, 12:42:31 pm
I actually prefer the dojo system the way it is now, it allows you to replace gals in the lategame without eternally carrying around rookies. The dojos appear rather late in the game, Dioxine did a good job here imo. If they would appear right at the beginning a cap would maybe be plausible, yes, but only then.

If you know the tech tree, you can get them early (I have 10 dojos in July first year).

I'll just make it configurable and let modders decide... I hate starting with strength=10 and stamina=30... but starting (after training) with strength=60 and stamina=100 is equally not enjoyable. I'd prefer starting with strength=40-45 and stamina=70-80 in the late game and would set my caps accordingly to values a bit higher than that since training gets progressively harder (i.e. strength training cap = 45-50 and stamina training cap = 80-90 would be ideal for me).

I don't care about other stats, I think I can live with any TUs, health, bravery, reactions, firing/throwing/melee accuracy the whole game.
Title: Re: Dojo mechanic question
Post by: Dioxine on April 29, 2016, 02:07:32 pm
I'll just make it configurable and let modders decide... I hate starting with strength=10 and stamina=30... but starting (after training) with strength=60 and stamina=100 is equally not enjoyable.

Like you said yourself, it depends on the player :) I have nothing against having fully-trained rookies, as long as game challenges are balanced with that in mind.
Title: Re: Dojo mechanic question
Post by: karadoc on April 30, 2016, 12:14:57 am
Like you said yourself, it depends on the player :) I have nothing against having fully-trained rookies, as long as game challenges are balanced with that in mind.
I don't think there is anything wrong with full-trained rookies from a game difficulty point of view; but I do think it could potentially take away some interesting decisions and planning from the game.

When my roster has a mixture of experience levels, I make a a lot of decisions based on their differences. Here are a few examples which come to mind:
I'm sure there are other things too.

My point is that if the Dojo is powerful enough to give us fully-trained rookies whenever we need them, then some potentially interesting parts of the game are, in some sense, removed.

I'm not trying to say that the Dojo is too powerful, or that it should have some particular limits or anything like that. I'm just trying to say it would be a good idea to keep these player decisions in mind when balancing. Because ultimately the fun of games is not just in the raw difficulty, but in the types of decisions we make as players. If the Dojo is going to remove some decision making, it should be to replace it with a different kind of decision, or something like that.
Title: Re: Dojo mechanic question
Post by: Rince Wind on May 01, 2016, 04:41:20 pm
It only gives you fully trained rookies whenever you need them if you always have a secondary team trained. It is not like you get to buy trained rookies, they still need time in there. Time that you might not have if a baby nuke just took out most of your primary team.
Title: Re: Dojo mechanic question
Post by: Cristao on May 01, 2016, 05:18:11 pm
Not sure if this will come out the wrong way - why not play the entire game before making comments on if something is overpowered.... e.g. the Dojo.
Title: Re: Dojo mechanic question
Post by: Dioxine on May 01, 2016, 05:44:35 pm
The game progresses from savage to civilized. Dojo is important in that aspect.

First, you send to battle assorted riff-raff. Decisions at this stage are, who can make an use of what weapon, who is a champion that is to be trained, and who is useless & to be given suicide-style weapons.

In time, you can allow yourself to send well-trained warriors to battle. Decisions at this stage change. You optimize loadouts based on general strategy and effectivity of weapons, and minimization of casaulties. No more champions and hobos, all are professional soldiers. But, different as decisions might be at this stage, they're still decisions. Also, people become much less cheap at this stage, since each death is not only $25k, but several months of training (which is a logistical effort).

Also, dojos certainly cut back on XP grinding, which is fun in the early game, but IMO gets really tedious at some point.
Title: Re: Dojo mechanic question
Post by: ivandogovich on May 01, 2016, 06:01:38 pm
The game progresses from savage to civilized. Dojo is important in that aspect.

First, you send to battle assorted riff-raff. Decisions at this stage are, who can make an use of what weapon, who is a champion that is to be trained, and who is useless & to be given suicide-style weapons.

In time, you can allow yourself to send well-trained warriors to battle. Decisions at this stage change. You optimize loadouts based on general strategy and effectivity of weapons, and minimization of casaulties. No more champions and hobos, all are professional soldiers. But, different as decisions might be at this stage, they're still decisions. Also, people become much less cheap at this stage, since each death is not only $25k, but several months of training (which is a logistical effort).

Also, dojos certainly cut back on XP grinding, which is fun in the early game, but IMO gets really tedious at some point.

I Concur completely on all points!
Title: Re: Dojo mechanic question
Post by: new_civilian on May 01, 2016, 07:29:30 pm
Yes, me too, especially about the XP grinding part in late-game.
Title: Re: Dojo mechanic question
Post by: x60mmx on May 01, 2016, 10:44:10 pm
I have yet to get Dojos, but I look forward to them.  XP grinding 15 missions in?  Cool.  80 missions in?  No thank you
Title: Re: Dojo mechanic question
Post by: karadoc on May 02, 2016, 11:49:18 am
The game progresses from savage to civilized. Dojo is important in that aspect.

First, you send to battle assorted riff-raff. Decisions at this stage are, who can make an use of what weapon, who is a champion that is to be trained, and who is useless & to be given suicide-style weapons.

In time, you can allow yourself to send well-trained warriors to battle. Decisions at this stage change. You optimize loadouts based on general strategy and effectivity of weapons, and minimization of casaulties. No more champions and hobos, all are professional soldiers. But, different as decisions might be at this stage, they're still decisions. Also, people become much less cheap at this stage, since each death is not only $25k, but several months of training (which is a logistical effort).

Also, dojos certainly cut back on XP grinding, which is fun in the early game, but IMO gets really tedious at some point.
Well said. That's some solid game-design.
Title: Re: Dojo mechanic question
Post by: Meridian on May 02, 2016, 11:58:35 am
I agree with all points too.

For those, who would still find it a bit OP, there will be an option to set training caps individually for each stat soon.
This way you won't be able to go too high, and also the training speed will decrease proportionally.
Title: Re: Dojo mechanic question
Post by: yrizoud on May 02, 2016, 04:14:34 pm
IMO the decreasing progress is much more important than the hard cap, because you don't want to have to check the base everyday and remove units who have reached caps (to replace with units who really need training)
Title: Re: Dojo mechanic question
Post by: Dioxine on May 02, 2016, 04:38:41 pm
Decreasing speed is already possible, I just promised Meridian to leave it alone till he has his dream team trained :)
Also I think price + capacity is limiting enough in Piratez. And I don't personally care if someone reaches cap or not, 90+ is good enough for me (at this point, progress during mission becomes much faster than training anyway; and training is easy to perform if your stats are already high, eg. you will Firing fast if you want to, since you will score many hits).
Title: Re: Dojo mechanic question
Post by: Meridian on May 02, 2016, 05:07:29 pm
Just for completeness:

1. the currently available setting in oxce+ decreases the improvement by flat percentage, regardless of the current stat (i.e. decreases training for rookies the same way as for veterans)
2. the upcoming stat cap will decrease the improvement gradually, i.e. rookies will train quicker than veterans... similar to current (100-stat)% formula... just the 100 will be unhardcoded

Some nice combination of both would be ideal.

I will post exact formulas once it is implemented.
Title: Re: Dojo mechanic question
Post by: The Think Tank on May 03, 2016, 07:30:08 pm
I think the Dojo actually provides way more benefit in terms of game design than it may detract. No more are your rookie gals devalued as nameless meat-shields, now they can be actually useful shock troops, and at 25k a pop, they aren't nearly as expendable as they once were.

If anything needs to be done about it, maybe make the training process take more time so you really need to invest both time and gals to churn out shock troops.
Title: Re: Dojo mechanic question
Post by: Eddie on May 04, 2016, 12:49:29 am
My thoughts on training algorithm:
Can the starting stat be factored in as well? The result would be individual caps for soldiers depending on what they started with, so you still have some differences between soldiers (aka character) even after compleate dojo training.

Possible math:

option 1 - max stat = starting stat + fixed number
example: max strength = 20 (starting) + 30 (fixed number) = 50
So dojo training would get that gal to a max strenth of 50
If the gal had started with 25 strength she would have gotten to 55 with dojo training.

option 2 - max stat = starting stat  + (fixed number - starting stat)*0,5
example: max strength = 20 (starting) + [100 (fixed number) - 20 (starting)]*0,5 = 60
So dojo training would get that gal to a max strenth of 50
If the gal had started with 40 strength she would have gotten to 70 with dojo training.

Numbers in the example calculations are not meant as a suggestion. They are mearly there to explain the math. Also, stat caps would still apply.
I also know this mechanic would make the coding a lot more complex. I just want to put out the idea in case you like it.
Title: Re: Dojo mechanic question
Post by: Meridian on July 21, 2016, 11:21:38 am
I will post exact formulas once it is implemented.

So, I added some more options.

Per soldier type you can now define the training caps (attribute "trainingStatCaps").

Before this change, the caps were by default 100. Yes, not the max stat cap, but flat 100. After the change, they are by default equal to max stat caps... and can be overridden by modders, e.g. like this:

Code: [Select]
  - type: STR_SOLDIER_S
    costBuy: 20000
    costSalary: 5000
    trainingStatCaps:
      tu: 100
      stamina: 200
      health: 60
      bravery: 0
      reactions: 0
      firing: 120
      throwing: 75
      strength: 120
      psiStrength: 0
      psiSkill: 0
      melee: 200
    minStats:
      tu: 60
      stamina: 30
      health: 40
      bravery: 10
      reactions: 40
      firing: 40
      throwing: 30
      strength: 10
      psiStrength: 25
      psiSkill: 0
      melee: 30
    maxStats:
      tu: 80
      stamina: 80
      health: 60
      bravery: 70
      reactions: 70
      firing: 70
      throwing: 60
      strength: 50
      psiStrength: 60
      psiSkill: 10
      melee: 90
    statCaps:
      tu: 100
      stamina: 140
      health: 90
      bravery: 100
      reactions: 100
      firing: 120
      throwing: 90
      strength: 80
      psiStrength: 60
      psiSkill: 40
      melee: 140
    armor: STR_ADVENTURER_OUTFIT_UC
    armorForAvatar: STR_BARBARIAN_RAGS_UC
    avatarOffsetX: 66
    avatarOffsetY: 43
    standHeight: 22
    kneelHeight: 14
    femaleFrequency: 50
    soldierNames:
      - delete
      - SoldierName/Pirate.nam
    deathMale: [41, 42, 43]
    deathFemale: [44, 45, 46]

Examples:

1. stat cap for Stamina=140 and trainingCap=140... stamina will increase (gradually slower) all the way up to 140

2. stat cap for Stamina=140 and trainingCap=200... stamina will increase (gradually slower, but quicker than in example 1) all the way up to 140... NOT to 200!

3. stat cap for Stamina=140 and trainingCap=90... stamina will increase (gradually slower, and slower than in examples 1 and 2) all the way up to 90 only... NOT to 140!

The speed by which it increases is determined by the difference between current soldier stat and by the training cap... see formula below.
Basically if soldier has stat=70 and training cap=140, chance is 50% to increase.

Code: [Select]
void Soldier::trainPhys(int customTrainingFactor)
{
UnitStats caps1 = _rules->getStatCaps();
UnitStats caps2 = _rules->getTrainingStatCaps();
https:// no P.T. for the wounded
if (_recovery == 0)
{
if(_currentStats.firing < caps1.firing && RNG::generate(0, caps2.firing) > _currentStats.firing && RNG::percent(customTrainingFactor))
_currentStats.firing++;
if(_currentStats.health < caps1.health && RNG::generate(0, caps2.health) > _currentStats.health && RNG::percent(customTrainingFactor))
_currentStats.health++;
if(_currentStats.melee < caps1.melee && RNG::generate(0, caps2.melee) > _currentStats.melee && RNG::percent(customTrainingFactor))
_currentStats.melee++;
if(_currentStats.throwing < caps1.throwing && RNG::generate(0, caps2.throwing) > _currentStats.throwing && RNG::percent(customTrainingFactor))
_currentStats.throwing++;
if(_currentStats.strength < caps1.strength && RNG::generate(0, caps2.strength) > _currentStats.strength && RNG::percent(customTrainingFactor))
_currentStats.strength++;
if(_currentStats.tu < caps1.tu && RNG::generate(0, caps2.tu) > _currentStats.tu && RNG::percent(customTrainingFactor))
_currentStats.tu++;
if(_currentStats.stamina < caps1.stamina && RNG::generate(0, caps2.stamina) > _currentStats.stamina && RNG::percent(customTrainingFactor))
_currentStats.stamina++;
}
}

So to recap:
a/ by default soldiers can max out their stats in training now (before they could only go until 100)
b/ this cap is moddable... still cannot go over the normal max stat cap, but can go below
c/ speed of training (per stat) can be increased/decreased by increasing/decreasing the training caps... note that decreasing will also act as stat limit, increasing will not act as limit... you can set it for example to 999999 if you want to train/improve each day
d/ the speed of training decreases gradually, depending on current soldier stat and training cap... modders can also decrease it by flat percentage (with an already existing option "customTrainingFactor" described in previous posts)

Decreasing speed is already possible, I just promised Meridian to leave it alone till he has his dream team trained :)
Also I think price + capacity is limiting enough in Piratez. And I don't personally care if someone reaches cap or not, 90+ is good enough for me (at this point, progress during mission becomes much faster than training anyway; and training is easy to perform if your stats are already high, eg. you will Firing fast if you want to, since you will score many hits).

The dream team is trained :) Feel free to rebalance the caps and the speed as you like.