Post by PzK on May 11, 2011 23:40:45 GMT
www.ign.com/blogs/maddocsoftware
Modding Post from Matthew Nordhaus
Modding Tools
We realize that players are going to want to mod our game, and we added a couple items to try to make it a little more friendly to modders.
File system Probably the most important change we made was to implement a way to load in mods easily, to override our existing files (any type at all) and replace them with data that you want.
Most of the data in our game is contained with zip files installed in our game. But you can also put files inside a directory called "data" in the same directory as the executable. The cool thing is that the game doesn?t care whether data is in the zip files or in the data directory. It takes the data with the highest priority and uses it when it runs the game.
We have a file called filesys.cfg in our build which lets players specify exactly what directories get loaded and in what order. You can override files by simply loading them later (the last one loaded is the one used). Filesys.cfg has several commands that modders are going to find useful.
For the examples below, assume that the game is installed in C:Program FilesSierraEE3 Also assume that you have your mods installed in a directory called extensions in the same directory as the executable.
First, you can use UnmountDirectory to have the file system ignore a directory recursively. For example, you might have 10 mods installed, but you only want to load a single one. In order to not load everything inside you would have to unmount the mod directory:
UnmountDirectory "data"
To load up a whole directory of directories as the root, use LoadCompleteSystem. To load the 'extensions' directory below you would use:
LoadCompleteSystem "extensions" PRIORITY 3
You can also load a single directory, and call it something else with the LoadDirectory command. The first parameter is the actual path on the hard drive, relative to the installed location, the second is the name you want to load the folder as. So if the folder in question is in extensionsmy_db, and you want to load it as the db folder, it would like like this:
LoadDirectory " extensionsmy_db " "db" PRIORITY 2
Priority is which folder is the most important. The higher the number, the higher the precedence. If a file is located in multiple locations, the folder with the largest priority number is the folder we will use
We will parse the entire file, looking for all LoadDirectory statements. All mounts with the same desired mount name go into the same list, and we only process them once we've found them all, in order of lowest to highest number.
So players can have multiple mods installed, and simply by switching config files to change priority of the loads, or even only load the ones they want, they can easily play with their friends that have the same mods installed.
It probably goes without saying that you won't be able to play multiplayer unless you are using the same mods as your opponent. This doesn't mean that you can't have multiples installed, just that you have to make sure the active one, the one that is loaded, matches exactly with the other people in the game.
Modding Post from Matthew Nordhaus
Modding Tools
We realize that players are going to want to mod our game, and we added a couple items to try to make it a little more friendly to modders.
File system Probably the most important change we made was to implement a way to load in mods easily, to override our existing files (any type at all) and replace them with data that you want.
Most of the data in our game is contained with zip files installed in our game. But you can also put files inside a directory called "data" in the same directory as the executable. The cool thing is that the game doesn?t care whether data is in the zip files or in the data directory. It takes the data with the highest priority and uses it when it runs the game.
We have a file called filesys.cfg in our build which lets players specify exactly what directories get loaded and in what order. You can override files by simply loading them later (the last one loaded is the one used). Filesys.cfg has several commands that modders are going to find useful.
For the examples below, assume that the game is installed in C:Program FilesSierraEE3 Also assume that you have your mods installed in a directory called extensions in the same directory as the executable.
First, you can use UnmountDirectory to have the file system ignore a directory recursively. For example, you might have 10 mods installed, but you only want to load a single one. In order to not load everything inside you would have to unmount the mod directory:
UnmountDirectory "data"
To load up a whole directory of directories as the root, use LoadCompleteSystem. To load the 'extensions' directory below you would use:
LoadCompleteSystem "extensions" PRIORITY 3
You can also load a single directory, and call it something else with the LoadDirectory command. The first parameter is the actual path on the hard drive, relative to the installed location, the second is the name you want to load the folder as. So if the folder in question is in extensionsmy_db, and you want to load it as the db folder, it would like like this:
LoadDirectory " extensionsmy_db " "db" PRIORITY 2
Priority is which folder is the most important. The higher the number, the higher the precedence. If a file is located in multiple locations, the folder with the largest priority number is the folder we will use
We will parse the entire file, looking for all LoadDirectory statements. All mounts with the same desired mount name go into the same list, and we only process them once we've found them all, in order of lowest to highest number.
So players can have multiple mods installed, and simply by switching config files to change priority of the loads, or even only load the ones they want, they can easily play with their friends that have the same mods installed.
It probably goes without saying that you won't be able to play multiplayer unless you are using the same mods as your opponent. This doesn't mean that you can't have multiples installed, just that you have to make sure the active one, the one that is loaded, matches exactly with the other people in the game.