Bit Blot Forum

Aquaria => Modding => Topic started by: Alec on May 15, 2010, 12:25:23 am

Title: Aquaria Open Source Project: Online Mod Database
Post by: Alec on May 15, 2010, 12:25:23 am
This'd be pretty cool, for someone who has the time and inclination to work on it... Setting up an online database of mods, and creating a UI in the game that can browse them. :)
Title: Re: Aquaria Open Source Project: Online Mod Database
Post by: Hiro on May 15, 2010, 03:06:27 am
But who has this expertise? :O
Title: Re: Aquaria Open Source Project: Online Mod Database
Post by: Dolphin's Cry on May 15, 2010, 01:35:10 pm
Or even just a nicer browser for the locally installed mods. If you have a couple of mods, it's a bit cumbersome to search through them until you find the one you want. If only I had more time. ;) I'm definitely going to take a look at the source, if only to confirm my theories about your implementation of the Lua integration. :P (Crashes when you pass an entity to a node function? Doesn't sound like you're using user objects!)
Title: Re: Aquaria Open Source Project: Online Mod Database
Post by: Alphasoldier on May 15, 2010, 01:47:25 pm
Will this simply be a browser ingame that links to a site or will it actually be able to download, enable and disable mods?
Title: Re: Aquaria Open Source Project: Online Mod Database
Post by: Dolphin's Cry on May 15, 2010, 10:06:30 pm
Alphasoldier: That sounds like you assume that anybody already has concrete plans for this. Well, I sure don't and I think Alec was also just tossing this out as an idea for someone to pick up. ;)
Title: Re: Aquaria Open Source Project: Online Mod Database
Post by: Alec on May 16, 2010, 04:02:44 am
Alphasoldier: That sounds like you assume that anybody already has concrete plans for this. Well, I sure don't and I think Alec was also just tossing this out as an idea for someone to pick up. ;)

Totally this. :)
Title: Re: Aquaria Open Source Project: Online Mod Database
Post by: RoadCrewWorker on May 17, 2010, 07:32:44 pm
Will this simply be a browser ingame that links to a site or will it actually be able to download, enable and disable mods?
One would assume that implementing a http request to pull json,xml or plaintext data from an online api to populate a simple listview would be much simpler than integrating a whole full blown browser to render html.

All in all i think its unnecessary, minor changes like loading mods as single-file gz archives or making the mod selector a list/gridview instead of the tedious single-thumbnail preview are much more feasable and useful.
Title: Re: Aquaria Open Source Project: Online Mod Database
Post by: Alec on May 17, 2010, 09:32:46 pm
Yeah, by "browser" I just mean "nice way to view and select mods" from an online database. :)
Title: Re: Aquaria Open Source Project: Online Mod Database
Post by: Alec on May 17, 2010, 09:33:27 pm
Actually, there's probably some way to tie it in with moddb? That'd be cool. http://www.moddb.com/

That way, the database stuff would just mean uploading to moddb. (and game-side, using some API to get the info from the db)
Title: Re: Aquaria Open Source Project: Online Mod Database
Post by: frostyfrog on May 19, 2010, 04:26:31 am
I can make things in php with mySQL/SQLite support in my free time (age: 15 :D ). Only problem is that I have no real host other than localhost witch is on the internet ATM (and I'm pretty much the only person who has the URL ATM)
Title: Re: Aquaria Open Source Project: Online Mod Database
Post by: Lady-Succubus on May 19, 2010, 04:54:42 am
in php with mySQL/SQLite support in my free time (age: 15 :D ).
Showoff :P
Now I feel really stupid... I'm already 17. :(
Title: Re: Aquaria Open Source Project: Online Mod Database
Post by: frostyfrog on May 19, 2010, 11:05:54 am
in php with mySQL/SQLite support in my free time (age: 15 :D ).
Showoff :P
Now I feel really stupid... I'm already 17. :(
To tell you the truth, I admire people who are better than me in a lot of things, like art, music, and other programmers :D. I just haven't had too many friends while I was growing up (still don't :( ) and I started by viewing the source code of WoW's website. I'd be glad to also tutor if I could. :)
Title: Re: Aquaria Open Source Project: Online Mod Database
Post by: Hiro on May 19, 2010, 12:23:11 pm
Haha, woah nice there Frosty. I remember teaching myself html back in...junior high? (I dunno, about age 12. Schooling system is different in NZ so I'm trying to convert xD )
Unfortunately that's about as far as I got, excluding playing around with macromedia flash in highschool (pretty much self-taught a lot of coding stuff). I'm useless until I get some real programming into me in the next few years at university (college).
Title: Re: Aquaria Open Source Project: Online Mod Database
Post by: Knight on May 19, 2010, 04:52:18 pm
I've got some programming experience from back in college (when I still thought writing games for a career WOULDN'T be Hell on Earth), but it's rather out of date. I've been in network support for too long.
Title: Re: Aquaria Open Source Project: Online Mod Database
Post by: Dolphin's Cry on May 19, 2010, 07:41:08 pm
Hiro: What are you going to study at university? By the way, I think it's funny that companies hire computer scientists as code monkeys. Seriously, physicists are better at that. Or anyone else who has spent more time on actual programming than learning the theory of programming. ;)

To get somewhat back on topic: Is there already a (preliminary) schedule for the release of the Aquaria source code?
Title: Re: Aquaria Open Source Project: Online Mod Database
Post by: Hiro on May 20, 2010, 07:51:54 am
Dolphin: I'm doing engineering. Software engineering is my planned speciality (specialisations start in second year for us (note that as I'm in the southern hemisphere I've had most of a semester of uni already)). So far the math and physics don't tend to be too bad but they're still boring. I chose to do Chinese (Mandarin) as a general education paper and its by far the most fun paper I'm doing . XD

I thought they said something like the source code would take a week or two?
Title: Re: Aquaria Open Source Project: Online Mod Database
Post by: p@ssito on May 20, 2010, 11:45:52 pm
Hi there :)

I'm really interested in doing the online mod database module for aquaria ! But for now and till end of june, it's not possible for me cos' i've school work to do.
If nobody is in since then, i'll do :)

Bye !
Title: Re: Aquaria Open Source Project: Online Mod Database
Post by: Xiagan on May 20, 2010, 11:53:44 pm
Hi and welcome!

See you later I hope! :)
Title: Re: Aquaria Open Source Project: Online Mod Database
Post by: frostyfrog on May 21, 2010, 12:59:13 am
@p@ssito,
Ya, I got school too, maybe it could be more of a group project. :)
I can't really host it too often, (I like to play Aquaria on Ubuntu Lucid Lynx and my web server is on Windows 7, and my specs are kinda low too) so that could be a problem... I do use compression now and that could help somewhat :). But other than the server and prices, I think I can help.

Edit: I hope I'm able to talk to you Alec, I've made some progress on my own little layout for the online Mod DB and I was hoping you could tell me what you think...

Edit 2: Project is now online and we are working on it, bit by bit. ;)
http://code.google.com/p/aquaria-mod-db/
Title: Re: Aquaria Open Source Project: Online Mod Database
Post by: Lady-Succubus on May 25, 2010, 08:45:30 am
Bit by bit by bit.

Good evening, ladies and gentlemen: as you can guess from my revealing-yet-spiffy-looking uniform, I shall be your designer-on-board for the duration of our journey. I would like to remind you of the captain's orders never to stick your arms and legs and other extremities beyond the clearly defined areas. Do not attempt to abandon the vessel as doing so will only threaten your life and the lives of the others on board. Do not attempt to circumvent safety measures as you may hurt yourself while doing so. Please feel free to voice any opinions you have regarding the voyage to any of the officers on board; we are very open to such ideas. We hope you have a decent voyage aboard the Aquariana and wish you a pleasant stay.

Yeah, I'm sleep deprived. Sorry. .-.

And err... captain, I mean frostyfrog, try not to doublepost. There's a modify button at the top left corner of your posts. There also happens to be a remove button. Very handy for consolidating posts. ^.–
Title: Re: Aquaria Open Source Project: Online Mod Database
Post by: Xiagan on May 25, 2010, 04:47:19 pm

And err... captain, I mean frostyfrog, try not to doublepost. There's a modify button at the top left corner of your posts. There also happens to be a remove button. Very handy for consolidating posts. ^.–

In cases like this, a double post is okay.
(New and important content people would miss if he just edited his last post)
Title: Re: Aquaria Open Source Project: Online Mod Database
Post by: Dolphin's Cry on May 25, 2010, 07:53:06 pm
Project is now online and we are working on it, bit by bit. ;)
http://code.google.com/p/aquaria-mod-db/
Do you already know under which license Aquaria's source code will be released and if it's compatible with GPLv3?
Title: Re: Aquaria Open Source Project: Online Mod Database
Post by: Lady-Succubus on May 25, 2010, 10:30:35 pm
No we don't, but does the platform used to share and display mods really depend on the related software? They're two separate things: one is a game, and another is a file sharing platform that happens to be used for a website that's planning to share mods for said game. :3
Title: Re: Aquaria Open Source Project: Online Mod Database
Post by: Dolphin's Cry on May 25, 2010, 10:59:18 pm
Well, I was under the impression that this was supposed to include an extension to the Aquaria source code to make said platform accessible from within the game. If that's not the case, then I also see no problem regarding license conflicts. :)
Title: Re: Aquaria Open Source Project: Online Mod Database
Post by: Lady-Succubus on May 25, 2010, 11:07:32 pm
We could make the game connecting API(?) thing open source, but software that uses the API(?) doesn't need the same license. :3
Title: Re: Aquaria Open Source Project: Online Mod Database
Post by: p@ssito on May 26, 2010, 01:29:15 am
Aquaria is a program, and the site hosting the mods will be linked to this program : I think that in the end, the website's sources will go with aquaria's.
For now, let's say that it's another project... Don't you think ?
Title: Re: Aquaria Open Source Project: Online Mod Database
Post by: Lady-Succubus on May 26, 2010, 02:54:25 am
The website's source's license is unrelated to the game's.

The future modification of the game that makes the the game work with the website is a separate project that is not linked in terms of licenses in any way to the website itself.  Therefore, the website's source will continue to be released under whatever license frostyfrog has set it as, and whether he decides to relicense the source to match with the game is entirely his decision.
Title: Re: Aquaria Open Source Project: Online Mod Database
Post by: frostyfrog on May 26, 2010, 03:27:13 am
I think I will switch it to the same license as Aquaria as soon as it is open sourced.
Title: Re: Aquaria Open Source Project: Online Mod Database
Post by: Lady-Succubus on May 26, 2010, 03:32:57 am
He has spoken. ^.^

I was thinking of a bluish blackish theme for the mod db site, something resembling this forum in color scheme maybe. Either that or more of the aquaria menu green. Any objections?

I doubt anyone would want the mod site to be made of the colors I like (pink, purple, pastels :3) xD
Title: Re: Aquaria Open Source Project: Online Mod Database
Post by: frostyfrog on May 26, 2010, 08:38:50 am
Well, I just committed a new update that allows you to submit mods and view them. I'm going to set it up better with more security in a few days.
Title: Re: Aquaria Open Source Project: Online Mod Database
Post by: Dolphin's Cry on May 26, 2010, 07:49:17 pm
Do you mean security as in escaping user-supplied parameters (http://www.php.net/manual/en/function.mysql-real-escape-string.php) in SQL queries or putting the database password into a configuration file that is not included in the publicly viewable SVN repository? ;) It would be a shame if some hacker breaks into the database and destroys it just because he's bored.
Title: Re: Aquaria Open Source Project: Online Mod Database
Post by: frostyfrog on May 26, 2010, 11:20:41 pm
Do you mean security as in escaping user-supplied parameters (http://www.php.net/manual/en/function.mysql-real-escape-string.php) in SQL queries
Exactly!
or putting the database password into a configuration file that is not included in the publicly viewable SVN repository? ;) It would be a shame if some hacker breaks into the database and destroys it just because he's bored.
MySQL doesn't reach outside of my house. Besides, that user only has access to that project. I'll make sure to put it all in a config, well, soon anyways.
Title: Re: Aquaria Open Source Project: Online Mod Database
Post by: Lady-Succubus on May 26, 2010, 11:37:54 pm
MySQL is something that the engine uses, though, right? :/
Title: Re: Aquaria Open Source Project: Online Mod Database
Post by: frostyfrog on May 26, 2010, 11:42:28 pm
yes, that is just the database though, I can't get my dad to allow too much through from my computer :(
Most servers that allow php5 though, have MySQL preinstalled.
Title: Re: Aquaria Open Source Project: Online Mod Database
Post by: Lady-Succubus on May 26, 2010, 11:44:11 pm
Yes, but what I mean is, if your webserver is accessible from outside, the MySQL queries it performs can be performed via outside access as well, right?

Yes... that makes sense. xD
Title: Re: Aquaria Open Source Project: Online Mod Database
Post by: GMMan on May 26, 2010, 11:46:07 pm
I'm just thinking, why not do it the way GooFans did it? Build a website specifically for modding, and make a utility that automatically install mods. It'd be hard to make a leaderboard for Aquaria, but everything else would be doable. All that needs to be done is customize the content management software so that it's suited to mods. It's better than starting completely fresh.

(Annnnddd... I might be able to host the entire thing on my server (consisting of an Xbox), though I have no idea when I would do it, and how fast it would be if I did do it (my connection is DSL). Oh, and it's on only from 8 till 5, so I hope that won't be too much trouble.)
Title: Re: Aquaria Open Source Project: Online Mod Database
Post by: Lady-Succubus on May 27, 2010, 12:24:29 am
That is, in fact, what we are planning to do, I believe. :3

Except we have someone willing to edit the game source on board, so the utility will be in the game itself. :3
Title: Re: Aquaria Open Source Project: Online Mod Database
Post by: GMMan on May 27, 2010, 12:28:46 am
Interesting idea, but I'm not sure if Bit Blot is going to release a community version of the game alongside the main game.  It has to be packaged separately, somehow (I mean the new game engine and everything).

If there were to be mods that extend beyond the current capabilities: The engine itself needs to be very flexible. In fact, what if the engine itself was just a runtime, and everything else are just scripts? At least that solves the "I'm going to add more emotions" problem.
Title: Re: Aquaria Open Source Project: Online Mod Database
Post by: Lady-Succubus on May 27, 2010, 04:15:59 am
Well, we can figure it out once the engine goes open source. :3
Title: Re: Aquaria Open Source Project: Online Mod Database
Post by: GMMan on May 27, 2010, 09:00:50 pm
I've got the project downloaded on to my server, though I'm having a bit of trouble getting it to all work. I've got the SQL tables and accounts set up, and should be working, but somehow requests to other pages are not responded to and are just returning 404 errors. The thing is set up at 216.197.137.27/aquaria-mod-db/ . (I'm a PHP noob, so I have no idea how to fix it myself.)

(I'm running lighttpd, if it helps.)
Title: Re: Aquaria Open Source Project: Online Mod Database
Post by: frostyfrog on May 27, 2010, 11:16:42 pm
Is there some way for me to contact you other than the forums? (via chat program I mean) I think it may be because I enabled a few things in apache (like mod_headers) but I'm not sure what else I've done to my installation, so I would like to talk to you in real time to try to figure this out. Once I figure out all that I have changed, I will commit another change with all of the modified settings in  a readme file. Sorry for the inconvenience :(.
Title: Re: Aquaria Open Source Project: Online Mod Database
Post by: GMMan on May 28, 2010, 12:43:05 am
It looks like that my webserver tries to literally find the .html file and fails.

@frostyfrog: I'll PM you on Saturday if I have time.
Title: Re: Aquaria Open Source Project: Online Mod Database
Post by: frostyfrog on May 28, 2010, 12:50:26 am
Ok, I'll be waiting then. :) Sounds so far like apache doesn't allow htaccess files to overide.
Title: Re: Aquaria Open Source Project: Online Mod Database
Post by: GMMan on May 28, 2010, 05:17:01 am
Ok, I'll be waiting then. :) Sounds so far like apache doesn't allow htaccess files to overide.

Actually, I'm running lighttpd. Maybe it doesn't support htaccess overrides? I did a search, and the way lighttpd parses overrides are different to the way Apache does.
Title: Re: Aquaria Open Source Project: Online Mod Database
Post by: frostyfrog on May 28, 2010, 05:32:08 am
It looks like lighttp isn't ever going to support htaccess files. :( Here is a solution if you don't mind installing another web server and have the space/time: http://www.apachefriends.org/en/xampp.html
Title: Re: Aquaria Open Source Project: Online Mod Database
Post by: RoadCrewWorker on May 28, 2010, 10:12:27 pm
Exactly how many released mods are actually out there anyway? Isn't concentrating on a DB CMS for <10 instead of actually modding a bit of overkill?

Portable UniServer has worked well for rapid prototyping apache/php/mysql designs for me. You don't really want to run a real website from/through your dads pc though.
Title: Re: Aquaria Open Source Project: Online Mod Database
Post by: GMMan on May 28, 2010, 11:35:00 pm
I've managed to get the thing working a bit, but also broke something else on my server. I was playing with regular expression, and I can't seem to make them work properly. Could someone write a test pattern for me that will match "/aquaria-mod-db/*.html", where * may be anything, and also one that will match "/aquaria-mod-db/dummy" (a page that doesn't have ".html" on it) but not "/aquaria-mod-db/media/theme/blahblah/dummy2.png" (my current one matches both, and I can't figure out how to exclude everything after the second "/".) (My PHPMyAdmin is affected because of those test expressions.)
Title: Re: Aquaria Open Source Project: Online Mod Database
Post by: frostyfrog on May 29, 2010, 12:26:57 am
/aquaria-mod-db/*.html = "/(aquaria-mod-db\/[-_+a-z0-9]*.html)/i"
/aquaria-mod-db/Anything = "/(aquaria-mod-db\/[-_+a-z0-9]*)/"
Tested on http://www.regextester.com/

Edit:
Exactly how many released mods are actually out there anyway? Isn't concentrating on a DB CMS for <10 instead of actually modding a bit of overkill?
Maybe, but it's better to place the system in now then to place it in down the line when there are hundreds :). Also, I'm not too good at modding. :(
Portable UniServer has worked well for rapid prototyping apache/php/mysql designs for me. You don't really want to run a real website from/through your dads pc though.
I've been using WAMP ( http://www.wampserver.com/en/ ). I'm running this through my computer which is on 24/7 pretty much anyways and I don't have a job to get it hosted, so it's been going through my computer for now.
Title: Re: Aquaria Open Source Project: Online Mod Database
Post by: aerozol on May 29, 2010, 03:01:57 am
Exactly how many released mods are actually out there anyway? Isn't concentrating on a DB CMS for <10 instead of actually modding a bit of overkill?
I don't know how many people have bought/ installed Aquaria so far, but it's a lot.
I think the main thing is that mods don't get much exposure. Releasing a browser that highlights even just one good mod, would be a huge boost in support for the creators, and would definitely get more people in.

It would have to be in an official patch though, because if someone's going to bother installing 3rd party software to do it, they may as well browse the mods on the web too, or just grab the ones they want of the list of mods in the Wiki. imo
Title: Re: Aquaria Open Source Project: Online Mod Database
Post by: GMMan on May 29, 2010, 04:10:20 am
@frostyfrog:
Quote
/aquaria-mod-db/Anything = "/(aquaria-mod-db\/[-_+a-z0-9]*)/"

I mean immediately following the "/aquaria-mod-db", and nothing after that (or it may rewrite everything else as well. Maybe I should try url.rewrite-once?

I'll test it out tomorrow. Thanks.
Title: Re: Aquaria Open Source Project: Online Mod Database
Post by: frostyfrog on May 29, 2010, 06:36:41 am
that /anything meant stuff like: dummy, about, etc. not like: dummy/test/
Title: Re: Aquaria Open Source Project: Online Mod Database
Post by: GMMan on May 29, 2010, 04:37:25 pm
I've  fixed up the regular expression patterns a little bit, and now everything is displayed properly, and the rules aren't devouring other pages either.  ;D Here's what I changed in my lighttpd.conf:

Code: [Select]
url.rewrite-once              = (
        "(/aquaria-mod-db/[-_+a-z0-9]*.html)\?(.*)" => "/aquaria-mod-db/index.php?$2",
        "(/aquaria-mod-db/[-_+a-z0-9]*.html)" => "/aquaria-mod-db/index.php",
        "(/aquaria-mod-db/[-_+a-z0-9]*)$" => "/aquaria-mod-db/index.php"
)

The app should be up and running on my server now. I still need to test uploads. If you want to have a look, go to http://216.197.137.27/aquaria-mod-db/ (http://216.197.137.27/aquaria-mod-db/).

UPDATE: I had to add another line to the url.rewrite-once list, because the server would rewrite an URL with "?file=blah" at the end with one that doesn't have it at the end.
Title: Re: Aquaria Open Source Project: Online Mod Database
Post by: GMMan on May 29, 2010, 05:49:07 pm
Everything should be working now, though I do get a warning when uploading a mod that says nl2br() has the wrong number of arguments (which I checked, shouldn't have a problem).

@frostyfrog: There doesn't seem to be any way to download mods. That sort of defeats the purpose, doesn't it?
Title: Re: Aquaria Open Source Project: Online Mod Database
Post by: frostyfrog on May 29, 2010, 06:43:11 pm
Currently, no there isn't. I'll go ahead and commit soon.
Title: Re: Aquaria Open Source Project: Online Mod Database
Post by: Lady-Succubus on May 31, 2010, 08:40:52 pm
I need to work on the design but now that I have time I'm too lazy to. T_T
Title: Re: Aquaria Open Source Project: Online Mod Database
Post by: GMMan on May 31, 2010, 08:50:03 pm
I've updated my server with the new files from the SVN. It's working. A couple suggestions (as a text based browser allow):
1. There needs to be a bit of spacing between the mod icon and the text.
2. Filenames needs to be prettied up. No one is going to be able to find a file named faaab.zip. Maybe record the original filename on upload and then apply it to the download file at user request? Also, instead of telling the client to pull the file from a specific location, how about using something like a "file_download.php" to both pull the file and apply the original filename?
Title: Re: Aquaria Open Source Project: Online Mod Database
Post by: Lady-Succubus on May 31, 2010, 08:53:19 pm
The first point I will work on when I get to designing the website.

The second... well frosty can deal with that one. :3
Title: Re: Aquaria Open Source Project: Online Mod Database
Post by: GMMan on June 01, 2010, 04:50:03 pm
I just tested mods.xml, and it doesn't work. I've updated my url.rewrite-once list, and I get the error
Code: [Select]
Parse error: syntax error, unexpected T_STRING in /var/www/aquaria-mod-db/root.php(22) : eval()'d code on line 1 when I try to access it. The page on frostyfrog's server returns a blank page.
Title: Re: Aquaria Open Source Project: Online Mod Database
Post by: frostyfrog on June 01, 2010, 10:39:42 pm
lol, sorry about that. the problem was A) I just barely setup the DB on Linux now, B) PHP was allowing short tags and the first line in that XML file uses php's short tags. It is currently displaying everything correctly now and...
No one is going to be able to find a file named faaab.zip.
I can, in linux, I just search start typing the name in my downloads folder. I can do the same thing in windows, and I'm pretty sure macs have the same capability. Also, the only web browsers that I can think of that would make it more difficult, would be IE or Lynx, since both browsers don't have recent download lists. And a problem with the file_download would be that it would make the file come a lot later then it would normally since the server would need to read the file, load it into the output buffer, and then send it. the bigger the file, the longer it would take.
I can't really think of a reason to change it from how it is, but I could if it becomes a problem.
A couple suggestions (as a text based browser allow)
So, text browser support? I can do that. I was also thinking of iPhone support and such.
1. There needs to be a bit of spacing between the mod icon and the text.
I can fix that.
Title: Re: Aquaria Open Source Project: Online Mod Database
Post by: GMMan on June 01, 2010, 11:27:58 pm
[strike]Say, could you commit your changes to the XML mod list?[/strike] Nevermind, I just inserted a bit of PHP to write out the first "<?". There isn't any links to the XML, maybe you could put that in somewhere?
Regarding the text browser, I'm just saying I'm using Lynx to go on the forums (because it's blocked from my regular connection, so I can only use my server at home to access the forums. And it doesn't have VNC, so I'm stuck with Lynx (have you tried to put VNC on an Xbox server? It's a pain and it's so slow.))
For the download thing, maybe it's possible to modify only the filename header, and then just directly output from the file on the server.
Title: Re: Aquaria Open Source Project: Online Mod Database
Post by: Dolphin's Cry on June 01, 2010, 11:43:14 pm
Two comments regarding usability issues with the mods page:

The download button violates the principle of least surprise. Even on an Aquaria mods site, I do not expect the download button to be hidden behind a dimmed image with Aquarian glyphs on it. In fact it took me almost five minutes to find it (no kidding). Please use just a simple text link labeled "Download".

I agree that the mangled file names for mods are a problem. The problem is not in finding the downloaded file, but being able to tell what the file contains, preferably just by looking at the file name. How about using a directory for each mod and having the ZIP file inside the directory? You could use the mangled name as directory name and the original (descriptive) name for the ZIP file. Then your links would be something like "media/mods/faaab/sacrifice.zip".
Title: Re: Aquaria Open Source Project: Online Mod Database
Post by: frostyfrog on June 01, 2010, 11:43:48 pm
Say, could you commit your changes to the XML mod list?
sure, just wait a few minutes, I'll need to boot into my windows PC, since I have no idea how to do SVN from linux.
Regarding the text browser, I'm just saying I'm using Lynx to go on the forums (because it's blocked from my regular connection, so I can only use my server at home to access the forums. And it doesn't have VNC, so I'm stuck with Lynx (have you tried to put VNC on an Xbox server? It's a pain and it's so slow.))
For the download thing, maybe it's possible to modify only the filename header, and then just directly output from the file on the server.
Ah, ok. and I haven't messed with my xbox at all... And the way for the downloads, it would still have to go through php for the entire transfer to get that kind of effect.


Edit:
The download button violates the principle of least surprise. Even on an Aquaria mods site, I do not expect the download button to be hidden behind a dimmed image with Aquarian glyphs on it. In fact it took me almost five minutes to find it (no kidding). Please use just a simple text link labeled "Download".
Ok, will fix with a little editing.
I agree that the mangled file names for mods are a problem. The problem is not in finding the downloaded file, but being able to tell what the file contains, preferably just by looking at the file name. How about using a directory for each mod and having the ZIP file inside the directory? You could use the mangled name as directory name and the original (descriptive) name for the ZIP file. Then your links would be something like "media/mods/faaab/sacrifice.zip".
Heh, I guess I should stop using the system that most popular file upload services use, I'll put that in.
Title: Re: Aquaria Open Source Project: Online Mod Database
Post by: GMMan on June 02, 2010, 08:53:20 pm
I've just uploaded the default mod pack to my server. Now we're on the second page. Just thinking, isn't five mods too little for a page? I think ten would be a good number.
Title: Re: Aquaria Open Source Project: Online Mod Database
Post by: frostyfrog on June 02, 2010, 09:14:38 pm
Committed.
Title: Re: Aquaria Open Source Project: Online Mod Database
Post by: False.Genesis on July 04, 2011, 12:45:03 am
Epic thread necroing!    *hides*


I originally intended to keep this private for now, but somehow i can't resist posting a little preview. ::)
To do something against forum dormancy, or so.

(http://dl.dropbox.com/u/22111385/Aquaria/modlist_dev/modlist_net1_thumb.jpg) (http://dl.dropbox.com/u/22111385/Aquaria/modlist_dev/modlist_net1.jpg)
^ Fetching online mods list and images (see firefox dir list in the background)

(http://dl.dropbox.com/u/22111385/Aquaria/modlist_dev/modlist_net2_thumb.jpg) (http://dl.dropbox.com/u/22111385/Aquaria/modlist_dev/modlist_net2.jpg)
^ Got it! Downloading Angry Li.

(http://dl.dropbox.com/u/22111385/Aquaria/modlist_dev/modlist_dev_thumb.jpg) (http://dl.dropbox.com/u/22111385/Aquaria/modlist_dev/modlist_dev.jpg)
^  Local mods list. Click one to start.

Won't be finished too fast, as i am coding this mostly during lectures, exams are starting soon, and there is still a lot to be done...

Anyways, any questions/suggestions/rants? :P
Title: Re: Aquaria Open Source Project: Online Mod Database
Post by: GMMan on July 04, 2011, 03:23:45 am
Got your network threading implemented?
Title: Re: Aquaria Open Source Project: Online Mod Database
Post by: False.Genesis on July 04, 2011, 03:47:03 am
Not yet, but i think now that i posted this here i can post updates to this as well.
Network threading will be fairly easy to do once i find the time to.
And while I'm at publishing stuff, I'll probably upload the code to github as well, in a about week or so.


EDIT:

It probably isn't clear what the "patches" menu is supposed to do, so here's a short explanation:
The plan is to be able to activate/deactivate patches that alter the main game, but without actually having to replace files on disk. Soft-patching, basically; downloadable with a single click from the online mods list.
That could include an easy/hard mode, food drop rate adjustment, the dark music pack, graphics alterations (always regular Naija mod, Nude mod, you name it), and actually carry changes over to game mods also, unless the game mods themselves override the things used.

And as a next step, i would like to integrate mods seamlessly with the game (sort of) -- basically, that mods do nothing else than replace/override game files, without the game engine having to distinguish between mod and non-mod game mode. I see it as a way to get the real world map working in mods without having to add extra code for that, and without the need to have a LUA replacement.
Should open up more possibilities for modders as well -- beeing able to virtually alter files while the game runs. Maybe a way to exchange Naija gfx for Mia, for example, or play as a Crotite without gluing an entitiy to the invisible Naija. Haven't gotten myself into modding a lot, as i prefer raw C++ plumbing :P

Of course that would require re-arranging files in mods a bit, but not more. Scripts and stuff won't break again by this change.

Not sure if this will work out like i imagine. Gotta finish the mod browser first, and then see what else can be done.


EDIT2:

Still an open question is who can host the necessary files for the mod browser, and then the mods themselves, but in a way that the owners can update them...
I'd take care of maintaining the mods list and/or a master server list that links to other servers providing data, whatever is needed.

The online system itself is designed that it can get its data and files even from a mess of dropbox links from different accounts, as long as direct download via HTTP is possible.
Can't really expect Alec (or Derek, but thats even more unlikely) to maintain things on their servers, and keep stuff up to date.
Better if the community helps itself, in that case. (Not meant as an offense, just beeing pragmatic and planning ahead a bit.)
Title: Re: Aquaria Open Source Project: Online Mod Database
Post by: False.Genesis on July 05, 2011, 11:03:56 pm
Got async resolve/connect/send operations done. Firewall blocking should be gone, but didn't yet test that. I have killed my firewall a few weeks ago because it was annoying :P

Test exe: http://dl.dropbox.com/u/22111385/Aquaria/NewMod_03.zip  [see link in my sig instead]
---  win32 only for now, sorry - will fix this for other OSes later. May crash randomly. Note that old mods are not compatible, you can open them, but they will not play correctly (see end of post for more info)
To test the mod downloader, you can download "FG's random editor testing", it will play correctly, although it is totally useless. :P
It connects to my server at http://fg.kicks-ass.org/aq/ upon clicking the globe, in case your firewall warns you.

This zip can be unpacked into your 1.1.1+ Aquaria dir without problems - scripts, updates, and everything that 1.1.1 does not have and which is required to run this build is contained in _hackfixes.lvpa, which the original exe does not read.

If for some reason anyone wants the (horrible) code patch before i cleaned it up, drop me a PM.


Mod compatiblity related info:
I'm afraid you're thinking a bit too narrow-mindedly. (: The ideal is of course to maintain compatibility, but when that's just not feasible (as in this case), the same logic says you should break it hard, once -- so that you don't have to break it again in the future -- rather than introducing a new incompatibility in every release.

Incidentally, the reason I had to break compatibility was because the original script engine ran every script in its own, independent environment, so scripts could do anything they wanted, like using global variables. But that also prevents the very significant optimization of running all scripts as threads in a single environment, because then they'd all clobber each other's state by writing to global variables. So there's simply no way around rewriting all the scripts for the new engine -- trying to do it programmatically would mean writing a separate Lua parser just to find and rewrite all the global variables, and even then you'd waste memory on multiple copies of all the common constants from the old entityinclude.lua file.

That said, it occurs to me (very belatedly) that replacing:
    v = getVars()
with:
    if getVars then v = getVars() else v = {} end
might let updated scripts continue working with the old engine, to get the best of both worlds.

Aaaand I've gone and actually done this -- in fact, I've done worse and removed getVars() entirely. The new (and hopefully final!) canonical boilerplate, which restores compatibility with the commercial engine, is:

if not v then v = {} end
if not AQUARIA_VERSION then dofile("scripts/entities/entityinclude.lua") end

As I stated on the mailing list (http://icculus.org/pipermail/aquaria/2011-May/000411.html), if any mod authors want me to fix up their scripts to work with both the commercial releases and the current icculus.org build, send me (achurch at achurch dot org) a zip of your script files and I'll do so ASAP.
Title: Re: Aquaria Open Source Project: Online Mod Database
Post by: GMMan on July 06, 2011, 01:58:04 am
Still an open question is who can host the necessary files for the mod browser, and then the mods themselves, but in a way that the owners can update them...
I'd take care of maintaining the mods list and/or a master server list that links to other servers providing data, whatever is needed.

The online system itself is designed that it can get its data and files even from a mess of dropbox links from different accounts, as long as direct download via HTTP is possible.
Can't really expect Alec (or Derek, but thats even more unlikely) to maintain things on their servers, and keep stuff up to date.
Better if the community helps itself, in that case. (Not meant as an offense, just beeing pragmatic and planning ahead a bit.)

Time to dig out my Xbox? Actually, I can probably pull the mod db files from SVN and work on it locally...
Title: Re: Aquaria Open Source Project: Online Mod Database
Post by: False.Genesis on July 06, 2011, 02:12:56 am
I had in mind that Alec could put a central mod list on his server that links to other sources, and does not necessarily have to contain files. Kinda would make things "official". A linked server network of some sorts. Just adding the last bits of support for this.
So, not sure if your Xbox really needs to do the hosting job :P
Some files are rather big, and may eat lots of bandwith, depending how many people start downloading things (hey, informatics is about the worst case, right?  ;) )
Otherwise, if theres stuff to chat about ... --> IRC. :P

Do you need some security checking of the PHP site (you meant that, right?) ?. I've done other websites before and things like SQL injection and XSS is nothing new for me. No problem, as soon as my semester is over...
Title: Re: Aquaria Open Source Project: Online Mod Database
Post by: GMMan on July 06, 2011, 03:10:20 am
So, not sure if your Xbox really needs to do the hosting job :P
That's just for development. My Xbox is probably too under the weather to handle anything more than a temporary server for testing.

Do you need some security checking of the PHP site (you meant that, right?) ?. I've done other websites before and things like SQL injection and XSS is nothing new for me. No problem, as soon as my semester is over...
Probably. I can do file upload checks, but I haven't worked with MySQL (or much PHP, for that matter).
Title: Re: Aquaria Open Source Project: Online Mod Database
Post by: False.Genesis on July 10, 2011, 10:31:48 pm
Added full softpatching support, improved network/HTTP code, fixed some crashes. Now it should be as stable as 1.1.1 :D
For unknown reason the http socket code is still unable to download files from dropbox, but from my own server things work fine. Will fix this in near future.
I consider the planned functionality done, except interface enhancements (mod select menu up/down arrow, gamepad support, additional informational icons for the larger mod icons, mouse wheel scroll limit), some more fixes here and there, and of course code cleanups ;)
The masterserver URL can be changed in usersettings.xml. Server chaining works too (via a <Server url="..."> tag in the mod list), limited to 3 hops, to prevent endless recursion or other possible abuse.

New version: http://dl.dropbox.com/u/22111385/Aquaria/NewMod_03.zip [see link in my sig instead]
(the old one will no longer work because i reorganized the XML file layout on the server)
Again, feedback is welcome.
C'mon guys, there must be some windows users out there, and not only Mac/Linux people who can't deal with exe files :P


EDIT:

forgot to mention that the downloadable Angry Li mod (all thx to Yogoda) does now work with this version. Basically, everything that can be downloaded from the interface works.

Alphasoldier, i hope it is ok for you that i made a downloadable package from your nude mod for testing. The effect of applying sprite patches (yours or the pirate mod) can be seen immediately on the title screen, which is kinda neat.

(And in case someone wonders why the image download is so slow, my server's on my home internet, occasionally not reachable, and the upload speed isn't so pretty)
Title: Re: Aquaria Open Source Project: Online Mod Database
Post by: Guy on July 12, 2011, 12:47:01 pm
For unknown reason the http socket code is still unable to download files from dropbox, but from my own server things work fine. Will fix this in near future.
Do you know what the issue there is? I've had some odd problems trying to access stuff on Dropbox servers too and never worked out why.
Title: Re: Aquaria Open Source Project: Online Mod Database
Post by: False.Genesis on July 12, 2011, 05:05:03 pm
Haven't yet figured out,  will need to dump the socket stream to figure this out.
My guess is that they either use a 30x redirect to another internal URL, or some sort of encrypted transfer via http.

Anyways, this is most likely a problem in my code, as i have implemented a very basic http socket myself not to have to rely on OS specific functions. Must be a bug or unhandled case there.


EDIT:
Found out. Super-stupid. When you expect "Content-Length: 12345" and the server sends "content-length: 12345" it won't work if you don't do case-insensitive string matching... Oh damn the standards and those who don't follow them accurately ::)
Fixed, now downloading from dropbox works too. Will up a new build once there is more new stuff than just this :P
Title: Re: Aquaria Open Source Project: Online Mod Database
Post by: False.Genesis on July 15, 2011, 05:28:45 am
Ha! ;D
(http://dl3.dropbox.com/u/22111385/Aquaria/modlist_dev/worldmap1_thumb.jpg) (http://dl3.dropbox.com/u/22111385/Aquaria/modlist_dev/worldmap1.jpg)
^ Native World maps in mods! Any graphics can be used, which is pretty nice.

Didn't even know the map screen has a hidden editor feature, that was a nice surprise.
Adding suport for this at the current state was just commenting out a line that blocks mods from opening the world map, and redirect map file saving to the mods directory if in a mod -- about 10 lines changed/added.
However, this depends a lot on the changes I already made, and couldn't be easily added to the icculus repo at this point (without throwing the other changes in as well).
It's still a bit wacky when it comes to positioning the Naija icon, but besides that, seems to work well.
I just totally don't understand how the zoom factor plays together with the exploration box size and other things on the map. This is really weird and needs digging.

So, any mod developers interested in this? :)


EDIT:

(http://dl3.dropbox.com/u/22111385/Aquaria/modlist_dev/worldmap2_thumb.jpg) (http://dl3.dropbox.com/u/22111385/Aquaria/modlist_dev/worldmap2.jpg)
^ Naija icon world map positioning done right, figured out how it works.  :) -- the calculations are really weird.


EDIT2:
Uploaded new build, link is now in my sig.

A bit of backgrond info about the world map editor:
Open world map and press TAB to enter editor mode.
Alt+Up/Down: Change scale
Shift+Up/Down: Change scale2
Only Up/Down/Left/Right: Move map part around
Press Ctrl to increase scale/move speed.
Press F2 in edit mode to save to data/worldmap.txt. (There is no indication that it saved, but if you have a loud harddisk you may hear it rattling a bit)
When editing a mod, it will save to its own directory instead.

Looking at the Naija map icon, scale causes the map part to expand, but the naija icon to move inwards.
Scale2 makes both move outwards uniformly.
A scale factor of exactly 4 and scale2 of about 1-2 seem good values to me.

Looking at data/worldmap.txt, the columns mean the following:

index |  map name (string# in stringbank.txt) | image name | layer | scale | gridX | gridY | pre-revealed | scale2

image name: the files from gfx/gui/worldmap/*.png but without extension.
layer: 0 mostly for open maps, 1 for caves. I think 0 is drawn first, then 1, ...
pre-revealed: used for the start maps -- when you start a new game, you can already see home waters although you haven't been there, for example.

Now, how to add a working world map to mods?

In your mod root dir, make a data folder, and create your initial worldmap.txt there.
gridX, gridY, scale and scale2 do not matter, as this can be set from the in-game editor. Just use 0 for the positions, 4 for scale, and 1 for scale2, as a start.

Mine looks like this (which i used for the screenshots):
Code: [Select]
0 1020 FINGERS 0 4.00162 -143.229 -253.862 1 1.35383
1 1020 BIGCAVE 0 4.00281 187.976 -190.119 1 1.23479
2 1020 TOP 0 4.00241 149.129 119.555 1 1.18679
3 1020 NAIJA 0 4.00102 527.481 -234.625 1 1.12416

Then, take your map template PNGs, copy them into a gfx/gui/worldmap directory in your mod's root dir, and change all the black to fully transparent. Save the map as 256x256 PNG.

Load up your mod, open the world map, and start moving the tiles into the right position, with the right scale. To select another tile, leave the editor mode for a sec, select the new tile, and enter editor again. Can't select another tile while the editor is on.

Later addition:
Don't forget to hit F2 in edit mode when done! (You have to be in edit mode, else it won't work. Also added a little overlay text to indicate it saved in the newer builds)

To properly init the Naija map gem, place the following script into your mod's scripts/maps/map_YOURFIRSTMAP.lua (yep, that version supports map_* and premap_* - scripts):
Code: [Select]
if not v then v = {} end

function init()
    -- just use anything here to prevent the gem beeing added twice.
    -- should be run on first init only.
    -- refer to map_naijacave.lua, near end of the file.
    if isStory(0) then
        pickupGem("Naija-Token", 1)
        setStory(1)
    end
end

I have updated my editor test mod with these changes. Re-download if you want to check it out.
For those preferring a direct mod .zip: There you go (http://dl.dropbox.com/u/22111385/Aquaria/fgtest_worldmap.zip).
Note that it requires the build linked in my sig. On older versions this won't work at all.
Title: Re: Aquaria Open Source Project: Online Mod Database
Post by: Guy on July 16, 2011, 12:03:59 am
Ah, awesome :)

We had some discussion of the world map here (http://www.bit-blot.com/forum/index.php?topic=1936.msg24418#msg24418) a while ago. I think the main difference between my interpretation and yours is the 'layer' value (I was trying to work it out before we had access to the source).
Anyway, great to see this available in mods now. If you can somehow extract all the necessary changes I think it would definitely be worthing sending this to icculus.
Title: Re: Aquaria Open Source Project: Online Mod Database
Post by: False.Genesis on July 16, 2011, 03:00:41 am
I plan to send a quite large patch to icculus for a 1.1.4 community version, just need to make sure its ok with Alec and everyone. And split that patch into smaller parts, lol.
Right now it depends on a little virtual file system library (https://github.com/fgenesis/ttvfs) that  i wrote, and could not be easily done without it; and i doubt anyone wants libraries that have not been proven to be absolutely stable. :-X
The patch (just game changes, not including my libraries) is now about 200KB large and has 7000 lines. Still nothing compared to achurch's changes, though :)

(I kind of feel like a cheater preparing a 1.1.4 release without explicitly asking first, but oh well... if noone picks this up, all will stick with 1.1.1 forever. Don't expect Alec to ever really touch his code again, tbh, so... forgive me).

achurch said on the mailing list he was currently rewriting the engine too (for the ipad port), and would eventualy release that as open source when he is done.
Now, problematic is that both changes will be totally incompatible.

I am willing to redo my patches once the "better" engine code is available, but that could be 1.1.5 then.
I think a new version is really needed, and fast, especially with the many script breaking changes that prevent compatible mods in the long term.
If everyone is going to make mods for 1.1.0-1.1.3 only, a newer version can never take off.

The advantage with my system is that mods have full control over the game, and can ship their own datafiles and everything, including recipes and stuff that was never doable, or must have been done by hand (see new recipes in Feral Beast mod, which as of now need to be copied by hand, and affect the main game as well). Also less code and directory / mod path fixing, but this isn't 100% done yet.

I do also plan to add more LUA interfaces and callbacks over time that give even better control over the game (how much damage naija takes, upgradeable energy shots, new forms with scripts, and so on.) Dont have any solid plan for this yet, just ideas. I'd thought something like modders asking for things and getting them as bleeding edge build instead of endless, complicated, and half-working LUA workarounds.
I'd like to make a really sick mod (hmm, a sequel?) someday, but i don't have time at all and too many other projects going on (besides university, that adds to it!), so my humble community contribution is C++ plumbing. There are not too many coders around here anyways,  from what i have seen.

Btw, have you tried soft-patching with my exe? Imho this can't be made any easier than it is now.

(Side note: Also going for new demo versions... win32, Linux, and Mac ones. But that's in the other topic already.
Someone just needs to update the website when time has come.)


EDIT:

Have read that topic a few times, actually. Really cool this was done witout touching the code, but its time to move on. With a long requested feature becoming available it is not necessary to stay with the old LUA-based workarounds unless absolute compatibility with the commercial engine is desired. Could always utilize both versions, depending on the version of the game the mod is loaded in.
Title: Re: Aquaria Open Source Project: Online Mod Database
Post by: Guy on July 16, 2011, 07:51:43 am
Nah, I'm on OS X so haven't tried any of your stuff yet. All sounds like really great progress though, so good on ya for doing it.
Shouldn't we have 1.2.0 before 1.4.0?

Just a thought, btw - it seems a bit unnecessary to have images for map templates and then again for the world map. Could you change it so they both use the same image files?
Title: Re: Aquaria Open Source Project: Online Mod Database
Post by: False.Genesis on July 16, 2011, 04:25:08 pm
1.1.2 is the version that comes with steam, and 1.1.3 the opensource version (from what i know).
So, these numbers are already taken :), but would be nice to get a comment from someone who actually knows the details.

Just a thought, btw - it seems a bit unnecessary to have images for map templates and then again for the world map. Could you change it so they both use the same image files?

Not really, the map templates are black/white only images of (2^n)x(2^n) pixels, while the map images are 256x256 white/transparent images. Technically it might work to translate the black areas to transparent and resize the image to 256x256, or even generate the map from the game's obstruction mask.  But both isn't worth the effort imho.
I removed the limitation of 256x256, but didn't test. Its the only size the game uses, up to now. If you have a close look at the map of the long part leading to Mithala, you will see there was a lot of upscaling done.

And anyways, with different images for the map screen you can do other neat things, like shade the map in different colors depending on the zone (kelp forest in green, norfair in red, ... :P), or hide certain spots from the world map.


EDIT:

Whoops. Messed up the version numbers and never noticed. Of course i meant 1.1.1 - 1.1.4, and so on.
Edited my earlier posts.

*should not post on forums under the influence of lack of sleep*
Title: Re: Aquaria Open Source Project: Online Mod Database
Post by: Daxar on February 25, 2014, 02:58:09 pm
Epic thread gravedigging time!

I juuust finished porting the Costume Mod, Big Energy Form Battle, and Ninja Form mods to the new scripting interface yesterday, and fgenesis uploaded them to his server. This should be all the mods that have been released so far, aside from some small WIP ones. Huzzah for download mirrors that work!

(https://dl.dropboxusercontent.com/u/31816885/photos/modlist.png)