wallset.default and GFX. Need help please.

This forum is for the Lua scriptable clone of DM/CSB called Dungeon Strikes Back by Sophia. Use DSB to build your own highly customised games.

Moderator: Sophia

Forum rules
Please read the Forum rules and policies before posting.
Post Reply
Rachel
Neophyte
Posts: 5
Joined: Fri Nov 18, 2011 1:25 pm

wallset.default and GFX. Need help please.

Post by Rachel »

Hello, I'm rachel. I just found this lovely forum and DSB and I have been looking at the code. Sophia, the lady who designed this programme is very clever!
I'm not very clever so I'm finding it hard, like learning a foreign language without ever hearing it spoken before.
It's very daunting, but I would really like to learn. I have been looking through the tutorials and read alot of stuff here on this DSB part, and I find alot of it confusing.
I have looked at the files for DSB using notepad++ which I read here would be okay to use. I have been using ESB and it's very interesting and I can make a very simple room with a few switches, doors and alcoves.

I really want to be able to get more invovled with the code though. I did try one of the examples to change an alcove, but that didn't work either.
I took the VI altar and edited it a little then saved it back out as a 256 PCX image. I'm not an artist, I just fiddled around a little. I just want to know the code to put it into my dungeon. I tried the exmaple:- GFX.ALCOVE_VI_FRONT = DSB_GET_BITMAP("NEW_ALCOVE_VI_FRONT") and I called the new rebirth alcove "new_alcove_VI_front" when I saved it. But it won't show up when I run the game and I get an error at the top of the screen saying look at the log file. But I don't get what the log file is saying to me. Also how do I use wallset.default. If I have all the pictures for the wallset how do I tell the game to look for them. Say they are in a folder called Rachels how do I tell the game to look for the pictures there? do I change wallset.default to wallset.rachels?

Sorry if the answer to both of these are simple, but I really would like to learn, but I need things making very simple for me. I hope you can help and don't mind me being a little slow. I really would like to do more in DSB.
Nice to meet you all,

Rachel.....xxx
User avatar
Kelly
Artisan
Posts: 157
Joined: Thu Aug 31, 2006 7:51 pm
Location: U.K.

Re: wallset.default and GFX. Need help please.

Post by Kelly »

Hi Rachel, welcome to the DSB forum. Firstly well done on using the editor and accomplishing the basics. A new program can be daunting to use for the first time.
Okay I'm not sure exactly your problem, but if I'm right I think you should try the following.

For an alcove image:- gfx.alcove_front = dsb_get_bitmap("ALCOVE_NEW_FRONT") I placed this in my startup.lua
In your dungeon.lua file type the following (somewhere at the top of everything else you see) lua_manifest = { "graphics.lua" }

You'll also want a startup.lua
I'm not very familiar with DSB, so I'm not really the person to help you, I'll just add graphics and let the ones whom know what their doing sort out the rest. I have no idea what most of the flags mean, perhaps Sophia or someone else with more experience will be able to help you more.
I'm sure if you request a tutorial, someone will be able to give you a more detailed description.

Sorry I'm not able to help you further.

This is my dungeon.lua at the mo' :-

lua_manifest = { "graphics.lua" }
--dsb_level_wallset(0, wallset.default) (This is rem'ed out for testing of additional wallsets through graphics.lua)

Addition stuff is in there for the dungeon and party member, etc, etc...

The graphics.lua:-

gfx.ws_front1 = dsb_get_bitmap("WS_FRONT1")
gfx.ws_front2 = dsb_get_bitmap("WS_FRONT2")
gfx.ws_front3 = dsb_get_bitmap("WS_FRONT3")
gfx.ws_left1 = dsb_get_bitmap("WS_LEFT1")
gfx.ws_left1alt = dsb_get_bitmap("WS_LEFT1ALT")
gfx.ws_left2 = dsb_get_bitmap("WS_LEFT2")
gfx.ws_left2alt = dsb_get_bitmap("WS_LEFT2ALT")
gfx.ws_left3 = dsb_get_bitmap("WS_LEFT3")
gfx.ws_left3alt = dsb_get_bitmap("WS_LEFT3ALT")
gfx.ws_pers1 = dsb_get_bitmap("WS_PERS1")
gfx.ws_pers1alt = dsb_get_bitmap("WS_PERS1ALT")
gfx.ws_pers2 = dsb_get_bitmap("WS_PERS2")
gfx.ws_pers2alt = dsb_get_bitmap("WS_PERS2ALT")
gfx.ws_pers3 = dsb_get_bitmap("WS_PERS3")
gfx.ws_pers3alt = dsb_get_bitmap("WS_PERS3ALT")
gfx.ws_far3 = dsb_get_bitmap("WS_FAR3")
gfx.ws_far3alt = dsb_get_bitmap("WS_FAR3ALT")
gfx.ws_pers0 = dsb_get_bitmap("WS_PERS0")
gfx.ws_pers0alt = dsb_get_bitmap("WS_PERS0ALT")
gfx.ws_floor = dsb_get_bitmap("WS_FLOOR")

wallset.whack_set = dsb_make_wallset_ext(gfx.ws_floor, gfx.roof, gfx.ws_pers0, gfx.ws_pers0alt, gfx.ws_pers1, gfx.ws_pers1alt, gfx.ws_pers2, gfx.ws_pers2alt, gfx.ws_pers3, gfx.ws_pers3alt, gfx.ws_far3, gfx.ws_far3alt, gfx.ws_front1, gfx.ws_front2, gfx.ws_front3, gfx.ws_left1, gfx.ws_left1alt, gfx.ws_left2, gfx.ws_left2alt, gfx.ws_left3, gfx.ws_left3alt, nil, nil, nil, nil, gfx.wallwindow)

These are modified versions of the original graphics I'm currently working one - again for testing purposes only. These will be loaded instead of the default wallset that is rem'ed out in the dungeon.lua file.

This code is generated by WHACK - all you have to do is copy and paste. Documentation is provided on its use if this is what you had in mind?
I prefer to do the graphics from scratch, I just used WHACK to get the code.

EDIT:- Here's a link to some documentation. Don't worry, I can't follow all of it myself, lol. :D
http://dmwiki.atomas.com/wiki/DSB/Exposed_functions
Last edited by Kelly on Fri Nov 18, 2011 5:54 pm, edited 1 time in total.
User avatar
Sophia
Concise and Honest
Posts: 4240
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Re: wallset.default and GFX. Need help please.

Post by Sophia »

Here are some simple issues that you may have overlooked.

:arrow: Did you remember to call it new_alcove_vi_front.pcx (or whatever format you're using), i.e., did you remember the file extension?
:arrow: Did you literally type: "GFX.ALCOVE_VI_FRONT = DSB_GET_BITMAP("NEW_ALCOVE_VI_FRONT")"? Lua is case-sensitive, so typing in all upper case won't work. Try this:

Code: Select all

gfx.alcove_vi_front = dsb_get_bitmap("NEW_ALCOVE_VI_FRONT")
:arrow: Where is your rachels folder? Is that where you've put your dungeon, or is it a subdirectory within your dungeon's home directory? If the latter, you'll need to specify an explicit path to your image:

Code: Select all

gfx.alcove_vi_front = dsb_get_bitmap("NEW_ALCOVE_VI_FRONT", "rachels/new_alcove_vi_front.pcx")
As for the wallset, Kelly is correct. You just need to cut/paste the code it automatically generates. You can cut and paste Kelly's code if you made the wallset yourself, and then just change the filenames to whatever is appropriate for you.

Let me know if this works for you. :)
Rachel
Neophyte
Posts: 5
Joined: Fri Nov 18, 2011 1:25 pm

Re: wallset.default and GFX. Need help please.

Post by Rachel »

Sophia and Kelly, thank you for your welcome and your kind words regarding me using the editor. I thought people would probably think I'm really stupid!

You have both really really helped, thank you so much. IT WORKED!!! I had my code a little mixed up!
I have now figured out how to place different walls in the editor, new alcoves on the walls and how to set up my lua files. I'm over the moon!

I have alot more to learn, I hope I can call on you both again!

Sophia you are brilliant and so smart - I wish I was you!!! Like Kelly said on the Dungeon Master Java place, I wish I could borrow your brain too!

Kelly, are you making new pictures for DSB now?

I have used whack but I get lots of lines on the pictures - do you? Do you and Sophia no how to stop this?
I can't make my own pictures, I'm just doodling. Your DMJ things are so pretty, are you doing that for DSB?

Many thanks again I love you both!

Rachel.
User avatar
Kelly
Artisan
Posts: 157
Joined: Thu Aug 31, 2006 7:51 pm
Location: U.K.

Re: wallset.default and GFX. Need help please.

Post by Kelly »

Everybody has to start somewhere Rachel, you're not stupid. You've already proved you are willing to learn by making use of the editor and examining the code to see how things work.
I didn't get DMJ straight away, when I started it 4 years ago - it was like looking at a alien code, lol.

As for DSB I don't have the faintest idea where to begin regarding the actual code. All I can do at this point is copy and reproduce the code already written and see what it does - if you get errors fine, its how you learn. It was the same with Java, although I only learned to change the basics of the code, it was still an accomplishment. You will gain the same experience with DSB and the LUA code if you keep at it.

So you've got your wallset and alcove to appear! Well done to you!

As for Whack, I really don't like it, lol. I get the lines as well, but then again I haven't really read through the doc file included, so for me it's probably just ignorance. I much prefer to make my own wallset by using the initial graphics as templates.
Saying that I have read that others have had success using Whack, so I'll leave it to them to provide you with a better understanding of that particular util.

The graphics for DMJ are not to the same scale as DSB, but I will implement what I can. It'll be a slow process but I have made a start, and look forward to posting a few piccies in the near future and get a little feedback.

Anyway, keep up the good work, and don't be embarrased to ask questions - it's the best way to learn than to struggle and lose interest.


EDIT:- Not to change the topic here, and I didn't want to make a fresh topic just to ask one question, lol.
@Sophia, is there a way to tell the wallset_left graphics not to flip - it's proving to be a really pain in the gluteus maximus. :lol:
User avatar
Sophia
Concise and Honest
Posts: 4240
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Re: wallset.default and GFX. Need help please.

Post by Sophia »

I'm not sure what you mean by "getting lines" with WHACK. It's a very simple tool and has some significant limitations, so I don't begrudge anyone who doesn't want to use it. However, if there's a bug, I'd like to fix it. Could either (or both) of you post a screenshot of what you mean?

Currently, there's no way to control (or stop) the automatic flipping of walls. If you can tell me in more detail what you want I can probably make something work, though. :)
Rachel
Neophyte
Posts: 5
Joined: Fri Nov 18, 2011 1:25 pm

Re: wallset.default and GFX. Need help please.

Post by Rachel »

Hello Sophia. What I mean by lines is that when I load in a bitmap it produces lines on the output files ( I hope I have worded that so it can be understood). Here is a picture of what I mean

Image

Image


The "front1" walls are perfect, but the other walls have lines in them - maybe it is me doing something wrong, and Kelly said that she doesn't use it, so any help would be really nice.

Oh, I'm using a dungeon master java wall and resizing it to 320x222, The floor is a bitmap I got from the internet (free of course) and resized to 512x256

Thank you for your help

Rachel.......xxx
User avatar
Kelly
Artisan
Posts: 157
Joined: Thu Aug 31, 2006 7:51 pm
Location: U.K.

Re: wallset.default and GFX. Need help please.

Post by Kelly »

Sophia wrote:.....Currently, there's no way to control (or stop) the automatic flipping of walls. If you can tell me in more detail what you want I can probably make something work, though. :)

Not to be fussy either way here sweetie, just kinda cursin' a little earlier, lol. The walls flip like they do in DMJ, but I can "join" them up by reversing the image. This doesn't work that well with the DSB images, especially if the wall isn't symmetrical (<Spelling?). The graphics in question (Cowsmanaut's wall set from DMJ) have a more ruggy look and are very unaligned, hence the problem with the flip. I was just wondering if there was a line of code to prevent the flip, or something?

Here's what I mean anyway:- http://i903.photobucket.com/albums/ac23 ... 7/test.jpg

Here I've had to copy/paste the image onto itself to make it symmetrical which needless to say looks just wierd. The left and leftalt walls then needs to be adjusted to "fit", but I have to compensate for the "flip" at the same same.
Here's the original image, just slightly modified in Adobe: http://i903.photobucket.com/albums/ac23 ... 7/wall.jpg

There's no c/p here, just Cows' wall with a little filter. If the flip wasn't a factor I'd have no problems intregated the wall set into DSB and still maintain the "ruggy-ness".

If any of that makes sense, I've been told my explanations sometimes confuses a person more. :?

Either way, don't think about it too much - I will get it right, it'll just take a little longer to get it aligned right.
User avatar
Sophia
Concise and Honest
Posts: 4240
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Re: wallset.default and GFX. Need help please.

Post by Sophia »

Rachel, thanks for the screenshots. That is an odd looking effect; I'm not really sure what's causing it. It doesn't show up for me at all.
It's intriguing to me is that the lines on the floor match the floor's perspective, meaning, they must have been introduced before WHACK applied the perspective effect. Do the lines on the side perspective view walls also match the perspective?
User avatar
Sophia
Concise and Honest
Posts: 4240
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Re: wallset.default and GFX. Need help please.

Post by Sophia »

Kelly, I am afraid that in this case your explanation has confused me more.
I can certainly prevent walls from being flipped, but first we have to know which walls you don't want flipped.

It seems like you don't want the front view walls to be automatically flipped when you advance. This is something I can do, but it'll remove a lot of the illusion of motion from the game. It seems like in combination with this, we'd have to specify a "front alt" view to go with all the other alt views, so DSB could switch between your two front view bitmaps, instead of flipping them.

Is this more or less what you wanted?

Hmm, it also seems like a a "right" view would be needed, to go with the "left," because right now, the right side is automatically generated by flipping the left side, and that may not be acceptable in all cases.
User avatar
Kelly
Artisan
Posts: 157
Joined: Thu Aug 31, 2006 7:51 pm
Location: U.K.

Re: wallset.default and GFX. Need help please.

Post by Kelly »

Sorry hon, my explanation wasn't very clear, but you certainly figured it out yourself anyway. Creating the front alt wall would really help and do away with the flip altogether.

Yes it's a better idea then actually stopping the flip method.
The "right" view isn't needed I should think because we already have that with the flip from the left. I just reverse the image to compensate (it's the same in DMJ). It would certainly be interesting to test and see how it comes together.

@Rachel, in your paint program, index the image to 256, then save as a 8bit bitmap - I think you're graphical images are too high.
Rachel
Neophyte
Posts: 5
Joined: Fri Nov 18, 2011 1:25 pm

Re: wallset.default and GFX. Need help please.

Post by Rachel »

Kelly wrote:@Rachel, in your paint program, index the image to 256, then save as a 8bit bitmap - I think you're graphical images are too high.
I have no idea what that means, Kelly. Can you please explain. I don't have a really good painting programme, just paint.net. Is this okay to use for these pictures?

I have a Dungeon Master Java wall, that I put into the whack folder (call it wallset) and for the floor is a jpeg off the internet. I saved both the jpeg and the wall gif from DMJ as a BMP. The graphics then come out like the picture I showed Sophia.

I thought you have the same problem? Or is it just that you don't like using it?

Any help would be appreciated.

Rachel..........xxx
Post Reply