online mod repository

Everything related to the code /
Tout ce qui touche au code
Post Reply
User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

online mod repository

Post by zuzuf » Sun May 31, 2009 6:36 pm

I am currently working on the mod repository system. Currently only netserver side and admin stuffs (how can I develop and test the client side stuffs if I can't fill the mod list first :P).

Here are the fields I created for mods in the database:

Code: Select all

ID - a unique ID that will identify the mod (for internal stuffs)
version - the version number of the mod (something like "0.0.1 beta", or anything you want provided it doesn't exceed 20 chars)
name - the mod name, 42 chars max
file - URL from where to download the mod archive (I plan to use a single HPI/CCX/UFO/GP3 archive for each mod)
author - name of the author(s)
comment - something to say about the mod
Do you see something else to add to that list ?
=>;-D Penguin Powered

milipili
Posts: 545
Joined: Thu Nov 02, 2006 8:52 am
Location: Paris (France)
Contact:

Re: online mod repository

Post by milipili » Sun May 31, 2009 10:56 pm

Code: Select all

ID - a guid and not a mere int
version - You will prefer all parts of the version to inform about new releases (hi INT2,lo INT2, patch INT2 should be good enough). Or a single int4 like Gcc versions 40212 -> 4.2.12
website - Url the maintainer's website (VARCHAR(256) default NULL)
ta3d version min - Same as `version`
ta3d version max - Save as `version` (default NULL)
If you're using a real database server, you can create with postgres your own compound type.
I don't know how far you want to go, but some depandancies might be useful (needs `the revpatch 1.3` for example).
Damien Gerard
Ta3d & Yuni Developer

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Re: online mod repository

Post by zuzuf » Sun May 31, 2009 11:39 pm

sorry but for legal reasons, things like "needs revpatch 3.1 cannot be done :P, but yeah, dependencies is a good idea, but it may become difficult to handle properly (our VFS has not been designed to merge an infinite number of folders, only a main one patched with a mod).
I was asking this, not because of database limitations (I am doing this with MySQL) but because the code that is going to use it won't auto-adapt to database structure :P, and netserver protocol won't either.
=>;-D Penguin Powered

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Re: online mod repository

Post by zuzuf » Mon Jun 01, 2009 1:54 am

I have modified a bit the login system of the website. It was a hidden mechanism for admins only (useful to post news without editing HTML/PHP code).
Now you can register/log in/log out, and users can be given different privileges:
admin - can post news
mod - can edit/post mods on the downloads -> mods page

What appears on the mods page is taken directly from netserver database, so editing mods information will affect the mod list you'll see in TA3D when you're logged in netserver :D

Currently there is no dependencies system ... even if this is something we can expect from a classical package repository, it really isn't obvious how to deal with dependencies in the Virtual File System ...
This is mainly because of file priority issues, currently the mod data has priority over global files, and real files have higher priority than files from archives of the same set. So now what do we do when mod A requires mod B + global set G + mod C when some file is not in A but is in B, C and G ?
Even if we compute a dependency tree, we can still end up with B and C at the same level, so we still don't know where to read the file :|

The only solution I see is adding some priority information in the ta3d.mod file which will be read from the selected mod and give priority rules for all the required packages, and also add a variable in it to tell if the "mod" is really a mod that can be played or only a package required by other mods (like TA, TA:CC, TA:BT, rev31.gp3 for example)
=>;-D Penguin Powered

xpoy
Posts: 669
Joined: Mon Sep 22, 2008 3:55 am

Re: online mod repository

Post by xpoy » Mon Jun 01, 2009 6:46 am

Well,I already collected about 30 mods /:^]

xpoy
Posts: 669
Joined: Mon Sep 22, 2008 3:55 am

Re: online mod repository

Post by xpoy » Mon Jun 01, 2009 7:43 am

And a important thing,Mod files should cover OTA files,or some weird bug come out.

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Re: online mod repository

Post by zuzuf » Mon Jun 01, 2009 10:54 am

Current priority system ensures mod files have priority over global (OTA/TA3D) ones.
=>;-D Penguin Powered

xpoy
Posts: 669
Joined: Mon Sep 22, 2008 3:55 am

Re: online mod repository

Post by xpoy » Mon Jun 01, 2009 12:15 pm

I just meet some wrong Comm, that due to wrong gamedata.Check out :)

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Re: online mod repository

Post by zuzuf » Mon Jun 01, 2009 7:37 pm

The online mod repository system is working :).

How does it work ? It's simple:
when you connect to netserver, TA3D retrieves the list of available mods (ID, name, version, author, comment, url but no dependencies yet).
There is now a "mods" window you can show up in the netserver screen, the window shows the list of mods.
When you select a mod, it shows related informations in the same window and update buttons according to the mod status (installed, not installed, can be updated).
Then just click the right button to install/remove/update mods :D

So now we need a few mods to test it :D.
in order to fill the list, just create an account on http://www.ta3d.org (home -> register), then ask me for mod publishing rights.
Once you're allowed to publish mods, you can add and edit your mods from the downloads -> mods page (you have to be logged).
Just fill the required fields, and that's all :mrgreen:

NB: urls must refer to http protocol (for now only http is supported, we'll add ftp support later).
=>;-D Penguin Powered

xpoy
Posts: 669
Joined: Mon Sep 22, 2008 3:55 am

Re: online mod repository

Post by xpoy » Tue Jun 02, 2009 5:23 am

Time to upload ta33a and taac.
Well, There some units 3rd pack, I think upload these pack in ftp is better. May they upload to ta3d ftp?

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Re: online mod repository

Post by zuzuf » Tue Jun 02, 2009 8:52 am

as long as a mod fits in a single archive, yes you can.
=>;-D Penguin Powered

xpoy
Posts: 669
Joined: Mon Sep 22, 2008 3:55 am

Re: online mod repository

Post by xpoy » Tue Jun 02, 2009 2:51 pm

gok131
swtfix17b2
ta33aCN
TABA1E
taPack131

I had made those pack for test.

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Re: online mod repository

Post by zuzuf » Tue Jun 02, 2009 5:34 pm

alright, I gave you mod publishing rights, you can now log in and add mods :)
=>;-D Penguin Powered

xpoy
Posts: 669
Joined: Mon Sep 22, 2008 3:55 am

Re: online mod repository

Post by xpoy » Tue Jun 02, 2009 7:02 pm

All in one single HPI folden?Or just a archive?
I had add some archive, if there should be HPI folden, I will change it in tomorrow.(Need time to upload, but now is 3:00am)

milipili
Posts: 545
Joined: Thu Nov 02, 2006 8:52 am
Location: Paris (France)
Contact:

Re: online mod repository

Post by milipili » Tue Jun 02, 2009 7:04 pm

I hope zuzuf has a big harddrive :D
Damien Gerard
Ta3d & Yuni Developer

xpoy
Posts: 669
Joined: Mon Sep 22, 2008 3:55 am

Re: online mod repository

Post by xpoy » Tue Jun 02, 2009 7:08 pm

:D
Yep...
And something to fix.
English version web link to Française web, it will changed when press the ID of mod.

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Re: online mod repository

Post by zuzuf » Tue Jun 02, 2009 8:05 pm

fixed :)

As far as storage is concerned, the mechanism allows external links :P, so mods files could be hosted elsewhere if needed (I thinking to moddb.com which could host a mod both as a TA and TA3D mod in a single file - 2 birds, 1 stone :P)
=>;-D Penguin Powered

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Re: online mod repository

Post by zuzuf » Tue Jun 02, 2009 10:44 pm

small misunderstanding:
mods must be stored in a simple standard HPI archive, not rar, zip or anything else (TA3D can't read them), just a simple HPI file you would use with OTA (except it should contain a ta3d.mod file if it requires some specific options to be overridden)
=>;-D Penguin Powered

xpoy
Posts: 669
Joined: Mon Sep 22, 2008 3:55 am

Re: online mod repository

Post by xpoy » Wed Jun 03, 2009 9:36 am

Does include ta3d.mod into HPI folden?
Somethings done

And that's eazy to suppent rar, there are a free software "unrar.exe" include in all winRar

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Re: online mod repository

Post by zuzuf » Wed Jun 03, 2009 3:41 pm

actually, it's not as easy as it seems with our current HPI code :? . This code will probably be reworked to add support for dependencies, and it should be split into HPI and VFS code (currently merged into a single module).
=>;-D Penguin Powered

xpoy
Posts: 669
Joined: Mon Sep 22, 2008 3:55 am

Re: online mod repository

Post by xpoy » Thu Jun 04, 2009 6:22 am

Well, I found that didn't had a good place to upload, if upload in China, it may cause a trouble net for others.
And in other places, I didn't had site to keep long times :(
But you can test the starmoon's ftp at now, try to download TAAC/ta33a, that was China net speed, if worked I will asked him to upload these file:
gok131
swtfix17b2
ta33aCN
TABA1E
taPack131

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Re: online mod repository

Post by zuzuf » Thu Jun 04, 2009 5:44 pm

only GOK is downloading properly :(
=>;-D Penguin Powered

xpoy
Posts: 669
Joined: Mon Sep 22, 2008 3:55 am

Re: online mod repository

Post by xpoy » Thu Jun 04, 2009 7:24 pm

Ofuuuuuuuuuuuuu, Sigh...
The FU moving made a lots of trouble.
We need write some Documentations, lots of new things hadn't bewrite.

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Re: online mod repository

Post by zuzuf » Sun Jun 07, 2009 4:31 pm

Yep, we need some docs, but I and milipili cannot do everything, and above all we're developers so we don't have the best point of view on what we're developing, since we already know how it works and we never really had to discover it since we built it.
I think documentation should be written by someone who discovered the game and knows what newcomers will want to learn in it.

Concerning the mod repository, I found a way to support archives easily:
using 7zip as an external command :D
You just set the command to run the 7z program and zip/rar/7z/tar archives are processed by 7z when needed :)
Since it requires 7zip to be installed or least shipped with TA3D, it'll be set as a dependency for Linux packages and shipped with the windows installer (2 small files put in the root folder, the 7z.exe file and a small dll)
=>;-D Penguin Powered

xpoy
Posts: 669
Joined: Mon Sep 22, 2008 3:55 am

Re: online mod repository

Post by xpoy » Sun Jun 07, 2009 5:54 pm

OH! Yes.I will try to write some doc for this, and some grammer wrong need fixed. Infact I had alreay finshed a FAQ for TA3D in Chinese, will be translated :)
There are a lots of mod save as rar, going to list more in tomorrow

Post Reply

Who is online

Users browsing this forum: No registered users and 38 guests