Create a Custom Game from a WB Scenario


DLL Minion
May 30, 2011
Near Portsmouth, UK
The goal of this tutorial is to enable you to be able to create Custom Games from World Builder maps and/or map scripts such that they can be played from the Custom Game menu.

The tutorial starts by showing you how to create (and play) a World Builder Map Scenario, with simple to follow, step-by-step instructions.

The tutorial then proceeds to show you how to convert the scenario into a mod, such that it can be shared with other players by means of the ModHub. Instructions on how to play the scenario as a mod are also given.

The tutorial then shows you how to convert the scenario mod into a custom game mod (using pre-built components) and instructions on how to start the custom game are also given.

Finally, the tutorial shows you how to use the pre-built components to enable and/or disable key features of configuring a custom game – civilization, map and difficulty selection.

By the end of the tutorial you will have a fully working, configurable, custom game based on both a World Builder created map and a standard map script.

This tutorial assumes that you:
  • Understand the basics of XML, SQL and Lua
  • Know how to download, install and enable a mod from the in-game ModHub
  • Have the Civilization V SDK installed
  • Know how to use ModBuddy to create and deploy a simple mod
  • Have the debug logs enabled, know where they are and know how to look for errors in them (specifically database.log, lua.log and xml.log)
  • Know how to use LiveTuner (FireTuner) to test and debug a mod
  • Know how to use World Builder to create a map
  • Know how to upload a mod to the ModHub
  • (Optional) Know how to create .dds format images

This tutorial was written with Civilization V and also tested with

Download and install the "TradersScenario" from my mod web-site. Once installed the PDF Tutorial Guide can be found at "...\My Documents\My Games\Sid Meier's Civilization 5\MODS\TradersScenario (v 1)\WB Scenario and Custom Game.pdf"
Great guide, grats whoward69 :)
Well explained and perfect exposed.

I am a beginner modder and would greatly appreciate some help

I applied to my mod "Planeta Historia", (downloadable hub) to get scenarios menus. Everything works fine, but I have included a modal window in ScenarioVictoryProgress.lua and I can't back.

Code for modal popup window:
Spoiler :
local popupInfo = {
Data1 = 500,
Type = ButtonPopupTypes.BUTTONPOPUP_TEXT,
popupInfo.Text = Locale.ConvertTextKey("TXT_KEY_VICTORY_TEXT");

Click the button to close and not close, it stays in that condition, obviously back button dont work. I have looked everywhere civfanatics and I could not find the answer. I think I've forgotten any process onBack() but not how to do.

Everything works perfectly but close button in modal window does not work when you press.

Thx for your great tutorial
So how can I create this type of scenarios?
So how can I create this type of scenarios?

Last paragraph of the original post ... "Download and install the 'TradersScenario' from the ModHub (listed under 'Other'). Once installed the PDF Tutorial Guide can be found at '...\My Documents\My Games\Sid Meier's Civilization 5\MODS\TradersScenario (v 1)\WB Scenario and Custom Game.pdf'"
Yes I read it but I can't find this scenario... I searched it but nothing...
Ah, sorry, I find it in this forum... Downloading, thanks
I'm trying to build a WB scenario with 16 civ's and for all of the selected Civ's to start with three cities each. I only have 5 more cities to place and I have run into a CTD when trying to place any one of the last cities left to place.

Here is the log that was placed on my desktop after the CTD:
View attachment 367692

Here is the Map I'm working with:
View attachment 367693
Note- I haven't enabled any MOD's trying to work with this yet, but I do have all of the DLC's except the newest map packs that came out. My SDK and CivV is up to date.

Thanks for any feed back on this issue.
I am using your sample files to create my own custom game and it is working wonderfully as expected. One thing I would like to have selectable as an option choice is game speed however. I would make the attempt myself but I have not done any UI modding. Would the set up in lua be similar to the way you set up the selections for game difficulty? If so, then I can try to backward engineer something using the game difficulties set up as a model... or am I totally barking up the wrong tree and wasting my time trying to do things this way?
It's been years (literally) since I looked at this, but I can't think of any reason why you couldn't set custom game speeds in much the same way as the difficulty level.

Rather than dive into UI modding (and there are some rather good tutorials on this even if I say so myself ;) ), I'd suggest that you test it out by fixing the difficulty and hi-jacking the difficultly drop-down for the game speed. Once you have confirmed that changing the game speed is possible, you can then work out how to add another drop-down to the scenario setup screen.
there's no pdf in there for just gives me a .civ5mod file, when I click it says 'windows cannot open file' please!
there's no pdf in there for just gives me a .civ5mod file, when I click it says 'windows cannot open file' please!

Extract it like a *.zip file.
Right-Button Click -> Open with... -> WinZIP/WinRAR/7z/Similar

Right-Button Click -> Open -> Select a Program from a List (or whatever) -> WinRAR/Winzip/7z/Similar.

There are other ways as well, but this is the simpler in my opinion.
This is pretty cool and I have successfully implemented it into CivRome, but it desperately needs 'random seed' in both the random map and the scenario. How do we put 'random seed' into the Lua script?
It would be better if the scenario was auto-selected and random map was displayed below (instead of vice versa). What changes to the code would I have to make to do that?
Top Bottom