Squads.csv - number of possible units (currently 128)

Post Reply
Aekar
Sergeant - 7.5 cm FK 16 nA
Sergeant - 7.5 cm FK 16 nA
Posts: 231
Joined: Thu Nov 27, 2014 10:29 am

Squads.csv - number of possible units (currently 128)

Post by Aekar »

Currently the max number of units in Squads.csv is 128.
I just have hit that limit because I had to combine existing units with the new ones.
For mods which alter current units and add new factions as well, this is slightly under the needs of the mods.

Could it be increased to 256, 512 or 1024?
Or where can we mod this value?

If the answer is that it cannot be changed, the only solution of course would be to create one mod per faction.
Mophead
Corporal - Strongpoint
Corporal - Strongpoint
Posts: 59
Joined: Sun Jan 29, 2017 7:23 pm

Re: Squads.csv - number of possible units (currently 128)

Post by Mophead »

I'll also request increase, if possible.

Looking quick at the .csv file, I count 57 units. 27 Orks and 30 SM. A cap of 128 leaves 71 available to be added.

You could add 71 subchapter-units with unique textures.

It allows two full reskins of the Space Wolves assets with 11 still available for use.

The existing unit textures folder is 559MB. A custom setup using 128 units, 71 added with unique skins, is easily over a Gb. Nine Chaos factions would be four or five gigabytes.

I added skins (CUSTOMSKIRMISH/DATA/BATTLE/UNITTEXTURES) to Pip's example, I think if my folder had the maximum number of skins in a custom campaign used as default data for skirmish, it would take a long time to load.

I don't know if the ceiling can be raised on that .csv file and would be interested to know if it can, at least to see how it effects the loading of a scenario, skirmish, or multiplayer game.

To use the round number 10, 10 chaos factions as reskinned Space Wolves are going to have 300 Colour.DDS files and if they are to look right there ought to be Spec & Normal .dds files as well. That's 900 texture files. Given a organized distribution of labor it would still take time to get the files edited and all together.
pipfromslitherine
Site Admin
Site Admin
Posts: 9702
Joined: Wed Mar 23, 2005 10:35 pm

Re: Squads.csv - number of possible units (currently 128)

Post by pipfromslitherine »

The max number of squad templates is 1024, so not sure what you mean.

Textures are only loaded if the unit is referenced and displayed.

Cheers

Pip
follow me on Twitter here
Aekar
Sergeant - 7.5 cm FK 16 nA
Sergeant - 7.5 cm FK 16 nA
Posts: 231
Joined: Thu Nov 27, 2014 10:29 am

Re: Squads.csv - number of possible units (currently 128)

Post by Aekar »

Now I understand better!
I had that error:
ERROR
Too many value ATTRIBs defined in the squads file. Max is 128

I now understand this is the number of columns instead of the number of lines.
It still sounds like a problem to me; I wanted to add custom attributes.
The original game actually has 143 attributes if I count that well, instead of 128, so I am still unsure what that means, but it surely means we cannot add attributes.

I used a Squads.csv with a #REPLACE at the top so I am unsure if that makes a specific case.
pipfromslitherine
Site Admin
Site Admin
Posts: 9702
Joined: Wed Mar 23, 2005 10:35 pm

Re: Squads.csv - number of possible units (currently 128)

Post by pipfromslitherine »

It's not something that is simple to change (I am pretty sure it would break savegames). There may be some arrays left over to use perhaps (that, plus things like the mancount and assetfile, explain why there seem to be more). You can have 128 single attribs, but also 16 attrib arrays of 8 elements each, which is another 128. So hopefully between the two you can find enough space for your new attributes.

Cheers

Pip
follow me on Twitter here
Aekar
Sergeant - 7.5 cm FK 16 nA
Sergeant - 7.5 cm FK 16 nA
Posts: 231
Joined: Thu Nov 27, 2014 10:29 am

Re: Squads.csv - number of possible units (currently 128)

Post by Aekar »

Took a week break!
Back at year 40,000.

So I tried that command:
AddAttribArray("ModTOC_UnitBaseStats") ;
... and it failed with a warning. ("Failed to add AttribArray")
Consequently of course when I try that:
(with a valid idUnit)
SetAttribArray(idUnit, "ModTOC_UnitBaseStats", 0, 0) ;
SetAttribArray(idUnit, "ModTOC_UnitBaseStats", 1, 60) ;
SetAttribArray(idUnit, "ModTOC_UnitBaseStats", 2, 6) ;
SetAttribArray(idUnit, "ModTOC_UnitBaseStats", 3, 2) ;
SetAttribArray(idUnit, "ModTOC_UnitBaseStats", 4, 0) ;


... it then fails with "SetAttribArray: Unknown array".
Right now I switched back to using the simple AddAttrib instead which would not make arrays possible.
Please tell me if I did something wrong!
Last edited by Aekar on Mon Feb 20, 2017 12:09 pm, edited 2 times in total.
Aekar
Sergeant - 7.5 cm FK 16 nA
Sergeant - 7.5 cm FK 16 nA
Posts: 231
Joined: Thu Nov 27, 2014 10:29 am

Re: Squads.csv - number of possible units (currently 128)

Post by Aekar »

While testing with AddAttrib it seems that only 6 attributes are possible before new ones are canceled.

For instance that works:
AddAttrib("ModTOC_unitPool") ;
AddAttrib("ModTOC_accuracyBonus") ;
AddAttrib("ModTOC_meleeSkill") ;
AddAttrib("ModTOC_ballisticArmour") ;
AddAttrib("ModTOC_armour") ;
AddAttrib("ModTOC_weapon1_power") ;
That triggers a warning with the two last attributes:
AddAttrib("ModTOC_unitPool") ;
AddAttrib("ModTOC_accuracyBonus") ;
AddAttrib("ModTOC_meleeSkill") ;
AddAttrib("ModTOC_ballisticArmour") ;
AddAttrib("ModTOC_armour") ;
AddAttrib("ModTOC_weapon1_power") ;
AddAttrib("ModTOC_weapon2_power") ;
AddAttrib("ModTOC_weapon3_power") ;
... and the two new attributes cannot receive values with SetAttrib whereas previous ones could.
6 attributes is a bit restricting but I can stick to it if there is no other way!
Thanks again for the support.
pipfromslitherine
Site Admin
Site Admin
Posts: 9702
Joined: Wed Mar 23, 2005 10:35 pm

Re: Squads.csv - number of possible units (currently 128)

Post by pipfromslitherine »

It may be that all the arrays are being used. You could in theory hang off the end of some of them (so take an array that is being used, but only has 4 values being read, and sneak you data into the last 4 elements). You would probably want to wrap access in functions to make your code cleaner, e.g.

FUNCTION GetMyValue(me)
{
// just an example
return GetAttribArray(me,"ExistingAttribName", 5) ;
}
follow me on Twitter here
Post Reply

Return to “Sanctus Reach Mods and Scenario Design”