Hey, we have forums!

Author Topic: More modding questions...  (Read 15543 times)

0 Members and 1 Guest are viewing this topic.

Offline Hubalaboo

  • Bit
  • ***
  • Posts: 14
    • View Profile
More modding questions...
« on: March 21, 2009, 06:15:28 pm »
Yes, I know... D: Please, bear with me.

1. I can't seem to get songbulbs to work. I place the songbulb entity and then I place a node on top with "seting poultice" as its name, for example. I save, reload, and try singing to it, but all it does is vibrate and then disappear without any poultice popping out (there's no sound either). What am I doing wrong? (Maybe I should try it one more time, just to make sure I'm really saving and reloading right... or spelling it right...)

2. How do you change the height of the water level? It's currently at the very top of my map and I have no idea how to bring it down lower so Naija can actually reach it.

3. Is there a way to automatically tile the background? It would save me a lot of time trying to line up every tile to cover up the water/gradient color behind.

I'll probably have more as I 'dive deeper' into modding.  :P

P.S. I suddenly had an idea for a mod... Basically you play as a Krotite, set in a time long before Naija begins her adventure. You are unique out of your kind, as you can sing, and you don't thirst for power/destruction like all the others of your kind. You want to try and stop the other Krotites from killing the Erulians somehow, and... you go through an adventure of some sort (Unfortunately you fail, and all the stuff with Naija happens while you're in hiding from the Creator). I thought this would connect nicely with the fact that spoiler there's one Krotite at the end of game, beside the fallen energy god. /spoiler
Oh, this leads me to another question: How simple would it be to replace Naija with a Krotite, for example? Would it require tons of programming or is it easier than that?
« Last Edit: March 21, 2009, 08:13:00 pm by Hubalaboo »

Offline Hiro

  • Hero Bit
  • *********
  • Posts: 674
  • Kriel's Legionary
    • View Profile
    • The Rat Hole
Re: More modding questions...
« Reply #1 on: March 21, 2009, 09:39:58 pm »
1. I dunno

2. I forgot what it is exactly, but its in the map's xml file, across the top. There should be something like waterlevel=0. You want it to equal 1. Then theres a height value for setting where abouts it is. You'll have to experiment with that.

3. I believe 'L' is the button you want. It should set the stretch mode to tile so that when you make your tile larger all it does it tile it rather than stretching it out of proportion. Its very useful for making large areas have the same background.

It should be possible to make Naija into a krotite by replaceing sprites and stuff, although there have been issues in the past with getting the head to work correctly. Alphasoldier should be able to help you there.
My site is: http://www.therathole.co.nr/
Where I put pictures and blog posts and stuff..

Offline Hubalaboo

  • Bit
  • ***
  • Posts: 14
    • View Profile
Re: More modding questions...
« Reply #2 on: March 21, 2009, 09:48:13 pm »
Thank you Hiro!

About the water level, is the height value just right after where the code says waterlevel=1? For example, "waterlevel="1", 5".
The exact code would be very helpful, if anyone has an example for me...

Offline Alphasoldier

  • Dream Bit
  • **********
  • Posts: 1810
  • Zero Suit!
    • View Profile
Re: More modding questions...
« Reply #3 on: March 23, 2009, 12:19:22 am »
And people throw me in, here I thought I could just keep walking.

This is what I have for a certain mod I was working on:
"setWaterLevel(node_y(me), 5)" (without the " )
first value is the height of the water, you'll probably have the temper with that, or, like I did, use a node.
And the second value is the time, obviously.
I tried myself to somehow make some formula that it would take the current water level, and the difference of what you want, then calculate the time so that it would always rise and lower with the same speed no matter how high or low something is.
I however didn't find anything to obtain the current water level, so that idea went up in fog.

The Krotite mod idea is pretty nice, you could try completely replacing Naija's graphics, by actually replacing the .png files, or you could use a certain script, but that wouldn't even look nice. Either way, yes, there are troubles with the head, you need to put them in the (mod)/gfx/naija folder. and call them exactly the same as the other ones, this is the only way to do that and would possibly even make the heads work, but I'm not sure about that.

And about the songbulbs, the node needs to be big enough to contain the entity(songbulb) and you need to put a value behind the item
As in: 'seting poultice 8'
Already a forward tip, leaves can only contain 1 item. And mithalan pots can also be set, just like the songbulbs.
« Last Edit: March 23, 2009, 10:22:08 am by Alphasoldier »
God sees and knows everything, but at least he won't gossip about it.

Offline Hiro

  • Hero Bit
  • *********
  • Posts: 674
  • Kriel's Legionary
    • View Profile
    • The Rat Hole
Re: More modding questions...
« Reply #4 on: March 23, 2009, 04:25:04 am »
I stand corrected. Upon actually looking at my map files again I see that you just set the waterlevel variable to the level you want. For example, the two veil maps from the main game both use 9620. No commas for sure.
Of course, if you want to have it change during gameplay you'll need a node/scripting as Alpha said, but if you just want it static its easier to use the map file. ;)
My site is: http://www.therathole.co.nr/
Where I put pictures and blog posts and stuff..

Offline Hubalaboo

  • Bit
  • ***
  • Posts: 14
    • View Profile
Re: More modding questions...
« Reply #5 on: March 23, 2009, 06:24:07 am »
Wow, thank you both. I'll be sure to test these out when I have the time. :)

Offline Edwards

  • Bit Bit
  • ****
  • Posts: 93
    • View Profile
Re: More modding questions...
« Reply #6 on: March 29, 2009, 01:05:10 am »
I however didn't find anything to obtain the current water level, so that idea went up in fog.
Easy enough to get the current water level: getWaterLevel()
As for the full even-speed thing, I've gotten a bit rusty on my Lua syntax over the past couple months, but the following should work:
Code: [Select]
-- Change the water level at a fixed speed, regardless of how far the level must change.  speed is in water level units/second.
function smoothlyChangeWaterLevel(height, speed)
local delta = math.abs(height - getWaterLevel())
local time = delta/speed
setWaterLevel(height, time)
end

As a more on-topic note, be warned that the values for waterlevel are reversed from what you would probably expect- higher numbers refer to a lower water level.

- Edwards
You should only need one canister shell to bag your deer using your howitzer, but assemble more than one if  you have a mind to.1

Offline Winterous

  • Bit
  • ***
  • Posts: 15
    • View Profile
Re: More modding questions...
« Reply #7 on: March 29, 2009, 01:17:25 am »
I like the idea of the Krotite mod, that'd be really interesting.
What I'd like to see though is a mod where you don't sing, you use items instead, like a hunter using a bow & arrow.

At any rate, about the water levels, what about in the Turtle cave where there's a little pool of water higher up?
How would that work?

Offline Edwards

  • Bit Bit
  • ****
  • Posts: 93
    • View Profile
Re: More modding questions...
« Reply #8 on: March 29, 2009, 01:22:01 am »
I like the idea of the Krotite mod, that'd be really interesting.
What I'd like to see though is a mod where you don't sing, you use items instead, like a hunter using a bow & arrow.
Yeah, that could be fun- I've played around a bit with ideas on how to turn the song interface into an inventory screen, although I don't have any demos lying around.  I definitely like the idea of a Krotite mod.

At any rate, about the water levels, what about in the Turtle cave where there's a little pool of water higher up?
That's done with a node named waterbubble.  These are used in the main scenario for those high-elevation pools, the floating bubbles of water, and the waterfalls.

- Edwards
You should only need one canister shell to bag your deer using your howitzer, but assemble more than one if  you have a mind to.1

Offline Winterous

  • Bit
  • ***
  • Posts: 15
    • View Profile
Re: More modding questions...
« Reply #9 on: March 29, 2009, 01:25:43 am »
To make it into an inventory screen, wouldn't you just change the pictures, remove the sounds, make the songs 1 note, and make the forms you holding the item?

Offline Edwards

  • Bit Bit
  • ****
  • Posts: 93
    • View Profile
Re: More modding questions...
« Reply #10 on: March 31, 2009, 06:44:49 pm »
To make it into an inventory screen, wouldn't you just change the pictures, remove the sounds, make the songs 1 note, and make the forms you holding the item?
Pretty much.  What I don't recall is whether I'd come up with a good way to make items not appear in the inventory if you don't have them.

- Edwards
You should only need one canister shell to bag your deer using your howitzer, but assemble more than one if  you have a mind to.1

Offline Winterous

  • Bit
  • ***
  • Posts: 15
    • View Profile
Re: More modding questions...
« Reply #11 on: April 01, 2009, 06:04:38 am »
I thought about that too, and then I figured you could only have a few 'form' items, like a bow, a pike, things like that.
And then you could have items in your inventory, like flash bombs and such.

An example I thought of is:
Mix a squid tentacle with a green bulb (it looks hollow) to make a container of ink.
Mix that with a magic exploding rock thingie to make an ink bomb, that stuns all enemies within a radius when you 'eat' it.

But how would you do ammo?
Like, so that when you shoot your bow it uses up an item in your inventory.