Mod Vault

Post here if you want to help developing something for FAF.

Mod Vault

Postby johnie102 » 06 May 2013, 20:23

Hey all,

I would like to help some more with FAF and I thought it might be fun too have a mod vault. This would probably look and work almost the same as the map vault. As far as I can see most of the work of the Map Vault is done in http://www.faforever.com/faf/vault/maps.php. I would like to ask if I could get acces to this file, so that I can just adapt the code for the mod vault.

How I see this would work is that you can just download mods. Then when you start a game you can select mods you want to activate before you enter the lobby. This way players can see which mods a lobby has activated. When you double click a game that has mods activated that you don't have you would be asked to download them from the mod vault just like happens with the map vault.

One idea that I also personally liked is map specific mods. So that when you want to play certain maps it suggests a mod to play it with. These map specific mods would be specified when a person uploads a map.

-John

PS: Some map names are black and some are green and cursive in the map vault. What does that signify?
johnie102
Avatar-of-War
 
Posts: 128
Joined: 27 Dec 2012, 22:26
Has liked: 0 time
Been liked: 2 times
FAF User Name: johnie102

Re: Mod Vault

Postby Ze_PilOt » 06 May 2013, 20:27

I'm way more complicated than that.

You must first parse all the mod and fill a DB with the name, the description, the type, the version and the uid of the mod. That would be a first step.
Nossa wrote:I've never played GPG or even heard of FA until FAF started blowing up.
User avatar
Ze_PilOt
Supreme Commander
 
Posts: 8985
Joined: 24 Aug 2011, 18:41
Location: fafland
Has liked: 18 times
Been liked: 376 times
FAF User Name: Ze_PilOt

Re: Mod Vault

Postby Raging_Squirrel » 07 May 2013, 04:57

johnie102 wrote:PS: Some map names are black and some are green and cursive in the map vault. What does that signify?

that you have those maps downloaded
Never argue with an idiot. He will bring you down to his level and beat with experience.
User avatar
Raging_Squirrel
Priest
 
Posts: 494
Joined: 26 Aug 2011, 16:53
Location: Russia
Has liked: 1 time
Been liked: 4 times
FAF User Name: Raging_Squirrel

Re: Mod Vault

Postby johnie102 » 07 May 2013, 13:31

Ze_PilOt wrote:I'm way more complicated than that.

You must first parse all the mod and fill a DB with the name, the description, the type, the version and the uid of the mod. That would be a first step.


Ok, I'll start with that then. There is a lua parser in the vault folder. I guess I can use that one.
johnie102
Avatar-of-War
 
Posts: 128
Joined: 27 Dec 2012, 22:26
Has liked: 0 time
Been liked: 2 times
FAF User Name: johnie102

Re: Mod Vault

Postby eXcalibur » 07 May 2013, 16:53

@johnie102: great idea. i am waiting for a mod vault for quite a while now. i hope it works the way you think it can be done.

when you have parsed a couple of mods and have written some example data into a database, you could start testing. but only, when you have access to the map vault php file. i hope zep will grant you access to it and that he will be more helpful once you have done the work he told you to do.

there is a copy of the old mod vault of gpg on the internet. look here: http://forums.gaspowered.com/viewtopic.php?f=2&t=57560 it is unorganized, but it will do the job at least in the beginning...

i might see a problem with the mod vault: some mods are folders with subdirectories and .lua files within them. other mods (like all featured mods in faf) are only .scd files. do you think this will cause problems?
most mods must be placed in the mods folder (inside the users folder) and others in the installation directory of supcom:fa. how is that going to work out?
eXcalibur
Priest
 
Posts: 302
Joined: 28 Apr 2012, 14:18
Has liked: 52 times
Been liked: 3 times
FAF User Name: eXcalibur

Re: Mod Vault

Postby Ze_PilOt » 07 May 2013, 17:03

I really don't see how the map vault can be of any help.

It's meant to display map thumbnails, infos ... it's at no point related to mods.

No idea why you think it would be easy to adapt it to mods.
You will have to throw so many code that you better start from scratch.
Nossa wrote:I've never played GPG or even heard of FA until FAF started blowing up.
User avatar
Ze_PilOt
Supreme Commander
 
Posts: 8985
Joined: 24 Aug 2011, 18:41
Location: fafland
Has liked: 18 times
Been liked: 376 times
FAF User Name: Ze_PilOt

Re: Mod Vault

Postby johnie102 » 28 May 2013, 13:10

I am working on this now and I have a few questions.

Uploaded mods will be editable by their authors. Is it enough identification to simply use the client.login value (the name of the player) or should I use some uid instead?

I'm also not sure how to best work with thumbnails. Is there some threading I could use to load these in the background or something?
johnie102
Avatar-of-War
 
Posts: 128
Joined: 27 Dec 2012, 22:26
Has liked: 0 time
Been liked: 2 times
FAF User Name: johnie102

Re: Mod Vault

Postby Ze_PilOt » 28 May 2013, 13:29

Editing mod is Bad.

That's why there is a version system in FA.
Nossa wrote:I've never played GPG or even heard of FA until FAF started blowing up.
User avatar
Ze_PilOt
Supreme Commander
 
Posts: 8985
Joined: 24 Aug 2011, 18:41
Location: fafland
Has liked: 18 times
Been liked: 376 times
FAF User Name: Ze_PilOt

Re: Mod Vault

Postby johnie102 » 28 May 2013, 18:56

I would still like to group different versions of a mod together. so it would still be helpfull to identify the original author.
johnie102
Avatar-of-War
 
Posts: 128
Joined: 27 Dec 2012, 22:26
Has liked: 0 time
Been liked: 2 times
FAF User Name: johnie102

Re: Mod Vault

Postby johnie102 » 09 Jun 2013, 16:47

More progress:
I'm not gonna make an update interface as off yet. Each version will have their own entry. The folder name of the mod will have the same name as the mod and so the version must be in the name somewhere.

When hosting a game there is a list of all your installed non-UI mods. I want to make it so you can select multiple of them. I tried using a QListView, but it doesn't really work. Thoughts?

Another point: Should the thumbnails be uploaded seperately from the zip file? And there is a problem in that icon files for supreme commander may be .dds files, while FAF only supports png and jpeg. Ideas for that?
Btw, are the FAF servers fast enough that I can simply load these thumbnails without spending this loading time in a seperate thread?

I'm also not sure how the replay system works in FA. Can I simply append the active mods to the replay file so that they can be read? If those mods are then properly installed, will FA activate them automatically when it loads the replay?

I might also know a fix to a 'bug' in the ingame FA lobby. Sometimes when you choose a map in FAF and then open the ingame lobby and go to game settings, it changes the active map. The file "C:\Users\<User>\AppData\Local\Gas Powered Games\Supreme Commander Forged Alliance\Game.prefs" holds this variable (the last selected map). If you change it in that file then it should be fixed. I already need to edit this file to set the active mods, so it might be worth trying this.

Besides this, it is almost done. It will need some work on the database side which I can't do, obviously.

EDIT: Can someboy confirm for me that the game.prefs file always exist? In it's current state it might not like it if it can't find that file.
I would also like to check if this is always the correct path:
%APPDATA%\..\Local\Gas Powered Games\Supreme Commander Forged Alliance\Game.prefs"
I can only test this on Windows 7. I can't use %APPDATA% because it goes into "appdata\roaming\" while I need "appdata\Local\". I don't know if there is a different system variable for this.
Last edited by johnie102 on 09 Jun 2013, 19:30, edited 1 time in total.
johnie102
Avatar-of-War
 
Posts: 128
Joined: 27 Dec 2012, 22:26
Has liked: 0 time
Been liked: 2 times
FAF User Name: johnie102

Next

Return to Contributors

Who is online

Users browsing this forum: No registered users and 1 guest