Data Files limits?

Post new mods and scenarios here.
User avatar
Platoon_Michael
Posts: 969
Joined: Sun Mar 09, 2003 5:14 am

Data Files limits?

Post by Platoon_Michael »

Hello,
What is the maximum amount for each of the Data pages?
I would really like to increase these considerably and hopefully Not have to find the limits by trial and error.
Thank-You
I.E.
Axs Teams
Als Teams
Vehicles
Soldiers
Weapons
Uniforms
User avatar
SteveMcClaire
Posts: 4303
Joined: Mon Nov 19, 2007 9:31 pm

RE: Data Files limits?

Post by SteveMcClaire »

In most casts there is no real limit on the number of entries you can have in these files. Internally the class is stored as a 16-bit signed value so the only limit there is 32,767 entries.

Uniforms.txt is limited by the maximum number of nations you can have times the styles per nation (8 * 3) to 24 unique uniform styles, with a second set for snow maps.

There is a gadget file limit of 256 unique weapon images.

User avatar
Platoon_Michael
Posts: 969
Joined: Sun Mar 09, 2003 5:14 am

RE: Data Files limits?

Post by Platoon_Michael »

So if I understand correctly Uniforms can have up to 48 total different variations with 24 of them being used for Snow Uniforms.And the other 24 being the total amount of Nations WAR can support.

And for Weapons I could realistically have 32,767 different Weapons as long as I only use 256 Weapon Icons?
I.E.
Team 1 could have a weak Weapon effect with Weapon Class 1 and Team 32,767 could have an enormous effect with that same Weapon Class set at 32,767
Conclusion is I could have a 32,767 different effects for any Weapon as long as the total number of Weapon Icons doesn't surpass 256?
I.E 32,767 sets of Data for say the MG 42.


Edit
I currently have my Weapons Class set at 134 for the total amount of Weapons.
Divide 32,767 by 134 = 244 total Weapon Class's (rounded off to the lowest common denominator)
Thus only leaving me 244 different variations of the current Weapons in my Mod?
Correct?
Not taking into account the Hard Codded Weapons of the game,which I assume leaves me at less than 244?

Yes I'm very repetitious in my posts and yes I'm very anal.
I can't help it.
If the Edit part of my post is correct that really only leaves me 48 weapons I can truly edit for each setting of the game.(From Recruit to Elite)
or am I thinking the wrong way?

I enjoy Modding the game,I just don't like making mistakes on something that is already known.

I hope you understand.





User avatar
SteveMcClaire
Posts: 4303
Joined: Mon Nov 19, 2007 9:31 pm

RE: Data Files limits?

Post by SteveMcClaire »

Weapon class = unique identifying number. This is the first column after the weapon name in the data file. The values in this column start at 0 and go upwards for each row in the file -- this is not the count of entries at the top of the file. It means you can have 32767 different weapons in your weapons.txt.

There is only space in ScrnGadg.gdg for 256 weapon icons, however. So many of your 32,767 weapons would have to share the same icon (on the Battlegroup and Soldier screens, and in the soldier monitor).

User avatar
Platoon_Michael
Posts: 969
Joined: Sun Mar 09, 2003 5:14 am

RE: Data Files limits?

Post by Platoon_Michael »

Has anyone tried this out in their GC yet?
How exactly does it work?
What BG's are dropped on what Maps?


# Allied parachute drop days (0 or 1) AB BGs arriving on maps with no off-map exit get random setup area(s)
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
# Axis parachute drop says
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
User avatar
SteveMcClaire
Posts: 4303
Joined: Mon Nov 19, 2007 9:31 pm

RE: Data Files limits?

Post by SteveMcClaire »

That option controls whether Airborne battlegroups (as defined in BGroups.txt) enter the game by air drop or marching onto the map. If an Airborne BG arrives as a reinforcement on an 'air drop' day, and there is a battle on its entry map, the Airborne BG will enter the battle via 1-3 random VLs.
User avatar
CSO_Talorgan
Posts: 783
Joined: Sat Mar 10, 2007 5:53 pm

RE: Data Files limits?

Post by CSO_Talorgan »

ORIGINAL: Steve McClaire

In most casts there is no real limit on the number of entries you can have in these files. Internally the class is stored as a 16-bit signed value so the only limit there is 32,767 entries. ... There is a gadget file limit of 256 unique weapon images.

Do these (lack of) limits apply to other re-releases?

.... and what of the base file entries which the .exe uses? Rumour has it that modding them will crash the game, but since we don't know which base file entries the .exe uses there's a crash waiting to ambush every adjustment.
User avatar
SteveMcClaire
Posts: 4303
Joined: Mon Nov 19, 2007 9:31 pm

RE: Data Files limits?

Post by SteveMcClaire »

Yes, the limits are the same in the all the re-releases from WaR on. Cross of Iron and Modern Tactics were old, and I would have to do some digging to verify, but I suspect they have lower maximum number of entries.

There are some indexes that are used by the EXE for fire support weapons in weapons.txt.

For WaR/TLD, these are:

0 - Hand to hand
1 - Hand grenades
2 - Secondary explosion (from exploding terrain)
19 - Mortar support
126 - Heavy Artillery / Naval Artillery support

For LSA these were all moved down to the front of the weapons.txt file:

0 = Hand to hand
1 = Grenade
2 = Secondary explosion
3 = Mortar support
4 = Artillery support
User avatar
CSO_Talorgan
Posts: 783
Joined: Sat Mar 10, 2007 5:53 pm

RE: Data Files limits?

Post by CSO_Talorgan »

Thank you very much for this very useful information!

Not so worried about Cross of Iron or Modern Tactics.

The weapons file info is invaluable. Many thanks!

Are any other base files referenced by the .exe?

My (oh-so-cunning) plan was to strip out the base files and start again basically. Obviously I'll have to avoid the lines referenced above. It looks as if it will be easiest with LSA as rows 0 to 4 can just be ring-fenced and bypassed.

Cheers!
User avatar
SteveMcClaire
Posts: 4303
Joined: Mon Nov 19, 2007 9:31 pm

RE: Data Files limits?

Post by SteveMcClaire »

The other place where there is significant reliance on indexes into the data files is elements.txt. There's a fair bit of old code that assumes indexes for various terrain analysis / manipulation. I think the best bet is to leave the meaning of the data rows as they are and just tweak the values.

And for all the data files, new things can always be added on to the end.

Here is a list of the elements the game uses directly, and the indexes need to stay constant for:

Dirt
Mud
Shallow Water
Deep Water
Stone Fence
Dirt Road
Paved Road
Stone Wall
Muddy Road
Leaves and Dirt
Leaves and Mud
Branches and Dirt
Branches and Mud
Light Snow
Heavy Snow
Sand
Wreck
Wood Rubble
Stone Rubble
Brick Rubble
Large Hedgerow
Small Hedgerow
Huge Tree 1-4
Destroyed Bridge
Underpass

Steve
User avatar
CSO_Talorgan
Posts: 783
Joined: Sat Mar 10, 2007 5:53 pm

RE: Data Files limits?

Post by CSO_Talorgan »

OK

I wasn't going to mess with elements.

However, a thought occurred to me today that there may be a link between battlegroup data and their stratmap icons. Would it cause a problem if a battlegroup was deleted while its icon remained?
User avatar
SteveMcClaire
Posts: 4303
Joined: Mon Nov 19, 2007 9:31 pm

RE: Data Files limits?

Post by SteveMcClaire »

ORIGINAL: CSO_Talorgan
However, a thought occurred to me today that there may be a link between battlegroup data and their stratmap icons. Would it cause a problem if a battlegroup was deleted while its icon remained?

The BG icon index is set in BGroups.txt, which is the index from the gadget STRBGICONS00 in ScrnGadg.gdg. There's no problem if you don't use a graphic that is in the ScrnGadg.gdg file. If you have one you're not using at all you can even replace it with a 1x1 pixel placeholder.

User avatar
Platoon_Michael
Posts: 969
Joined: Sun Mar 09, 2003 5:14 am

RE: Data Files limits?

Post by Platoon_Michael »

I'm curious as to how many different combinations can be used to fill each setting in the game?
I understand that some graphics have a shorter limit than say the total amount of different teams.

I.E.
How many different variations could one have for example Panzergrenadiere's?

I suppose if you wanted to stick with the allotted amount of 5 based on the settings Recruit/Green/Line/Veteran/Elite you could have 5 completely different Panzergrenadiere Teams.

But what if you then went and changed their characteristics to also be based upon Dates during the Grand campaign one could then have 125 different variations to the Panzergrenadiere Teams correct?.
Assuming you wanted a different Team for each Day and each setting of the game.
You could then have 125 different effects for say the MG 42,this would allow one to have teams in there FP based on Moral and Experiance to have different effects in the game.
I.E.
Day 1 horrible kill ratio (Couldn't hit the side of a Barn and would flee at the slightest shot fired at them )
to
Day 25 Excellent Kill ratio(Kills everything that comes in its path and fears nothing)correct?


But what is considered best when working with the Force Pools?
Whats the best way to have that players attrition effect his Force Pools?
Or is that even possible?
If I say set KG Peiper's amount of Panthers to 10 on day 1 and leave the other dates set to 0 will the game keep the total amount at 10 if he doesn't loose a tank and vice verse subtract each tank he losses in Battle till he ends up with nothing?

Or will he have 10 Panthers on Day 1 and 0 from there on out?

I've kinda started doing just the above mentioned and was wondering who else has,and what possible Ill side effects could occur?
User avatar
SteveMcClaire
Posts: 4303
Joined: Mon Nov 19, 2007 9:31 pm

RE: Data Files limits?

Post by SteveMcClaire »

ORIGINAL: Platoon_Michael
If I say set KG Peiper's amount of Panthers to 10 on day 1 and leave the other dates set to 0 will the game keep the total amount at 10 if he doesn't loose a tank and vice verse subtract each tank he losses in Battle till he ends up with nothing?

Or will he have 10 Panthers on Day 1 and 0 from there on out?

Assuming you're not using the "Classic CC4 / Refresh FP" switch, the force pool quantities are used to create the force pool when you start playing a scenario. From there are on out you have what you have in the FP. So if you have 10 x Panther on day 1 and 0 the rest of the dates, any scenario that starts on day 1 will have 10 Panthers in the FP. If a scenario starts on day 2+ you will have 0 Panthers in the FP. If you expect to have scenarios starting on days after the first, I'd suggest a more gradual decrease from 10 down to 0 over time.

You could use the FP to model experience and attrition, as you describe, but these things also happen naturally in the game. Teams that survive become more experienced (assuming you keep them in your BG). FP quantities get lower as you lose teams and have to replace them. Managing the data for 125 different versiosn of a Panzergrenadier team might be a bit of a headache, but there's nothing preventing you from experimenting with the system you described if you want to try it out.

User avatar
Platoon_Michael
Posts: 969
Joined: Sun Mar 09, 2003 5:14 am

RE: Data Files limits?

Post by Platoon_Michael »

Currently I'm only adding 2 sets of data to my current Mod.It is quite the headache but something I want to try out.
1) for Head to Head (Already completed)
2) for playing against the AI.(Currently working on)

I don't think I would go as far as 125 different sets of Data but if it was ever done I can only image it would be interesting to play.

Where is the Data that is used for Teams that do acquire more Experience/Moral is that hard codded in the game?
If my Team starts out weak and progresses to Veterans where and what Data is being effected?
Is it only Experience and Moral or does it effect everything?
User avatar
Platoon_Michael
Posts: 969
Joined: Sun Mar 09, 2003 5:14 am

RE: Data Files limits?

Post by Platoon_Michael »

I just cant seem to find whats wrong here.

Data is the same as it was in a previous working version,with only the Class # being changed to 292.
Total teams is 293.
So why isn't it working now?

Image
Attachments
UO0203.jpg
UO0203.jpg (23.48 KiB) Viewed 565 times
User avatar
SteveMcClaire
Posts: 4303
Joined: Mon Nov 19, 2007 9:31 pm

RE: Data Files limits?

Post by SteveMcClaire »

The format for that item is incorrect.  Probably it is missing a field or missing a tab between fields someplace.  If you attach the file itself I can tell you specifically what the issue is.
 
 
User avatar
Platoon_Michael
Posts: 969
Joined: Sun Mar 09, 2003 5:14 am

RE: Data Files limits?

Post by Platoon_Michael »

User avatar
Platoon_Michael
Posts: 969
Joined: Sun Mar 09, 2003 5:14 am

RE: Data Files limits?

Post by Platoon_Michael »

I still haven't been able to figure this one out.

Any advice?
User avatar
SteveMcClaire
Posts: 4303
Joined: Mon Nov 19, 2007 9:31 pm

RE: Data Files limits?

Post by SteveMcClaire »

You actually only have 292 (0-291) entries in the AxTeams2 sheet, not 293 (0-292).  The class index value is off someplace in the sheet.  So you've probably skipped a value while numbering in the class (Col3) column.
 
The easiest way I know to fix this in Excel is to put "0" in for the class value in your first row, then "=E5+1" (or whatever the class cell is for the first row, if it's not E5 in your sheet) for the second class value.  Then you can copy & paste this formula into the rest of the column for your whole sheet.  This will guarantee there are no duplicate or missed values.
 
Steve
Post Reply

Return to “Mods and Scenarios”