The Dink Network

Experience and Level Up stuff

December 29th 2005, 11:52 AM
bonca.gif
Christiaan
Bard They/Them Netherlands
Lazy bum 
In my D-Mod, I'm aiming for a different kind of status-bar and menu system. So I was wondering if it is at all possible to check how much experience you need to proceed to next level without looking at the number on the status bar. I want to get rid of the numbers on the status bar and just let a script tell you how much exp you need for next level. Any ideas?
December 29th 2005, 12:23 PM
custom_magicman.gif
magicman
Peasant They/Them Netherlands duck
Mmmm, pizza. 
The formula (hard coded, not changeable):

&level = level Dink is currently on

The total experience needed to advance a level is.

&total_exp_needed = &level * &level * 100;

Substracting the amount of experience from that is what you still need.

&exp_needed = &level * &level * 100 - &exp;

So for example, if you are level 2 and have 134 exp already, the status bar will show this: 134/400

&total_exp_needed will be 400
&exp_needed will be 266, the amount you'll need before another levelraise occurs.
December 29th 2005, 01:08 PM
dragon.gif
Is it possible to change the ammount of experience needed to gain a level?
December 29th 2005, 01:21 PM
custom_magicman.gif
magicman
Peasant They/Them Netherlands duck
Mmmm, pizza. 
No, the formula is hardcoded in the .exe.
December 29th 2005, 01:23 PM
dragon.gif
So you have to change the source code then. That sucks. It should be done with a script.
December 29th 2005, 02:14 PM
knightg.gif
cypry
Peasant He/Him Romania
Chop your own wood, and it will warm you twice. 
Well, I have a solution to this, but that's a bit complicated. Let's say you want 100 exp for level 1, 200 exp for level 2, 300 exp for level 3, you should use the following seq, in every die procedure, at every monster script:

if(&exp >= &levexp)
{
&level += 1;
&exp -= &levexp;
external("lraise", "main");
}

also, in the lraise script, you should enter
&levexp = &level;
&levexp *= 100;

This works only if &levexp is lower than it should be. If it's higher, the lraise script should be emty:
void main(void)
{
kill_this_task();
}
and you should replace "lraise" with some other name.
You also need to find a way to remove the exp box from the status bar(maybe redink1 can tell us how he did in reconstruction).
I don't know if this will work, but you can try it.
December 30th 2005, 02:42 PM
dragon.gif
My dmod might not have a status bar.
December 30th 2005, 03:36 PM
custom_magicman.gif
magicman
Peasant They/Them Netherlands duck
Mmmm, pizza. 
No statusbar? Just load blank frames (of the correct size, I guess) into the sequences used by the game.
December 30th 2005, 04:34 PM
dragon.gif
I'm not sure what you mean by that.
December 30th 2005, 04:52 PM
custom_magicman.gif
magicman
Peasant They/Them Netherlands duck
Mmmm, pizza. 
If you don't know how to add new graphics, read some tutorials, found in the Development section.

You will need the original Dink Smallwood bmp pack (also in the Development section) to see what files are used for the statusbar, and where they are located in the graphics directory.

Rebuild that part of the graphics directory in your D-Mod's directory. For example, if the status bar is located in graphics/statusbar/stat-01.bmp, you should make a file called stat-01.bmp in your D-Mod's graphics/statusbar/ directory. I'm quite sure this isn't the actual place the graphic is in, but it's easy to find out if you have the original bmp pack.

This new stat-01.bmp (still the example) should have the exact image size (pixels) as the original one, but leave it white. The game will think this new white thing is the statusbar and display it. No dink.ini editing required!
December 30th 2005, 09:38 PM
dragon.gif
I said I'm not sure what you mean, not I don't know how to do it. I know full very well how to add graphics.

I still don't know what you're suggesting I do.
December 30th 2005, 10:14 PM
duck.gif
Tal
Noble He/Him United States
Super Sexy Tal Pal 
He's suggesting that if you really want absolutely no status bar, you replace the status bar graphic with a big transparent frame so the status bar in-game is pretty much nothing.

But then you have the problem of the Dink screen surrounded (especially on the bottom) by nothingness.
December 31st 2005, 02:58 AM
anon.gif
DraconicDink
Ghost They/Them
 
Well, I don't get why he'd be suggesting that.
December 31st 2005, 04:58 AM
slimeg.gif
metatarasal
Bard He/Him Netherlands
I object 
Because you said that your DMOD might not have a statusbar. And magicman provides you with an easy way to do that.
December 31st 2005, 05:10 AM
dragon.gif
I thought there would be an easier way to do it, such as altering a script.
December 31st 2005, 06:17 AM
custom_magicman.gif
magicman
Peasant They/Them Netherlands duck
Mmmm, pizza. 
Nope, statusbar things are all hardcoded. The way you gain experience, the way you levelup, the way strenght and defense are handled in combat, the way the statusbar is built (you can't change the magic pic to suddenly become the active weapon. At least, not easily).

Or, well, suddenly I remember something. Often the statusbar doesn't display during cutscenes, but only at the beginning of the game. You might check what command is used after the little talk scene in the main game to let the status bar appear, and remove it from your script. I'm still not sure how this affects savegames, though. I don't believe I've ever seen the statusbar disappear when it was previously there.
December 31st 2005, 08:40 AM
custom_king.png
redink1
King He/Him United States bloop
A mother ducking wizard 
You could remove the &update_status = 0, but the status bar'll just re-appear when the game is loaded.

This might work (dunno, haven't tried it).

&update_status = 0;
fill_screen(0); // or fill_screen 255, I forget
draw_background();
December 31st 2005, 11:25 AM
spike.gif
It'll go away... If I remember right there was a disappearing status bar in LOT.

But blank frames are the easiest way to make it go away for good, or then I'm an uninformed little rabbit. :'(
December 31st 2005, 07:14 PM
knightg.gif
cypry
Peasant He/Him Romania
Chop your own wood, and it will warm you twice. 
How do you make just one stat(let's say experience) dissapear from the status bar?
January 6th 2006, 04:41 PM
knightg.gif
cypry
Peasant He/Him Romania
Chop your own wood, and it will warm you twice. 
???
January 6th 2006, 05:01 PM
custom_magicman.gif
magicman
Peasant They/Them Netherlands duck
Mmmm, pizza. 
Only load blank frames for that one stat

Search what sequences are used for the experience numbers and replace them by blank graphics.
January 6th 2006, 05:26 PM
dragon.gif
Well actually I figured out a work around, but I'm not going to use it because I don't like it.