Hey, we have forums!

Author Topic: Aquaria Open Source Project: Online Mod Database  (Read 82766 times)

0 Members and 2 Guests are viewing this topic.

Offline Dolphin's Cry

  • Bit Bit
  • ****
  • Posts: 61
    • View Profile
Re: Aquaria Open Source Project: Online Mod Database
« Reply #60 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".
Can you hear the dolphin's cry?

Offline frostyfrog

  • Bit
  • ***
  • Posts: 43
  • Lonely Bit :P
    • View Profile
Re: Aquaria Open Source Project: Online Mod Database
« Reply #61 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.
« Last Edit: June 02, 2010, 01:26:10 am by frostyfrog »
Linux to play Aquaria and for power, Windows for my dev stuff, Chromium for school surfing. I can't browse the grade system >:D. Join me on the bit-blot IRC channel.

Offline GMMan

  • Giant Bit
  • ******
  • Posts: 254
  • "Uh... I'll be right here after you're done..."
    • View Profile
Re: Aquaria Open Source Project: Online Mod Database
« Reply #62 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.
Follow me on Twitter: @gmman_bzflag

Offline frostyfrog

  • Bit
  • ***
  • Posts: 43
  • Lonely Bit :P
    • View Profile
Re: Aquaria Open Source Project: Online Mod Database
« Reply #63 on: June 02, 2010, 09:14:38 pm »
Committed.
Linux to play Aquaria and for power, Windows for my dev stuff, Chromium for school surfing. I can't browse the grade system >:D. Join me on the bit-blot IRC channel.

Offline False.Genesis

  • Administrator
  • Super Bit
  • **********
  • Posts: 461
  • PRESS COMPILE FOR RAINBOWS
    • View Profile
    • My source code!
Re: Aquaria Open Source Project: Online Mod Database
« Reply #64 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.


^ Fetching online mods list and images (see firefox dir list in the background)


^ Got it! Downloading Angry Li.


^  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

Offline GMMan

  • Giant Bit
  • ******
  • Posts: 254
  • "Uh... I'll be right here after you're done..."
    • View Profile
Re: Aquaria Open Source Project: Online Mod Database
« Reply #65 on: July 04, 2011, 03:23:45 am »
Got your network threading implemented?
Follow me on Twitter: @gmman_bzflag

Offline False.Genesis

  • Administrator
  • Super Bit
  • **********
  • Posts: 461
  • PRESS COMPILE FOR RAINBOWS
    • View Profile
    • My source code!
Re: Aquaria Open Source Project: Online Mod Database
« Reply #66 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.)
« Last Edit: July 05, 2011, 01:13:26 am by False.Genesis »

Offline False.Genesis

  • Administrator
  • Super Bit
  • **********
  • Posts: 461
  • PRESS COMPILE FOR RAINBOWS
    • View Profile
    • My source code!
Re: Aquaria Open Source Project: Online Mod Database
« Reply #67 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, 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.
« Last Edit: July 15, 2011, 03:39:18 pm by False.Genesis »

Offline GMMan

  • Giant Bit
  • ******
  • Posts: 254
  • "Uh... I'll be right here after you're done..."
    • View Profile
Re: Aquaria Open Source Project: Online Mod Database
« Reply #68 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...
Follow me on Twitter: @gmman_bzflag

Offline False.Genesis

  • Administrator
  • Super Bit
  • **********
  • Posts: 461
  • PRESS COMPILE FOR RAINBOWS
    • View Profile
    • My source code!
Re: Aquaria Open Source Project: Online Mod Database
« Reply #69 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...

Offline GMMan

  • Giant Bit
  • ******
  • Posts: 254
  • "Uh... I'll be right here after you're done..."
    • View Profile
Re: Aquaria Open Source Project: Online Mod Database
« Reply #70 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).
Follow me on Twitter: @gmman_bzflag

Offline False.Genesis

  • Administrator
  • Super Bit
  • **********
  • Posts: 461
  • PRESS COMPILE FOR RAINBOWS
    • View Profile
    • My source code!
Re: Aquaria Open Source Project: Online Mod Database
« Reply #71 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)
« Last Edit: July 15, 2011, 03:38:51 pm by False.Genesis »

Offline Guy

  • Bit Bit
  • ****
  • Posts: 62
    • View Profile
Re: Aquaria Open Source Project: Online Mod Database
« Reply #72 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.

Offline False.Genesis

  • Administrator
  • Super Bit
  • **********
  • Posts: 461
  • PRESS COMPILE FOR RAINBOWS
    • View Profile
    • My source code!
Re: Aquaria Open Source Project: Online Mod Database
« Reply #73 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
« Last Edit: July 15, 2011, 02:32:29 pm by False.Genesis »

Offline False.Genesis

  • Administrator
  • Super Bit
  • **********
  • Posts: 461
  • PRESS COMPILE FOR RAINBOWS
    • View Profile
    • My source code!
Re: Aquaria Open Source Project: Online Mod Database
« Reply #74 on: July 15, 2011, 05:28:45 am »
Ha! ;D

^ 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:


^ 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.
Note that it requires the build linked in my sig. On older versions this won't work at all.
« Last Edit: July 17, 2011, 10:49:35 pm by False.Genesis »