Trouble with text2agnx

I'm trying to edit some landclass autogen using AGN Tools. I used agn2txt to get my AGN into txt format, but now when I try to recompile using txt2agnx, not all of my files get converted back to .agn format. Here's what my files look like:

Original AGN files, before conversion to txt:



The text of my batch file to convert the decompiled .txt files back to .agn:

txt2agnx 011b2an0.txt Texture
txt2agnx 011b2an1.txt Texture
txt2agnx 011b2an2.txt Texture
txt2agnx 011b2an3.txt Texture
txt2agnx 011b2an4.txt Texture
txt2agnx 011b2an5.txt Texture
txt2agnx 011b2an6.txt Texture
txt2agnx 011b2an7.txt Texture
txt2agnx 011b2an8.txt Texture
txt2agnx 011b2an9.txt Texture
txt2agnx 011b2ana.txt Texture
txt2agnx 011b2anb.txt Texture
txt2agnx 011b2anc.txt Texture
txt2agnx 011b2and.txt Texture
txt2agnx 011b2ane.txt Texture

And the new .agn files created by txt2agnx. As you can see, all agn files with a letter at the end have been omitted, and it appears that the one with a "0" at the end now has the "0" omitted:



Thanks,
Scott
 
Update:

I tried to find a work-around by renaming the ends of my txt files from 1-15 so there were no alphabetical letters at the ends, but the results were the same. I also tried renaming the '10' file to '16' to remove the zero on the end of it, but still txt2agnx converted the same 10 files, instead of the full 15. I'm pretty much out of ideas at this point...
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Hi Scott,

I'll have a look. It might be I'm only checking for numbers now, I haven't seen letters before. Not sure what is going on with the zero.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Hi Scott,

I just had a look at the code. At the moment I expect the last number to be a digit, so that's why the letters don't work. I'll fix that as soon as I'm behind my FS pc again.

Do you know if there is a maximum to the value FS allows? Is it hexadecimal for example 0 till f? Or can we even get a z there?

Not sure why the zero didn't work, as that is a digit it should work.
 
Hi Arno, thanks for looking into it!

As far as I know, 16 is the maximum number of variants in an LC set, so that would take you from 0 to f. I'm not an expert though; I've asked Holger to take a look at it and we'll see what he says.

AGN for landclass is given the same name as the LC textures, which have a naming convention of 3 digits (from 000 to 360), followed by a letter, followed by a number (always 2 from what I can tell), followed by the season, and then the variant letter or number.

-Scott
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Hi,

Sounds like it is hexadecimal than. Makes sense from programmer point of view :). I'll try to fix it tomorrow, haven't been behind my pc tonight.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Hi Scott,

I have fixed it now. So if you grab the new version tomorrow it will work.

Be aware that you need to decompile with the new agn2txt as well. Your current TXT files won't compile back to AGN correctly with this new version.
 
Top