Tutorial for MOD installer

In that case I'll get on it as soon as I figure out QT for visual studio. Because now I am infected. :)
Until than you figure out if my list has any features lacking. And Luis can finish up his installer by than as well so we can ship it all together.
I hope you get better soon!
Also just to be clear, I am making a Mod Installer not a Mod Launcher, so a program that allows Modders to distribute their mods easier and give users the option to choose modules.
 
I hope you get better soon!
Also just to be clear, I am making a Mod Installer not a Mod Launcher, so a program that allows Modders to distribute their mods easier and give users the option to choose modules.
Infected as in you infected me with the urge to learn python GUI in visual studio. So now I just have to try it. It's a programmer thing. You basically catch a bug for some new piece of tech and go crazy until you learn it.
 
Infected as in you infected me with the urge to learn python GUI in visual studio. So now I just have to try it. It's a programmer thing. You basically catch a bug for some new piece of tech and go crazy until you learn it.
HAHAHA:lol::lol::lol:!
Well GUI is very cool imo and very very very worth it to learn!
Till now I think the easiest coding language to create GUI in for me is Visual Basic Net, because you literally already have the screen ready for you and to add buttons, labels, pictures, etc... all you have to do is go to the Tool Box and drag and drop them, to add effects to them you have to code it though.
 
Well basically from what I gathered a launcher needs to:
1. Adaptively change it's name and stuff to show which mod you are using it with.
2. Can launch the game with the mod on. And can automatically detect where the BTS exe is to do it.
3. Automatically detects modules and lets you turn them on or off.
4. Have an about page or some other form of description and link to the mod here on the forum.
5. Have a button to run the sound integration thing that he mentioned.
5b. Don't forget that it should also check if the audio defines are already added or not. We don't want multiply entries of the same thing.
6. Custom graphical background for the app (I know you are an artist too, so probably thought if already :) )
Spoiler Since my English fails me some times I also add pics :

This is how the original AND2 launcher looks like:
upload_2021-1-5_20-43-54.png

And this is how I modded it for my modmod:
upload_2021-1-5_20-44-59.png

 
For #6 see the example exe I uploaded a couple pages back.
 
For #6 see the example exe I uploaded a couple pages back.
Do you mean this:
You don't get what I am saying. I am saying that you should be the one to make the exe for people. And that any customization should be done by that exe reading ini files as opposed to manual input from the end user.

I can whip you up a dirty C# prototype of the interface (no functionality, just interface) to show you what I mean if you like.

Edit: Here is what I was talking about. Whipped this exe up in about 15 minutes for you. Launch it and you'll see a bunch of generic text. Put it in any mod folder of your choice and it will automatically read from the ini file and configure it self. The play button also works. And if there is a file called Background.png in the same folder as the exe and ini file (top folder of any mod you like) it will automatically load the file and put it up as a background for the form.

Applied to an installer you could do the same thing. Just make an exe that reads the mod name from the ini and copies the whole folder to the beyond the sword mods directory. The entire process for the potential mod user would than be:
1. Download zip
2. Unzip anywhere
3. Run setup.exe
4. Play


PS. I am not trying to show you off here and make my self look superior or anything. Sorry if that's how this comes off. Rather my goal is to use my experience and knowledge to guide and inspire you in the proper direction for how these things are done so that you can do them your self, learn and grow from doing so. This is a great project for you to do so on because it really isn't that difficult and has lots of room for fun playing around with features.

Well... it's plain white:
upload_2021-1-6_8-28-32.png
 
See the instructions. If you put an image called background.png next to the exe it automatically loads it. But you as the mod creator have to manually do that. Really, there is no better way to do this sort of thing than to make the mod creator make the minimum effort to do something like that.
 
It uses the existing ini for the mod. That's the beauty of it. Also, apparently getting QT graphics for python requires me to download and manually compile stuff just to make visual studio work with it. And ain't nobody have the nerves to mess with that. Seriously, if you make a visual studio plugin that says it lets me work with something than I shouldn't have to browse the internet and jump through hoops to get it to work. It should just work without question.

This might take a while. God dam stupid plugin developers.
 
Last edited:
Excellent!
One more thing: Imagine that two modders create two modules independently of each other. Both include your exe in their archive with different names for the exe and different backgrounds. Obviously one will be overwritten.

So could it work this way when the exe is checking for background:
  1. if there is one named after the exe (MyMod.exe and MyMod.png) than it choses that file - else
  2. it checks for a background.png to choose - else
  3. it stays blank
It's not that important but I hope it's not a big work to add.
 
I envisioned this as something you as the mod developer put in your own mod folder. So if you have 10 developers having 10 mods you'd have 10 mod folders with 10 exe files all called Launcher.exe with Background.png but because they are each in their separate mod folders nothing would ever overwrite. Not unless the 10 people all name their mod exactly the same.

So like what you'd have is a structure that goes like this:

Code:
some path/Civilization 4/Beyond the Sword/Mods/Mod1/Assets
some path/Civilization 4/Beyond the Sword/Mods/Mod1/XML
some path/Civilization 4/Beyond the Sword/Mods/Mod1/Mod1.ini
some path/Civilization 4/Beyond the Sword/Mods/Mod1/Launcher.exe
some path/Civilization 4/Beyond the Sword/Mods/Mod1/Background.png


some path/Civilization 4/Beyond the Sword/Mods/Mod2/Assets
some path/Civilization 4/Beyond the Sword/Mods/Mod2/XML
some path/Civilization 4/Beyond the Sword/Mods/Mod2/Mod1.ini
some path/Civilization 4/Beyond the Sword/Mods/Mod2/Launcher.exe
some path/Civilization 4/Beyond the Sword/Mods/Mod2/Background.png


some path/Civilization 4/Beyond the Sword/Mods/Mod3/Assets
some path/Civilization 4/Beyond the Sword/Mods/Mod3/XML
some path/Civilization 4/Beyond the Sword/Mods/Mod3/Mod1.ini
some path/Civilization 4/Beyond the Sword/Mods/Mod3/Launcher.exe
some path/Civilization 4/Beyond the Sword/Mods/Mod3/Background.png


The idea is to keep this 100% self contained to the individual mod so as to ensure it works without thinking about the sort of stuff you just mentioned. Ideally the mod developer absolutely just needs to paste the exe into his mod and newer give it a thought. And than what ever installer you have just does the tiny extra step of creating a desktop shortcut for the exe as well.
 
I mentioned it because I started my modding carrier as a modmodder and I can easily imagine that a mod has several modmodders.
I even have some ideas/plans on improving my More Music modmod. Right now it is for CoM/AND2 only but I plan to make it universal, so it could also be installed for C2C, RI, WIP, etc. For this modmod I would add a music related background for your exe.
These are the reasons why would like it the way I described things but if you don't want to do it, I respect that :hatsoff:
 
If you create a modmod you are making a new mod with a different folder in the CIV4 BTS folder, right? I mean, you can't install one mod on top of another and have both coexist. They have to have separate folders. CIV just physically does not work like that.

Also, again, the other guy is doing an installer. Installation is something that I am not touching.
 
If you create a modmod you are making a new mod with a different folder in the CIV4 BTS folder, right? I mean, you can't install one mod on top of another and have both coexist. They have to have separate folders. CIV just physically does not work like that.
Not exactly. My mod started as modules installed into AND2's folder. One could "simply" switch my modmod on/off by enabling/disabling the module folder. So believe me Civ4 works just like that ;)
Also, again, the other guy is doing an installer. Installation is something that I am not touching.
I'm not really interested in an installer. I prefer zip/rar.
 
Not exactly. My mod started as modules installed into AND2's folder. One could "simply" switch my modmod on/off by enabling/disabling the module folder. So believe me Civ4 works just like that ;)
Than it's not a mod but a module. And that falls under module switching.

Or did you actually want to have the ability for a module to insert its own name and picture instead of the original mod one when enabled? If so why didn't you just say so?
 
Or did you actually want to have the ability for a module to insert its own name and picture instead of the original mod one when enabled? If so why didn't you just say so?
Because I didn't think of that as a solution.
I thought that the easiest thing is to add a few extra lines in your code (see #90).
Let me explain in a different way: I my signature you can see AND Mega Pack and More music. Those are both modular modmods, modules or add-ons, as you like. The first one adds extra civs to the game, the second adds extra music for each era.
I imagined it as adding your exe to both. MegaPack.exe would have a backgroung called MegaPack.png, and MoreMusic.exe would have MoreMusic.png. They would do completely the same thing, just with different name and graphical interface.
 
They are literally just modules but by a different name. Something that sits in the assets/modules folder and you can turn on and off. You can call them what ever you like but I can't get into the details of every modders individual nomenclature if I am going to make something generic that works for every mod out there even those not yet designed.
 
At the end of the day I have no issues making a giant complicated ini file for mod makers to edit that can tweak and configure the launcher any way you want. But like that'll have to wait until I get a generic version going. Either way I can't start on it this week due to other work.
 
Hey guys,

I know it very much changed topic through the thread but (thanks a lot to my teammate GG for all the work) we confirm Inno Setup ended up doing everything we wanted it to do.

Took a little time to post because we wanted to try with a range of people in different configuration (steam, not steam, has moved the store, hasn't moved the store etc),
Here is our solution(s) (I will post also in the initial message).

Obviously it's very tailored mail to our/his install but it give headlines and importantly it has the registry keys of both normal & steam versions :

Normal Version
Spoiler InnoSetup Code :

; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppName "Sid Meier's Civilization 4 - Beyond the Game"
#define MyAppVersion "2.20"
#define MyAppPublisher "Penny & Friends"
#define MyAppURL "https://forums.civfanatics.com/threads/beyond-the-play-community-mod.648750/"
[InstallDelete]
Type: filesandordirs; Name: {reg:HKLM\SOFTWARE\Firaxis Games\Sid Meier's Civilization 4 - Beyond the Sword,INSTALLDIR}\Mods\Beyond The Game
[Setup]
; NOTE: The value of AppId uniquely identifies this application. Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{948BDE4A-45DC-4E98-BEBD-E11998DFA94E}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
UninstallDisplayName={#MyAppName}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={reg:HKLM\SOFTWARE\Firaxis Games\Sid Meier's Civilization 4 - Beyond the Sword,INSTALLDIR}\
DefaultGroupName={#MyAppName}
DisableProgramGroupPage=yes
; Uncomment the following line to run in non administrative install mode (install for current user only.)
;PrivilegesRequired=lowest
OutputDir=D:\Bureau\Installer Mod
OutputBaseFilename=BeyondTheGame
SetupIconFile=D:\Bureau\Installer Mod\Fichier du jeu\BTG.ico
Compression=lzma
SolidCompression=yes
WizardStyle=modern
DirExistsWarning=no
UninstallDisplayIcon={app}\BTG.exe
[Types]
Name: "full"; Description: "Default installation"
//Type of installation... I don't mess with this.
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
Name: "french"; MessagesFile: "compiler:Languages\French.isl"
Name: "german"; MessagesFile: "compiler:Languages\German.isl"
Name: "russian"; MessagesFile: "compiler:Languages\Russian.isl"
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags:
[Files]
Source: "D:\Bureau\Installer Mod\Fichier du jeu\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Icons]
Name: "{userdesktop}\Beyond The Game"; Filename: "{reg:HKLM\SOFTWARE\Firaxis Games\Sid Meier's Civilization 4 - Beyond the Sword,INSTALLDIR}\BTG.exe"; Parameters: "mod=\Beyond The Game"; Tasks: desktopicon; IconFilename: "{app}\BTG.ico"
[Run]
Filename: "{reg:HKLM\SOFTWARE\Firaxis Games\Sid Meier's Civilization 4 - Beyond the Sword,INSTALLDIR}\BTG.exe"; Parameters: "mod=\Beyond The Game"; Description: "{cm:LaunchProgram,Beyond The Game}"; Flags: nowait postinstall skipifsilent


Steam Version
Spoiler InnoSetup Code :

; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppName "Sid Meier's Civilization IV Beyond the Game"
#define MyAppVersion "2.20"
#define MyAppPublisher "Penny & Friends"
#define MyAppURL "https://forums.civfanatics.com/threads/beyond-the-play-community-mod.648750/"
[InstallDelete]
Type: filesandordirs; Name: {reg:HKLM\SOFTWARE\WOW6432Node\Valve\Steam\,INSTALLPATH}\steamapps\common\Sid Meier's Civilization IV Beyond the Sword\Beyond the Sword\Mods\Beyond The Game
[Setup]
; NOTE: The value of AppId uniquely identifies this application. Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{7C83C135-5126-491A-9F35-031B5F62481D}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
UninstallDisplayName=Sid Meier's Civilization IV: Beyond the Game
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={reg:HKLM\SOFTWARE\WOW6432Node\Valve\Steam\,INSTALLPATH}\steamapps\common\Sid Meier's Civilization IV Beyond the Sword\Beyond the Sword\
DefaultGroupName={#MyAppName}
DisableProgramGroupPage=yes
; Uncomment the following line to run in non administrative install mode (install for current user only.)
;PrivilegesRequired=lowest
OutputDir=D:\Bureau\Installer Mod
OutputBaseFilename=BeyondTheGame - STEAM
SetupIconFile=D:\Bureau\Installer Mod\Fichier du jeu\BTG.ico
Compression=lzma
SolidCompression=yes
WizardStyle=modern
DirExistsWarning=no
UninstallDisplayIcon={app}\BTG.exe
[Types]
Name: "full"; Description: "Default installation"
//Type of installation... I don't mess with this.
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
Name: "french"; MessagesFile: "compiler:Languages\French.isl"
Name: "german"; MessagesFile: "compiler:Languages\German.isl"
Name: "russian"; MessagesFile: "compiler:Languages\Russian.isl"
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags:
[Files]
Source: "D:\Bureau\Installer Mod\Fichier du jeu\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Icons]
Name: "{userdesktop}\BTG - STEAM"; Filename: "{reg:HKLM\SOFTWARE\WOW6432Node\Valve\Steam\,INSTALLPATH}\steamapps\common\Sid Meier's Civilization IV Beyond the Sword\Beyond the Sword\BTG.exe"; Parameters: "mod=\Beyond The Game"; Tasks: desktopicon; IconFilename: "{app}\BTG.ico"
Name: "{userdesktop}\BTG - STEAM LOBBY"; Filename: "{reg:HKLM\SOFTWARE\WOW6432Node\Valve\Steam\,INSTALLPATH}\steamapps\common\Sid Meier's Civilization IV Beyond the Sword\Beyond the Sword\Civ4BeyondSword.exe"; Parameters: "mod=\Beyond The Game"; Tasks: desktopicon; IconFilename: "{app}\BTG.ico"

 
Back
Top Bottom