Visual Mode.lua help

Questions about the content creation procedure go here, including using Forge, Anvil, or other editors, or operating emulators like Basilisk II.
Post Reply
User avatar
BoBsBrother
Cyborg
Posts: 110
Joined: Aug 12th '10, 03:20
Location: Kearney, Nebraska
Contact:

Hi, I just have a few questions about visual mode.lua. I'm making a map and when I try to use visual mode to texture it it wont let me. The walls are all pink, but the floor is textured. And when I try to texture something it comes up with some sort of error. Any help out there?
User avatar
CryoS
Vidmaster
Posts: 1720
Joined: Jul 1st '07, 09:56
Location: The Dungeon
Contact:

did you pave the level before opening in in A1?
What are you, if not seven different shades of stupid?
User avatar
BoBsBrother
Cyborg
Posts: 110
Joined: Aug 12th '10, 03:20
Location: Kearney, Nebraska
Contact:

Yeah, I did pave it, but it doesn't work still.
User avatar
treellama
Vidmaster
Posts: 6107
Joined: Jun 2nd '06, 02:05
Location: Pittsburgh
Contact:

Can you post a screenshot of the error? And an overhead view of your map?
User avatar
BoBsBrother
Cyborg
Posts: 110
Joined: Aug 12th '10, 03:20
Location: Kearney, Nebraska
Contact:

Heres the pictures. This time the error only showed up once, where I didnt have time to get a screeshot. Before it showed up multiple times. The error says something about a "nil value."[attachment=4110:Picture_1.png]
Attachments
Picture_4.png
Picture_4.png (118.71 KiB) Viewed 4491 times
Picture_1.png
Picture_1.png (23.13 KiB) Viewed 4491 times
Picture_2.png
Picture_2.png (276 KiB) Viewed 4491 times
Picture_2.png
Picture_2.png (276 KiB) Viewed 4491 times
User avatar
treellama
Vidmaster
Posts: 6107
Joined: Jun 2nd '06, 02:05
Location: Pittsburgh
Contact:

Please go read the Forge manual, and watch the tutorials. Marathon maps must have at least two polygons, and at least three if you want monsters to work.
Last edited by treellama on Aug 13th '10, 19:08, edited 1 time in total.
mijenke
Spazeroid
Posts: 3
Joined: Feb 9th '11, 08:06
Contact:

Hi,

I am having a problem with Visual Mode.lua. I tried to add a new topic but apparently I don't have permission to (?), so I figured that this was the best place to ask for help under the circumstances.

At work I have an older computer running Debian 5 "lenny" and an older build of aleph one, from 2009. Visual mode works perfectly on that computer.

At home I have a newer computer running Debian 6 "squeeze" with the latest aleph one build. Visual mode works fine except for that the overlays at the top of the screen - the ones that tell me what each key does - are clipped at the top, and I cannot see their text, I can only see the very bottom of the icons. This, of course, makes using Visual Mode a whole lot more confusing. I also tried old A1 builds from '09, same problem.

On both computers I am running in software rendering mode. On the problem computer, I have tried every variation of options that I could think of, windowed mode on or off, different resolutions, OpenGL mode, etc...I still can't see those overlays no matter what options I use.

I looked in the Visual Mode.lua script and found that these are displayed by modifying the player's "overlays" array. I even looked in the A1 source code to figure out where these are drawn so that I might be able to manually move them down, found references to them in lua_player.cpp, also poked around in lua_hud_script.cpp, but I don't understand the code well enough to be able to fix this myself. I wouldn't mind implementing a code hack to deal with my specific issue, but I thought that if it's happening to me, it might happen to other people too so it might be worthwhile to figure this problem out.

Tried searching in these forums for any mention of this issue but was unsuccessful.

It's obviously not the A1 version per se since I tried both new & old versions on the problem computer. I suspect that it might have something to do with different X11 configurations or something like that. But I could be totally wrong about that. At this point I just don't know where the problem is. I do have a widescreen monitor at home and a more old-school one at work, but I don't see why this should affect e.g. the A1 windowed mode, other than that it might have affected the X11 configuration. I also have no idea why different X11 configurations might clip the A1 view area in different places, and this is why I can't tell whether or not this is a X11 configuration problem or something deeper. Nonetheless, as I said before, if it's happening to me now, it's bound to happen to someone else later so it would be great to resolve this problem now. It may not be an X11 problem, but if not, I really haven't a clue as to what it might be.


Anyone have any experience with this problem? Or any idea about how to fix it?

Any help is really appreciated, thank you.
User avatar
treellama
Vidmaster
Posts: 6107
Joined: Jun 2nd '06, 02:05
Location: Pittsburgh
Contact:

Can you press F9 to take a screenshot, and post that?

It will be in your ~/.alephone/Screenshots directory
Last edited by treellama on Feb 9th '11, 13:36, edited 1 time in total.
mijenke
Spazeroid
Posts: 3
Joined: Feb 9th '11, 08:06
Contact:

Treellama wrote:Can you press F9 to take a screenshot, and post that?

It will be in your ~/.alephone/Screenshots directory
Sure. I haven't posted here before, so I'm hoping this does the trick:

[attachment=4600:UntitledLevel_0000.png]

You can see that there is a black space above the rendered image. I don't know if that's normal or not. It almost seems as though, if this blank space were rendered, I would be able to see the overlays. However, even if I switch to a resolution that eliminates the HUD space, the rendered image fills the window/screen, but the overlays are still clipped the same way.

I don't know if this is some weird interaction between A1's drawing methods and my window manager or what. I use GDM on top of X11, and it's been working just fine for everything else. I really suspect some kind of weird interaction there...maybe something in the way A1 calculates the size of the viewing area or something like that. Maybe it's been clipping the top off of everything the whole time I've been using it and I just never noticed until now.


Any ideas?
Attachments
UntitledLevel_0000.png
UntitledLevel_0000.png (200.91 KiB) Viewed 4495 times
User avatar
treellama
Vidmaster
Posts: 6107
Joined: Jun 2nd '06, 02:05
Location: Pittsburgh
Contact:

My first guess is that you compiled without SDL_TTF support. While the overlays should still work with the bitmap fonts in the Fonts file, maybe that's broken?

So, can you rerun configure and verify you have SDL_TTF support enabled?
mijenke
Spazeroid
Posts: 3
Joined: Feb 9th '11, 08:06
Contact:

Treellama wrote:My first guess is that you compiled without SDL_TTF support. While the overlays should still work with the bitmap fonts in the Fonts file, maybe that's broken?

So, can you rerun configure and verify you have SDL_TTF support enabled?


Ahhh yes, thank you so much. That was indeed the problem, I just had to install the libsdl-ttf-dev package and recompile. I never would have noticed that. The build instructions are pretty clear about requiring the sdl image, net, and sound libraries, but didn't say anything about ttf, and I never read the output of configure closely enough to notice it was missing.

As to why bitmap fonts won't work, or why the icons seem to be mostly offscreen, I have no idea. I don't know what you mean by "the Fonts file."

Anyway, thanks for clearing this up.
User avatar
treellama
Vidmaster
Posts: 6107
Joined: Jun 2nd '06, 02:05
Location: Pittsburgh
Contact:

Well, technically this is a bug, which I'll try to remember to look into. If you want to file one on SourceForge, that would help.

Or, maybe we should just require SDL_TTF ::shrug::
pfhore
Born on Board
Posts: 22
Joined: Feb 22nd '08, 09:31
Contact:

I'm not sure if it is right place to write this.

There are no Chip or Wire Panel in Jjaro texture set in Visual Mode.lua. (Maybe two of "tag" are actually them but I don't know which is)

It is bug? or intentional?
User avatar
treellama
Vidmaster
Posts: 6107
Joined: Jun 2nd '06, 02:05
Location: Pittsburgh
Contact:

I must have overlooked them. You can add them to your script, if you want. Open it in a text editor, and search for the line

Code: Select all

-- these must be hard-coded into Forge; the engine can't tell them apart
Add these lines to the list of control panel types:

Code: Select all

ControlPanelTypes[52]._type = "chip insertion"
ControlPanelTypes[53]._type = "wires"
Let me know if that works.
pfhore
Born on Board
Posts: 22
Joined: Feb 22nd '08, 09:31
Contact:

Treellama wrote:I must have overlooked them. You can add them to your script, if you want. Open it in a text editor, and search for the line

Code: Select all

-- these must be hard-coded into Forge; the engine can't tell them apart
Add these lines to the list of control panel types:

Code: Select all

ControlPanelTypes[52]._type = "chip insertion"
ControlPanelTypes[53]._type = "wires"
Let me know if that works.
It seems works, thanks.
Post Reply