Bit Blot Forum
Aquaria => Modding => Topic started by: FrancesF on March 16, 2011, 05:16:28 am
-
Hello,
First of all, thank you, Alec and Derek, for this beautiful game. I bought and played Aquaria in January. It took me three weeks because I don't generally play shooter games, but I enjoyed being in the Aquarian world so much it was worth the learning curve. It is simply an incredible game. The music, art work, pacing, challenges --everything works together to make it probably the best game I've ever played.
So now I am 2/3rds finished with a modest mod, and although I have figured out lots of things from reading the forum, perusing the wiki, and studying the other mods, there are many things I haven't been able to understand. I'm really liking this whole mod learning process-- from total mystification, to partial understanding. I haven't yet tackled lua but I can see that coming. . .
The mod under development is titled "Labyrinth". It's for people (like me) who like mazes, but I'm also including some other challenges.
A few of the things I can't get to work:
1) Warping within a map. I've followed the directions in the wiki, but apparently I'm doing something wrong. I can warp between maps, but not from one place to another within the same map. How do I do that?
2) Getting a 1024 x 1024 map to work correctly that is titled something other than "main." The maps show up fine in the editor, but when you try to play in them, you can only access a 512 x 512 segment. I've finessed this by calling my second map "mainmz" and my third map "maindeeps" but can anyone tell me how to access the full map without that gimmick?
3) When I use the node "pe bubbles 01" I get the little blurry bubbles as in the title screen. But in the native mod "pe bubbles 01" gives the nicely defined bubbles with highlights that react when Naija moves through them. How can I get the clearer bubbles?
Something I'd like to know:
Where does the script for an entity grab the graphic for that entity? Eventually I'd ilke to script new entities, but until I learn how, how do I put my own graphic on an existing one?
There's lots more, but that's a beginning. Thank you Alec and Derek also for the mod editor; it's just great! I've used Adobe Illustrator for years, and its actually easier to quickly create an environment in this editor than in Illustrator. And I'd like to express my admiration to Alphasoldier, TheBear, Dolphin's Cry, Yogoda, Ralph and Sarah Bergstrom for your excellent mods. They have inspired me to work on Labyrinth.
-
A few of the things I can't get to work:
1) Warping within a map. I've followed the directions in the wiki, but apparently I'm doing something wrong. I can warp between maps, but not from one place to another within the same map. How do I do that?
You need to use "warplocalnode" instead of "warp" as your node name. The format looks like:
warplocalnode TARGET-NODE in|out
where TARGET-NODE is the name of the node to warp to, and the last parameter is "in" if you're entering a room, "out" otherwise. (The last parameter is used to adjust Naija's position on the world map -- when warping to an "in" node, the world map uses Naija's previous position as the location to display rather than the current position, and holds it constant until the player warps to an "out" node. If you're warping between two "outside" parts of the map, this can be "out" in both places. This probably doesn't matter for mods since the world map isn't supported for them, but just for reference.)
Take a look at Mithalas01 in the original game data (use the Native mod (http://aquariawiki.ryanballantyne.name/wiki/index.php/Native_Mod) to load the game data in the scene editor) for an example of how it's used.
2) Getting a 1024 x 1024 map to work correctly that is titled something other than "main." The maps show up fine in the editor, but when you try to play in them, you can only access a 512 x 512 segment. I've finessed this by calling my second map "mainmz" and my third map "maindeeps" but can anyone tell me how to access the full map without that gimmick?
That sounds like a camera bounding issue. By default, the game constrains the camera to the size of the obstruction grid, which is generated from the map template file -- this means that if the right or bottom edge of your template is completely empty, the camera will be constrained to a smaller area. (This is based on reading the source code; I haven't actually tried creating a map from scratch myself.)
The screw-it-I-don't-care solution is to open your map file in a text editor and set the cameraConstrained attribute of the <Level> tag to 0:
<Level ... cameraConstrained="0" ... />
(add the attribute if it doesn't already exist, otherwise change the value that's already there). In this case, make sure you have enough buffer at the edges of the map so the player can't scroll off the edge.
3) When I use the node "pe bubbles 01" I get the little blurry bubbles as in the title screen. But in the native mod "pe bubbles 01" gives the nicely defined bubbles with highlights that react when Naija moves through them. How can I get the clearer bubbles?
Try "pe bubbles01" without the space between "bubbles" and "01". As a side note, you can check the textures used by any of the particle effects by looking in the data/particles directory (look for lines starting with "Texture =").
Something I'd like to know:
Where does the script for an entity grab the graphic for that entity? Eventually I'd ilke to script new entities, but until I learn how, how do I put my own graphic on an existing one?
The texture used by an entity is entirely up to the script itself. There are two primary ways of doing it:
- Specify the texture name in setupBasicEntity(). This is good for simple entities that only need a single texture -- see e.g. raspberry.lua from the game data (in scripts/entities).
- Use a sprite definition file with entity_initSkeletal(). This is good for more complex entities with multiple parts -- see e.g. grouper.lua from the game data. Sprite definition files are stored in data/animations, or in the "animations" directory of a mod.
Consequently, you have to either make a copy of the script and change the texture name, or else put a replacement texture in the "graphics" directory of your mod -- this naturally has to be the same size as the original.
-
Thanks, achurch!
1) Warping within the map is working really well, and being able to do that has solved a some problems with the flow of the mod.
2) Your map suggestion (cameraConstrained="0" in the map file) worked like a charm.
3) The new bubbles are looking fine. That was an easy fix!
I haven't investigated the entity graphics yet. Will report back when I do (probably with more questions).
New question: I'm trying to attach a couple of screen shots from "Labyrinth." The attachment window tells me that I'm limited to 128k, but I can't get .png, .gif, or jpegs under 128k to upload without getting an error message. Can someone help with this?
FrancesF
-
Just use an image hosting site like tinypic.com, photobucket, imageshack and link it to here.
-
Thank you, Alphasoldier. I uploaded a few screen shots to ImageShack.
(http://img703.imageshack.us/img703/9960/labyrinthmodicon.th.jpg) (http://img703.imageshack.us/i/labyrinthmodicon.jpg/)
(http://img35.imageshack.us/img35/6108/screenshot20110317at728.th.png) (http://img35.imageshack.us/i/screenshot20110317at728.png/)
(http://img6.imageshack.us/img6/5508/screenshot20110317at750.th.png) (http://img6.imageshack.us/i/screenshot20110317at750.png/)
(http://img195.imageshack.us/img195/9081/screenshot20110317at752.th.png) (http://img195.imageshack.us/i/screenshot20110317at752.png/)
(http://img220.imageshack.us/img220/4278/screenshot20110317at939.th.png) (http://img220.imageshack.us/i/screenshot20110317at939.png/)
(http://img219.imageshack.us/img219/3552/screenshot20110317at940.th.png) (http://img219.imageshack.us/i/screenshot20110317at940.png/)
(http://img17.imageshack.us/img17/5791/screenshot20110317at947.th.png) (http://img17.imageshack.us/i/screenshot20110317at947.png/)
Spent most of the day trying to get a new map to work correctly, and finally succeeded. I called it the Zen map, as it was a reproduction of the labyrinth at Chartres. It looked lovely, with the wall tiles from Song Cave, and a blue to light green gradation in the background. I thought it would be fun and serene to really get into the rhythm of swimming Naija through it without touching any walls. But it wasn't fun at all – just boring! Then it struck me – what was I thinking? It would be hard to be more in the moment then playing with Naija in the Veil! So I scrapped the whole thing.
Labyrinth will probably end up with four maps. Three are 3/4ths complete, and the fourth just begun. I still have some challenges, among them: getting the energy doors to work, getting the bosses to a) actually come alive, and b) not freeze the game when Naija kills them! Answers to these challenges are for sometime in the future; I'm not quite there yet.
Frances
-
Those screenshots look very well done indeed!
Particularly the areas with those spindly pillars in the mod icon, which I think capture the feel of the original game as well as any other area I've seen in any mod--without just reprising any of the areas in the original game. That is quite an accomplishment, and I very much anticipate seeing how the rest of your mod stands up!
-
I have to agree with Inyssius here and also say that I really love the ambiance of the last pic.
A tip on the pillars on the front layers in the first pic, use some kind of black smudge to make it look like they fade into the blackness instead of standing out on the front where it looks like they're pasted on there.
Oh and I hope you're blocking your fish tunnels with the "fishpass" node.
-
Yeah, looks very awesome! (And tough. ;))
-
Thank you, Inyssius, Alphasoldier, and Xiagan for your encouragement. It inspires me to keep going. Alphasoldier, that's a good suggestion about the pillers fading to black, and I did not realize there was a fishpass node. (I kind of wondered how that plump little fish was able to negotiate those narrow tunnels.) But now I've found it in Native mod and have put it on my maps. I can't test it because I haven't yet figured out how to get fish form working (Energy and Bind are working fine because I copied and pasted from the script file in Guert's mod.) I also haven't been able to figure out how to have Naija discover shield form. I can have her come into the game with it already in place by putting a line in the init file, which I just realized I could do for fish form also, but I'd like to have her discover these in-game. For both shield and fish, I've tried using every seemingly relevant node name and script I've been able to find in any of the mods, but so far nothing has worked. Help with that would be appreciated.
And here's another really stupid newbie question, that I'm embarrassed to ask, but I'm continually frustrated by it: people keep referring to a directory where they can find the graphic (gfx?) and other files from the game. How can I get to those files on my mac?
Inyssius, I'm also anticipating seeing how the rest of my mod stands up! And, I'm really looking forward to your first mod. . .
Frances
-
I don't have a mac, but I'm fairly sure that the folder is named gfx too.
Maybe this will help:
(On a Mac, you can do this by right-clicking the app, and selecting "Show Package Contents".)
-
I did not realize there was a fishpass node. (I kind of wondered how that plump little fish was able to negotiate those narrow tunnels.)
Just for the record, the fishpass node doesn't actually affect whether Naija can pass through a tunnel in fish form (that depends on the shape of the map itself). What it does do is bounce Naija back if she's not in fish form, thus preventing players from trying to squeeze their way in anyway and either breaking the sequence or getting stuck.
I also haven't been able to figure out how to have Naija discover shield form. I can have her come into the game with it already in place by putting a line in the init file, which I just realized I could do for fish form also, but I'd like to have her discover these in-game.
In the original game, Naija starts with the shield song, so there's no preexisting node for it; you'll have to write the script yourself. A really simple script (that didn't show any messages or anything) would look like:
function update(me, dt)
if not hasSong(SONG_SHIELD) then
if node_isEntityIn(me, getNaija()) then
learnSong(SONG_SHIELD)
end
end
end
Save that as "node_learnshieldsong.lua" (the "learnshieldsong" is the node name, and can be anything you want) in your mod's scripts directory, and create a node called "learnshieldsong" in your map; when Naija enters it, she'll learn the shield song.
If you want to see how Aquaria itself handles learning songs, look at e.g. node_songcavecrystal.lua (search for "learnSong").
And here's another really stupid newbie question, that I'm embarrassed to ask, but I'm continually frustrated by it: people keep referring to a directory where they can find the graphic (gfx?) and other files from the game. How can I get to those files on my mac?
There are actually two different names, which may be why you're confused. (: I assume you already know about the "graphics" directory for mods, but the game's own graphics are stored in a directory called "gfx" distributed as part of the program. I don't have the Mac version myself to check, but if you go to Finder, right-click the Aquaria program icon (in the Finder, not the Dock), and select "Show Package Contents", you should be able to find a "gfx" directory in there somewhere. If that doesn't work, try "Library/Application Support/Aquaria" from the top level of your hard drive.
-
Wow, what a treasure trove to get into the game files. I had a good day–successfully replaced the graphics on an entity; it doesn't look quite right yet, but it works! The "learnshieldsong" node works with the script that achurch suggested, and I was even able to add a hint line to it. Thank you!
-
Yuck, nothing but spam the last couple of days! Let's not let this forum die! :-[
Here's a new question: I'm trying to get the collectible treasures to work right. They do appear in Naija's inventory, but not in her home cave. And I've put the nodes (example "collectiblechest") where I want the treasures to show up. I'm probably overlooking something obvious. But what?
-
The treasures and costumes do not work in a mod like they do in a game. In playing Yogoda's Beauty of Aquaria mod I found some of the costumes appeared in the mini-map and could be put on later, and others appeared once when Naija discovered them (with the cute little changing-clothes silhouette script), then never again. We made a special treasure cave map with display stands in our Magic of Aquaria mod, attached to the home cave, where Naija can go look at them; the ones she hasn't found yet are seen in silhouette (see below). Naturally Yogoda made this happen; PM him and ask for details on scripting. The player gets a special reward for finding all 50 treasures, and a special trophy presentation with a tiny golden Naija statue as a "hood ornament". Right now I am trying to put the treasures around in our mod and having little luck, and Nightmare and I found that trying to collect the urchin costume crashes the game. I tried to put a costume in the treasure room and it won't appear. Please, Yogoda, find that apartment soon! I think part of the problem with putting the costumes (and transport turtles ) in is that I don't know how to add a round node; just the rectangular ones. Anyone know how to add a round node?
(http://i763.photobucket.com/albums/xx278/Yogoda/Magic%20of%20Aquaria/close-uptreasureroom.png)
This is a preliminary shot of the full treasure cave.
(http://i763.photobucket.com/albums/xx278/Yogoda/Magic%20of%20Aquaria/TreasureCavemap-1.png)
This is an in-game shot with some of the treasures collected and many uncollected.
-
You can change a rectangular node to round by hovering over it with your cursor, and pressing "y." Then you can re-size it just as usual.
I've been able to collect the urchin costume, and it shows up in Naija's inventory (the mini-map). I guess I should have her wear it for awhile and see if it also crashes my mod. I'd just like to be able to use some of the treasures from the game, as collecting them makes exploring down dead-end paths in a maze much more interesting. . .
Your treasure cave looks great. I'm really looking forward to playing "Magic."
-
Thanks for the round node info, FF. For treasures I used pendants and things from my collection (I have a jewelry website, with which I have NOT spammed the forums) on purpose because I figured the treasures from Aquaria would be too easy for people to find, and I hid the treasures in sneaky ways (color-wise). Below, before the collection of not-so-sneaky treasure (the entrance to the treasure cave is on the left, swimming into the greenery):
(http://i763.photobucket.com/albums/xx278/Yogoda/Magic%20of%20Aquaria/HomeCaveEntrancetoTreasureCave.png)
and after (message to let the player know how many treasures s/he has left to find):
(http://i763.photobucket.com/albums/xx278/Yogoda/Magic%20of%20Aquaria/Treasuremessage.png)
and a sneakier hidden treasure:
(http://i763.photobucket.com/albums/xx278/Yogoda/Magic%20of%20Aquaria/poisonfrogs.png)
I just think it is more fun to have new treasures in a mod.....
-
Make sure you have the actual LUA files for the collectible nodes in your MOD. You have to manually copy them all over as Aquaria doesn't look for node files in the vanilla directory. I did some custom stuff with the collectibletemplate.lua file in Sacrifice to move the items based on where the story is but I don't think you need that file. Let me know how it goes.
-
Thanks, I'll do that.
-
Labyrinth Mod update: Three of the four maps are finished (except for final tweaking) and pretty much ready to go. The fourth is about half done. I was pleased to finally solve the problem I was having with warping between maps, when I didn't want Naija to leave and enter at the same place. (Not much point to a maze if you can just exit the way you came in!) I finessed it by using small intermediate maps, and it's working well.
But I'm in need of some scripting help. I'd like to:
1) Make a node where the first time Naija is in it, if she has discovered fish form, there will be a line of text. She doesn't have to be wearing fish form, just have it in her inventory.
2) Make the collectible treasures work properly. They appear in Naija's inventory, but not in her home cave, where I have placed the nodes. I have added the collectible entity scripts and the collectible treasure node scripts to my mod script file, but that hasn't helped.
3) Modify the round virus script so that it migrates slowly downhill through a fairly narrow tunnel, while still rotating and shooting its poison darts.
4) Modify the dark jelly script so that a group of them in the same room are attracted to each other and bunch up closely, so Naija can not get through them.
Also I've got a good idea and graphic for a boss, but need a script . . . I'll trade artwork for scripts!
Frances
new screenshots:
(http://img90.imageshack.us/img90/7826/screenshot20110324at105.th.png) (http://img90.imageshack.us/i/screenshot20110324at105.png/)
(http://img641.imageshack.us/img641/5885/screenshot20110414at120z.th.png) (http://img641.imageshack.us/i/screenshot20110414at120z.png/)
(http://img31.imageshack.us/img31/5459/screenshot20110414at120.th.png) (http://img31.imageshack.us/i/screenshot20110414at120.png/)
-
Looks smooth and atmospheric. I like!
-
1) Make a node where the first time Naija is in it, if she has discovered fish form, there will be a line of text. She doesn't have to be wearing fish form, just have it in her inventory.
I think the hasSong(Song value) function is the important bit there. The value you're looking for should be SONG_FISHFORM = 10.
(http://img90.imageshack.us/img90/7826/screenshot20110324at105.th.png) (http://img90.imageshack.us/i/screenshot20110324at105.png/)
(http://img641.imageshack.us/img641/5885/screenshot20110414at120z.th.png) (http://img641.imageshack.us/i/screenshot20110414at120z.png/)
(http://img31.imageshack.us/img31/5459/screenshot20110414at120.th.png) (http://img31.imageshack.us/i/screenshot20110414at120.png/)
Holy shit! Those look really, really good.
-
Thanks, Xiagan and Inyssius! :)
-
I want to thank TheBear for helping with my scripts. He's already fixed the starting and ending comments, and found a way to make the treasures appear in Naija's home immediately after she finds them without the map having to reload. It's just excellent–and really helps with the framework of the mod.
-
Are you guys doing the scripts that they are compatible with the current 1.1.3 release, or with the newest changes in the icculus repository? No idea if you have been following the mailing list, but the lua state changes by achurch have been added, and should an update based on the newest code be published, your mod will likely be incompatible, unless you or someone takes the time to adapt it.
If you are not up to date with what has changed, read this: http://hg.icculus.org/icculus/aquaria/rev/bfa9cdfcfb90
Not sure if this will work, but a way to have the v = getVars() stuff working on 1.1.3 might be to define that function manually in some include file, and remove it should an update come. But i am (yet) no lua expert, so i don't know how this would be done to actually preserve states across entities.
EDIT: Or maybe just do v = {}, and change it to v = getVars() later ...
-
So what does this mean for those of us actively making mods? I gather there are at least three of us, Sindhi, Inyssius, and myself, who are quite involved at present.
-
Nothing if you don't plan on using the update.
I find it rather weird myself that mods would stop working when pushing through an update, I don't think anyone would want that. Only adding functions, optimizing them, not removing stuff should not break anything, unless you ARE doing stuff like that... or am I thinking too narrow minded about this?
-
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.
-
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.
-
Update on Labyrinth Mod:
Spent hours and hours the past two weeks on the "find energy" map, which I had optimistically thought was practically finished. I had quite a sense of elation on placing the final entity and swimming out. I've been so immersed in it that I've lost the ability to judge if it's too easy, too hard, too frustrating, too??? Wished for the hundredth time that someone in my immediate group of family/friends was into computer games in general and Aquaria in particular!
Don't know if it's of interest to anyone, but the abyss octopus's laser beam destroys verse eggs.
Some recent screenshots:
(http://img38.imageshack.us/img38/544/screenshot20110604at111.th.png) (http://imageshack.us/photo/my-images/38/screenshot20110604at111.png/)
(http://img824.imageshack.us/img824/1412/screenshot20110604at115.th.png) (http://imageshack.us/photo/my-images/824/screenshot20110604at115.png/)
(http://img689.imageshack.us/img689/544/screenshot20110604at111.th.png) (http://imageshack.us/photo/my-images/689/screenshot20110604at111.png/)
(http://img228.imageshack.us/img228/9281/screenshot20110604at114.th.png) (http://imageshack.us/photo/my-images/228/screenshot20110604at114.png/)
(http://img121.imageshack.us/img121/7245/screenshot20110604at115u.th.png) (http://imageshack.us/photo/my-images/121/screenshot20110604at115u.png/)
(http://img543.imageshack.us/img543/4650/screenshot20110605at123.th.png) (http://imageshack.us/photo/my-images/543/screenshot20110605at123.png/)
-
(Totally forgot to post)
The pictures you posted look awesome. From what i see i guess you are using lots of parallax layering, right? I totally <3 parallax. ^^
Did you make the wall textures and some of the plants yourself? I cant remember seeing these before.
And the 2nd picture, what is the red stuff in the background? Microscrope images of pollen, perhaps? It fits well :)
Hows your progress in general? From the amount of awesome scenery (http://tvtropes.org/pmwiki/pmwiki.php/Main/SceneryPorn) (:P) you already posted it looks like you may as well be almost finished, at least with the parts you have shown :o
-
Yes, I finally got parallax looking right in some areas. There are places, though, where it just doesn't work out; sometimes it looks as though what you have put in the background is following you around. Very disconcerting!
I'm trying to make most of the scenery and tiles from scratch on three of the four maps. Since I'm not yet up to par on scripting, the mod has got to look interesting enough to pull people in and make them want to keep exploring.
The red stuff in the background could be pollen, or a virus, or whatever. At least it's not looking like balls of yarn any more. :P
Progress: Main map is finished, find energy map is finished, maze map is 7/8th finished, and strange map is 1/2 (maybe) finished.
Thanks for the link to TVtropes. :D Yep, I'm aiming for scenery porn.