Hey, we have forums!

Author Topic: how to add effects/attributes to costumes?  (Read 9170 times)

0 Members and 1 Guest are viewing this topic.

Offline dannyshan

  • Mini Bit
  • **
  • Posts: 2
    • View Profile
how to add effects/attributes to costumes?
« on: July 17, 2013, 06:04:25 pm »
After 6 years, I pick up Aquaria this classic game again and to have more fun I try to mod the game slightly. Without any experience of programming, I learned some basic lua language from the forum. However, I must admit I am not good at modding, not only due to lack of programming eperience, but also because drawing is not my stuff.

Recently, I try to add some effects (for example, +1 speed) to the Krotite costume. I tried to learn from other costumes that already have some effects, like the crab costume. But unfortunately, I couldn't find the files that define the effects of these costumes in data or script folder.

I wonder if anyone can show me an example to add effects/attributes to the costumes. Thank you.

Offline False.Genesis

  • Administrator
  • Super Bit
  • **********
  • Posts: 461
  • PRESS COMPILE FOR RAINBOWS
    • View Profile
    • My source code!
Re: how to add effects/attributes to costumes?
« Reply #1 on: July 17, 2013, 06:20:50 pm »
Hi! From my own experience there is a trade-off between simplicity and features.

As simple example what you could do is to make a node that reads the current costume via getCostume(), and then act according to what you get.
As long as you have a node like this on every map it works fine.

But note that setting +1 speed via script is not possible in any older version. In my OSE releases there is a function that allows this, but it's still some fiddling to get it working properly.
A great deal of things are hardcoded in the game and are impossible to achieve via scripting; I've lifted those limitations somewhat but this is of course not official.
For example the jelly costume healing or the crab costume damage reduction are all hardcoded and can neither be changed, nor used for custom costumes (game checks for getCostume() == "jelly").

I thought about the same, and to get everything working as I imagined,  I have resorted to completely re-implementing all forms and costumes in plain Lua. If you're not a coder this is definitely not recommended, but it gives a great deal of flexibility. As I said, there's a trade-off, depending on what you want :)

If you have further questions, ask away! Most modding activity is on IRC (#bitblot), so for quick questions this is the best place to ask.

« Last Edit: July 17, 2013, 06:23:13 pm by False.Genesis »

Offline dannyshan

  • Mini Bit
  • **
  • Posts: 2
    • View Profile
Re: how to add effects/attributes to costumes?
« Reply #2 on: July 17, 2013, 07:03:08 pm »
Hi! From my own experience there is a trade-off between simplicity and features.

As simple example what you could do is to make a node that reads the current costume via getCostume(), and then act according to what you get.
As long as you have a node like this on every map it works fine.

But note that setting +1 speed via script is not possible in any older version. In my OSE releases there is a function that allows this, but it's still some fiddling to get it working properly.
A great deal of things are hardcoded in the game and are impossible to achieve via scripting; I've lifted those limitations somewhat but this is of course not official.
For example the jelly costume healing or the crab costume damage reduction are all hardcoded and can neither be changed, nor used for custom costumes (game checks for getCostume() == "jelly").

I thought about the same, and to get everything working as I imagined,  I have resorted to completely re-implementing all forms and costumes in plain Lua. If you're not a coder this is definitely not recommended, but it gives a great deal of flexibility. As I said, there's a trade-off, depending on what you want :)

If you have further questions, ask away! Most modding activity is on IRC (#bitblot), so for quick questions this is the best place to ask.



Thank you for the quick and clear reply.

As I said, I am not a coder, modding the game is to just add a little more fun. According to what you said, it's too complicate for me. I think I will just add more food and be a good cook :D

I am looking forward to your sequel mod. The pics you posted are really polished. I can't imagine a mod could have so many new maps and objects. I really need to learn drawing.