Hey, we have forums!

Author Topic: Creating a new mod–here are a few questions  (Read 36180 times)

0 Members and 1 Guest are viewing this topic.

Offline FrancesF

  • Bit Bit
  • ****
  • Posts: 83
    • View Profile
Creating a new mod–here are a few questions
« 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. 

Offline achurch

  • Bit Bit
  • ****
  • Posts: 90
    • View Profile
Re: Creating a new mod–here are a few questions
« Reply #1 on: March 16, 2011, 12:44:41 pm »
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 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.

Offline FrancesF

  • Bit Bit
  • ****
  • Posts: 83
    • View Profile
Re: Creating a new mod–here are a few questions
« Reply #2 on: March 17, 2011, 06:17:53 am »
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

Offline Alphasoldier

  • Dream Bit
  • **********
  • Posts: 1810
  • Zero Suit!
    • View Profile
Re: Creating a new mod–here are a few questions
« Reply #3 on: March 17, 2011, 05:36:46 pm »
Just use an image hosting site like tinypic.com, photobucket, imageshack and link it to here.
God sees and knows everything, but at least he won't gossip about it.

Offline FrancesF

  • Bit Bit
  • ****
  • Posts: 83
    • View Profile
Re: Creating a new mod–here are a few questions
« Reply #4 on: March 18, 2011, 05:15:54 am »
Thank you, Alphasoldier.  I uploaded a few screen shots to ImageShack. 









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

Offline Inyssius

  • Extra Bit
  • *****
  • Posts: 118
  • Duke Nukem Foreveresque
    • View Profile
Re: Creating a new mod–here are a few questions
« Reply #5 on: March 19, 2011, 02:52:29 am »
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!

Offline Alphasoldier

  • Dream Bit
  • **********
  • Posts: 1810
  • Zero Suit!
    • View Profile
Re: Creating a new mod–here are a few questions
« Reply #6 on: March 19, 2011, 10:47:43 am »
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.
God sees and knows everything, but at least he won't gossip about it.

Offline Xiagan

  • Global Moderator
  • Dream Bit
  • **********
  • Posts: 1452
  • "Does absolution lie above the waves?"
    • View Profile
Re: Creating a new mod–here are a few questions
« Reply #7 on: March 19, 2011, 12:37:26 pm »
Yeah, looks very awesome! (And tough. ;))
"Sire, I had no need of that hypothesis." (Laplace)

~ www.xiagan.net ~

Offline FrancesF

  • Bit Bit
  • ****
  • Posts: 83
    • View Profile
Re: Creating a new mod–here are a few questions
« Reply #8 on: March 20, 2011, 06:54:43 am »
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

Offline Xiagan

  • Global Moderator
  • Dream Bit
  • **********
  • Posts: 1452
  • "Does absolution lie above the waves?"
    • View Profile
Re: Creating a new mod–here are a few questions
« Reply #9 on: March 20, 2011, 12:48:21 pm »
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".)
"Sire, I had no need of that hypothesis." (Laplace)

~ www.xiagan.net ~

Offline achurch

  • Bit Bit
  • ****
  • Posts: 90
    • View Profile
Re: Creating a new mod–here are a few questions
« Reply #10 on: March 20, 2011, 12:59:26 pm »
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.

Offline FrancesF

  • Bit Bit
  • ****
  • Posts: 83
    • View Profile
Re: Creating a new mod–here are a few questions
« Reply #11 on: March 21, 2011, 03:48:22 am »
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! 

Offline FrancesF

  • Bit Bit
  • ****
  • Posts: 83
    • View Profile
Re: Creating a new mod–here are a few questions
« Reply #12 on: April 11, 2011, 03:36:20 pm »
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?


Offline Sindhi

  • Giant Bit
  • ******
  • Posts: 296
    • View Profile
    • Bindhu Artisan Jewelry
Re: Creating a new mod–here are a few questions
« Reply #13 on: April 11, 2011, 07:15:46 pm »
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?



This is a preliminary shot of the full treasure cave.



This is an in-game shot with some of the treasures collected and many uncollected.
"You are the sky. Everything else is just the weather."  Pema Chodron

Offline FrancesF

  • Bit Bit
  • ****
  • Posts: 83
    • View Profile
Re: Creating a new mod–here are a few questions
« Reply #14 on: April 11, 2011, 08:12:46 pm »
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."