Author Topic: Changelog - picture heavy  (Read 28426 times)

0 Members and 1 Guest are viewing this topic.

Offline Andy ONeill

  • Moderator
  • Viking
  • *****
  • Posts: 349
Re: Changelog - picture heavy
« Reply #240 on: January 06, 2019, 08:05:37 AM »
All

Removed Limbered and Unlimbered from formations.
Artillery in column will be limbered and hauled by horses.
Artillery in Line is not limbered and will move slower.

FYI
In real world for our period a cannon could be prolonged and moved by it's team of horses without being limbered.  If you feel the need you can alter scenario movement speeds and how long it takes to change from line to column to take this into account.


Offline Andy ONeill

  • Moderator
  • Viking
  • *****
  • Posts: 349
Re: Changelog - picture heavy
« Reply #241 on: January 09, 2019, 03:31:17 AM »
Scenario Editor

Added formation change time to edit movement rates
This is per side so one can be better drilled than the other.
This will be used as a base value.
Changing formation will be harder when close to the enemy and harder again when under fire.

Show piece size in px on menu

Offline Andy ONeill

  • Moderator
  • Viking
  • *****
  • Posts: 349
Re: Changelog - picture heavy
« Reply #242 on: January 11, 2019, 06:10:20 AM »
All
Choose file view - increased width of column for name

Sandbox

Best visible target calculation.
This takes several points representing a shooting unit and work out what enemy units are in range and within arc of fire.
It then looks at the distance between each shooting point and each visible point representing the position of qualifying target units.
The closest (or none) is chosen for each shooting point.


Offline Andy ONeill

  • Moderator
  • Viking
  • *****
  • Posts: 349
Re: Changelog - picture heavy
« Reply #243 on: January 11, 2019, 12:05:26 PM »
All
Choose file view, added user confirmation before deleting.

Offline Andy ONeill

  • Moderator
  • Viking
  • *****
  • Posts: 349
Re: Changelog - picture heavy
« Reply #244 on: January 12, 2019, 07:45:07 AM »
Sandbox

Shooting - another iteration on best target points.

Offline Andy ONeill

  • Moderator
  • Viking
  • *****
  • Posts: 349
Re: Changelog - picture heavy
« Reply #245 on: January 12, 2019, 09:59:50 AM »
Scenario editor
Bug fix
Set turn time.
The width of each rectangle representing movement was calculated incorrectly.

Army Editor
Increase ammo max to 999

Offline Andy ONeill

  • Moderator
  • Viking
  • *****
  • Posts: 349
Re: Changelog - picture heavy
« Reply #246 on: January 15, 2019, 05:11:55 AM »
Sandbox

Moving some code around so shooting and target points are only calculated once per unit ( in a time slice ).

Choosefile

This is the standardised view which is used to open a file -  map, army or scenario.
Avoiding opening any selected file if you close the window using the x top right.

Offline Andy ONeill

  • Moderator
  • Viking
  • *****
  • Posts: 349
Re: Changelog - picture heavy
« Reply #247 on: January 16, 2019, 06:26:03 AM »
Combat Lib & SandBox

Started shooting prototype.
There are a lot of factors go into deciding how many casualties are inflicted by a volley.
Amongst other things, a unit might not be shooting at just one enemy.

Offline Andy ONeill

  • Moderator
  • Viking
  • *****
  • Posts: 349
Re: Changelog - picture heavy
« Reply #248 on: January 19, 2019, 10:20:43 AM »
Combatlib

Shooting weighted random and modifiers.

Offline Andy ONeill

  • Moderator
  • Viking
  • *****
  • Posts: 349
Re: Changelog - picture heavy
« Reply #249 on: January 21, 2019, 03:41:43 AM »
ModelLib

Moved randomisation routine and weighted it.
This is used for shooting and the previous version was a bit too slow and producing too many casualties.
The routine now produces a "bell curve" similar to rolling 3 dice - or normal distribution.

Offline Andy ONeill

  • Moderator
  • Viking
  • *****
  • Posts: 349
Re: Changelog - picture heavy
« Reply #250 on: January 21, 2019, 06:16:29 AM »
Sandbox & CombatLib

Calculating the zone shooting is from - front, flank or rear.
A unit in line has 5 "shooting points" and fire is calculated for each.
The "zone" that point falls in is calculated for each of these.

The zone will be used for morale.
Being attacked from the rear doesn't particularly cause any more casualties than from the front.
It's particularly bad for morale though.

Offline Andy ONeill

  • Moderator
  • Viking
  • *****
  • Posts: 349
Re: Changelog - picture heavy
« Reply #251 on: January 22, 2019, 09:47:02 AM »
Sandbox

Added horse holders multiplier
A quarter of skirmishing cavalry are allocated as horse holders so they shoot at 0.75 effect.

Minor refactor of combat code.

Offline Andy ONeill

  • Moderator
  • Viking
  • *****
  • Posts: 349
Re: Changelog - picture heavy
« Reply #252 on: January 23, 2019, 04:34:44 AM »
SandBox & ModelLib

Added Current stats for piece
This allows me to track losses from shooting.
Will allow me to track changes in status such as morale, fatigue etc.

Offline Andy ONeill

  • Moderator
  • Viking
  • *****
  • Posts: 349
Re: Changelog - picture heavy
« Reply #253 on: January 25, 2019, 10:01:56 AM »
Sandbox & CombatLib

Added Morale prototype.
Still incomplete but I now have a set of morale states and a mechanism which will degrade these as a unit is shot.


Offline Andy ONeill

  • Moderator
  • Viking
  • *****
  • Posts: 349
Re: Changelog - picture heavy
« Reply #254 on: January 26, 2019, 09:51:36 AM »
CombatLib

Degrading morale from being shot at.
And more work on morale generally.
All this is still prototype stage.

There are two measures of morale.
The stat which is 1-99. ( A 1 stat morale unit would be extremely brittle and 99 would be equally silly).
The level ( I might change the name for that ) which is the unit's current state and can reduce effectiveness, limit what they will do or make them run away completely.

The various morale levels are:

        Enthusiastic
        Steady
        Slowed
        Shaken
        Halted
        Suppressed
        Repulsed
        Routed
        Dispersed

Most, maybe all units, will start Steady.
How a unit gets to be Enthusiastic is TBD.

Hence (at present) if a unit fails morale tests badly enough it can be irrecoverably broken.
I might make that only if attacked whilst routed.

Each usually has 5 shots.
A unit shot at takes morale tests.
These are a straight percent roll vs the unit's current morale stat.
Failure reduces the morale level to the next one - eg Steady to Slowed.
It takes 1 test + another per 5% casualties taken.
Just being fired at can be bad.
Taking a lot of casualties is likely to be really bad.
For each test the current morale stat is always reduced by 1.

Say unit X takes fire from unit A.
Unit A has 5 firing points which fire is resolved for.
For each of these.
Casualties are resolved.
Morale is then tested.

At the end of a period... which is yet to be decided....
The unit will recover morale if it wasn't shot at during that period.
At the end of a period.... again which is yet to be decided...
The unit may be rallied to recover level.
 
Winning a combat will probably increase morale level.

There will also be some sort of rallying mechanism.
Self rallying will be possible but leaders in proximity will be better.
You can't just send a note telling a unit to rally.

This attempts to model how real world unit morale works.
Studies looking for a morale losses based "break point" have found there is no guaranteed percentage.
An assaulting unit will probably break at around 30% losses but there are instances where attacks have still carried on with higher or stopped with far lower.
"Just" 10% losses can often stop an assault.
What these studies found was how fast a unit took losses was usually a decider.
This is what reducing the morale stat and then increasing it when not under fire is about.
If a unit comes under sustained attack then it will become brittle.
If it comes under attack from numerous attackers then that will happen quicker.
The longer it goes without being attacked the more such a unit will recover morale.

Below is debug output for some shooting.
I'm using this to check my process gives good results and it's not really for public consumption but probably clear enough.
If you find it confusing, don't worry.
Combat reports you see in the game will be more user friendly, albeit with less internal detail.
When I write em.

The 5 sets of hits (casualties) are one each per firing point.
The unit shooting is strength 2390.
It has first shot bonus making modifier 1.2
Each musket is rated as killing 1 person per hit.
This is very short range so accuracy is high.
The morale of the firing unit is indifferent -  40
The quality of the firing unit is indifferent -  42
The target unit is face on and both are in line so no enfilade multiplier
The random factor used is weighted -  It's currently three randoms between 0.01 and 1 added together and divided by 9.
Note that the casualties are maybe still too high - morale is and was far more significant than pure casualties.

Hits 91 -- Strength: 2390 Modifier 1.2 Lethality 1 Accuracy 0.993 Morale 0.4 Quality 42 Enfilade 1 Random 0.191271533347327
Hits 51 -- Strength: 2390 Modifier 1.2 Lethality 1 Accuracy 0.993 Morale 0.4 Quality 42 Enfilade 1 Random 0.108229782068795
Hits 110 -- Strength: 2390 Modifier 1.2 Lethality 1 Accuracy 0.993 Morale 0.4 Quality 42 Enfilade 1 Random 0.231340596404861
Hits 101 -- Strength: 2390 Modifier 1.2 Lethality 1 Accuracy 0.993 Morale 0.4 Quality 42 Enfilade 1 Random 0.212642983942902
Hits 122 -- Strength: 2390 Modifier 1.2 Lethality 1 Accuracy 0.993 Morale 0.4 Quality 42 Enfilade 1 Random 0.255582311102719

The morale tests for these:
Fives +1 is five-percent-losses plus one.
Rolled is the percentage "rolled" as a test.
Morale is the current morale of the unit which started at 72 and drops 1 each test.
Strength is the number of men left alive in the unit being shot
When it says "Reduced Morale state" that means the level drops from Steady > Slowed > Shaken > Halted
This is a relatively large unit shooting at a smaller one at point blank and 475 casualties would be a LOT from a real napoleonic era volley.

Rolled 20 Morale 71
Rolled 38 Morale 70
New Morale Steady Casualties 91 Fives+1 2 Strength 1560
Rolled 19 Morale 69
New Morale Steady Casualties 51 Fives+1 1 Strength 1509
Rolled 20 Morale 68
Rolled 15 Morale 67
New Morale Steady Casualties 110 Fives+1 2 Strength 1399
Rolled 92 Morale 66
Reduced morale state
Rolled 82 Morale 65
Reduced morale state
New Morale Shaken Casualties 101 Fives+1 2 Strength 1298
Rolled 61 Morale 64
Rolled 16 Morale 63
Rolled 70 Morale 62
Reduced morale state
New Morale Halted Casualties 122 Fives+1 3 Strength 1176
RunTime 0 s 10 ms
Total casualties: 475