Chester01
09-14-2005, 12:30 PM
I'll send you the link to the full tool and its coding as soon as i get it uploaded.I have also included the df2.cfg file as well and scores.txt and a dfd1.trn file. There all really just text files. Anyhow due to i have the cfg file auto loading from the game directory you may need to change the config form action to your own auto load.
This is what i have it as at the moment.
procedure TForm7.FormCreate(Sender: TObject);
begin
Memo1.Lines.LoadFromFile('C:\Program Files\NovaLogic\Delta Force 2\df2.cfg');
end;
I have the memo showing as well for now, But in the end it will be hidden. Still working on lots of section on it, If theres anyway you can think of to cut it down and or a better way let me know mate. Still all a learning thing for here.
Also in the modding section i have a memo showing over top of another this one will be hidden in the end as well once i get the buttons all working there as well. This memo there will load a temp trn file there and then you can make the changes from the buttons and save your own ect ect. All confusing. Only a few buttons there to fix, Sky map, Sky pallet,Horison, Water map, and water height. Another one is the uses resources from DF2 file folder button, This one needs to be able to change the target location in the start menu on the DF2.exe file to "C:\Program Files\NovaLogic\Delta Force 2\df2.exe" /D but this is yet another later on thing lol All fun and games.
// DISPLAY
video_type = 1
game_res = 6
no_anim = 0
sp_wind = 2
mp_gametype = 1
Ok the above is a section of a cfg file. Now with in this cfg file the change of numbers does different things. First i'll explain what one thing does and the way you have greatly helped me set up.
Take the game_res = 1 , This 1 there represents that the game will be in a resolution of 320 X 240 , Now if we were to change that number to a number 5 then the game resolution would then be viewed in 800 X 600 . This all works out well with the set up you have greatly provided. So in the combo box i have for this you can see in screen shot in to versions , The first one being the video_type = 1 , You can see that when clicking on the second one in the combo box it puts a 2 next to the video_type = 2. And the example i talked about above you can see as well , As you can see i have clicked on the 4th one down and a number four appeared in the file as it should .
http://img138.imageshack.us/img138/1360/gameres4lc.jpghttp://img138.imageshack.us/img138/3842/videoselect3ht.jpg
Some what of an example .
Combobox line strings
Line 1 = 320 X 240>>>>>>Click on >>>game_res = 1
Line 2 = 400 X 300>>>>>>Click on >>>game_res = 2
Line 3 = 512 X 384>>>>>>Click on >>>game_res = 3
Line 4 = 640 X 480>>>>>>Click on >>>game_res = 4
Line 5 = 800 X 600>>>>>>Click on >>>game_res = 5
Line 6 = 1024 X768>>>>>>Click on >>>game_res = 6
Now on to the next part where things get a bit wackey. If you look at the line mp_gametype = 2 it reads the numbers a bit different. Number 2 in this case belongs to the (TDM) text in the combobox . mp_gametype = 1 , the 1 belongs to (DM) and 0 belongs to the (COOP). In the image below you can see i clicked on the the DM line and if you look in the memo box it reads a number 2, For this case it should read a number 1 instead, Because coop is 0 and then so on.
http://img138.imageshack.us/img138/4275/teamselect6ow.jpg
Combobox line strings
Line 1 = COOP>>>>>>Click on >>>mp_gametype = 0
Line 2 = DM>>>>>>Click on >>>mp_gametype = 1
Line 3 = TDM>>>>>>Click on >>>mp_gametype = 2
Line 1 = KOTH>>>>>>Click on >>>mp_gametype = 3
Line 2 = TKOTH>>>>>>Click on >>>mp_gametype = 4
Line 3 = CTF>>>>>>Click on >>>mp_gametype = 5
Line 1 = S&D>>>>>>Click on >>>mp_gametype = 6
Line 2 = A&D>>>>>>Click on >>>mp_gametype = 7
Line 3 = FB>>>>>>Click on >>>sp_wind = 8
I'm using a few different combo boxs upon this form and though that the one example would be great to carry on to the rest, But shorty after i relized everything starts off with number 1 but yet in some case i need the number to start of from 0 .
Next combobox should react like this
Combobox line strings
Line 1 = COOP>>>>>>Click on >>>mp_gametype = 0
Line 2 = DM>>>>>>Click on >>>mp_gametype = 1
Line 3 = TDM>>>>>>Click on >>>mp_gametype = 2
Line 4 = KOTH>>>>>>Click on >>>mp_gametype = 3
Line 5 = TKOTH>>>>>>Click on >>>mp_gametype = 4
Line 6 = CTF>>>>>>Click on >>>mp_gametype = 5
Line 7 = S&D>>>>>>Click on >>>mp_gametype = 6
Line 8 = A&D>>>>>>Click on >>>mp_gametype = 7
Line 9 = FB>>>>>>Click on >>>sp_wind = 8
But at the moment reacts as the first combobox ,example
Line 1 = COOP>>>>>>Click on >>>mp_gametype = 1<<Should be 0
Line 2 = DM>>>>>>Click on >>>mp_gametype = 2<<Should be 1
Line 3 = TDM>>>>>>Click on >>>mp_gametype = 3<<Should be 2
Line 4 = KOTH>>>>>>Click on >>>mp_gametype = 4<<Should be 3
Line 5 = TKOTH>>>>>>Click on >>>mp_gametype = 5<<Should be 4
Line 6 = CTF>>>>>>Click on >>>mp_gametype = 6<<Should be 5
Line 7 = S&D>>>>>>Click on >>>mp_gametype = 7<<Should be 6
Line 8 = A&D>>>>>>Click on >>>mp_gametype = 8<<Should be 7
Line 9 = FB>>>>>>Click on >>>mp_gametype = 9<<Should be 8
I can't change the way the cfg file is set up or it won't work , Why it was ever set up to start some things at 0 and others at 1 is be yound me.
Theres worse ones yet. But this will cover the basics. Only way may be to do up yet another dochange procedure to start some comboboxs off at 0 intstead of 1 . Something along the lines of docombochange blah blah .
Theres another combo box that needs text thats in the combo box actually added to the cfg file.But thats nothing at the moment lol .
This is what i have it as at the moment.
procedure TForm7.FormCreate(Sender: TObject);
begin
Memo1.Lines.LoadFromFile('C:\Program Files\NovaLogic\Delta Force 2\df2.cfg');
end;
I have the memo showing as well for now, But in the end it will be hidden. Still working on lots of section on it, If theres anyway you can think of to cut it down and or a better way let me know mate. Still all a learning thing for here.
Also in the modding section i have a memo showing over top of another this one will be hidden in the end as well once i get the buttons all working there as well. This memo there will load a temp trn file there and then you can make the changes from the buttons and save your own ect ect. All confusing. Only a few buttons there to fix, Sky map, Sky pallet,Horison, Water map, and water height. Another one is the uses resources from DF2 file folder button, This one needs to be able to change the target location in the start menu on the DF2.exe file to "C:\Program Files\NovaLogic\Delta Force 2\df2.exe" /D but this is yet another later on thing lol All fun and games.
// DISPLAY
video_type = 1
game_res = 6
no_anim = 0
sp_wind = 2
mp_gametype = 1
Ok the above is a section of a cfg file. Now with in this cfg file the change of numbers does different things. First i'll explain what one thing does and the way you have greatly helped me set up.
Take the game_res = 1 , This 1 there represents that the game will be in a resolution of 320 X 240 , Now if we were to change that number to a number 5 then the game resolution would then be viewed in 800 X 600 . This all works out well with the set up you have greatly provided. So in the combo box i have for this you can see in screen shot in to versions , The first one being the video_type = 1 , You can see that when clicking on the second one in the combo box it puts a 2 next to the video_type = 2. And the example i talked about above you can see as well , As you can see i have clicked on the 4th one down and a number four appeared in the file as it should .
http://img138.imageshack.us/img138/1360/gameres4lc.jpghttp://img138.imageshack.us/img138/3842/videoselect3ht.jpg
Some what of an example .
Combobox line strings
Line 1 = 320 X 240>>>>>>Click on >>>game_res = 1
Line 2 = 400 X 300>>>>>>Click on >>>game_res = 2
Line 3 = 512 X 384>>>>>>Click on >>>game_res = 3
Line 4 = 640 X 480>>>>>>Click on >>>game_res = 4
Line 5 = 800 X 600>>>>>>Click on >>>game_res = 5
Line 6 = 1024 X768>>>>>>Click on >>>game_res = 6
Now on to the next part where things get a bit wackey. If you look at the line mp_gametype = 2 it reads the numbers a bit different. Number 2 in this case belongs to the (TDM) text in the combobox . mp_gametype = 1 , the 1 belongs to (DM) and 0 belongs to the (COOP). In the image below you can see i clicked on the the DM line and if you look in the memo box it reads a number 2, For this case it should read a number 1 instead, Because coop is 0 and then so on.
http://img138.imageshack.us/img138/4275/teamselect6ow.jpg
Combobox line strings
Line 1 = COOP>>>>>>Click on >>>mp_gametype = 0
Line 2 = DM>>>>>>Click on >>>mp_gametype = 1
Line 3 = TDM>>>>>>Click on >>>mp_gametype = 2
Line 1 = KOTH>>>>>>Click on >>>mp_gametype = 3
Line 2 = TKOTH>>>>>>Click on >>>mp_gametype = 4
Line 3 = CTF>>>>>>Click on >>>mp_gametype = 5
Line 1 = S&D>>>>>>Click on >>>mp_gametype = 6
Line 2 = A&D>>>>>>Click on >>>mp_gametype = 7
Line 3 = FB>>>>>>Click on >>>sp_wind = 8
I'm using a few different combo boxs upon this form and though that the one example would be great to carry on to the rest, But shorty after i relized everything starts off with number 1 but yet in some case i need the number to start of from 0 .
Next combobox should react like this
Combobox line strings
Line 1 = COOP>>>>>>Click on >>>mp_gametype = 0
Line 2 = DM>>>>>>Click on >>>mp_gametype = 1
Line 3 = TDM>>>>>>Click on >>>mp_gametype = 2
Line 4 = KOTH>>>>>>Click on >>>mp_gametype = 3
Line 5 = TKOTH>>>>>>Click on >>>mp_gametype = 4
Line 6 = CTF>>>>>>Click on >>>mp_gametype = 5
Line 7 = S&D>>>>>>Click on >>>mp_gametype = 6
Line 8 = A&D>>>>>>Click on >>>mp_gametype = 7
Line 9 = FB>>>>>>Click on >>>sp_wind = 8
But at the moment reacts as the first combobox ,example
Line 1 = COOP>>>>>>Click on >>>mp_gametype = 1<<Should be 0
Line 2 = DM>>>>>>Click on >>>mp_gametype = 2<<Should be 1
Line 3 = TDM>>>>>>Click on >>>mp_gametype = 3<<Should be 2
Line 4 = KOTH>>>>>>Click on >>>mp_gametype = 4<<Should be 3
Line 5 = TKOTH>>>>>>Click on >>>mp_gametype = 5<<Should be 4
Line 6 = CTF>>>>>>Click on >>>mp_gametype = 6<<Should be 5
Line 7 = S&D>>>>>>Click on >>>mp_gametype = 7<<Should be 6
Line 8 = A&D>>>>>>Click on >>>mp_gametype = 8<<Should be 7
Line 9 = FB>>>>>>Click on >>>mp_gametype = 9<<Should be 8
I can't change the way the cfg file is set up or it won't work , Why it was ever set up to start some things at 0 and others at 1 is be yound me.
Theres worse ones yet. But this will cover the basics. Only way may be to do up yet another dochange procedure to start some comboboxs off at 0 intstead of 1 . Something along the lines of docombochange blah blah .
Theres another combo box that needs text thats in the combo box actually added to the cfg file.But thats nothing at the moment lol .