Simply Hex

Post everything from general questions, to modding questions, to map WIPs to releases. (SWBF1 only)

Moderator: Moderators

Post Reply
Storm

Simply Hex

Post by Storm »

Hello. I'm quite new to the SWBF modding scene, and I'm curious of just 1 question. Has anybody found out the hex for changing how many reinforcements are in each LVL? I'm modifying the XBox game and not PC so the SDK won't work (I don't own the PC game so it won't load for me :-\). Is there any documentation regarding the hex of certain values and places? Wouldn't mind changing the speed of the gun fires as well, but that too, needs to be found in hex. I'll continue my search and hopefully someone can lend a helping hand.
sawyerdk9

RE: Simply Hex

Post by sawyerdk9 »

I asked about changing reinforcements and how many people are on the map at once but nobody seemed to know
JabbaLovesLava
Sith
Sith
Posts: 1396
Joined: Tue Jun 07, 2005 11:50 am

RE: Simply Hex

Post by JabbaLovesLava »

mmm, i bet guru can help. He's a computer (and hex-editer) geek :D (geek as in you know a lot, not as in insult)
Last edited by JabbaLovesLava on Tue Aug 30, 2005 5:32 pm, edited 1 time in total.
Storm

Post by Storm »

Nobody could take a current .lvl, edit it to more reinforcements, then find the odd offset?? Or is there much more to it than that.. I wouldn't think so.
sawyerdk9

Post by sawyerdk9 »

if u have the mod tools you can make an new map and change that stuff in the lua, then when your all done munge it and the take your actual level file and replace it with one of the shipped ones. thats what I do
User avatar
Nimlot
Jedi Admin
Jedi Admin
Posts: 103
Joined: Wed Oct 20, 2004 9:35 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Contact:

Post by Nimlot »

Its definitly possible Storm, but it breaks the games warrenty, thus is not condoned. But if you really want to do, search these forums, this was discussed a lot back in the beginning.
Leviathan
Missing Jedi Admin
Posts: 3277
Joined: Fri Nov 12, 2004 2:54 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Post by Leviathan »

Or simply ask here... I like hex-edit some *.LVL files ! :wink:
Storm

Post by Storm »

That is what I'm asking. If someone has the modding tool, take a current level they have, with say 200 reinforcements, then export/munge/etc. Then same level, change to 300 reinforcements, then export/munge/etc. and then give me the offset number that's different. How is that breaking the game's warranty? o.O
Leviathan
Missing Jedi Admin
Posts: 3277
Joined: Fri Nov 12, 2004 2:54 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Post by Leviathan »

So, you just want to change the number of reinforcements for shipped maps... But which ones ?
Storm

Post by Storm »

Any, just do 1, do 200 reinforcements, then do the exact same map with 300 reinforcements, then use hex editor to see which offset on 1 map is different. The only offset that should be different is the reinforcements.
Leviathan
Missing Jedi Admin
Posts: 3277
Joined: Fri Nov 12, 2004 2:54 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Post by Leviathan »

It can be realized... I'll see what I can do... :wink:
Riley75

Post by Riley75 »

I don't know what differences there may be on the X-Box, in terms of location and structure of files... But if the files are the same as on the PC, this is how the reinforcement count is stored:

It's in the \_LVL_PC\mission.lvl file for all the shipped maps. I don't have all the specific offsets written down, but you can identify them by:
1) Finding the map name (eg. "bes1a").
2) Scrolling down after a section of string values.
3) Finding the hex bytes "C6 31 00 80". That's how it looks for a count of 200. Other values are "C6 36 00 80" for 220 (Kamino - clones only), and "46 3E 00 80" for 250 (Hoth and a few others). Keep in mind this will appear twice for each map - once for each side. They're usually fairly close to each other for the same map. If you're looking at them in UltraEdit in hex mode (16 bytes per line), they're usually about 8 lines apart.

Here are some possible values you might want :
300 = "C6 4A 00 80"
400 = "C6 63 00 80"
500 = "C6 7C 00 80"
1000 = "C6 F9 00 80"

For anyone who decides to try this... please remember to back up your mission.lvl file! (And I'm assuming this is for single-player instant action mode; make sure you put it back to what it was before you play multiplayer!)

Now, I'm sure people are going to ask how these numbers are computed... The best I can do is direct you here:
http://personal.riley-man.com/swbf/edit ... l-scr.html
And say that it has to do with how Lua byte code is stored. What you're finding above is actually a "PUSHINT 200" opcode.

One easy rule: If the number (call it N) you want is divisible by 4, the hex for it is always of the pattern "C6 xx 00 80". The "xx" is (N - 4) / 4. If it isn't divisible by 4 (such as for 250), well, you'll have to read over the page I linked to understand it all.


And um... to those who remember me... hi again. ;)
Storm

Post by Storm »

The one man I was hoping would reply! Thanks a bunch Riley!
User avatar
Nimlot
Jedi Admin
Jedi Admin
Posts: 103
Joined: Wed Oct 20, 2004 9:35 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Contact:

Post by Nimlot »

ooo, Riley! I hope you stick around for BF2, I definitely would love more lvl documenting :)
Riley75

Post by Riley75 »

Possibly. ;)
Certain things about Battlefront kind of disappointed me, to be honest. Once I started working with the map editor, the AI controls available (boundaries, hubs, connections, hints) I found tough to deal with. The lack of additional game modes, and the lack of a more comprehensive single-player experience, were downers. I was really hoping to build not just new maps, but entire campaigns of related maps.
My prospects for Battlefront II have improved as of late, though. I've been reading about all the new game modes (capture the flag, hunt mode, etc.) and the single-player campaign. So perhaps I'll be back. ;)
Leviathan
Missing Jedi Admin
Posts: 3277
Joined: Fri Nov 12, 2004 2:54 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Post by Leviathan »

Riley', you gave us a manner to tweak reinforcements' number through hex-editing... Personally, I prefer making these modifications using SWBF Mod Tools' materials... :wink:

PS : By the way, welcome back ! I've not seen you for a long time... :)
Riley75

Post by Riley75 »

Yep, a simple mod tool to do this would be great. 8) If someone were to write up a program for it, I'd recommend also allowing the person to set the unit count -- and allowing the person to set the counts back to defaults.
Leviathan
Missing Jedi Admin
Posts: 3277
Joined: Fri Nov 12, 2004 2:54 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Post by Leviathan »

I guess such a program could be done, using VBS scripts... (Based on "BFBuilder.hta")
Riley75

Post by Riley75 »

You could, yes. Before BFBuilder, I didn't even know about this "HTML Application" (*.hta files) functionality. :oops: I tend to do stuff like this in C/C++. heh.
Leviathan
Missing Jedi Admin
Posts: 3277
Joined: Fri Nov 12, 2004 2:54 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Post by Leviathan »

I've already known those *.HTA files... (Like a sound player for Internet Explorer, and many other funny stuffs like that... :P)
Post Reply