New Interface button (Full Version)

All Forums >> [New Releases from Matrix Games] >> Decisive Campaigns: Case Blue >> Mods and Scenarios



Message


LiquidSky -> New Interface button (9/12/2012 12:57:31 AM)

Adding a new button to the front page of the game:

Open the file defaultmod.txt in the main folder, it will look like this:

Case Blue

1
dccbmodgraphics
dccbscenarios
dccbsound
natocounters
intro.ogg

21
1,7,-485,540,LOAD SAVED GAME,4,
1,7,-485,500,LOAD SCENARIO,3,dccbscenarios\
1,7,-227,570,TRAPPENJAGD,1,dccbscenarios\campaign1.dc2
1,7,-227,610,CASE BLUE (FULL) ,1,dccbscenarios\campaign2.dc2
1,7,-227,500,CASE BLUE (SHORT),1,dccbscenarios\campaign2s.dc2
1,7,-227,650,URANUS (FULL),1,dccbscenarios\campaign3.dc2
1,7,-227,690,URANUS (SHORT),1,dccbscenarios\campaign3s.dc2
1,7,25,500,2ND KHARKOV,1,dccbscenarios\2ndkharkov.dc2
1,7,25,540,VORONEZH,1,dccbscenarios\voronezh.dc2
1,7,25,640,1ST PANZER ARMY,1,dccbscenarios\1stpanzer1.dc2
1,7,-485,580,IMPORT ZIP,15,
1,7,-485,620,QUIT,5,
1,7,275,580,TUTORIAL,2,dccbscenarios\Tutorial3.dc2
1,7,275,500,PBEM++,16,
1,18,-485,460,OPS,1,
1,18,-227,460,MAIN CAMPAIGN SCENARIOS,1,
1,18,-227,540,OTHER CAMPAIGN SCENARIOS,1,
1,18,25,460,SMALL SCENARIOS,1,
1,18,25,600,LINKED SCENARIO CAMPAIGN,1,
1,18,275,460,PBEM++,1,
1,18,275,540,TUTORIAL,1,


Notice the number of items below the 21 is well, 21. Each one of those items is a button on the first screen when you load up the game, with information on what file to run if you click on it.

In my PBEM game, my friend Steve sends me the same file name everytime, which I dutifully dump in my savedgames folder. SO in order to run that file with the click of a button, I increment the 21 to a 22 (since I will now have 22 items) and add this line after the QUIT button:

1,7,-485,660,STEVE,1,savedgames\Steve@Joe.dc2

This adds a button called STEVE which, when clicked, will load the saved game Steve@Joe.dc2. (not an email address[:'(] )

For those curious, the 1, 7, represents the button...the 1, 18 is a label.

The -485 is the x coordinate of the button, and the 660 is the y coordinate. I just followed the buttons behind it by adding 40 to the y coordinate.

If you want to add a Mod, like Redmarkus' mod, you can do this:

1,7,-227,730,REDMARKUS,1,dccbscenarios\RedmarkusMod.dc2 which would put it after the URANUS (SHORT) button.

Just remember to change the 21 to the actual number of items in the list below it.




redmarkus4 -> RE: New Interface button (9/12/2012 4:55:15 PM)

Wow - very good find!

Do you mean 'add a Mod', or 'add a Scenario' in your third line from the bottom?




LiquidSky -> RE: New Interface button (9/12/2012 8:52:34 PM)


Bassically where REDMARKUS is the name of the button.
Its location is at -277,730 which puts it just under the URANUS(SHORT) button.
dccbscenarios\RedmarkusMod.dc2 is the folder\filename of the scenario you want the button to run. I invented the name, as I dont have yours (or Ritter's) mod yet.

If it is in a different folder (within the CaseBlue main folder) you would use it instead.... folder\name.dc2

You still have to put the file in the correct location..this is just a means of running it from the entry screen.



EDIT:

Oh, I see...yes, if the file is in the mods folder then you would use mods\NameOfModFile.dc2 instead of dccbscenarios....

if it is in a subfolder of mods...you could use mods\subfolder\NameOfModFile.dc2

and so on.




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
1.367188E-02