modding: adding a new campaign

A forum to discuss custom scenarios, campaigns and modding in general.

Moderators: Slitherine Core, The Lordz

Post Reply
xriz
Administrative Corporal - SdKfz 251/1
Administrative Corporal - SdKfz  251/1
Posts: 148
Joined: Tue Oct 21, 2008 2:17 am
Location: Los Angeles

modding: adding a new campaign

Post by xriz »

Adding 1 additional campaign to the exiting ones is pretty easy.

the file is:
Data/scripts/ui/scenarios.lua

open it up and add this to the end, well not the vary end, just above the very last curly bracket. I copied the 1915 campaign code in the file and just changed the first 3 lines to "test", "campaign5info" and "campaign5".

Code: Select all

 {
    script = "test",
    desc = "campaign5info",
    text = "campaign5",
    startingFaction = 1,
    video =
    {
      name = "test",
      duration = 120,
      timing =
      {
        english =
        {
          {0,1, 0, "subtitles_1915_1", "subtitles_1915_1"},
          {0,4, 0, "subtitles_1915_2", "subtitles_1915_2"},
          {0,10, 0, "subtitles_1915_3", "subtitles_1915_3"},
          {0,18, 0, "subtitles_1915_5", "subtitles_1915_5"},
          {0,27, 6, "subtitles_1915_10", "subtitles_1915_10"},
          {0,34, 0, "subtitles_1915_12", "subtitles_1915_12"},
          {0,38, 0, "subtitles_1915_13", "subtitles_1915_13"},
          {0,46, 0, "subtitles_1915_15", "subtitles_1915_15"},
          {0,53, 7, "subtitles_1915_16", "subtitles_1915_16"},
          {1,05, 0, "subtitles_1915_20", "subtitles_1915_20"},
          {1,09, 0, "subtitles_1915_21"},
          {1,15, 0, "subtitles_1915_22", "subtitles_1915_22"},
          {1,21, 6, "subtitles_1915_23", "subtitles_1915_23"},
          {1,28, 0, "subtitles_1915_27", "subtitles_1915_27"},
          {1,31, 0, "subtitles_1915_28"},
          {1,35, 0, "subtitles_1915_30", "subtitles_1915_30"},
          {1,41, 0, "subtitles_1915_31", "subtitles_1915_31"},
          {1,48, 0, "subtitles_1915_32", "subtitles_1915_32"},
          {1,55, 0, "subtitles_1915_33"},
        }
      }
    }
  },
You'll need to add a new file "test.lua", a copy of one of the exiting scenario files or one of your modified scenario files, example you can use the "1914.lua".

Then in English.txt add these two lines at the appropriate places (you can use find in note pad ).
campaign5 = test - testing
campaign5info = Starting alliance: The Central Powers;The year is test...;test

And that should do it, your own slot for your mod.
test.jpg
test.jpg (22.85 KiB) Viewed 1848 times
JJ_Pihtari
Lance Corporal - Panzer IA
Lance Corporal - Panzer IA
Posts: 10
Joined: Sat Dec 22, 2012 10:13 am

Re: modding: adding a new campaign

Post by JJ_Pihtari »

Thanks for the info!
Post Reply

Return to “Commander the Great War : Mods & Scenario Design”