I’ve still got various test units to build and actual testing to put the code through its paces, but its tormenting me by surviving first-glance rough handling.
TOE MILESTONE REACHED!
TOEs live on the BETA SERVER; baseline featureset completed.
(Without crashing every 9-15 minutes)
– Spawn lists and resupply lists are entirely encapsulated within the brigade they belong to; essentially equipment never moves. If you’re about to ask a what if question involving a CP? Dee-dee-dee. Equipment is filed under brigade, not CP.
– TOEs are template based, http://not4.joo/toetemplate.html
– Each brigade is assigned a template
– New, simpler trickle suppy system
– New capability: dynamic, variable resupply rates
– New “;dumpresupply” CRS command to list the top 30 (combined) resupply tickets for your brigade
Detailed explanations of key features:
(At this milestone)
A template defines the nominal list of equipment for a “type” of brigade. The only restriction as to what equipment may be added to a template is country. You can put infantry on a naval template. Each brigade derives its spawn lists as an instance of the template assigned to it.
Note: A brigade registered to a template is termed “a subscriber”
If you change the “capacity” of a vehicle for a template, the host will apply this change to all brigades using that template. If you raise the capacity of riflemen on a template, all of the templates subscribers will the number of units present by 5 vehicles (unless they are overstocked).
If you add a new vehicle to a template, it will be added to the instances of all subscribers.
All bulk resupply uses the new trickle resupply mechanic. This is based on five variables:
capacity — the total number of vehicles available on this TOE
absent — the number of units to be trickled
delay — the amount of time before it should begin resupplying
window — the total amount of time over which the resupply should occur
intervals — the lesser of the host config value deliverySlices or the capacity of the vehicle
Delivery does not start for delay seconds and is then distributed across window seconds.
The trickle system determines an interval between each delivery based on window / intervals. If window is 10 minutes and intervals is 10, then the interval will be 1 minute.
Finally, for each interval it schedules delivery of the lesser of capacity/intervals or absent for resupply.
Riflemen: 400 capacity, 65 absent, 2 minutes delay, 3600s window (1 hour), 20 intervals.
interval between = 3600 / 20 = 180 seconds ( 3 minutes )
units per interval = (capacity 400) / (intervals 20) = 20
Since 65 riflemen are missing it will generate the following tickets:
+2 minutes (delay) -> 20 riflemen
+5 minutes (delay + interval 3 minutes) -> 20 riflemen
+8 minutes -> 20 riflemen
+11 minutes -> 5 riflemen
Server startup gap filling
When the server restarts it loads the templates, applies the templates to subscriber brigades and then restores the saved supply levels from the database. Any shortfall (difference between capacity and present) are scheduled for trickle resupply over a 15 minute window. Trickle does not begin until the server is unlocked.
If a brigade becomes out of supply (routed, moved off map, loses factory link) it will flush all of its resupply tickets. If it is routed or moved off map, it also wipes its spawn lists.
Once it is moved back to a supplied city, the lists will be restarted with trickle resupply.
Uses host configuration values deliveryDelay and deliveryWindow.
Dynamic Supply Rates
Individual supply tickets (deliver 10 rifles in 30 minutes) are grouped together into dockets. Each docket holds tickets that fall within a certain time of each other (currently 15 seconds). Instead of saying “deliver 10 rifles in 30 minutes” it becomes “deliver 10 rifles in 100 dockets time”.
By changing the rate at which the system takes dockets off the resupply queue, the effective resupply time of vehicles can be changed; more importantly, it respects the current conditions of the resupply queue.
This could enable us to have rules such as faster resupply for a brigade which has moved into the same town as its DivHQ. The resupply queue is unchanged, but while it is under these conditions, the brigade would pull dockets off the queue faster. If it then moves away, the resupply queue would slow down.
- A replacement for an MIA char is scheduled for 3 hours.
- 1 hour passes, leaving char1 due for resupply in 2 hours.
- Brigade moves to a town where resupply occurs 2x faster.
- A replacement for a second MIA char is scheduled for 3 hours (1.5 hours in this town)
- Brigade remains here for 30 minutes at 2x resupply, so char 1 would now be due in 30 minutes; char 2 would be due in 1 hour
- Brigade relocates to original town with normal resupply: Char 1 would now be due in 1 hour and Char 2 in 2 hours.
Factory Link = Supply
Prior to 1.27 there were two supply-related states for a CP:
out of supply – meant the town had no (0) links to friendly towns and was entirely cut off and received no supply
no factory link – meant the town had one or more friendly links but it was in a pocket, cut off from friendly factory supply; initial trickle supply still applied allowing players to expand into a pocket, also resupply still applied at 1/2 speed
With 1.27, this has been reduced to
supplied – the town has one or more link connecting it to its friendly factories.
A brigade in a town that is not supplied receives no initial trickle supply, no resupply, and no new vehicles if the template is adjusted.
- RDP adjustment of TOEs – either progressive templates or provide a column on the template page for the next cycle.
- Multicrewing is currently crippled, needs a few hours work to re-enable
- Fallback is crippled, a few hours work
- Support brigades are not implemented
- If a player RTBs someplace other than their brigade, there is no delay in the return of the equipt to the brigade
- When a brigade moves, there is no delay on the availability of its equipment
- No warning for HCs/anyone when equipt runs low
- Host restart is currently required to change which template a brigade is using
- Vehicles that are out of attrited (0 present) are not showing in the client spawn list for some reason