4) Throwing random stuff would stop giving throwing experience once the character has reached the average stat of a hired soldier.
5) For equity, I would give "shooting experience" to soldiers who shoot at a hostile target (even if they miss) if their shooting accuracy is under-average. This should not trigger secondary experience gain, because it's too easy to abuse.
How about: when any damage is dealt? Or at least when an enemy is hit?Rule 3 handles it (in vanilla it gives shooting accuracy and secondary gains, my proposal is to change the reward to throwing accuracy + secondary gains)
It would still be abused though. "Let everyone shoot everywhere for points." Nah.This is only a boost for sub-average soldiers, the ones that you would have sacked and replaced immediately if you had the cash. If such underdog sees enough action to shoot 40+ times at aliens, surviving 5+ missions, IMO they deserve to reach the status of "barely useful".
Piratez includes several different weapons which rely on throwing skill when you "shoot" them : black powder bombs and molotovs, bows, knives. I really like how it lets you use recruits who have a bad shooting accuracy. Even weaker ones can be bowwomen with unlimited ammo.
However, there is the issue that these weapons don't train the right stat... The standard experience system gives "shooting experience" when you hit a hostile target with any ranged weapon (either directly or with splash damage), and this increases firing accuracy, not throwing.
So my suggestion would be for Extended to modify the experience system accordingly.
1) Ranged weapons which rely more on "throwing" than "shooting" should give throwing experience when hitting a hostile, instead of shooting experience.
2) In this case it should still trigger secondary experience gains (TU, energy,..)
Such rules can be hard-coded, because it only triggers in games/mods that include such weapons.
Now, personnally I wouldn't stop there, but I know this gets far from vanilla...
3) Grenade/proxies explosions which hit a hostile would give throwing experience instead of shooting experience. And still provide secondary experience, like in 2)
4) Throwing random stuff would stop giving throwing experience once the character has reached the average stat of a hired soldier.
5) For equity, I would give "shooting experience" to soldiers who shoot at a hostile target (even if they miss) if their shooting accuracy is under-average. This should not trigger secondary experience gain, because it's too easy to abuse.
if (_expBravery || _expReactions || _expFiring || _expPsiSkill || _expPsiStrength || _expMelee)
Dioxine, sorry I didn't even know about Dojo :-[ And my resentment about "bad shooting accuracy = useless" is a leftover from vanilla UFO. Piratez provides ways for several other stats to come to the rescue.
Meridian, did you modify the code that grants secondary stats? It should now count, otherwise the amazons will never improve rank/TU/stamina/health/strengh
It should look like the following, in BattleUnit.cppCode: [Select]if (_expBravery || _expReactions || _expFiring || _expPsiSkill || _expPsiStrength || _expMelee)
Yes the code would be straightfoward, but there is like a hundred items in Piratez, I understand Dioxine's reluctance : It's one more piece of information to maintain forever.
I am also thinking about melee 'guns' like chainsaws or hammers, should they give melee experience? Perhaps making all guns with a range of 1 give such experience would easily fix that.
Awesome! How about rules 1-3? I'd like the condition to hit the enemy with these to be in, best would be optional - so you either play as intended - no experience without scoring actual hits - or have even easier time upgrading Throwing, as you wanted (mind you, that even smoke grenades will grant you Throwing when you hit the enemy with the smoke cloud).
EDIT: the events of throwing a grenade and grenade exploding are just too disconnected... but I will try for rule 3 (weapons with immediate effect like molotovs, etc.)
- For rule 1 & 2, the explosive needs to be primed for 0 or 1 (else someone just could replace training flares with HE grenades pre-primed for 23 turns...). There's scarcely any practical reason to prime them for more than 1 turn, anyway (well, in 95% cases, you prime them for 0...).
Maybe I wasn't describing my thoughts accurately.
What I was thinking was when reading in the ruleset for accuracy you use that to determine experience points. You could also do something for calculating bonus damage. I haven't taken a close look at the source code, but if those places are too far separated from experience gain, then add a tracking variable in the weapon class that's built up during ruleset parsing from the accuracy and bonus damage. No special cases, no need to have lots of extra handlers per weapon.
What do you guys think?
If it had both firing and throwing like the mortar then it increases both. How about iterating over the accuracy and bonus damage modifiers when damage is dealt. Anything that affects accuracy or damage gets awarded experience. Since only handling at damage dealt (would have to be before armor and resistances), this removes training via flares all together. This would also handle primed things, proximity, and guns all the same.
I suppose I also assume which actor tried to deal damage is tired tightly to the damage already or else proximity and primed grenades awarding experience properly is more convoluted than I thought.
Thoughts?
Throwing Grenades improve Throwing Accuracy, and also Firing Accuracy when enemies are caught by explosions. All enemies (if not mind controlled) caught in the blast will give experience toward firing accuracy, even if undamaged (i.e., their armor absorbed it) - see Experience.
All in all. I like Yankes idea. And this seems to me to be a feature that should be brought into OXCE to support other mods.
And what does "each action" mean exactly?Basic would be current place where skill grain is awarded. Next event like grenade or proxy explosion. Question is that values would be shared (between places) or if there should be special cases (in one place).
If it's just the battle action (e.g. BA_THROW or BA_AUTOSHOT) that's far away from being enough.
And from the other side, is exploding grenade even an action?.... in my opinion not, as it doesn't require anyone to (directly) act (in game's terms).... it just happens.
I am not against improvements, but it needs to be very carefully and precisely defined... and if possible should be easy to understand.
For example, what if your theoretical weapon has accuracy = firing*0.5 + throwing*0.5 ? Which experience point would you award?From looking at the file, Piratez does include a mortar which uses 0.5 throwing and 0.5 shooting.
About the existing experience given by grenades/proxies : It works because battle items have a _previousOwner field, it points to who threw or dropped it.
If/when item sets off, this field is passed to the new ExplosionBState()as the last (optional) argument. In turn, when ExplosionBState::explode() calls TileEngine::explode(), it passes this unit as the last (optional) argument.
There are two cases where TileEngine::explode() receives a unit : when a fired weapon causes AOE, and when an explosive item which was carried by someone sets off. It's tricky because at this point in the code, there's no longer any track of HOW the damage was caused.
Awesome! That sounds great Yankes!That was only possible solution and is bit long way to made it working :) It always possible that something will go wrong and every thing will be pointless.
Unless you're making a more advanced system already :)
I am making it right now... and I am being quite successful.This look good, probably best balance between customization and simplicity. I will probably steal this functionality to my branch :)
Still many hours of testing in front of me though.
I am at a point where also points 1/2/3 work as you suggested, i.e. only when grenades actually hit.
Now I am adding a possibility to override the algorithm-based training with a custom training (per weapon)... and no, the "formula" will not be freely definable by ruleset, you will only have (more than enough) options to choose from (see spoiler, feel free to propose other options, I promise to consider them :) ):
This look good, probably best balance between customization and simplicity. I will probably steal this functionality to my branch :)