Total War: ATTILA

Total War: ATTILA

Standalone Supply System
Sheph 23 Apr, 2020 @ 12:45pm
Issues with supply system
What we see is that armies remain near 100% supply and integrity with this mod even after losing battles. I wonder if this is because the scripts lack an upper limit on the armies and they enter say with 100 points and leave a battle with only -8 supply.
Is "Max_Supplies Working?

In my Vanilla campaign, it seems most armies are fully-supplied except the fragments that wander around after battles.

Thanks for your creation!
< >
Showing 1-15 of 19 comments
mementomoria  [developer] 23 Apr, 2020 @ 1:15pm 
There is no actual 'max_supplies' value. There are 20 'stages' of supply. When you have the highest stage and then loose a battle your supply stage should drop down to 12. It's a bit complicated to explain without reference. Have you looked at the source code?
Sheph 23 Apr, 2020 @ 1:26pm 
I have gone over the lua scripts many times. I can't quite understand where the upper bound is created. Anyways, I'm testing it right now. I won a close victory and my supplies stayed at level 1 (full) while his went down to "barely supplied". It seems to be working. I'll try to ask Ansivara more questions. Are you saying the scripts don't set an limit to supply levels? If not, where can I see it?
Sheph 23 Apr, 2020 @ 1:29pm 
Can I use this mod (or an edited version of it)? I'm crediting you in the comments and trying to make it more accessible to other mods since I've learned how to combine lua scripts. Anisvara wants to use the system for his new overhaul but he has issues I"m helping him with.
Thank you for your great work!
Last edited by Sheph; 23 Apr, 2020 @ 1:29pm
mementomoria  [developer] 23 Apr, 2020 @ 1:54pm 
if force_supply[force_cqi] == nil or used_supplies == "refill" then force_supply[force_cqi] = #supply_effects elseif (force_supply[force_cqi] + used_supplies) > #supply_effects then force_supply[force_cqi] = #supply_effects elseif (force_supply[force_cqi] + used_supplies) < 1 then force_supply[force_cqi] = 1 else force_supply[force_cqi] = force_supply[force_cqi] + used_supplies end

#supply_effects is the length of the list of supply stages and therefore basically MAX_SUPPLIES
1 is the lowest supply level and therfore MIN_SUPPLIES
Sheph 23 Apr, 2020 @ 1:55pm 
I think it will be your gain if more people experienced real history through this mod and attributed it to your hard work here.
Anyways, it is working for me. I don't know what the 642 team did to the script.
I sense that 20 is indeed the starting supply level because supplies drop to the lowest level after a major loss with starvation. I have pictures that I can't attach here.
His concern is that max_supplies is going above 30 or so.
Last edited by Sheph; 23 Apr, 2020 @ 1:57pm
Sheph 23 Apr, 2020 @ 2:08pm 
It seems to work like this: There are 20 elements in the array supply_effects_army = { in lib.lua:
"bundle_army_scarce_supplies_3",
"bundle_army_scarce_supplies_3",
"bundle_army_scarce_supplies_3",
"bundle_army_scarce_supplies_2",
"bundle_army_scarce_supplies_2",
"bundle_army_scarce_supplies_2",
"bundle_army_scarce_supplies_2",
"bundle_army_scarce_supplies_1",
"bundle_army_scarce_supplies_1",
"bundle_army_scarce_supplies_1",
"bundle_army_scarce_supplies_1",
"bundle_army_well_supplied",
"bundle_army_well_supplied",
"bundle_army_well_supplied",
"bundle_army_well_supplied",
"bundle_army_fully_supplied",
"bundle_army_fully_supplied",
"bundle_army_fully_supplied",
"bundle_army_fully_supplied"

Every change will call this array and move the pointer up and down the array.
There is no actually supply quantity. Just an element in an array of 20 that seems to start at fully_supplied.
Last edited by Sheph; 23 Apr, 2020 @ 2:09pm
mementomoria  [developer] 25 Apr, 2020 @ 5:48am 
Originally posted by littleShepherd:
His concern is that max_supplies is going above 30 or so.

That is not possible if left unchanged.


Originally posted by littleShepherd:
It seems to work like this: There are 20 elements in the array supply_effects_army. Every change will call this array and move the pointer up and down the array.
There is no actually supply quantity. Just an element in an array of 20 that seems to start at fully_supplied.

That is correct.
Anisvara 26 Apr, 2020 @ 7:07am 
Hello @mementomori420, the idea of the supply system is extraordinary, and I would like to integrate the scripts directly in my upcoming AD642 modmap. So I ask you for permission. Of course with reference etc., maybe in a fixed discussion with direct links to the included mods for advertising (better display with link and pic), my own included mods could need such support too.
Kindly regards
Olaf
mementomoria  [developer] 29 May, 2020 @ 11:41am 
Ok sure
Anisvara 29 May, 2020 @ 11:55am 
Thanks a lot. I need about 14days to get ready for the public release (if not something unexpected happens, for example a crash). I am going to post the link after release here!
Anisvara 13 Jun, 2020 @ 2:31am 
@mementomori420 - the release was about 15 hours ago: https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=2128069857
Anisvara 15 Sep, 2020 @ 9:56am 
@mementomori420 - is it possible to change the great script that an army also gets supply in allied territories? I think this would be realistic.
Sheph 15 Sep, 2020 @ 10:16am 
I'd like to see that as well. Or at least tell us which files I would need to update to fix this feature.
mementomoria  [developer] 17 Sep, 2020 @ 9:40am 
That is already the case.
Anisvara 17 Sep, 2020 @ 1:19pm 
In all my campaigns my armies needed victories to get supply (in all not own territories). If I sent an army to protect an allied town the supply went down.
< >
Showing 1-15 of 19 comments
Per page: 1530 50