Community Content Pack 2.0 Guidelines
This Guide Discusses a format of organizing user-created content in Overgrowth.
It has been designed with the content-browser, editor, and the Server that will house it in mind.
It will be able to handle content as small as a custom texture, and as large as a full blown replacement mod.
Index
1. - Why should I use this stupid format anyways?
2. - The good news and the bad news.
3. The Folder Format
4. - Custom/Username/Projectname/
5. - /Version/
6. - /Content
7. The 'About' File
8. - JSON
9. - Content
10. Community Content Pack 2.0
11. Suggestions
So, you've made some custom models, or maybe even some full Levels, and want to release your masterpieces for the whole Community to see?
Well this is a guide is for you! It will should you how you should format your stuff together so we can enjoy it, and it can be included in the next Community Content Pack.
Why should I use this stupid format anyways?
You might wonder why these rules are put in place. Couldn't we just place our stuff into the Data folders as each of us pleases?
This is true, that would work for a time, but after a while it would become incredibly difficult to find what you need, and without a standard format, everyone would have have their own custom instructions for installing their content. It would be a complete and total mess, especially if you start mixing the files into those of the original engine, and boy will it be hard to find stuff then, and when something messes up and you want to find where the problem is good luck.
To solve these problems, creating a standard location and format for user-created content is crucial.
Another reason for keeping strict rules on the format of the content pack is because ultimately it will be housed on a server and accessed via the in-game content browser. For the browser to be able to easily manage all this information things need to be consistent.
Lastly, having it all in one location allows you to just drag and drop it from one weekly alpha to the next, without having to go file-hunting.
The good news and the bad news
The good news is that because this will all be managed by the server, mod browser and engine, ultimately you won't have to worry about it much at all.
The bad news is that until the mod browser and server are set up, you need to manually format your stuff, and with the next release some of the format might have changed. Such is the way things go during alpha development. That or, you could just wait until the final release, but you wouldn't be on the SPF if you just wanted to wait, now would you
Regardless this guide should help with understanding and following this format.
=Disclaimer: All of this is still subject to change until the server is up and the mod browser are fully implemented.=
The Folder Format
First and foremost the user created content should NEVER mix with the original game content, apart maybe from very quick and momentary tests.
Where and how you place your content is as follows:
Code: Select all
/Data/Custom/USERNAME/PROJECTNAME/VERSION(optional)/CONTENT
The following sections will describe each part of this file-path, and why it is the way it is:
Custom/Username/Projectname/
Any user-created content needs to be inside the Custom folder at the very least. This will make transferring your work and content from one alpha to the next very easy and pain-free: Just drag the custom folder from the old alpha's Data folder to that in the new alpha.
Ideally you should keep all your personal stuff inside Custom/your-forum-name/
As of now file-paths are absolute, and moving folders will break them. Because of that, it's simply best to have files that objects and levels will link to in their final locations.
A possible alternative to absolute filepaths as they are now will be suggested later.
/Version/
Sometimes there will be multiple versions of a Project released over time.
One might argue 'why not just replace the previous version?'
Well keep in mind that this folder system will be the same as that on the server, which will house all the versions. Multiple versions are necessary because sometimes people just like previous versions more, or (as some of us know all to well with some of the alphas) sometimes newer versions of something don't work as well as they should.
To support multiple versions an optional version folder can be added into to the file-path as in the image at the beginning. This folder will always be formated as either "v#.#" or "v#.#.#". This allows the user to keep Seperate versions of a project in their Custom folder while allowing the versions to all be saved under one name.
Once implemented, the content browser should by default load the most recent version of a project, but you'll be able to choose an older version of you want to.
Again as it stands now, because file-paths are absolute, you need to change all the paths linking to your content from levels and objects to include the "v#.#" folder so that they won't break when you decide your piece should have different versions.
A possible alternative to absolute filepaths as they are now will be suggested later.
/Content
Once inside the Projects folder (or version folder if there is one) the folder structure should mirror that of the actual Data folder.
Not only will this be consistent, but it will enable selective, non-destructive replacement of existing files.
For example:
Say you want to change a texture of the original Campaign, and just for the sake of this example let's say that that texture is located at /Data/Textures/image1.png
You could place your image at /Data/Custom/YOURNAME/PROJECTNAME/Textures/image1.png
and tell the engine to load your project as a replacement.
You could use this method to replace any aspect of the game, from sounds to animations to shaders, and so it would allow for extensive customization that is easily redistributed and doesn't actually change anything in the original Files.
This illustrates a possible solution for the problem of absolute Filepaths: If a project is loaded, have the engine treat the contents inside each Project folder as if it was actually in the normal file structure in Data. See the "Suggestions" section for a full proposal.
The 'About' File
If the Folder structure illustrated above is the 'body' of the Project, then the About file is its 'soul'.
It is a JSON file that stores all the metadata that will be used to organize and manage the Projects within the Server and Content Browser.
It Lives in the Project folder (or version folder if one exists) besides the content folders: Because the engine should be able to find this file quickly and easily it is important that it is -always- in this location, and will always be titled "About.json"
About.json files should -not- be modified after their release. This means that they will -not- contain meta-data such as user-rating, etc.
JSON
Originally the About file was going to be XML based, but was recently modified to be JSON based.
JSON is a Javascript based Data 'interchange' format that is easily readable for humans and because it is Javascript based, will play nice with the engine, including the future Content browser, which uses Google's V8 Javascript engine.
The Content pack includes a Template file that will make editing very easy, and so learning JSON is not a prerequisite, but if you are curious hit the 'JSON' Link above for the wikipedia article.
Because exactly what the content browser will require from this file is not 100% decided yet, the exact syntax is still subject to change, but overall its structure shouldn't change much anymore.
Content
An example of what is contained in an About.json file:
It is largely self explanatory, and there is a fully commented version included in the content pack which explains each section in detail.
Here are a select few sections explained:
- - "Content": "tags": ["Tag1","Tag2"]
These tags will be used by the content browser to help find content. the title of the project or the author(s) don't need to be included, and should also be considered by the browser's search engine. The search engine should ignore the letter 's' at the end of tags, so 'Canyon' and 'Canyons' would be considered the same tag.
- "Content":"dependencies":["/Username1/Project1/","/Username2/Project2/v1.0/"] Filepaths to other Projects who are used in this Project. If listed Projects are not present or not loaded, this Project won't load either. This allows users to use content from other Projects, without having to copy the content and so saving space. It's likely that this will ultimately be replaced by a some kind of ID the server uses for each project, or a code or hash-code that takes the version of the Project into account.
- "Team":"Authors":"forum_id":"#####"
The Forum ID of the author's account on the wolfire forums (found by clicking the user's name at the top of a post, and looking at the end of the url). Once the server is set up and users have usernames there that userID could be used instead, or "server_id" might replace it, and the forum ID could just be included in the user's account on the server. So far at least all of the OG modding has been on the forums so it is a good temporary way of identifying the author.
Community Content Pack 2.0
For those of you that weren't scared off by all that mumbo jumbo and just want to try out the current version of the content pack, which includes a template About.JSON and a fully commented version, as well as most of the current user-created stuff here is the file.
TO DOWNLOAD THE NEW CONTENT PACK PLEASE CLICK HERE! (about 50 MB)
Suggestions
This section is mainly stuff for the devs to consider when they start implementing the Content browser
About and relative file-paths:
Absolute file-paths, meaning filepaths that are based on the location of a file relative to the root folder, so the parent of /Data/, are impractical for custom user content and can become really long and difficult to manage:
Code: Select all
Data/Custom/User/Project/v1.0.1/Textures/Terrain/Terrain1/Terrain1_c.png
A possible solution for this is to have an option to make the file-paths relative to the project folder, or version folder; basically the folder containing About.json
This would make the file read like this: Data/Textures/Terrain/Terrain1/Terrain1_c.png where the engine would deal with 'Data' as the filepath of About.json.
This solution ties in well with the previously suggested non-destructive file replacement. Wherever the engine keeps track of which files are currently installed there needs to be a boolean that defines whether the given project is enabled or not.
Basically when the engine loads it Iterates through files in /Custom/ and Finds the About.json files at /Custom/username/projectname/About.json or /Custom/username/projectname/v#.#/About.json or Custom/username/projectname/v#.#.#/About.json
and then uses their location as the root of the contents of each project.
The contents browser uses displays the static metadata from the about.json file (remember, About.json is never modified after download)
I'm probably not making much sense anymore, it's quite late, and I had to retype much of this after my computer decided to crash and I hadn't backed it up in a good while. Sorry.
I know I had some more suggestions on my mind earlier, but can't think of any more at the moment...
Since I don't want to leave you hanging, and so you have an idea of how I envision the end result, here is a mock-up of the Content browser I threw together: Each 'Box' with a thumbnail, title, version number and type is a Project. Currently the browser's sorting mode is set to 'Authors' (equivalent to the 'username' folder') which shows an alphabetized list of the Authors, each of which, when expanded, shows their projects.
Grayed out Authors and Projects show that they are not currently set to load.
I will post another mockup of what browsing the community server will look like in the future.
So what do you think?
-Jo