Page 1 of 2

2.3c File saving and input

PostPosted: Thu Jan 12, 2006 4:24 pm
by monks
Hi Aaron, I've just had the MEDEM tut mgf open in 2.3c in order to try out the new lighting and there seems to be a problem opening it up.
It opens up in L3DT but the horizontal scale has been changed- the bar in bottom right now gives 2Km (it should be 5Km). After generating the heightmap I found that the scale was set to 10m- at least that's what appears in the field when doing operations>Heightfield>Change
horizontal scale. I change it to 20m and everything appears to be OK.
I'm pretty sure that this was not a problem with 2.3b. I've installed 2.3c in the same folder so I don't have 2.3b to test it against.
I walk through the map process, using x4 (high res lightmap) lighting and texture. The texture at least should be OK for my grafix card. I save mgf using Save Group as. When I fire up the viewer and open up the folder- there are no mgfs visible. Going into the folder with Windows Explorer reveals no files saved at all.
I've retried the same tut mgf without making any changes to it at all, including scale. Still no files found in the folder.
I then saved it using the other options (save All and Save Map Group File). It did save a file and opened up, everything intact in the viewer, but it was at the incorrect horizontal res (ie, the horizontal res query still stands).


Also, the lighting step 2/3 to 3/3 in the Wizard cuts off some of the dialog box.

monks

Re: 2.3c File saving and input

PostPosted: Thu Jan 12, 2006 4:49 pm
by Aaron
Hi Monks,

monks wrote:It opens up in L3DT but the horizontal scale has been changed- the bar in bottom right now gives 2Km (it should be 5Km). After generating the heightmap I found that the scale was set to 10m- at least that's what appears in the field when doing operations>Heightfield>Change
horizontal scale. I change it to 20m and everything appears to be OK.
I'm pretty sure that this was not a problem with 2.3b. I've installed 2.3c in the same folder so I don't have 2.3b to test it against.


Hmm...I didn't go anywhere near those bits of the code in 2.3c. I can't reproduce it here either, but I'll have a bit more of a play around.

Edit: Whoops, spoke too soon. It looks like L3DT doesn't load the terrain spacing correctly if there isn't a heightfield (this would affect all previous versions). I'll fix this and issue an update on the weekend.

2nd edit: Yup, that was the problem. Fix will be included in 2.3c Rev. 3.

3rd edit: Uploading now... (again, ahead of schedule :))

monks wrote:I save mgf using Save Group as. When I fire up the viewer and open up the folder- there are no mgfs visible. Going into the folder with Windows Explorer reveals no files saved at all.


Eh? That's also rather surprising, and I can't reproduce it either. Has anyone else had a problem like this?

monks wrote:Also, the lighting step 2/3 to 3/3 in the Wizard cuts off some of the dialog box.


Okay, at least this one I can fix. Are you using a display DPI of 96 or 120 (or other)? Whichever the one, go to 'Options->Settings->Wizards'. Double click on whatever DPI you are using. Double click on 'Allow resize', and set the value to 1. Now you should be able to resize the wizard appropriately. Afterwards, if you don't mind, please send me the settings/wizards.ini file and I will incorporate the changes in the next release.

4th edit: Ahah! The update utility didn't include the new wizards.ini file, and the defaults were kind of stupid. If you install using the full installer, this should be OK.

Cheers,
Aaron.

PostPosted: Thu Jan 12, 2006 9:13 pm
by Hinklemister
That's great that your fixing bugs so fast Aaron. About the saving problem, that has happened to me a few times. It seems to be random but what happens is that for some reason it saves the map in C:\Documents and Settings\(Current User), and it saves it with the name of the current user. You can later rename it, move, and open it fine but for some reason it saves there at times. Also, as I said it seems random as it's only happened to me a few times. So, I think that's the same bug that he found.

-Hinklemister

PostPosted: Thu Jan 12, 2006 9:51 pm
by monks
Okeydokey, I'll download the latest version and give it a try.
I've made the changes you stated to the resize. I'll check that out when I've got the latest version. Btw, it's a pretty cool effect- the dialog resizing- there's a man who enjoys his code :)

Hinklemister, you're definately onto that one as I remember the first time I tried out the new build with the file, a Windows dialog box came up with something about C:\Documents...It didn't appear after that.

That's great that your fixing bugs so fast Aaron.


...thinks Aaron might be related to Zaphod Beeblebrox- you must have two heads and three arms to code that quick!- :lol:

I'll send the ini file later.

monks

PostPosted: Thu Jan 12, 2006 11:57 pm
by Aaron
Hinklemister wrote:About the saving problem, that has happened to me a few times. It seems to be random but what happens is that for some reason it saves the map in C:\Documents and Settings\(Current User), and it saves it with the name of the current user.


Thanks Hinklemister, I'll have a look into it.

monks wrote:Btw, it's a pretty cool effect- the dialog resizing- there's a man who enjoys his code :)


Thanks. The resizing stuff was written for an event just like this (back with release 2.3).

monks wrote: ...thinks Aaron might be related to Zaphod Beeblebrox- you must have two heads and three arms to code that quick!- :lol:


Sadly, no. One line of code was all that was required:

Code: Select all
// now update the terrain spacing
GetGroupSetting("HF.HorizScale", VTID_float, &HF_PixelSize);



Cheers,
Aaron.

PostPosted: Fri Jan 13, 2006 4:30 am
by Aaron
Okie dokie,

I think I've worked out a plan of attack on the wonky file-naming. I remembered that I had the same problem with the 'export to VTP enviro' option a while back. That fault was caused by me lazily using a string pointer to an object that went out of scope. The result of this is that the string addressed by the pointer may, or may not, still contain the data from the object, depending on whether the OS has reallocated the memory or not. That's why it's intermittent, and system dependent.

Anyhoo, I'll nuke the group filename-handling code and re-write it. I probably should've done this a long time ago anyhow, since it looks at times a bit more like ANSI C than nice C++ OOP.

Cheers,
Aaron.

PostPosted: Fri Jan 13, 2006 2:17 pm
by monks
I've just tried it out and the scaling and dialog's fixed.

I've just been through the tut again. I did a system search (Windows Search) for the files saved as mgfs but none were found- not even in the directory (or equivalent) that Hincklemister pointed out. I've never encountered this problem before. If it's any help-when using the Save feature (as opposed to Save As), the file was saved in the folder which is a very recent creation (created for the purpose of trying out the article tut in rev 2 yesterday) called ArticleDownload. This folder forms a root in terms of rev 2 and 3 usage. (It goes ArticleDownload/2.3c/FromScratch/)

-sorry if I ballsed up the ini I sent -hope they were helpful.

monks

PostPosted: Fri Jan 13, 2006 3:22 pm
by Aaron
Thanks for the ini files. I'll include the fix in the next build.

Also, I've re-built the map-group name-handling (which is probably/hopefully the bit that's gone crazy), and uploaded a new version. Would you care to try again?

PostPosted: Fri Jan 13, 2006 3:27 pm
by Hinklemister
I won't mind trying it out. It just means though that I have to wait til I get home. I hate school as it makes me waste programming time and it makes it harder to help people like you test updates. But anyway, enough of my life. Thanks for updating so quickly again. I'll have fun trying it out in about 6 hours.

-Hinklemister

PostPosted: Fri Jan 13, 2006 3:53 pm
by Aaron
Don't worry, Hinklemister, I can wait. School is more important.

Cheers,
Aaron.

PostPosted: Fri Jan 13, 2006 5:16 pm
by monks
I am half way through the tut and have a few maps built.
I saved as : Save group As 'FromScratch5' without specifying a .mgf file extension- and the problem persists. An L3DT info dialog appeared stating that it had saved the file in the root folder (incorrect) under a name '2'.
I then saved with the extension and it stated that the file had been saved in the correct folder with correct name- but having checked- there's nothing in that folder.
I've completed the map process and opened the '2' file in the viewer- everything seems fine.

Hey Hinklemister - I agree with Aaron (though I remember not liking school too much myself) :wink:

monks

PostPosted: Sun Jan 15, 2006 1:42 pm
by monks
I dropped the thread here a bit. i've just tried it again to make absolutely sure I am using the latest version. The bug still stands - my previous post was on the 2.3 rev 5.
Out of interest, L3DT is installed on drive E- though the dialog feedback from the save operation gives the correct path...
If you're busy there's no rush from this users perspective :wink:

monks

PostPosted: Mon Jan 16, 2006 12:05 am
by Aaron
Hi Monks,

Hmmm... curiouser and curiouser. Will it even save to the root directory (eg E:\) ?

Aaron.

PostPosted: Mon Jan 16, 2006 4:35 pm
by monks
Hey -you said it!

I've just saved it successfully in the root (with or without the filename extension). I then proceeded to save it in all of the root folders down to the original where it wasn't saving. Hey presto- it's now there!! :? :?

That wins a bizarre award. Good news is- it's fixed here.

monks

PostPosted: Tue Jan 17, 2006 1:07 am
by Aaron
Hurrah!

Another victory for voodoo programming! I think I'm getting kind of good at this. All you have to do is wave your hands around a bit, chant something in a language you don’t know, head-but the keyboard three times, and presto, the problems just disappear.

[Actually, I find this very disconcerting. I have no idea what caused the problem or what made it go away.]

Cheers,
Aaron.