Bit Blot Forum

Aquaria => Modding => Topic started by: Maria on January 14, 2009, 04:15:09 am

Title: Hi, I have questions.
Post by: Maria on January 14, 2009, 04:15:09 am
Hi, I really don't know where to start talking/typing.

So I will introduce myself.
My name is Maria. (wish I could of put that as my User name but I didn't thought about it twice. D:)
And I really enjoyed the game. I have had a wonderful time playing it, the art and the story is very beautiful as well.
At first, I wasn't sure if it was going to be fun, but my curiosity won my mind.

Lately I have being thinking of making games, but I wasn't sure. When I saw this game and it had that Modding. I was very surprised.
I wanted to try and see if I was some what good at it and be patient about it. I am going to ask as many questions to make sure I understand it. So please bare with me.

Sometimes I need to be explained many times, and I a mean MANY, to understand just one thing.

My first question is, How do you make a map? what program? is it paint?
I have seen some where in the forums that it's black and white with the little areas.

Thank you so much and I hope you make more games like this. :)
Title: Re: Hi, I have questions.
Post by: Danger Mouse on January 14, 2009, 05:12:14 am
I suggest using the search feature to find answers to your questions about starting with modding as they have all already been answered.

It doesn't matter what art program you use to create the map image. But there are specifics here already posted on what size dimention in pixels the images can be, as well as what colors to select, ie white (RGB 255,255,255) for travelable areas and black (RGB 0, 0, 0) for non-travelable areas. There's an example in the _mods\aquariatemplate\maptemplates folder. That should give you an idea.

Glad to see another interested in modding! :) Good luck, and feel free to ask questions that you absoluately can't find an answer to. :)
Title: Re: Hi, I have questions.
Post by: Chibi on January 14, 2009, 05:52:11 am
Also, you can change your username by entering your profile and selecting "Account Related Settings." Welcome to the forums, Maria!  :)
Title: Re: Hi, I have questions.
Post by: Maria on January 14, 2009, 06:08:54 am
I suggest using the search feature to find answers to your questions about starting with modding as they have all already been answered.

It doesn't matter what art program you use to create the map image. But there are specifics here already posted on what size dimention in pixels the images can be, as well as what colors to select, ie white (RGB 255,255,255) for travelable areas and black (RGB 0, 0, 0) for non-travelable areas. There's an example in the _mods\aquariatemplate\maptemplates folder. That should give you an idea.

Glad to see another interested in modding! :) Good luck, and feel free to ask questions that you absoluately can't find an answer to. :)

Ooooooooh! Thank you!
I do have another question.
I was practicing on the Mod map, and it said that "T" flips.
I tried it on one of the fish that points to the left, but it doesn't flip to the right.
It does flip, but it doesn't when I past it.

Does it work on only non active objects?

Also, when I try to point the fish looking up it still goes left to right. Did I miss something?  :-X

Quote from: Chibi
Also, you can change your username by entering your profile and selecting "Account Related Settings." Welcome to the forums, Maria!   :)
Oh! that is awesome, thank you!
Title: Re: Hi, I have questions.
Post by: Edwards on January 14, 2009, 06:43:33 am
I was practicing on the Mod map, and it said that "T" flips.
I tried it on one of the fish that points to the left, but it doesn't flip to the right.
"T" will only flip tiles horizontally, not entities.  There's no way that I am aware of to flip entities, such as fish, in the editor.

Also, when I try to point the fish looking up it still goes left to right. Did I miss something?  :-X
No, you didn't miss anything.  In order to make that type of fish go up and down (or any direction other than left and right) you would need to modify its script file.  Unless you already have some experience with programming, I'd suggest holding off on that until you know the editor a bit better.  If you want to try it, though, copy a script (such as crotoid.lua, which is the fish you're talking about) from the data/scripts/entities folder into the mod's scripts folder, and start modifying it in any text editor.  You can find an introduction to Lua (the scripting language the game uses) here (http://www.lua.org/pil/), and a quick introduction to how the game uses Lua (along with several other mod-making subjects) here (http://www.bit-blot.com/aquaria/mods/modguide.html).

- Edwards
Title: Re: Hi, I have questions.
Post by: Maria on January 14, 2009, 07:09:32 am
Also, when I try to point the fish looking up it still goes left to right. Did I miss something?  :-X
No, you didn't miss anything.  In order to make that type of fish go up and down (or any direction other than left and right) you would need to modify its script file.  Unless you already have some experience with programming, I'd suggest holding off on that until you know the editor a bit better.  If you want to try it, though, copy a script (such as crotoid.lua, which is the fish you're talking about) from the data/scripts/entities folder into the mod's scripts folder, and start modifying it in any text editor.  You can find an introduction to Lua (the scripting language the game uses) here (http://www.lua.org/pil/), and a quick introduction to how the game uses Lua (along with several other mod-making subjects) here (http://www.bit-blot.com/aquaria/mods/modguide.html).

- Edwards


Um.. I think I will just leave it be. I don't know much of programing things yet and I don't want to mess up things, hehe. But thank you!

Okay, I have made my Black square with white background, how do I know how big the rooms or passage ways should be? Because I don't want to make a  room to be too big nor too small. Do I just guess? I know silly question.  :-X
Title: Re: Hi, I have questions.
Post by: Edwards on January 14, 2009, 07:52:12 am
Um.. I think I will just leave it be. I don't know much of programing things yet and I don't want to mess up things, hehe.
I don't blame you.  I know what I'm doing, and I've managed to accidentally make an entity that consistently crashes the game one second after you hit it. ::)  You can do quite a lot with the built-in entities, especially if you don't feel like you need to make new bosses.

Okay, I have made my Black square with white background, how do I know how big the rooms or passage ways should be? Because I don't want to make a  room to be too big nor too small. Do I just guess? I know silly question.  :-X
Mostly just guess.  50 pixels in an image editor ends up about the height of the screen at normal swimming zoom, if that helps.  I'd guess a normal passage at being closer to the 20-pixel range.  Play around in that range, and see what you like.

Also, don't forget that once you've made the template file, you'll need to tell the editor to regenerate the level from the template.

- Edwards
Title: Re: Hi, I have questions.
Post by: Maria on January 14, 2009, 08:31:16 am

Okay, I have made my Black square with white background, how do I know how big the rooms or passage ways should be? Because I don't want to make a  room to be too big nor too small. Do I just guess? I know silly question.  :-X
Mostly just guess.  50 pixels in an image editor ends up about the height of the screen at normal swimming zoom, if that helps.  I'd guess a normal passage at being closer to the 20-pixel range.  Play around in that range, and see what you like.

Also, don't forget that once you've made the template file, you'll need to tell the editor to regenerate the level from the template.

- Edwards
Oh, I thought you just make the map and save it in the maptemplate file and that is it. Do I PM him?
Title: Re: Hi, I have questions.
Post by: Edwards on January 14, 2009, 09:05:23 pm
To create a new map template:
1) Make a new image (or modify an existing maptemplate).  This image must be square, with a side length of 2^n pixels (256x256, 512x512, and 1024x1024 are good sizes).
2) Fill the image in with black, and then draw your map in white.  Widths: 50 pixels seems to be about the size of the screen, 1-3 pixels is about the right size for a fish passage.  If you open a map in the editor and delete the tiles along the border, you can see how large a pixel ends up.
3) Save the image as [mapname].png in your mod's maptemplates folder, where [mapname] is the name of one of your mod's maps (those are saved in the maps folder, as xml files).
4) Launch Aquaria, load your mod, and load the map you created a template for (if you're working with a copy of the aquariatemplate mod, the level "template" is loaded by default).
5) Go to the menu, and select the option "Regen rock from maptemplate".  This will change the outline of the map to match your template image, but will not affect anything else you've placed in the level.

- Edwards
Title: Re: Hi, I have questions.
Post by: Danger Mouse on January 14, 2009, 11:23:23 pm
I would just stick with a file dimension of 1024x1024 for your maps, and btw, you can't have larger than 1024x1024, the editor doesn't support it, it automatically clips it to the 1024x1024 of the left bottom most portion of the image. It really doesn't cut down loading times having a smaller size map template. The only thing that will slow down the map load time is how many tiles and entities are loaded for the map.
Title: Re: Hi, I have questions.
Post by: Maria on January 15, 2009, 10:50:48 am
To create a new map template:
1) Make a new image (or modify an existing maptemplate).  This image must be square, with a side length of 2^n pixels (256x256, 512x512, and 1024x1024 are good sizes).
2) Fill the image in with black, and then draw your map in white.  Widths: 50 pixels seems to be about the size of the screen, 1-3 pixels is about the right size for a fish passage.  If you open a map in the editor and delete the tiles along the border, you can see how large a pixel ends up.
3) Save the image as [mapname].png in your mod's maptemplates folder, where [mapname] is the name of one of your mod's maps (those are saved in the maps folder, as xml files).
4) Launch Aquaria, load your mod, and load the map you created a template for (if you're working with a copy of the aquariatemplate mod, the level "template" is loaded by default).
5) Go to the menu, and select the option "Regen rock from maptemplate".  This will change the outline of the map to match your template image, but will not affect anything else you've placed in the level.

- Edwards

Thank you!
I understand now.
Sorry that I haven't responded. Got busy.

Um, like this? map (http://i289.photobucket.com/albums/ll217/Onwas_photos/MariasMapTest2.png)


Edit:
Hmmm... for some reason it wont let me use the map. I keep getting  red X's.
This is so embarrassing. I guess I don't understand it then. D:

I am confused. :-X :-[
Title: Re: Hi, I have questions.
Post by: Chibi on January 15, 2009, 12:05:49 pm
That happened to me a lot when I fiddled around with the Aquaria mod files - it's probably a mistake in how you installed the mod.
Title: Re: Hi, I have questions.
Post by: Edwards on January 15, 2009, 09:48:24 pm
A few points:
1) Make sure that the maptemplate image has exactly the same name as the map you want to use it for.  So, if the map name is "template", using the map file "template.xml", then the maptemplate image should be named "template.png".  My guess, based on testing your image myself, is that this is your problem.
2) Supposedly, the game is quite picky about the size of the image- the image you posted is 510x510, not 512x512.  That said, my version of the game (1.1.0 for MacOS) used it just fine.
3) When I tested the maptemplate, the game gave a warning about "png color depth ( < 3 bit) not supported", although this does not appear to have prevented it from working.  What program did you use to make the image, and did you tell it to use any specific settings when saving?
4) The image should be pure black-and-white- yours has bits of grey along the endges of most of your lines.  Once again, this didn't prevent the game from using the image, but I don't know just how it handles greys.  If your image editor has a "convert to monotone" feature, using it might be a good idea, at least if you care about the pixel-level details of your map.

- Edwards
Title: Re: Hi, I have questions.
Post by: Maria on January 15, 2009, 11:21:30 pm
A few points:
1) Make sure that the maptemplate image has exactly the same name as the map you want to use it for.  So, if the map name is "template", using the map file "template.xml", then the maptemplate image should be named "template.png".  My guess, based on testing your image myself, is that this is your problem.
2) Supposedly, the game is quite picky about the size of the image- the image you posted is 510x510, not 512x512.  That said, my version of the game (1.1.0 for MacOS) used it just fine.
3) When I tested the maptemplate, the game gave a warning about "png color depth ( < 3 bit) not supported", although this does not appear to have prevented it from working.  What program did you use to make the image, and did you tell it to use any specific settings when saving?
4) The image should be pure black-and-white- yours has bits of grey along the endges of most of your lines.  Once again, this didn't prevent the game from using the image, but I don't know just how it handles greys.  If your image editor has a "convert to monotone" feature, using it might be a good idea, at least if you care about the pixel-level details of your map.

- Edwards

I know what is the problem.  :-[

I don't know what is XML? I should of asked that long time ago.  :'(
Sorry.
And thank you so much for taking the time on helping me!
Title: Re: Hi, I have questions.
Post by: Edwards on January 16, 2009, 12:01:53 am
I don't know what is XML? I should of asked that long time ago.  :'(
XML is just a text-based format for organizing data.  In Aquaria mods, it's used to store all the information about maps, animations, and a few other minor things.  You can edit an XML file in any text editor.  You don't need to actually know much of anything about it to do basic map-editing, as the editor will automatically make the XML files when you save your map.  All you really need to do is make sure that an XML file exists in the maps folder of your mod for each map you have.

You can get a basic map XML file in one of two ways:
1) Duplicate the existing template.xml file from the aquariatemplate mod, and rename it to whatever you want your map name to be.  This is the easiest method,
2) Create one from scratch, following the instructions on this page (http://www.bit-blot.com/aquaria/mods/maps.html) (also contains useful information if you want to change things in a map like the music, background color, etc.).

My personal recommendation for figuring out how things work for modding is to just make a backup copy of an existing mod, then start opening up files, changing them, and reloading the mod to see what changed.  Occasionally this will cause the mod to not load, or crash the game- when that happens, just copy over whatever file you changed from your backup, and try something different.

- Edwards
Title: Re: Hi, I have questions.
Post by: Maria on January 16, 2009, 02:13:36 am
I don't know what is XML? I should of asked that long time ago.  :'(
XML is just a text-based format for organizing data.  In Aquaria mods, it's used to store all the information about maps, animations, and a few other minor things.  You can edit an XML file in any text editor.  You don't need to actually know much of anything about it to do basic map-editing, as the editor will automatically make the XML files when you save your map.  All you really need to do is make sure that an XML file exists in the maps folder of your mod for each map you have.

You can get a basic map XML file in one of two ways:
1) Duplicate the existing template.xml file from the aquariatemplate mod, and rename it to whatever you want your map name to be.  This is the easiest method,
2) Create one from scratch, following the instructions on this page (http://www.bit-blot.com/aquaria/mods/maps.html) (also contains useful information if you want to change things in a map like the music, background color, etc.).

My personal recommendation for figuring out how things work for modding is to just make a backup copy of an existing mod, then start opening up files, changing them, and reloading the mod to see what changed.  Occasionally this will cause the mod to not load, or crash the game- when that happens, just copy over whatever file you changed from your backup, and try something different.

- Edwards
OH! MY! GOODNESS!
I GOT IT!!!!

Thank you!!!
This is so AWESOME!
Title: Re: Hi, I have questions.
Post by: Chibi on January 16, 2009, 02:18:24 am
Haha! Good luck Marian.  :)
Title: Re: Hi, I have questions.
Post by: Maria on January 16, 2009, 02:27:20 am
I have another question, how do you make the water level down?
Title: Re: Hi, I have questions.
Post by: Danger Mouse on January 16, 2009, 02:43:57 am
in the top line for the maps xml file you will find the line to edit for the water level.
Title: Re: Hi, I have questions.
Post by: Maria on January 16, 2009, 03:08:19 am
in the top line for the maps xml file you will find the line to edit for the water level.
I'm sorry, I don't understand. :(
In the game?
Title: Re: Hi, I have questions.
Post by: Edwards on January 16, 2009, 06:05:27 am
I'm sorry, I don't understand. :(
In the game?
To make the water level change in-game, you'll need to make a script that changes it.  I'd suggest creating a new text file named "node_movewater.lua" (do NOT allow your text editor to add a .txt to the end!), and putting in the following code:

dofile("scripts/entities/EntityInclude.lua")

function init(me)
   node_setCursorActivation(me, true)
end

-- The following code runs when you right-click on this node:
function activate(me)
   level = getWaterLevel() -- Get the current water level
   
   -- Check whether the water level is above or below the 5000 line along the vertical axis.
   if level < 5000 then
      -- If the level is less than 5000 (which means that on-screen it is higher
      -- than the map's centerline, at least for a 512x512 map), lower the water level.
      setWaterLevel(6000) --
   else
      -- Otherwise, raise the water level.
      setWaterLevel(level - 100)
   end
end


You will then need to place a node in the level, named "movewater" (without the quotes), save the level, and reload it.  You should then be able to click on that node and have the water level change.  Play around with this code, and see what happens if you change various values.

Also, you may need to set the water level in the map XML file to some level other than "0", as if the water level is "0", there won't be a surface for the script to move.  To do this, open up the map XML file in a text editor, an somewhere on the first line, there should be a bit that says: waterLevel="0"
Change this to any positive number; 7000 may be reasonable.  Try a few different numbers to see where they put the water level.

- Edwards
Title: Re: Hi, I have questions.
Post by: Hiro on January 16, 2009, 11:35:23 am
Haha, I think Marian wanted to know where DangerMouse was suggesting, not how to do it in game specifically. xD But thats a pretty nice code there anyway.
I'll have a go at simplifying:

Marian, you know the XML file that you had to create to make your map? If you open it in notepad (or any other text editor) then you should find at the top line that looks like this:
Quote
<Level tileset="energytemple" waterLevel="0" gradTop="0.6 0.1 0.1" gradBtm="0.1 0 0" gradient="1" parallax="0.5 0.55 0.6" music="miniboss" sceneColor="1 0.7 0.8" />

The bit in red is the part we want to look at, it should be the second parameter from the left. The teal number there, '0', is the number you want to change if you want to have a water level. If it is a number other than 0 you will have a water line. The higher the number, the lower the water level will be.
If you experiment a little you can see where each number makes the water level go, and find the number you want to use.

Say for example you wanted it to be at 4000, you would make the line look something like this:
Quote
<Level tileset="energytemple" waterLevel="4000" gradTop="0.6 0.1 0.1" gradBtm="0.1 0 0" gradient="1" parallax="0.5 0.55 0.6" music="miniboss" sceneColor="1 0.7 0.8" />
And then save the XML file. Next time you load your map in the editor it should have a water level somewhere.
Title: Re: Hi, I have questions.
Post by: Maria on January 16, 2009, 01:15:06 pm
I actually want to scream.
I feel like I am going some where! :D

Thank you so much guys!
And I mean every one, thank you so much!

I have to make notes of this.
So I don't forget, hehe.

Anyways, I will ask more questions when they come. :)
I am going to practice on the things that I know right now.

Again, thank you so much!
I will be back. :P
Title: Re: Hi, I have questions.
Post by: Danger Mouse on January 17, 2009, 07:34:51 am
Hey, Hiro, thanks so much for expanding on it, I was at work and don't have Aquaria on the computer there to be able to dig the exact information while I was writing a response to help out. Anyways, Maria, sorry that I was confusing and couldn't convey enough information for you. I'm glad that you got it solved now though! And Edwards, that is bad*ss. We need a threads section just for your scripts! :) Kudos!
Title: Re: Hi, I have questions.
Post by: Maria on January 17, 2009, 05:47:25 pm
It's okay, Danger Mouse. I appreciate that you were trying to help me. :)

And yes I came for more questions.

I noticed a while ago (though I didn't wanted to ask yet till I knew how to warp to another map, water level, and making maps) an Animation Editing. How do you put/make them? because when it's on naija, there is a bright light in the middle.

And when I click to move something, it only moves her arm.
But the bright light doesn't let me see if I put her arm correctly back to her body.


Title: Re: Hi, I have questions.
Post by: Particlese on January 17, 2009, 09:48:08 pm
The bright spot on the middle of Naija is part of one of her forms, and it only shows up then.

Pressing up or down on the keyboard selects different body parts, and then you can move them around with the mouse.  The left mouse button moves parts, and the right one rotates them.

Pressing left/right on the keyboard selects the previous/next "key" (or "key frame") in the animation.  A key is something that tells Aquaria, "Put Naija in this pose by this time."  You can use the mouse to move around the arrows at the bottom of the screen, each of which represents a key.

Derek posted a pretty good tutorial here (http://www.bit-blot.com/aquaria/mods/animation.html) if you're interested in making your own creatures.  It will require some more XML, though.

Hope that helps!
Title: Re: Hi, I have questions.
Post by: Titch on January 18, 2009, 12:12:08 am
Thats odd Particlese, I've been having the white blob show up on my normal form. I haven't been worrying about it because I haven't had to do any animation yet...
Title: Re: Hi, I have questions.
Post by: Particlese on January 18, 2009, 12:54:08 am
I should have specified that the white blob is usually absent in-game.  It's definitely visible in the animation editor.
Title: Re: Hi, I have questions.
Post by: Maria on January 18, 2009, 02:38:23 am
The bright spot on the middle of Naija is part of one of her forms, and it only shows up then.

Pressing up or down on the keyboard selects different body parts, and then you can move them around with the mouse.  The left mouse button moves parts, and the right one rotates them.

Pressing left/right on the keyboard selects the previous/next "key" (or "key frame") in the animation.  A key is something that tells Aquaria, "Put Naija in this pose by this time."  You can use the mouse to move around the arrows at the bottom of the screen, each of which represents a key.

Derek posted a pretty good tutorial here (http://www.bit-blot.com/aquaria/mods/animation.html) if you're interested in making your own creatures.  It will require some more XML, though.

Hope that helps!
Thank you, Edwards showed me that page.
It is really good help, but sometimes I don't understand on somethings.
That's why I come here to understand it more.

Again, thank you. :)
Title: Re: Hi, I have questions.
Post by: Maria on January 21, 2009, 02:24:01 pm
Hello, me again.

I was looking at the page, and I wanted to add a fish picture. I did everything it said, but every time I try to add it, I only get a white square.
I have tried again and again, but failed. I don't get what I am doing wrong.  :-X

Any one know?
Title: Re: Hi, I have questions.
Post by: Particlese on January 21, 2009, 08:19:10 pm
Where exactly are you getting the white square?  I get one for my creature when I press CTRL+E in the level editor, but it looks fine everywhere else, oddly enough.  If you're getting it in the animation editor or everywhere, I have more questions for you:

Did you save the picture of the fish as a PNG file in the "graphics" folder of your mod and refer to it without the extension?  In other words, do you have a file like ".../aquaria/_mods/mymod/graphics/fish.png" and an xml file that has something like this?
    <Bone idx="0" gfx="fish" pidx="-1" name="body" fh="0" fv="0" cr="0" cp="0 0" />
I know that's pretty much what's in the tutorial, but sometimes rewording it helps.  (You can also have your file as ".../graphics/fish/body.png" and use "fish/body" in the xml file if you want, which is even closer to the tutorial.)

If your set-up already looks like this, there might be something funny about the png file itself.  To test that theory, try copying one of the original game's graphics and put it in place of your "fish.png" or whatever you've named it.  If that fixes it, there's something wrong with your png file, and we can work from there.
Title: Re: Hi, I have questions.
Post by: Maria on January 21, 2009, 10:37:35 pm
Hmm... I really don't know where I messed up.

Going to start from scratch.
This time though, I am going to not animate and just show the picture.

Agh, I feel like I made no sence there.


Edit: Haha, now it shows in the Animation, but in the plants or creatures it show a white square still.
Title: Re: Hi, I have questions.
Post by: Particlese on January 22, 2009, 05:03:13 pm
Glad you got it working!  I can't find any posts on that last white square problem, but if I figure out what's causing it, I'll let you know.
Title: Re: Hi, I have questions.
Post by: Maria on January 23, 2009, 05:14:02 pm
Thank you!

I did it again, to know what I did wrong. I went back to the game and sure enought. It was a white box.

When I went to the animation the monster/creature  was there.
But I noticed, and should of said this earlier, that the monster/creature had white on the background. My first monster had it too.
 You could tell the shape of the box.
Like Naija, she didn't had it, like the background was transparent.

How do I get the back ground transparent? maybe that is the reason I see a white box when I pick a monster or a plant.

Title: Re: Hi, I have questions.
Post by: Titch on January 23, 2009, 06:38:56 pm
You need to set an alpha channel on the images you are using. How to do that depends on what kind of image program you are using. A lot of imaging programs confuse transparency and alpha channel/mask.  You could probably just put google it to get the specifics for whatever program you are using.
Title: Re: Hi, I have questions.
Post by: Maria on January 23, 2009, 09:45:00 pm
Hm... Okay, this time I used Gimp2.
I found a picture of a Pepper and it worked in the animation.
But I still get a white box on monsters or plants.

 :'( What am I doing wrong.

Thank you for the help, Titch.
Title: Re: Hi, I have questions.
Post by: Particlese on January 24, 2009, 04:30:54 am
I would also love to know if anyone else has entities showing up properly in the CTRL-E menu.  I've tried subbing in graphics and scripts from Aquaria and comparing several scripts and animation files, but what I've tried so far hasn't fixed it.  It's not much of a problem when you only have a few new creatures, but if you had a whole screen of white squares, it could get tedious finding the right one.
Title: Re: Hi, I have questions.
Post by: Edwards on January 24, 2009, 08:18:35 am
I would also love to know if anyone else has entities showing up properly in the CTRL-E menu. 
The preview images that are shown for the built-in entities are defined in the entities.txt file in the scripts/entities folder of the data files.  I haven't tried adding a similar file to a mod myself, but you may want to look into that.

- Edwards
Title: Re: Hi, I have questions.
Post by: Particlese on January 24, 2009, 06:18:52 pm
Hmm, that sure looks like the right file, but Aquaria doesn't seem to do anything with it when you put it in:
_mods/mymod/scripts/entities/
_mods/mymod/scripts/
_mods/mymod/

I looked in the debug output and grepped for "entities" throughout Aquaria, but I couldn't find anything interesting.  Maybe the code for overriding or appending this file just isn't there.  I didn't see anything in the modding guide, either. :-\
Title: Re: Hi, I have questions.
Post by: TheBear on January 24, 2009, 07:09:24 pm
Quote
rpg_elena naija/mithalan-head
rpg_naija naija/teen-head

"rpg_elena" is that actual name of the entity. Whatever you place after that becomes the icon displayed in the map editor window. So "naija/mithalan-head" is found in gfx folder, naija folder, mithalan-head. This is obviously declared in the entitygroups.txt
Title: Re: Hi, I have questions.
Post by: Edwards on January 24, 2009, 09:52:58 pm
Ah, so all you need to do is add a path to the image to use as a preview just after the entity's entry in entitygroups.txt.  Of course, now that I know what to look for, that's demonstrated in the example mods, but thanks for pointing it out!

Anyway, regarding Maria's last post, it sounds like what's going on is that you are getting a white box surrounding the whatever image you're trying to add, right? (like this: (http://i9.photobucket.com/albums/a68/vernagovi/eyewhite.png))  If so, what you need to do is convert the background of your image from white to transparent.  It should be possible to do this by using the magic wand tool to select the white background, and either cut it out (edit menu->cut) or delete it (delete key?).  There's also a rather long illustrated tutorial here (http://cafesuccess.blogspot.com/2006/09/making-images-with-transparent.html), although it seems rather more complicated than it needs to be.  I wish I could be more helpful, but my copy of the Gimp is crashing spectacularly every time I try to launch it.

If your problem is that the entire image is pure white, it's probably a formatting error.  Make sure your image has dimensions that are powers of 2 (6, 32, 64, 128, etc.), and that you're saving it as a .png file in the graphics folder of your mod, and that you're using the correct name in the animation file (that is, don't include the extension, so for "image1.png", you would use the name "image1").

- Edwards
Title: Re: Hi, I have questions.
Post by: Particlese on January 24, 2009, 10:31:01 pm
...This is obviously declared in the entitygroups.txt
That did it.  Thanks!

Another way to add transparency in the Gimp (if your image doesn't already have it) is to go to the "Layer" menu, then select "Transparency", followed by "Add Alpha Channel".  Now you can do as Edwards said and select the parts you want to be transparent and press delete.  To fine-tune it, you can also use the eraser tool.
Title: Re: Hi, I have questions.
Post by: Maria on January 28, 2009, 01:22:35 am
Hi, sorry that I haven't replied for some time.
Got busy.

But let me show you what I get. :)


This one  (http://i289.photobucket.com/albums/ll217/Onwas_photos/Aquaria2009-01-2717-53-43-25.png)is in Animation, I finally got the back ground transparent. (Thank you Edward)

But now I have another dilemma.
Every time I go to Entity group I get this. (http://i289.photobucket.com/albums/ll217/Onwas_photos/Aquaria2009-01-2717-56-29-42.png)
Yeah, I made the non-active group, because I thought "Maybe they are in a wrong subject". :-X
And I made two more to figure out what I did wrong. :(
I don't know what I missed.

Thank you for the help!
Title: Re: Hi, I have questions.
Post by: Particlese on January 28, 2009, 05:10:07 am
Open up "entitygroups.txt" in your mod's main folder.  It should look something like this:

GROUP:Non-Active
Carrot carrotparts/greens
Pepper pepper


The two things to check are that:
1.  the part on the left matches the entity's name.
2.  the part on the right matches the texture you want to see in the Entity Group screen.  In the example above, the texture ".../mymod/graphics/carrotparts/greens.png" would represent Carrot, and ".../mymod/graphics/pepper.png" would represent Pepper.

Does that fix it?
Title: Re: Hi, I have questions.
Post by: Maria on January 28, 2009, 06:00:11 pm
Thank you!
That helped  a lot!

But now, ever time I paste it, instead of showing the pepper, it shows Naija's head.  :o

I have looked in ModGuide, but I don't understand.
Do I open the .lua file to make a script to make it appear?
Title: Re: Hi, I have questions.
Post by: Particlese on January 29, 2009, 04:37:37 am
Haha!  I love Naija's floating head; it's so absurd.

Anyway, I think I know what's going on there.  If you're following the tutorial, you probably copied the contents of "aquariatemplate/scripts/00_starter.lua" into "mymod/scripts/pepper.lua".  If so, the top of your pepper.lua file should look like this:
Code: [Select]
dofile("scripts/entities/entityinclude.lua")

function init(me)
setupEntity(me)
entity_setEntityType(me, ET_ENEMY)
entity_initSkeletal(me, "00_starter")
entity_setState(me, STATE_IDLE)
end
To get the pepper to show up properly, change the line
entity_initSkeletal(me, "00_starter")
to
entity_initSkeletal(me, "pepper")
That tells Aquaria to use "mymod/animations/pepper.xml" for the pepper's animation.  (If the animation for your pepper is in a different file, change it to whatever that file's name is, minus the ".xml" part.)  Right now, it's using  "00_starter.xml", which just shows Naija's floating head. :D
Title: Re: Hi, I have questions.
Post by: Maria on January 29, 2009, 06:38:08 am
Ooooh!
I get it now!
Thank you so much!
I hope I wasn't much of a bother bugging people of simple things.  :-X
Title: Re: Hi, I have questions.
Post by: Particlese on January 29, 2009, 05:27:23 pm
Nah, keep asking!  Sometimes I also learn stuff while trying to figure out the answer.
Title: Re: Hi, I have questions.
Post by: Maria on February 22, 2009, 08:16:49 am
Okay, I am back!
And this time I am trying to add music.
But I am having trouble how.
How do you add music to a map?

I promise, I tried and tried.
But can't do it.

I made the sound .ogg and added it to Audio.
I don't know, I think I missed a step. I have search at the site, but I don't get it.
And having trouble finding it here. If you know where it is, please show me.

Thank you so much!
Title: Re: Hi, I have questions.
Post by: Alphasoldier on February 22, 2009, 07:11:50 pm
When adding stuff into a game it's a very wise thing to look at the debug file, it's not that hard to figure out.
the file is called debug.log, after that, I'd search for the name of the song that you put in the xml file of the map.

So, check debug.log for your song name and check what's wrong with it, propably just a directory mistake, or that you added .ogg to the name you entered in the xml file, I don't know, I personally can't help you much further without more information.
Title: Re: Hi, I have questions.
Post by: Particlese on February 23, 2009, 12:36:06 am
Make sure your OGG is indeed in your mod's "audio" folder.  In my examples, I'll assume it's "mymod/audio/filename.ogg".  To set it as a level's default music, there should be a "music" entry in the first line of the map's XML file.  Something along these lines:
   <Level tileset="main" music="filename" sceneColor="1 1 1" />
You can also use playMusic("filename") in a script to play it.

If it's not in the right spot, you'll see this toward the end of your debug.log:
   playMusic: filename
   FMODEX error: 23: Unknown error code
   playmusic end

If you can't find that error, it might just be that the first part (or all) of the music is too quiet to hear above other sound effects.

Also, just to check, it is encoded as an Ogg Vorbis file, right?  Some programs might have a "save as compressed file" option and not tell you that they're really saving it as an mp3 even though you called it filename.ogg.  Probably not, but I thought it would be good to mention just in case.

Good luck!  Can't wait to see what you make!
Title: Re: Hi, I have questions.
Post by: Maria on February 23, 2009, 04:47:39 am
Thank you!!!

You were right, the sound was to low. :P
Hehe, silly me.

I have another question.
Is there a way that I can trigger the sound, like when she enters a room.
But with out going to another map.

Um... Do you understand what I am saying?  :-X
Title: Re: Hi, I have questions.
Post by: Particlese on February 23, 2009, 06:19:40 am
Yeah, I was stumped for a while with custom music because the first 10 or so seconds of the song I was using were quite quiet compared to the rest.

If it's music you want to trigger, make a node that overlaps the area you want to have the music (such as a boss's lair), and name it (for example) "musictrigger".  If you need a circular area, hit "y" when the node is highlighted.  Then make a text file in your mod's script directory, rename it "node_musictrigger.lua", and put the following inside it, with appropriate tweaks:
Code: [Select]
function init(me)
inside = false --Keep track of Naija's entrance/exit so music changes aren't made every frame.
n = getNaija()
end

function update(me, dt)
if not inside then
if node_isEntityIn(me, n) then --Naija just entered, so start the music.
inside = true
playMusic("miniboss")
end
else
if not node_isEntityIn(me, n) then --Naija just left, so return to the level's normal music.
inside = false
updateMusic()
--fadeOutMusic(6) --fade to silence instead
end
end
end
That starts the miniboss music whenever Naija enters the node's area and goes back to the normal music when she leaves it.

If it's a sound effect you want to trigger, I can tell you that there are several ways to do it, but I'm not that familiar with them yet and I need to go to bed now!  ;)
Title: Re: Hi, I have questions.
Post by: Maria on February 24, 2009, 04:28:03 am
Hi, thank you!

But now, I am confused on something.
I have made a picture, but the background is Black.

I have made sure many times that the background is transparent.

But it stills shows black, has any one happen to have this too?
Title: Re: Hi, I have questions.
Post by: Alphasoldier on February 24, 2009, 10:11:04 am
If I were you, I'd open up an existing file (picture) and work from there, the picture usually has some options on that are hard to find.
I presume you're using photoshop?
Title: Re: Hi, I have questions.
Post by: Maria on February 25, 2009, 01:24:36 am
If I were you, I'd open up an existing file (picture) and work from there, the picture usually has some options on that are hard to find.
I presume you're using photoshop?

I don't have photoshop. :(

First I use freehand, I make sure it's not blending or have soft edges so I don't get white marks..
Then I copy the image and paste it in Paint.Net program.
From there, I use the magic wand, and delete.

I figured it out just now what was wrong with it, but thank you for responding!