The Dink Network

Adding Graphics Problems

May 26th 2009, 10:24 PM
pillbug.gif
pillbug
Peasant He/Him United States
Love! True love! 
Alright, I feel really stupid. A few weeks ago I could add graphics like nothing, but now I have no idea how to. So, I will add the line of code I'm using to try to add my space ship graphics unsuccessfully.
Oh, and this ship should be treated like a character (random man, etc.), with movement and such.

load_sequence_now graphics/space/ship- 851

I have checked numerous times to make sure all the ship files in the graphics folder are named properly and put in proper order. My calculations show that it is something right in front of me that I am overlooking.
May 27th 2009, 03:25 AM
custom_skull.gif
Skull
Peasant He/Him Finland bloop
A Disembodied Sod 
Instead of load_sequence_now graphics/space/ship- 851, maybe you should put load_sequence_now graphics/space/ship- 850, and try it.
May 27th 2009, 03:35 AM
spike.gif
My calculations show that it is something right in front of me that I am overlooking.

Prepare to slap your forehead.

You're using slashes (/) while you should be using backslashes (\).
May 27th 2009, 03:40 AM
custom_skull.gif
Skull
Peasant He/Him Finland bloop
A Disembodied Sod 
Really? It works for me with normal slashes.
May 27th 2009, 12:56 PM
pillbug.gif
pillbug
Peasant He/Him United States
Love! True love! 
Well, that was one of the problems. I figured out what the second problem was, but I'm not sure why it did this. There is probably some easy noob fix that you learn 10 minutes into D-modding, but WinDinkEdit doesn't react with what I do in the skeleton. Example: I was looking for some spacey tilesets, and I found a few I wanted to experiment with. I added them to the skeleton's tiles folder, loaded up the dmod, and checked 39 (I named it TS39). The default graphics were there. After I did some more experimenting, making sure I had named it correctly and such, I made a new DMod based on the same skeleton so I could experiment without messing up my scripts. Well, the tiles were there. And just recently with my spaceship graphics, after I changed my slashes I was sure it was going to work, but yet again, fail. I started a new dmod on that same skeleton, success. I thought it might be because I had several dmods working off the same skeleton, so I tried a completely new skeleton. Fail. Yet again, I had to create a completely new Dmod to refresh the editor. Ideas?
May 27th 2009, 02:06 PM
custom_marpro.png
Marpro
Peasant He/Him bloop
 
I haven't read everything but you could always check that your new graphics are 8 bit. I had a similar problem before and that was it.
May 27th 2009, 02:30 PM
bonca.gif
Christiaan
Bard They/Them Netherlands
Lazy bum 
Why 8 bit? Dink supports 24 bit for years now.
May 27th 2009, 11:04 PM
pillbug.gif
pillbug
Peasant He/Him United States
Love! True love! 
It's not just graphics though. I made a script in WDE, then later checked the story folder, and it was empty (besides main.c and such).
May 28th 2009, 07:28 PM
pillbug.gif
pillbug
Peasant He/Him United States
Love! True love! 
Oh, and is there a way to temporarily disable the ability to attack with physical and magical attacks?
June 4th 2009, 12:53 AM
pillbug.gif
pillbug
Peasant He/Him United States
Love! True love! 
I've tried to work around this problem but it's hard. I'll keep looking for ways to fix it, but does anyone else have any ideas on my WDE problem?
June 4th 2009, 08:15 AM
bonca.gif
Christiaan
Bard They/Them Netherlands
Lazy bum 
Are you using WinDinkEdit Plus? It's much better than regular WDE. Maybe you should try it in the old DinkEdit too.

As for your other question, just make a global variable for being able/unable to use magic and to use weapons. let's name them &muse and &wuse. Put them in the main.c and give them a value of 1.

Then, put in the item scripts this:

void use( void )
{
if (&muse == 0)
{
return;
}

on top of everything else. For weapons use &wuse.

Now you need to make sure you change &muse and &wuse to 0 whenever you want to disable it, and turn it back to 1 when you can use it again.
June 4th 2009, 11:37 AM
dinkdead.gif
Don't know what's up with your scripts vanishing but about the graphics - sometimes when I make graphics they don't appear in WDE+, there's just a blank blue space where they should be. That happens when they're 32 bit, just change them to 24 or lower and they should appear, like Marpro said.

Just make your scripts in Notepad or whatever directly instead of using WDE if that's still a problem...
June 4th 2009, 01:31 PM
pillbug.gif
pillbug
Peasant He/Him United States
Love! True love! 
Thanks for the help on the scripting, Christiaan, but I still can't get those graphics up! They are 24 bit, but they still don't show up. I'm new at this, so how do I change the bit number? I'll keep working on the mapping and scripting for the time being.
[Edit]
I made a new Dmod on the same skeleton, the graphics showed up. This is confusing.

Oh, and I am using WDE+, if it gets to the point where I absolutely cannot fix this, I'll try DinkEdit. I tried using it before, and it's a lot less user friendly imo.
June 4th 2009, 03:04 PM
spike.gif
I encourage you to try to learn Dinkedit. It can be difficult to get into, but it's much faster to use than WDE after you're familiar with it.

I made a list of the keyboard commands in Dinkedit a while ago, which might be helpful. I was also going to write a complete tutorial on using Dinkedit but never got around to it (yet).

As for changing the bit number, you can change it to 1-bit (2 colours) with Paint. That's probably not what you want though, so you'll need some other graphic program. Irfanview is a good free one. With Irfanview, click the "Image" toolbar, and select "Decrease Colour Depth" to lower it.
June 4th 2009, 03:45 PM
slayer.gif
MadStalker
Peasant He/Him Finland
tag line 
You actually can convert graphics to the 256 color Dink palette with Paint, just open a original 256-color image and the one you want to convert, then copy-paste the new graphic over the old one and save as a 256-color image. Presto
June 4th 2009, 03:54 PM
custom_marpro.png
Marpro
Peasant He/Him bloop
 
I've heard that you can use irfanview to change many pictures in one modify, not just change one picture at the time... Is this true?
June 4th 2009, 04:23 PM
spike.gif
Oh yeah, I had forgotten about that trick.

I've heard that you can use irfanview to change many pictures in one modify, not just change one picture at the time... Is this true?

Yep, Press B or click File -> Batch Conversion/Rename. You can change the bit depth with that, however, it has limited options. I don't think it can be used to apply the same palette to all pictures, for example, which is a shame.
June 4th 2009, 04:56 PM
custom_marpro.png
Marpro
Peasant He/Him bloop
 
Awh, I've been converting all as singles.

By the way, is there a similar function in Photoshop CS3?
June 4th 2009, 07:41 PM
bonca.gif
Christiaan
Bard They/Them Netherlands
Lazy bum 
I still don't get why you would deliberately lower the graphics when Dink supports 24-bit. The problem can't be the palette, as both WDE+ and Dink support 24-bit graphics.
June 4th 2009, 09:05 PM
spike.gif
Aside from trying to get around a bug, if the graphic doesn't actually use that many different colours, lowering the colour depth will decrease the file size without change in the image quality. Using 24-bit on a black and white picture is just dumb, the lantern graphic being a great example, since the graphic is huge (1199x799). With 1-bit, the file size is 120 kilobytes. With 24-bit, it's 2.74 megabytes.

If lowering the colour depth seriously ducks up the image quality, though, I agree that it shouldn't be done JUST to decrease the file size/have mercy on crappy computer people.