expecting SHOT got SBOT

duffstone

Member
Joined
Sep 13, 2013
Messages
188
Ok, what the heck does this mean?

*edit*
Ok, This error basically means that you scripted the object wrong on the server side, probably in the object.lua in the object/building/player/* directory.
Correct:
object_building_player_shared_tobin_house = SharedBuildingObjectTemplate:new {

Incorrect:
object_building_player_shared_tobin_house = SharedInstallationObjectTemplate:new {

I'm sure you could replace installation with pretty much any of the other types of building/structures, but this was my problem.
*edit*

I'm trying to add one of the newer houses to the core and got the deed just fine but it's crashing my client when I try to use the deed.

Now I have some other threads to follow on the crash (I haven't isolated it to anything in perticular yet) but... in my core log I get the SHOT / SBOT line when loading my house.iff.

#1) does it really mean anything?
#2) if it does, then what's it looking for that's different. I've compared files and VERY little is different. Unless I"m just blind which could be the case. :)

Any idea's how to solve the SHOT problem before I waste my time trying to narrow down a client crash error?

-Duff
 

duffstone

Member
Joined
Sep 13, 2013
Messages
188
Let me re-ask this another way. is there a way to bring in player houses from NGE at all? I've found places that say it's a POB issue, and others that have done it. yet I'm not seeing any obvious way to rewrite the POB, it's Completely different and I'm not understanding it. :-\

I'll keep at it, but I'm seriously curious if it's even doable for the average lite hacker.

-Duff
 

Timbab

Administrator
Staff member
Administrator
Moderator
Joined
Oct 6, 2010
Messages
1,057
Location
Magna Germania
Well the obvious one is that you have to rename

0004DATA to 0003DATA
And all
PRTL0005 to PRTL0004

Haven't looked deeper than that, structure seems to be the same otherwise.
 

duffstone

Member
Joined
Sep 13, 2013
Messages
188
the POB file is definately a different format. I"m guessing based on the POB file notes on these forums that the type 3 POB's use folders and indexes for the Verts, where as the type 1's & 2's don't have any subfolders.

I renamed all the nodes I could find that were different, I reworked the POB to look like a standard large corellia house (using the bunker data, corellia house format), but the client still crashes. It will take some time to narrow down if it's the POB causing the crash, or the IFF or shader, or whatever.

For the time being if I replace the Bunder data with the corellia house data, leaving everything else the same I still get the sbot / shot error, which tells me it's not the house iff causing the issue but something downstream. Simply renaming the corellia house, and not loading any additional assets should work just fine, so by loading the additional assets something is getting borked.

Sure would be nice if Uli would enlighten us, or whoever is working on it, but we'll get it. I hope.

-Duff
 

duffstone

Member
Joined
Sep 13, 2013
Messages
188
Ok, so i'm starting from scratch and trying to be methodical in my approach. What's killing me tho is right out of the gate I'm running into an unexpected problem I can't seem to fix.

I started clean. I copied the shared_player_house_generic_small_style_01.iff and named it shared_player_house_mustafar_lg.iff. Keeping the names the same so it matches with the CRC tables I had already modified. So I have a new IFF that's the same as the existing iff in all but name (no structure changes within the IFF).

The core scripts had already been modified, and shouldn't need to be changes. They're pointing to the mustafar house in object.lua, then refactoring it (removing the share_ and setting some default values) in the player_house_mustafar_lg.lua file. Serverobjects doesn't change either. None of the path's to the IFF's needs to change because I maintained the naming structure.

I did the same process for the deed (as listed above) just to make sure I rooted out all post 14.1 BS.

The deed generates fine, I can get the place structure screen with the mesh and green squares fine, and the mesh looks like the generic style 1. But when I place it the core goes whacko. First it says it can't find the footprint, then it says it can't generate the object with CRC xxx and then obviously the final fail to generate object. All the paths in the error line up with existing files that I know (and confirmed) are in the .tre files...

I'm at a loss. This should work. No type-o's. No flubbs that I can find.

Also, I can spawn a style 1 generic fine using a frog, and I even went back to the core scripts and changed my deed to spawn the generic style 1 directly and it worked just fine. so it's something to do with how the core is handling the new object even though it's the same as the old object...

frustrating.

-Duff
 

Uli

Moderator
Staff member
Moderator
Joined
Aug 30, 2010
Messages
208
duffstone said:
the POB file is definately a different format.
No there not, there is only one slight difference which causes the crashes and that change was to make the file structure follow how it should of been in the first place.

Thats a big hint.
 

duffstone

Member
Joined
Sep 13, 2013
Messages
188
Well I appreciate the help/hint. It will all start to make sense in time, right now I'm just too green to understand it all without a bunch of fail, rince, repeat cycles. :)

I think the troubles I was having with whacky wild unexpect stuff happening was tre file versioning. I was working on my laptop at work and I haven't gotten it setup for proper development yet.
 

duffstone

Member
Joined
Sep 13, 2013
Messages
188
ok, despite the head cold I think I'm making progress. All my other peculiarities I was experiencing were caused by the CORE me inadvertently trying to use an installation object instead of a house object. (I wasn't trying to to it, I just copied the wrong entity and didn't notice). So anyway I'm making deeds and placing renamed existing 14.1 structures at will. So the coding & tre file construction side of it is now understood.

Now I'm working on the POB file. I believe I know what I need to (rename the nodes, and make sure the vert coords are stated counter-clockwise), But I'm lacking a tool that will allow me to efficiently pull the hex data out of the file as Hex values. My pastes keep tying to convert it into ascii or something else. I just want the regular hex long values as they appear in the editors "04 AF D0 11". <--- that.

Not the wierd ascii interpretation of it. Any of you guys come across a tool that will do that? I'm using FrHed as my hex editor but I'm open to something more effective if you have something.

-Duff

P.S. I would be willing to pay for a good one that would be fully featured. I just don't know much about them would like some advice.
 

Timbab

Administrator
Staff member
Administrator
Moderator
Joined
Oct 6, 2010
Messages
1,057
Location
Magna Germania
I use Hex Workshop, Uli uses HxD, but it really comes down to preference.

Make sure you target/select the bytes (hex values) instead of the actual ASCII translation. TreExplorer will copy the ASCII regardless though.

Also...

Floats and most of the ints are reversed, so you'll need to manually reverse them, always go by 2 bytes.

Example float:
The number 2 = 40 00 00 00 in bytes, normally. In SWG, it would be 00 00 00 40.

I don't know of any program that reverts bytes of the top of my head, besides actually coding it into a program (like I have to do for the mod tools).

By the way, no idea if you know this, but as a general tip, replace strings (ASCII type stuff, like sample/music_theme.wav) in treExplorer, because it'll automatically fix the chunk size, otherwise you'd have to edit it in manually edit the 4 bytes following a Chunk/FORM name as a reversed integer. This is, because if you edit/paste in a name that's longer than the original one, the chunk size won't match and the game won't read it right, or if you open it in treExplorer, it'll split the different chunks wrongly.
 

duffstone

Member
Joined
Sep 13, 2013
Messages
188
What I'd love to know is how you figured all this out. How do you know a number is a long or a float? I know that's a loaded question and time fills all gaps in knowledge but still. :) I'm guessing that the xyz in the verts in the POB are floats and not longs, but ultimately I don't think it matters as long as the bytes get moved into the right order counter-clockwise order.

-Duff
 

Timbab

Administrator
Staff member
Administrator
Moderator
Joined
Oct 6, 2010
Messages
1,057
Location
Magna Germania
It's generally based on how they look, sometimes it gets a bit tricky, so you have to play around and guess what makes the most sense, but generally all floats that I've found are reveresed, most integers aren't reversed except a handful, then you have some bools, rarely single byte values and the occasional short.

Floats and regular integers are both 4 bytes, shorts are 2 bytes, booleans are 1 byte.

Examples of how I split hex strings:

0000803FB5B4343FC8C6C63E0000803F00000040

This one was easy, they all look like floats off the bat when you split them into 4 bytes (8 characters per)

0000803F
B5B4343F
C8C6C63E
0000803F
00000040



00000100000000000000000000000000803F010000000000803F01

I know that the 00 00 80 3F's are floats for sure (they equal 1.0), so I split those for sure, the 01 00 00 00 looks like an obvious int, so now I have to figure out the rest. This one was actually pretty tricky, but thankfully Sytner helped me out.

01 | Boolean
0001 | Short reversed
0000000000000000000000 | No idea, never found them being set to anything in other files, so I haven't bothered testing it.
0000803F | Float Reversed
01000000 | Integer
0000803F | Float Reversed
01 | Boolean

Comparing with files of the same type is crucial, basically I open a bunch, then copy out parts into notepad, split them by into 4 bytes per line from the bottom to the top, if I have left overs, I'll try to get as much info on the 4 bytes (which are the most common value type) by comparing to other files and then try to figure out which are definitively floats or integers. The rest, I just wing it.


Best way to figure out if something is a float, run it through a hex to float converter. Be sure to reverse the btes first, so B5 B4 34 3F to 3F 34 B4 B5, which is 0.71 rounded up.

If you run a 4 byte through a converter and get something like: -1.610806E+31, then it's clearly not a float.

But after a while, it's pretty easy to get a feel for it.

Most integers are in the correct form, so:

04 00 00 00
01 00 00 00
12 30 00 00

etc


Last thing about the form/chunk sizes, example:
ASCII: FORM....
Hex: 464F524D00000088

464F524D | Is the FORM in bytes
00000088 | File length as a reverse integer, which translates to 136 bytes, or 272 characters (2 characters per byte).

Every FORM and Chunk has a size.

Then some files also have a byte or an integer that lists the number of files that are linked. For example, in an .SND file, you have .mp3 and .wav links separated by 00 bytes, depending on how many links there are, you'll have that number in the 4 bytes before the first filename, so you'll have something like:

ASCII: SD2D0003........voice/sample/cre_ewok_chatter_15.wav.
HEX: 53443244303030330000009901000000766F6963652F73616D706C652F6372655F65776F6B5F636861747465725F31352E77617600

Which split, would be:
5344324430303033 | SD2D0003
00 00 00 99 | Chunk length, so 99 bytes
01 00 00 00 | Number of files, 1 in this case, but if it was 28 for example, it'd be 1C 00 00 00

766F6963652F73616D706C652F6372655F65776F6B5F636861747465725F31352E776176 | Filename path string
00 | Separation 0 byte.
 

Timbab

Administrator
Staff member
Administrator
Moderator
Joined
Oct 6, 2010
Messages
1,057
Location
Magna Germania
Well, continue to wing it, seems to be working out for you. Best way to learn anyhow.

I seem to be posting way too much in depth unneeded 'help'.
 

duffstone

Member
Joined
Sep 13, 2013
Messages
188
oh no, there's no such thing as unneeded info. At least not for me. :) That's why I post my notes all over the place even if they're not in a good "guide" style, or even complete.

Uli getting on to ya for giving stuff away? :)
[hr]
edited the OP to give solution to the specific error that started the thread.

gonna start a new thread for further developments. :)

BTW, Timbab you're awesome with your over posting of info. I wouldn't have gotten as far as I have without some of your tricks.

-Duff
 

Timbab

Administrator
Staff member
Administrator
Moderator
Joined
Oct 6, 2010
Messages
1,057
Location
Magna Germania
Wasn't sure if it was appreciated/needed. :)

I'm glad you're posting notes! I should really make a few more guides about all sorts of stuff, for ease of use in the future.
 

duffstone

Member
Joined
Sep 13, 2013
Messages
188
Timbab said:
Wasn't sure if it was appreciated/needed. :)

I'm glad you're posting notes! I should really make a few more guides about all sorts of stuff, for ease of use in the future.
Well if you haven't been feeling the love, feel it now. 60-70% of my breakthroughs came from some tidbit you mentioned on the SWGEMU forums. Even if it didn't pertain to what I was working on at that moment in time, it was info I used subsequently on other stuff.

Not enough to be a gimme or direct solution, but enough to make me learn it and that's what helps the most. so keep it up PLEASE!!!

-Duff
 

DavinFelth

Administrator
Staff member
Administrator
Joined
Aug 29, 2010
Messages
165
ITT: Timbab is a hero!

Also, this is definitely the best way to learn, I think we all probably know what we do from experimenting and helping each other out with things, it would be good if things could be more accesible though, some people have the creativity but not the technical knowledge to make it happen :)
 

Timbab

Administrator
Staff member
Administrator
Moderator
Joined
Oct 6, 2010
Messages
1,057
Location
Magna Germania
DAVIN! Quit lurking and be more active. <3

I'm working on making it more accessible, but I'm still learning. I got my CEF tool done basically and figured out a main thing that should make the rest of the tools fairly easy to write from now on.

I'll post it in a bit.

@Duff,

I'm glad I could be of indirect help. :D
It really is the best way to learn, because you create your own logic with tidbits of info, it's just a simple this works like X, but you learn to figure out why Y works like X.
 
Top Bottom