22.10.2008, 02:40
RichardHed PMed me with this cool idea of his (hope you don't mind posting the PM):
That is true, i think. So, with regard to his idea i developed a application, that needs only one input parameter - IL2 instalation folder. And the other requirement is that moders create a custom file in which they descripe what goes where. The file name is mandatory (sorry ) and it's called "Z_AutoLoader.ini"
This file contains lines that describe everything that needs to be done. A short sample that i was testing:
Now, don't panic, the structure is like this:
That's it. If you want to copy everything you use '*' mark under "Section in that file to copy" or if you want to append it at the end of the output file again use '*' mark. Last entry has to be number
Sample files and results:
file: blabla.txt
File: static.ini
Line in the 'Z_AutoLoader.ini' file:
Result is:
Result is:
In short, this is it. And after the 'Z_AutoLoader.ini' file is processed it is renamed to 'Z_AutoLoader.ini.done', so you can run this application as many times as you want and it will not ruin or process already processed mods.
The last thing to tell is that this famous 'Z_AutoLoader.ini' file must be placed somewhere in the \\IL2RootDir\Mods folder. The app searches for this files from there on. And the files location in the file can contain absolute file paths (it is replaced later on with inserted IL2 root dir location) or relative file path FROM IL2 root dir on!.
I'll attach link to the app in a sec. Not done quite yet (must wire the status window) but then that's it.
Was this a waste of time?
Quote:Sir;
You seem adept at make tools and I was wondering if you could look at a small dilemma with objects. Currently FC's ShipPack2, Lal_RONEs Hanger Mod (and his upcoming Fortifications Mod) and other Objects do not have the distribution they should have because the lines of text within are not single lines but nested lines of text.
I have an idea of creating a protocol for object builders in the spirit of FCs ShipPack2 which contains the objects in a separate xxx.ini.txt file that should be appended to the end of the existing file. If you download FC's ShipPack2 and Lal_RONEs Hanger Mod and look at the structure you will see what I mean.
What's missing is someway to integrate the additional lines of text. I'm sure you are busy and I may not have explained this well enough but if you could look at this and come up with a small applet that could resolve this, then maybe we could get new objects added to the AAAui.
That is true, i think. So, with regard to his idea i developed a application, that needs only one input parameter - IL2 instalation folder. And the other requirement is that moders create a custom file in which they descripe what goes where. The file name is mandatory (sorry ) and it's called "Z_AutoLoader.ini"
This file contains lines that describe everything that needs to be done. A short sample that i was testing:
Quote:D:\temp\IL2\Mods\MyMod\Ini Files\blabla.txt;*;D:\temp\IL2\Static\static.ini;*;0;
//D:\temp\IL2\Mods\MyMod\Ini Files\blabla.txt;*;D:\temp\IL2\Static\static.ini;[Middle];1;
//D:\temp\IL2\Mods\MyMod\Ini Files\blabla.txt;[Start];D:\temp\IL2\Static\static.ini;[Middle];1;
//D:\temp\IL2\Mods\MyMod\Ini Files\blabla.txt;[Start];D:\temp\IL2\Static\static.ini;*;0;
Now, don't panic, the structure is like this:
Quote:file to copy from; section in that file to copy; file to copy to; section in that file to append lines to; copy section name or not;
That's it. If you want to copy everything you use '*' mark under "Section in that file to copy" or if you want to append it at the end of the output file again use '*' mark. Last entry has to be number
Sample files and results:
file: blabla.txt
Quote:[Start]
aaaaaaaaaaaaaaaa
bbbbbbbbbbbbbbbb
cccccccccccccccc
dddddddddddddddd
eeeeeeeeeeeeeeee
ffffffffffffffff
gggggggggggggggg
hhhhhhhhhhhhhhhh
[Middle]
iiiiiiiiiiiiiiii
jjjjjjjjjjjjjjjj
kkkkkkkkkkkkkkkk
llllllllllllllll
mmmmmmmmmmmmmmmm
nnnnnnnnnnnnnnnn
oooooooooooooooo
pppppppppppppppp
rrrrrrrrrrrrrrrr
ssssssssssssssss
[End]
tttttttttttttttt
uuuuuuuuuuuuuuuu
vvvvvvvvvvvvvvvv
zzzzzzzzzzzzzzzz
File: static.ini
Quote:[Start]
aaaaaaaaaaaaaaaa
bbbbbbbbbbbbbbbb
cccccccccccccccc
dddddddddddddddd
eeeeeeeeeeeeeeee
ffffffffffffffff
gggggggggggggggg
hhhhhhhhhhhhhhhh
[Middle]
iiiiiiiiiiiiiiii
jjjjjjjjjjjjjjjj
kkkkkkkkkkkkkkkk
llllllllllllllll
mmmmmmmmmmmmmmmm
nnnnnnnnnnnnnnnn
oooooooooooooooo
pppppppppppppppp
rrrrrrrrrrrrrrrr
ssssssssssssssss
[End]
tttttttttttttttt
uuuuuuuuuuuuuuuu
vvvvvvvvvvvvvvvv
zzzzzzzzzzzzzzzz
Line in the 'Z_AutoLoader.ini' file:
Quote:D:\temp\IL2\Mods\MyMod\Ini Files\blabla.txt;[Start];D:\temp\IL2\Static\static.ini;*;0;
Result is:
Quote:[Start]
aaaaaaaaaaaaaaaa
bbbbbbbbbbbbbbbb
cccccccccccccccc
dddddddddddddddd
eeeeeeeeeeeeeeee
ffffffffffffffff
gggggggggggggggg
hhhhhhhhhhhhhhhh
[Middle]
iiiiiiiiiiiiiiii
jjjjjjjjjjjjjjjj
kkkkkkkkkkkkkkkk
llllllllllllllll
mmmmmmmmmmmmmmmm
nnnnnnnnnnnnnnnn
oooooooooooooooo
pppppppppppppppp
rrrrrrrrrrrrrrrr
ssssssssssssssss
[End]
tttttttttttttttt
uuuuuuuuuuuuuuuu
vvvvvvvvvvvvvvvv
zzzzzzzzzzzzzzzz
aaaaaaaaaaaaaaaa
bbbbbbbbbbbbbbbb
cccccccccccccccc
dddddddddddddddd
eeeeeeeeeeeeeeee
ffffffffffffffff
gggggggggggggggg
hhhhhhhhhhhhhhhh
Quote:D:\temp\IL2\Mods\MyMod\Ini Files\blabla.txt;[Start];D:\temp\IL2\Static\static.ini;[End];1;
Result is:
Quote:[Start]
aaaaaaaaaaaaaaaa
bbbbbbbbbbbbbbbb
cccccccccccccccc
dddddddddddddddd
eeeeeeeeeeeeeeee
ffffffffffffffff
gggggggggggggggg
hhhhhhhhhhhhhhhh
[Middle]
iiiiiiiiiiiiiiii
jjjjjjjjjjjjjjjj
kkkkkkkkkkkkkkkk
llllllllllllllll
mmmmmmmmmmmmmmmm
nnnnnnnnnnnnnnnn
oooooooooooooooo
pppppppppppppppp
rrrrrrrrrrrrrrrr
ssssssssssssssss
[End]
tttttttttttttttt
uuuuuuuuuuuuuuuu
vvvvvvvvvvvvvvvv
zzzzzzzzzzzzzzzz
[Start]
aaaaaaaaaaaaaaaa
bbbbbbbbbbbbbbbb
cccccccccccccccc
dddddddddddddddd
eeeeeeeeeeeeeeee
ffffffffffffffff
gggggggggggggggg
hhhhhhhhhhhhhhhh
In short, this is it. And after the 'Z_AutoLoader.ini' file is processed it is renamed to 'Z_AutoLoader.ini.done', so you can run this application as many times as you want and it will not ruin or process already processed mods.
The last thing to tell is that this famous 'Z_AutoLoader.ini' file must be placed somewhere in the \\IL2RootDir\Mods folder. The app searches for this files from there on. And the files location in the file can contain absolute file paths (it is replaced later on with inserted IL2 root dir location) or relative file path FROM IL2 root dir on!.
I'll attach link to the app in a sec. Not done quite yet (must wire the status window) but then that's it.
Was this a waste of time?