Changing status bars mid-game
Having trouble using init()...
I have custom status bars, if they are loaded in the ini file they work fine, however I want to switch status bars at different points in the game.
If this is used to switch graphics:
Then the game crashes as soon as draw_status() is called after that (crash = freeze for a second then instantly exit, like kill_game).
What am I missing?
I have custom status bars, if they are loaded in the ini file they work fine, however I want to switch status bars at different points in the game.
If this is used to switch graphics:
init("load_sequence_now graphics\myfolder\status\stat- 180 BLACK");
Then the game crashes as soon as draw_status() is called after that (crash = freeze for a second then instantly exit, like kill_game).
What am I missing?
They work fine if loaded "normally", so I don't think it's the graphics themselves. It's using init where there's a problem.
It could be that you have to use set_mode() to remove the current status bars before changing them. I don't see why it would matter but eh, maybe it'll work?
I guess also make sure that whatever you're loading doesn't have more frames than the initial status bars. (I'm like 90% sure this can cause the type of crashes you're experiencing.)
I guess also make sure that whatever you're loading doesn't have more frames than the initial status bars. (I'm like 90% sure this can cause the type of crashes you're experiencing.)
shamelessly steal from dinky dimensions, which is inexplicably not v1.00 still.
Whats this? Are you reviving work on "Shrine of the Dragon"? If so, then by all means please add some details to the "Preview" thread on that subject to whet our increasing appetites for more dmods!
Try doing load_sequence without init? I'm not sure what the function of the init() command is, to be honest.
init() in DinkC is an abbreviation of the I've_never_intended_this() function. So yeah... You can omit that part
I struggled with this a while back making a DMOD with characters you could switch between (much like Resident Evil 0), though sadly I never got around to finishing it. I can't remember the exact solution, but I seem to remember a large part of it having to do with compressing both the status bars I wanted into a single dir.ff file much like the compression used in the original release of the game.
This included having to recompress the original status bars into the new dir.ff along with the alternate ones I was adding.
This included having to recompress the original status bars into the new dir.ff along with the alternate ones I was adding.
If you can upload a sample D-Mod with this issue, I can debug the issue and figure out the root problem.
I'll try all these suggestions tonight
Redink - will do, thanks. Would it be easier if I emailed it to you rather than upload here?
SlipDink - Nope sorry, this is something else... Though SotD will probably also use different status bars, so this will come in useful there.
Redink - will do, thanks. Would it be easier if I emailed it to you rather than upload here?
SlipDink - Nope sorry, this is something else... Though SotD will probably also use different status bars, so this will come in useful there.
@Sparrowhawk:
I'll try all these suggestions tonight
Well, which one worked? We are all students of DinkC, no matter how long we've played with it.
SlipDink - Nope sorry, this is something else... Though SotD will probably also use different status bars, so this will come in useful there.
Hmmmm. So, SotD is still coming; but not before this "something else...", right?
Well, tell us something about this "something else..." in the Previews threads then, no matter what it is... please? (Insert additional groveling here.)
I'll try all these suggestions tonight
Well, which one worked? We are all students of DinkC, no matter how long we've played with it.
SlipDink - Nope sorry, this is something else... Though SotD will probably also use different status bars, so this will come in useful there.
Hmmmm. So, SotD is still coming; but not before this "something else...", right?
Well, tell us something about this "something else..." in the Previews threads then, no matter what it is... please? (Insert additional groveling here.)
"set_mode() ... maybe it'll work?"
Nope.
"make sure that whatever you're loading doesn't have more frames than the initial status bars"
It's the same.
"shamelessly steal from dinky dimensions"
This appears to do exactly what I'm doing.
"Try doing load_sequence without init?"
Could not get this to work, it's just ignored. How? Brackets? Quotes? Tried all sorts.
"save them in irfanview"
Didn't do nuffin.
"So, SotD is still coming; but not before this "something else...", right?"
Right. Eventually.
"Well, tell us something about this "something else...""
No
Redink - it's uploaded, in the rejected list. See readme.txt. Thanks
Nope.
"make sure that whatever you're loading doesn't have more frames than the initial status bars"
It's the same.
"shamelessly steal from dinky dimensions"
This appears to do exactly what I'm doing.
"Try doing load_sequence without init?"
Could not get this to work, it's just ignored. How? Brackets? Quotes? Tried all sorts.
"save them in irfanview"
Didn't do nuffin.
"So, SotD is still coming; but not before this "something else...", right?"
Right. Eventually.
"Well, tell us something about this "something else...""
No
Redink - it's uploaded, in the rejected list. See readme.txt. Thanks
well at least i'm not alone in things not functioning for absolutely no reason whatsoever.
I tried out your demo, and it works with DinkHD v1.91 and FreeDink 108.4, but does indeed crash classic Dink v1.08.
Found the problem: your stat-06.bmp is a little too big: it is 3 x 61 pixels, but it needs to be 3 x 55 pixels. I used paint to resize it to 3 x 55, and it stopped crashing in v1.08.
Found the problem: your stat-06.bmp is a little too big: it is 3 x 61 pixels, but it needs to be 3 x 55 pixels. I used paint to resize it to 3 x 55, and it stopped crashing in v1.08.
Wow. Ok, I'll try that. But but why then does it work when used from the beginning?
Also, even when using init, the "magic loading" shows with the new stat-06.bmp. It's only draw_status which kills it, but at that point the bmp in question is already drawn.
Also, even when using init, the "magic loading" shows with the new stat-06.bmp. It's only draw_status which kills it, but at that point the bmp in question is already drawn.
Could not get this to work, it's just ignored. How? Brackets? Quotes? Tried all sorts.
I meant just using load_sequence like it's used in dink.ini. I tried playing around with removing the init() parts from dink's scripts at some point, and everything seemed to work just as usual. I'm not sure what version of Dink I was using, though... Probably FreeDink.
Wow. Ok, I'll try that. But but why then does it work when used from the beginning?
Maybe the .bmps just need to be the same size, but the actual size doesn't matter. I tried using a status bar like this in v1.08, and it worked just fine.
I meant just using load_sequence like it's used in dink.ini. I tried playing around with removing the init() parts from dink's scripts at some point, and everything seemed to work just as usual. I'm not sure what version of Dink I was using, though... Probably FreeDink.
Wow. Ok, I'll try that. But but why then does it work when used from the beginning?
Maybe the .bmps just need to be the same size, but the actual size doesn't matter. I tried using a status bar like this in v1.08, and it worked just fine.
I don't have a good explanation as to why it crashes. Maybe for the status bar it stores the original size of the images for later use, and when new imaged of a different size are used it gets confused somehow? (Kinda like a cratchet suggested).
Didn't work
No change. Tried with Irfanview and GIMP for good measure. Maybe it's something to do with bit depth... I'll try lowering my status graphics to 8 bit if possible and see what happens. Is that all you did? Just shrink stat-06.bmp to 55px high?
No change. Tried with Irfanview and GIMP for good measure. Maybe it's something to do with bit depth... I'll try lowering my status graphics to 8 bit if possible and see what happens. Is that all you did? Just shrink stat-06.bmp to 55px high?
I could've sworn I just used mspaint to shrink the image. I had tried changing color depth beforehand, maybe I had those changes active too. I won't be home for a day or so, so I can't check at the moment.
dink need more file format support...
Dan can you send your version back to me please so I can take a look? Or just copy it
Still can't get this to work in 1.08!
Still can't get this to work in 1.08!