Server Help Forum Index Server Help
Community forums for Subgame, ASSS, and bots
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   StatisticsStatistics   RegisterRegister 
 ProfileProfile   Login to check your private messagesLogin to check your private messages   LoginLogin (SSL) 

Server Help | ASSS Wiki (0) | Shanky.com
LVZ Hell (part deux)

 
Post new topic   Reply to topic Printable version
 View previous topic  .ini changing when sent by email Post :: Post How do I get my custom shipset into my...  View next topic  
Author Message
Cerium
Server Help Squatter


Age:41
Gender:Gender:Male
Joined: Mar 05 2005
Posts: 807
Location: I will stab you.
Offline

PostPosted: Mon Jan 15, 2007 4:22 pm    Post subject: LVZ Hell (part deux) Reply to topic Reply with quote

Ok, so I've come to the conclusion that Priit added LVZ support over the course of two hours while heavily intoxicated and possibly drugged.

I've got a bunch of LVZs, each using a fair number of objects. LVZ 1 has 192 images, LVZ 2 has 103 Images (about 40 of them dummys) and LVZ 3 has a single image.

I really have no fucking clue how LVZs work on the client end. On the surface, Continuum seems to allow each LVZ file to have it's own unique set of images that can only be used by the objects in that file (which in itself is stupid, but makes a bit of sense when you consider he stupidly limited the total number of images to 256). However, when I started writing the bot I quickly noticed this is not the case.

Originally, LVZ 2 only had around 60 images, with holes inbetween a bunch of image definitions for organization. This works fine for your standard LVZ designs where nothing needs to be toggled or changed, but as soon as I had a bot start sending modification and update packets, Continuum broke. LVZ objects which have no object ID (and thus, should be constant) were changing on a whim and some were using images that were defined in other LVZs.
I figured the problem was that I would jump around on the image numbers (IMAGE15 to IMAGE20 being left undefined), so I filled all the gaps in with dummy images, but that only made things worse.

Now, even before the bot can do anything, the LVZ images are getting hosed. The single LVZ object defined in LVZ 3 is using an image defined in LVZ 1, but the bot's modification seems to work fine now.


So, yeah. I'm confused as fuck. Every time I think I make sense of this shit, something else that makes absolutely no sense happens and I'm right back to where I started. Does anyone (MGB) have any clue how the client handles this crap? I'm about to lose my mind here, as it seems like I've wasted a month of work thanks to this awful client.

Thanks
-C
_________________
There are 7 user(s) ignoring me right now.
Back to top
View users profile Send private message Add User to Ignore List AIM Address
Mine GO BOOM
Hunch Hunch
What What
Hunch Hunch<br>What What


Age:40
Gender:Gender:Male
Joined: Aug 01 2002
Posts: 3614
Location: Las Vegas
Offline

PostPosted: Mon Jan 15, 2007 4:38 pm    Post subject: Reply to topic Reply with quote

One, and only one, LVZ file can have object ids. Thus the whole reason for my first Makelevel program I did, so I could create an LVZ file with just pure object information, and have other LVZs hold the files so if you updated an image, you wouldn't have to redownload a meg file.

Internally in the LVZ, all image numbers are renumbered from 0 to n-1. That is why if you debuild a LVZ file, they don't always keep the same numbering system as the original ini file that created it.

How you should do it: LVZ 1 has some images, LVZ 2 has more images, etc. Then another LVZ called lvzobjs.lvz or something is the only one with object information. lvzobjs.lvz should contain no files, as you can split those off into other LVZ files.
Back to top
View users profile Send private message Add User to Ignore List Send email
Smong
Server Help Squatter


Joined: 1043048991
Posts: 0x91E
Offline

PostPosted: Mon Jan 15, 2007 4:38 pm    Post subject: Reply to topic Reply with quote

First I would assume cont loads the lvz in the order they are listed in the server settings. This would be the fallback order. Then I would assume as you have already stated - objects defined in a lvz will try and use images defined in the same lvz, otherwise fallback to the other lvz.

Another thing is avoid using the ID 0, and also large number ID's, since these might wrap around due to the number of bits given to them.

Other than my opinion I can't give you any solid advice. I've never tried implementing lvz in my client and probably never will.

When I wrote my skin viewer there were non-obvious undocumented things that were pretty confusing there too (I was going for exact clone). I consider my current implementation "good enough", but it could be better if I didn't get frustrated with it.
_________________
ss news
Back to top
View users profile Send private message Add User to Ignore List Visit posters website MSN Messenger
Cerium
Server Help Squatter


Age:41
Gender:Gender:Male
Joined: Mar 05 2005
Posts: 807
Location: I will stab you.
Offline

PostPosted: Mon Jan 15, 2007 4:48 pm    Post subject: Reply to topic Reply with quote

So if you put all your image definitions in one file and the object definitions in another file, how do you define which image you're using? How does continuum know you want IMAGE0 from redlvz instead of IMAGE0 from bluelvz?
Back to top
View users profile Send private message Add User to Ignore List AIM Address
Mine GO BOOM
Hunch Hunch
What What
Hunch Hunch<br>What What


Age:40
Gender:Gender:Male
Joined: Aug 01 2002
Posts: 3614
Location: Las Vegas
Offline

PostPosted: Mon Jan 15, 2007 5:03 pm    Post subject: Reply to topic Reply with quote

All file= lines are in a bunch of LVZs. Everything else, images, screen objects, and map objects, are in one LVZ file. Do not split this into more than one LVZ file.
Back to top
View users profile Send private message Add User to Ignore List Send email
Cerium
Server Help Squatter


Age:41
Gender:Gender:Male
Joined: Mar 05 2005
Posts: 807
Location: I will stab you.
Offline

PostPosted: Mon Jan 15, 2007 5:06 pm    Post subject: Reply to topic Reply with quote

So I am limited to 256 images? Fucking Priit.

Oh well, looks like I've got a lot of work to do. Thanks for the info.
Back to top
View users profile Send private message Add User to Ignore List AIM Address
Mine GO BOOM
Hunch Hunch
What What
Hunch Hunch<br>What What


Age:40
Gender:Gender:Male
Joined: Aug 01 2002
Posts: 3614
Location: Las Vegas
Offline

PostPosted: Mon Jan 15, 2007 5:18 pm    Post subject: Reply to topic Reply with quote

Cerium wrote:
So I am limited to 256 images? Fucking Priit.

Source: ASSS Wiki: LVZ
Quote:
Continuum only supports 256 different images in all of your lvz files combined. If you exceed this limit, toggling the 257th image will turn on the 1st image. This is often undesired, so be careful.
Back to top
View users profile Send private message Add User to Ignore List Send email
Chambahs
Power attack
Power attack


Joined: Jun 19 2005
Posts: 820
Offline

PostPosted: Mon Jan 15, 2007 6:38 pm    Post subject: Reply to topic Reply with quote

I would have thought 256 was enough..
Back to top
View users profile Send private message Add User to Ignore List
Bak
?ls -s
0 in


Age:24
Gender:Gender:Male
Joined: Jun 11 2004
Posts: 1826
Location: USA
Offline

PostPosted: Mon Jan 15, 2007 6:42 pm    Post subject: Reply to topic Reply with quote

Are you sure you have to define all your object ids in one file? i've never had any problems using more than one file, as long as your total number of images is less than 256.
_________________
SubSpace Discretion: A Third Generation SubSpace Client
Back to top
View users profile Send private message Add User to Ignore List AIM Address
Cerium
Server Help Squatter


Age:41
Gender:Gender:Male
Joined: Mar 05 2005
Posts: 807
Location: I will stab you.
Offline

PostPosted: Tue Jan 16, 2007 5:03 am    Post subject: Reply to topic Reply with quote

@Bak:
You don't absolutely have to, but it certainly makes it easier to figure out how the images and objects will be defined and handled on the client end -- less likely to end up with bizzaro problems like mine. Plus, as he said, you can change stuff around without requiring a complete redownload.


@Chambahs:
256 isn't even close to enough to what I'd like to do. To complete this project exactly to the original specs I'd need (atleast) another 576 images.
Back to top
View users profile Send private message Add User to Ignore List AIM Address
Doc Flabby
Server Help Squatter


Joined: Feb 26 2006
Posts: 636
Offline

PostPosted: Tue Jan 16, 2007 7:32 am    Post subject: Reply to topic Reply with quote

one thing you could do. Is combine say 4 images or as many as you want into one. Then use a black (or whatever colour your background is) lvz to cover the sections you dont want to see.

This solutions i can see being horrible to impliment however. I also have no idea if it would acctually work.
_________________
Rediscover online gaming. Get Subspace | STF The future...prehaps
Back to top
View users profile Send private message Add User to Ignore List
Samapico
No, these DO NOT look like penises, ok?


Joined: May 08 2003
Posts: 1252
Offline

PostPosted: Tue Jan 16, 2007 6:59 pm    Post subject: Reply to topic Reply with quote

I thought mapObjects definitions could only apply to files in the same lvz... cool.
_________________
(Insert a bunch of dead links here)
Back to top
View users profile Send private message Add User to Ignore List
Samapico
No, these DO NOT look like penises, ok?


Joined: May 08 2003
Posts: 1252
Offline

PostPosted: Wed Feb 07, 2007 8:48 pm    Post subject: Reply to topic Reply with quote

Hmm, quick question about these lvzs...

Is it possible to have Image Definitions (IMAGE#=...) in a lvz, and the mapobjects using that image definition in a different lvz?
Back to top
View users profile Send private message Add User to Ignore List
Bak
?ls -s
0 in


Age:24
Gender:Gender:Male
Joined: Jun 11 2004
Posts: 1826
Location: USA
Offline

PostPosted: Wed Feb 07, 2007 9:52 pm    Post subject: Reply to topic Reply with quote

no, why would you want to? the meat of the filesize is when you include the File= part.
Back to top
View users profile Send private message Add User to Ignore List AIM Address
Samapico
No, these DO NOT look like penises, ok?


Joined: May 08 2003
Posts: 1252
Offline

PostPosted: Wed Feb 07, 2007 10:17 pm    Post subject: Reply to topic Reply with quote

its not that i want to.. just wanted to figure out how to make dcme's interface for lvz's, and if it was technically possible to do that, it would have complicated things a bit...
Didn't think it was possible either, just wanted to make sure... stuff started to get confused in my head tongue.gif
thx
Back to top
View users profile Send private message Add User to Ignore List
Samapico
No, these DO NOT look like penises, ok?


Joined: May 08 2003
Posts: 1252
Offline

PostPosted: Fri Feb 16, 2007 8:30 pm    Post subject: Reply to topic Reply with quote

Another thing I'm wondering right now...
What happens if you have, say, a IMAGE0 in one lvz, and a IMAGE0 in a different lvz? Does continuum confuses them? Or does continuum creates its own imageID's anyway? (as long as total of all imageID's isn't more than 256, of course)
Back to top
View users profile Send private message Add User to Ignore List
Cyan~Fire
I'll count you!
I'll count you!


Age:36
Gender:Gender:Male
Joined: Jul 14 2003
Posts: 4608
Location: A Dream
Offline

PostPosted: Fri Feb 16, 2007 8:50 pm    Post subject: Reply to topic Reply with quote

Continuum does confuses them, it's actually supposed to be a feature.
_________________
This help is informational only. No representation is made or warranty given as to its content. User assumes all risk of use. Cyan~Fire assumes no responsibility for any loss or delay resulting from such use.
Wise men STILL seek Him.
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Samapico
No, these DO NOT look like penises, ok?


Joined: May 08 2003
Posts: 1252
Offline

PostPosted: Fri Feb 16, 2007 9:47 pm    Post subject: Reply to topic Reply with quote

gah.. I just re-re-re-read the lvz format...

the Image Definitions sections don't have an ID identifier... so emm... When they are loaded, they get ID's automatically from 0 to 255 within that lvz file? or... ô.o

If that is the case, I can't see how continuum would confuse them... well it would depend on the order in which lvz's are loaded, which makes no sense...

Is MGB's lvz toolkit source available somewhere? I'd like to see how that is done exactly... that or a clear explanation would do tongue.gif
Back to top
View users profile Send private message Add User to Ignore List
Bak
?ls -s
0 in


Age:24
Gender:Gender:Male
Joined: Jun 11 2004
Posts: 1826
Location: USA
Offline

PostPosted: Fri Feb 16, 2007 10:34 pm    Post subject: Reply to topic Reply with quote

Continuum doesn't confuse them. The numbering is unique to the lvz file, although a total of 255 total images in all lvz files is all that's allowed. If you create an lvz using IMAGE10 instead of IMAGE0, create the lvz file, then decompress the lvz file, it will be IMAGE0 in the ini file.


X-LvzToolkit comes with source if you want a look.
Back to top
View users profile Send private message Add User to Ignore List AIM Address
Samapico
No, these DO NOT look like penises, ok?


Joined: May 08 2003
Posts: 1252
Offline

PostPosted: Fri Feb 16, 2007 10:37 pm    Post subject: Reply to topic Reply with quote

ok... that now makes sense in my head

So I'm guessing when you build lvz with mgb's lvztoolkit, when you write like

IMAGE23=file.bmp
IMAGE27=anotherfile.bmp

and then
IMAGE23,x,y,blahblahblah

when saving the lvz object definitions, image23 is the first to be saved (id = 0), image 27 is saved next (id = 1), so when the mapobject using image23 is saved, the actual 'ImageID' that is stored would be '0' ?
Back to top
View users profile Send private message Add User to Ignore List
Bak
?ls -s
0 in


Age:24
Gender:Gender:Male
Joined: Jun 11 2004
Posts: 1826
Location: USA
Offline

PostPosted: Fri Feb 16, 2007 10:41 pm    Post subject: Reply to topic Reply with quote

correct

Code: Show/Hide
/**
* We need to map the encoded image num, to the actual one, since we don't get a choice when
* we're encoding the image objects
* @param encodeNum the encoded number in the ini file, that we'll transform into the correct one
* @return the correct byte we should use for the image num in our lvz file
*/
private static int getImageNum(int encodeNum)
{
   int num = -1;
   
   for (int x = 0; x < imageObjects.size();++x)
   {
      ImageObject io = (ImageObject)imageObjects.get(x);
      
      if (io.num == encodeNum)
      {
         num = x;
         break;
      }
   }
      
   return num;
}
Back to top
View users profile Send private message Add User to Ignore List AIM Address
Samapico
No, these DO NOT look like penises, ok?


Joined: May 08 2003
Posts: 1252
Offline

PostPosted: Fri Feb 16, 2007 10:52 pm    Post subject: Reply to topic Reply with quote

alright, thanks

<finishing up DCME's lvz>
Back to top
View users profile Send private message Add User to Ignore List
Bak
?ls -s
0 in


Age:24
Gender:Gender:Male
Joined: Jun 11 2004
Posts: 1826
Location: USA
Offline

PostPosted: Sat Feb 17, 2007 3:12 am    Post subject: Reply to topic Reply with quote

can't wait bro, DCME is amazing.
Back to top
View users profile Send private message Add User to Ignore List AIM Address
Cyan~Fire
I'll count you!
I'll count you!


Age:36
Gender:Gender:Male
Joined: Jul 14 2003
Posts: 4608
Location: A Dream
Offline

PostPosted: Sun Feb 18, 2007 1:03 am    Post subject: Reply to topic Reply with quote

Ooh, my bad. Is it that a file included in one LVZ can be referenced in another? There's something like that.
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Samapico
No, these DO NOT look like penises, ok?


Joined: May 08 2003
Posts: 1252
Offline

PostPosted: Sun Feb 18, 2007 1:01 pm    Post subject: Reply to topic Reply with quote

Files can be referenced by other lvz yes.
But not image definitions.

So you can define an image definition using a bitmap from a different lvz, but can't define a mapobject using an image definition from a different lvz
Back to top
View users profile Send private message Add User to Ignore List
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> LVZ/LVL Questions All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum
View online users | View Statistics | View Ignored List


Software by php BB © php BB Group
Server Load: 760 page(s) served in previous 5 minutes.

phpBB Created this page in 0.548678 seconds : 50 queries executed (79.3%): GZIP compression disabled