Play Mos Eisley Assault with different levels
Moderator: Moderators
- guru
- Jawa Admin
- Posts: 2390
- Joined: Thu Oct 14, 2004 8:45 pm
- Projects :: swbf 1 vanilla
Wrong. There IS a way to use longer strings, but it's not as easy as the normal method. I just played around a little and noticed that .lvl files consist of blocks like xml files. The blocks have the following formatIf you want to replace all_hero_luke_jedi then the item has to be less than or equal in size to the space provided.
Code: Select all
4 bytes type - 4 bytes length - content - some 00 bytes
Code: Select all
ufcb: 4 times 00 at the end (This is the 'root' block that surrounds everything)
lvl_: 4 00 bytes
scr_: 4 00 bytes
NAME: ? 00 bytes (Found with 0 and 2 bytes)
DATA: 3 00 bytes
SCOP: 4 00 bytes
OK, fine... so all you have to do is to increase the length bytes of all blocks of the 'branch* your string is in, including the string subblock (which seems to be a little different from the other blocks since it has only a one byte type 0x04 and the 00 byte at the end is included in the length). I haven't successfully done that yet, but it SHOULD work. I guess, I just haven't found all blocks.
P.S.: Please don't blame me if anything is wrong or if there is already a document like mine. That's only what I found out in half an hour.
-
- Missing Jedi Admin
- Posts: 3277
- Joined: Fri Nov 12, 2004 2:54 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
Ladies and gentlemen! DFYX proudly presents cloakedanakin on Corouscant!
I finally found out which block sizes to increase. For the rep hero on Corouscant (Conquest) they are:
Screenshot 1
Screenshot 2
mission.lvl
I finally found out which block sizes to increase. For the rep hero on Corouscant (Conquest) they are:
Code: Select all
OFFSET TYPE
0x000004 ufcb
0x0187D8 lvl_
0x0187E8 scr_
0x018810 BODY
0x0192C5 The name string
Screenshot 2
mission.lvl
-
- Missing Jedi Admin
- Posts: 3277
- Joined: Fri Nov 12, 2004 2:54 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
That's a great discovery, DF', which might become really useful for further SWBF II mods... Thanks for helping the GameToast community !... (And for having released your source file.)
By the way, would it be possible to release a (small) tutorial, where you'd explain us how you did that mod, please ? Thanks in advance !...
By the way, would it be possible to release a (small) tutorial, where you'd explain us how you did that mod, please ? Thanks in advance !...
Well, I did nothing special. Changed rep_hero_macewindu with rep_hero_cloakedanakin and increased the 5 integers I mentioned by 4 (since the new string consists of 4 bytes more than the old one).
The integers are really easy to find. The first one is at the beginning of the file just after "ufcb". To find the 2nd to 4th integer just search for the last lvl_ before the unit you want to edit. They're very close to each other, just after the block types. The last one consists of the 4 bytes just before the string. Just remember that in windows files, the lowest byte (the one with the 1-bit to 128-bit of the integer) is usually the first and the highest byte is the last. So that's NOT the order you would write them down.
The integers are really easy to find. The first one is at the beginning of the file just after "ufcb". To find the 2nd to 4th integer just search for the last lvl_ before the unit you want to edit. They're very close to each other, just after the block types. The last one consists of the 4 bytes just before the string. Just remember that in windows files, the lowest byte (the one with the 1-bit to 128-bit of the integer) is usually the first and the highest byte is the last. So that's NOT the order you would write them down.
You should do this with a hex editor. Don't know how Lua works, maybe you could use it, too.
An integer is a number that consists of 4 bytes. Sry that I didn't explain, but I'm a programmer and so it's quite normal to call a 4-byte number an integer. To increase the first integer by 4, replace CC 21 13 00 (= 0x001321CC in normal notation = 1253836 as decimal number) with D0 21 13 00.
An integer is a number that consists of 4 bytes. Sry that I didn't explain, but I'm a programmer and so it's quite normal to call a 4-byte number an integer. To increase the first integer by 4, replace CC 21 13 00 (= 0x001321CC in normal notation = 1253836 as decimal number) with D0 21 13 00.
since im not a programer (only know basic parts of BASIC) and im not an experienced modder so explain this in the simplest way possible. (i lost you somewhere around the first thing you said) I'll read through it a few more times but im still confused
Also how do you know how to convert those integers into decimal numbers?
Also how do you know how to convert those integers into decimal numbers?
OK, I see... I should start with the basics... the problem is that I'm German so it's quite hard for me to explain things like that in English in a way a newbie understands.
Converting hex numbers to decimal numbers is easy. Just open the windows calculator and change it's display mode in the view menu. Then there will be some more buttons. On the top left you can switch the mode between hex, dec, oct and bin. Switch the mode to hex, type in your hex number (Don't forget to invert the byte order) and switch to dec. Now you'll see the number as a decimal number.
Converting hex numbers to decimal numbers is easy. Just open the windows calculator and change it's display mode in the view menu. Then there will be some more buttons. On the top left you can switch the mode between hex, dec, oct and bin. Switch the mode to hex, type in your hex number (Don't forget to invert the byte order) and switch to dec. Now you'll see the number as a decimal number.
Oh My GOD. I just tried changing tat\tat2.lvl.....tat2_tdm to:
spa\spa3.lvl......spa3_ctf (Space Kashyyyk)
I dont know if anyone has tried this, but it had some FREAKY EFFECTS!
This may take a while to load (there are 10 screenies) but it appears that there are NO starfighters, NO turret seats, and most surprising, NO ROOMS IN THE HEROES SHIP! (ie. no engine, shield, or life support room, but the main room with the turret seats still exists.)
Have a look:
spa\spa3.lvl......spa3_ctf (Space Kashyyyk)
I dont know if anyone has tried this, but it had some FREAKY EFFECTS!
This may take a while to load (there are 10 screenies) but it appears that there are NO starfighters, NO turret seats, and most surprising, NO ROOMS IN THE HEROES SHIP! (ie. no engine, shield, or life support room, but the main room with the turret seats still exists.)
Have a look:
OK....Here are the links for anyone who cant see them...
http://i31.photobucket.com/albums/c353/ ... -17-23.jpg
http://i31.photobucket.com/albums/c353/ ... -25-10.jpg
http://i31.photobucket.com/albums/c353/ ... -31-31.jpg
http://i31.photobucket.com/albums/c353/ ... -43-79.jpg
http://i31.photobucket.com/albums/c353/ ... -36-54.jpg
http://i31.photobucket.com/albums/c353/ ... -11-82.jpg
http://i31.photobucket.com/albums/c353/ ... -05-71.jpg
http://i31.photobucket.com/albums/c353/ ... -27-62.jpg
http://i31.photobucket.com/albums/c353/ ... -13-75.jpg
http://i31.photobucket.com/albums/c353/ ... -09-95.jpg
There.
http://i31.photobucket.com/albums/c353/ ... -17-23.jpg
http://i31.photobucket.com/albums/c353/ ... -25-10.jpg
http://i31.photobucket.com/albums/c353/ ... -31-31.jpg
http://i31.photobucket.com/albums/c353/ ... -43-79.jpg
http://i31.photobucket.com/albums/c353/ ... -36-54.jpg
http://i31.photobucket.com/albums/c353/ ... -11-82.jpg
http://i31.photobucket.com/albums/c353/ ... -05-71.jpg
http://i31.photobucket.com/albums/c353/ ... -27-62.jpg
http://i31.photobucket.com/albums/c353/ ... -13-75.jpg
http://i31.photobucket.com/albums/c353/ ... -09-95.jpg
There.
-
- Missing Jedi Admin
- Posts: 3277
- Joined: Fri Nov 12, 2004 2:54 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
Jaffa, I didn't ask because I can't see them but because it's not good to post large pics directly in a thread.
Leviathan, the integer must contain the exact length of the block it belongs to. So if you increase the string length by 2, you have to increase all the integers by 2. Of course you can add more bytes to the string and null them out, but then you have to increase the integers by the number of bytes you added INCLUDING the 00s.
Leviathan, the integer must contain the exact length of the block it belongs to. So if you increase the string length by 2, you have to increase all the integers by 2. Of course you can add more bytes to the string and null them out, but then you have to increase the integers by the number of bytes you added INCLUDING the 00s.