The Dink Network

My first one, and problems!

May 21st 2005, 11:14 AM
slimeb.gif
DaVince
Peasant He/Him Netherlands
Olde Time Dinkere 
I finally started creating D-Mods, but I've ran into a problem. My status bar won't refresh! This means when I pick up money, nothing happens with the money status bar until I equip an item. The same goes for life, experience, and all other meters on the bar! Even the magic meter won't fill up!
What did I do wrong or what should I activate before everything works fine?

I'll post my DMod if it's needed. Just tell me when it is.
May 21st 2005, 11:16 AM
fairy.gif
Glennglenn
Peasant He/Him Norway
GlennGlenn doesn't want a custom title. 
There is prabobly some mix up on the star-1.c file

Add these lines

&update_status = 1;
draw_status();
May 21st 2005, 11:30 AM
fish.gif
Simeon
Peasant He/Him Netherlands
Any fool can use a computer. Many do. 
As he's new, it would be helpful to say where it needs to be added (usually in void click(void) of start-1.c). And, in case you have a cutscene in the beginning and you don't want the statusbar to be visible during the cutscene, draw_status(); is not required in start-1.c, you can also do it at the end of the cutscene.
May 21st 2005, 11:34 AM
slimeb.gif
DaVince
Peasant He/Him Netherlands
Olde Time Dinkere 
Nah, I can figure out where it should be, I've looked into it before. And I went through TROS, so...

Okay, I made a startstory.c and I will include it at the end of it! If it works I really have to thank you guys!

Oh, and I already had draw_status(), but not the other line...
May 21st 2005, 11:55 AM
fairy.gif
Glennglenn
Peasant He/Him Norway
GlennGlenn doesn't want a custom title. 
That may be why your status line didn't update!
May 21st 2005, 11:58 AM
slimeb.gif
DaVince
Peasant He/Him Netherlands
Olde Time Dinkere 
Duh, that's why it's suggested. Gonna try it later, I have two computers you see... I'm pretty sure it will work, tho!
May 21st 2005, 12:00 PM
spike.gif
The command is very self-explanary, &update_status = 0; means the status won't update and &update_status = 1; means it updates. I wonder what happens if you put &update_status = 2;
May 21st 2005, 12:04 PM
slimeb.gif
DaVince
Peasant He/Him Netherlands
Olde Time Dinkere 
I bet it's a boolean value. It was probably programmed like: if &update status != 1, dont update.
May 21st 2005, 12:12 PM
fish.gif
Simeon
Peasant He/Him Netherlands
Any fool can use a computer. Many do. 
If it was programmed like that, it wouldn't be boolean. Boolean is 1 or 0, true or false, not "everything but 1 means not update (meaning that 1336 also means not update)"
May 21st 2005, 12:12 PM
spike.gif
Most propably... but it'd be fun if something weird happened.

it's an interesting command - the second best/best way to have god mode without modifying the game itself.
May 21st 2005, 12:21 PM
slimeb.gif
DaVince
Peasant He/Him Netherlands
Olde Time Dinkere 
Simeon: the variable is created inside Dink as a Dink value, not as an int... and Dink values are no booleans but ints. (I think, or maybe doubles?) They have a set type to make it easier for the Dmodder.
May 21st 2005, 01:28 PM
fish.gif
Simeon
Peasant He/Him Netherlands
Any fool can use a computer. Many do. 
DaVince: I've checked the source code and it's defined as follows (integer pointer):

int *pupdate_status, *pmissile_target, *penemy_sprite, *pmagic_cost, *pmissle_source;

Elsewhere, it checks the value of *pupdate_status as:

if (*pupdate_status == 1) update_status_all();

where update_status_all(); handles all the code in updating the statusbar.

So, that would also answer the other question in this thread (setting it to 2 or other values), it'll only update when this integer is set to 1. In scripts, it's indeed the case that only integers can be used
May 21st 2005, 01:41 PM
slimeb.gif
DaVince
Peasant He/Him Netherlands
Olde Time Dinkere 
Hehe, thought so. That's why no types have to be asked from the user...

Anyways, it worked! Everything works fine now. Thanks, all!
May 23rd 2005, 11:50 AM
slimeb.gif
DaVince
Peasant He/Him Netherlands
Olde Time Dinkere 
Well, here's a screenshot of +-4 screens. The DMOD will be called Helpin' an ol' Farmer. Wow, I just discovered WinDinkEdit and it is so friggin' cool!

4 screens of my first dmod in one image.

Tell me, everyone, what do you think of it? It's nothing out of the ordinary but since it's my first map (my first first map) I'd like to hear some comments from you experienced guys.
May 23rd 2005, 12:22 PM
fish.gif
Simeon
Peasant He/Him Netherlands
Any fool can use a computer. Many do. 
Yes well, it's hard to judge the quality of the map, you could have hardness missing, incorrect hardness, depth ques/scripts/other properties still set to a sprite where it shouldn't and such As for the visual quality, it's like you said.
May 23rd 2005, 12:26 PM
slimeb.gif
DaVince
Peasant He/Him Netherlands
Olde Time Dinkere 
Don't worry. I removed all hardness errors and checked all the sprites.
See that brown thing at the bottom right of the top-left screen? It's an invisible fence to remove a hardness error. I use those. I also walked throught the entire map checking for those errors.