This tutorial will explain how to remove the episodic restrictions that the Italy and Egypt campaigns have. First i will explain what those restrictions are: These campaigns are designed to be played inside the main napoleon history, so they are not suited for a indepedent custom campaign as it is.
For example they have an introduction video, and a video in the end as well.
Some of them also have restrictions, for example, the egypt campaign have disabled the diplomacy button. This is disabled on the campaign per se, not using scripting, this means that the restriction can not be lifted by removing the script you donīt need, as you can do with other restrictions.
For example, you can remove a script from scripting.lua that is hiding some part of the interface (like the trade tab), and in this way you will be able to see the trade tab in your campaign. But the restrictions that are built into the own campaign (like the videos) are impossible to remove by deleting scripts.
I will explain how to remove those restrictions, so you will be able to have a custom campaign based on those maps (italy, egypt). The reason as to why i am not explaining this for the europe campaign is because it is not needed, you already have the campaign of the coalition, which is pretty much a custom campaign based on the map from the historic napoleon campaign. In short there is no need for this process if you are going to base your campaign on the coalition campaign.
1) Pick a campaign
First thing we are going to do is to pick a campaign we want to base our own custom campaign, italy or egypt. I will be picking egypt for this tutorial, but everything i explain here works too for the italy campaign.
2) Pick a startpos
As we have picked the egypt campaign, we will open the campaigns folder of ntw and then we have to make another pick: the startpos.
Here we will decided whenever we will use the startpos included in the folder (egy_napoleon) or the one included in the folder (mp_egy_napoleon). The difference is that the first is the startpos used in the napoleon historic campaign, while the second is the one used for the multiplayer campaign.
The startpos are different, this means that in one of them you may find armies that are not present in the other, you may find more units in a city, or a character with different traits, a faction with more provinces etc.
So eventually, you will decide which startpos you prefer, by seeing which starting positions you like the best. It does not matter which one you pick, but remember to pick the one that needs the less changes, that would make your life more easy. In this example i decided to pick the single player startpos, because in the multiplayer startpos the french had several regions i did not want them to have.
3) Pick the scripting.lua
Another important thing to pick is the scripting.lua, this time around you canīt just pick one and use it. You need to make your own, you can of course base yours in another one. I suggest that you copy the 2 scripting.lua, the one located in the singleplayer (egy_napoleon) and multiplayer (mp_egy_napoleon) campaigns. Rename these 2 copies as you like, these will serve you as a handy reference when you create your own scripting.lua
4) Create a custom campaign
Now we will create a custom campaign, this process is not explained here, as there is already a tutorial covering it by alpaca. I post here the link to it for your interest: http://www.twcenter.net/forums/showthread.php?t=293150
You will end up with your mod folder inside campaigns, i named mine "orient". So now i have inside campaigns a folder called orient, that folder will be your custom campaign folder. There you will place:
-The startpos you picked (i picked the single player)
-The two scripting.lua files
You already edited the startpos following alpacaīs custom campaign tutorial, and unlocked the 4 factions (or less) that you want playable, so now we will proceed with the last step, making a custom scripting.lua
5) Make a custom scripting.lua
We will be basing it on the one that is closer to what we want, in most cases this is the multiplayer scripting.lua. Why? Because it have less scripts and is the closer one to a "sandbox" campaign. Once you have it you can add all the scripts you want in your campaign, but to remove the episodic restrictions you have to change the headline at the top of the script.
If you picked the multiplayer scripting lua, you will have something like this:
If you picked the singleplayer scripting lua, you will have instead something like this:Code:local advice = require "export_advice" local historic_events = require "export_historic_events" local scripting = require "EpisodicScripting" scripting.SetCampaign("mp_egy_napoleon")
The important part is in bold, if your script refers to "egy_napoleon" (singleplayer) then your campaign game will have the introduction video, the end video, and the episodic restrictions.Code:local advice = require "export_advice" local historic_events = require "export_historic_events" local scripting = require "EpisodicScripting" local camera_pan = 0 local new_game = false scripting.SetCampaign("egy_napoleon")
If your script refers to "mp_egy_napoleon" (multiplayer) then your campaign will not have the introduction video, or other episodic restrictions other than the ones present in the multiplayer campaign.
For our custom campaign, we want it to be as sandbox as possible. The singleplayer egypt campaign have diplomacy restricted, plus intro videos, so i chose the multiplayer campaign instead. Note, that i am not using the multiplayer startpos, i am using the line "mp_egy_napoleon" with a single player startpos, so that the game use the single player startpos but the campaign will be as if it was a multiplayer one, without any intro video.
In this way, we are able to have a Italy or Egypt campaign, without the limitations imposed by the napoleon historic campaign. The only limitations you will have are the ones of the multiplayer campaign, which in my experience are non existent (almost all can be added back with the scripts) so effectively it is the closest thing to a sandbox egypt/italy custom campaign. It will be accesed throught the coalition campaign menu as the campaigns based on the europe map, and the limit of playable factions is 4 as well.
I hope you find this tutorial useful and if you have any questions or problems just post it and i will try to do my best to help you. I would also like to give special thanks to HusserlTW, who helped me a lot to figure out how to resolve this problem for my mod, and who gave me many advices as to how best proceed. Without his help i would never have managed to make my mod and write this tutorial.
Credits
-All the people who have worked on the ESF editor program (Just, Erasmus777, HusserlTW, etc.)
-alpaca for the custom campaign
-HusserlTW for his tutorials about using the ESF editor


Reply With Quote



