2 questions-- hex-editing--spaceships

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
fiddler_on_the_roof
1st Lieutenant
1st Lieutenant
Posts: 460
Joined: Wed Nov 12, 2008 5:28 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

2 questions-- hex-editing--spaceships

Post by fiddler_on_the_roof »

1--RepSharpshooter's hex-editing tutorial, it says
(from Rep's tutorial) 6. read the long int number on the Data Inspector, this is how many bytes are afer it. There will be a 4-byte long- int after each header telling how many bytes come after it.
7. Put cursor on last byte of the long int.
Ok, how do I find the last byte, as it says in step 7. I can do the rest, just I don't know how to find the last byte. Am I supposed to count all 3116 bytes untill I reach the indicated byte?

2--I want to put space ships (eg arc170) on my land map, but when I place the vehicle spawn and munge, nothing is there. I added the rep_fly_arc170_sc to my lua, so it looks like this

Code: Select all

    ReadDataFile("SIDE\\rep.lvl",
                             "rep_hero_macewindu",
                             "rep_fly_arc170_sc")
I put, in the repATT
"rep_fly_arc170_sc", and the same in repDEF, in zeroeditor. the vehicle spawn is in a control zone, and it still doesn't work. What do I need to do?

thanks :bowdown:
User avatar
666rulerofclones
Command Sergeant Major
Command Sergeant Major
Posts: 281
Joined: Fri Aug 08, 2008 1:30 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: The Badger State!

Re: 2 questions-- hex-editing--spaceships

Post by 666rulerofclones »

i think you need to mod the maps files to add in the Arc-170s spawn
MercuryNoodles
Jedi
Jedi
Posts: 1003
Joined: Sun Mar 12, 2006 7:16 pm
Projects :: Space - Boarding Action
xbox live or psn: No gamertag set

Re: 2 questions-- hex-editing--spaceships

Post by MercuryNoodles »

2) Default ships? In that case, a quick check of the rep.req in the assets shows me this:

"rep_fly_arc170fighter_sc"

Fix the names, and try it again.
fiddler_on_the_roof
1st Lieutenant
1st Lieutenant
Posts: 460
Joined: Wed Nov 12, 2008 5:28 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Re: 2 questions-- hex-editing--spaceships

Post by fiddler_on_the_roof »

MercuryNoodles wrote:2) Default ships? In that case, a quick check of the rep.req in the assets shows me this:

"rep_fly_arc170fighter_sc"

Fix the names, and try it again.
Ok, thanks so much! :bowdown: I could have sworn that it was rep_fly_arc170_sc.

what about question 1?
MercuryNoodles
Jedi
Jedi
Posts: 1003
Joined: Sun Mar 12, 2006 7:16 pm
Projects :: Space - Boarding Action
xbox live or psn: No gamertag set

Re: 2 questions-- hex-editing--spaceships

Post by MercuryNoodles »

Start countin' boy! :funny2: No, really. Some things have to be done manually. To make it easier, if it's that long, figure out how many bytes are in one row, and use a little math. There's no need for counting every individual byte, unless you really mistrust your math, or the consistency of the fabric of the universe. :P
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: 2 questions-- hex-editing--spaceships

Post by Maveritchell »

MercuryNoodles wrote:Start countin' boy! :funny2: No, really. Some things have to be done manually. To make it easier, if it's that long, figure out how many bytes are in one row, and use a little math. There's no need for counting every individual byte, unless you really mistrust your math, or the consistency of the fabric of the universe. :P
Woah woah woah. Both of you need to read Rep's tutorial again (or even just look at the first post)!
read the long int number on the Data Inspector, this is how many bytes are afer it. There will be a 4-byte long- int after each header telling how many bytes come after it.
Put cursor on last byte of the long int.
Start on the first byte. Count over four. Ta-da, done.
User avatar
Fiodis
Master of the Force
Master of the Force
Posts: 4145
Joined: Wed Nov 12, 2008 9:27 pm
Projects :: Rannoch + Tientia + Tools Programming

Re: 2 questions-- hex-editing--spaceships

Post by Fiodis »

Off-topic: What are you trying to hex-edit?

On-topic: If you don't want to do that long-int thing, search for the MODL chunk after the cape's MODl chunk, then put your cursor on the byte right before the M.

Ta-da, done.
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: 2 questions-- hex-editing--spaceships

Post by Maveritchell »

Fiodis wrote:On-topic: If you don't want to do that long-int thing, search for the MODL chunk after the cape's MODl chunk, then put your cursor on the byte right before the M.

Ta-da, done.
Wrong. You too, could do well with reading what I posted just above your post.
fiddler_on_the_roof
1st Lieutenant
1st Lieutenant
Posts: 460
Joined: Wed Nov 12, 2008 5:28 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Re: 2 questions-- hex-editing--spaceships

Post by fiddler_on_the_roof »

Ok, thanks
MercuryNoodles
Jedi
Jedi
Posts: 1003
Joined: Sun Mar 12, 2006 7:16 pm
Projects :: Space - Boarding Action
xbox live or psn: No gamertag set

Re: 2 questions-- hex-editing--spaceships

Post by MercuryNoodles »

I don't know how I missed that. Sorry. :P
User avatar
Fiodis
Master of the Force
Master of the Force
Posts: 4145
Joined: Wed Nov 12, 2008 9:27 pm
Projects :: Rannoch + Tientia + Tools Programming

Re: 2 questions-- hex-editing--spaceships

Post by Fiodis »

Maveritchell wrote:Wrong. You too, could do well with reading what I posted just above your post.


I did, Mav, and posted that in response.

I don't see what's wrong with it. I Used that method to get to the end of the cape's MODL chunk, and it worked fine. Rather than messing with long ints to find the end of the chunk, what I did is much easier.
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: 2 questions-- hex-editing--spaceships

Post by Maveritchell »

Fiodis wrote:
Maveritchell wrote:Wrong. You too, could do well with reading what I posted just above your post.


I did, Mav, and posted that in response.

I don't see what's wrong with it. I Used that method to get to the end of the cape's MODL chunk, and it worked fine. Rather than messing with long ints to find the end of the chunk, what I did is much easier.
And this would be great, if he were asking how to find the end of the MODL chunk. He wasn't.
User avatar
Fiodis
Master of the Force
Master of the Force
Posts: 4145
Joined: Wed Nov 12, 2008 9:27 pm
Projects :: Rannoch + Tientia + Tools Programming

Re: 2 questions-- hex-editing--spaceships

Post by Fiodis »

fiddler_on_the_roof wrote:Ok, how do I find the last byte, as it says in step 7.
Going to Rep's tut, we see that :
Hidden/Spoiler:
[quote="RepSharpshooter"]1. Find cape you want (which .msh, I'll use rep_inf_ep3sniper)
2. Open it up in hex editor
3. Search > find and search for: MODL
Note remember to start at begining. After MODL in the msh file, they'll be a MTYP MNDX and the NAME hedr. Make sure afer the NAME header is rep_inf_ep3sniper_cape, or whatever the cape is called.
4. Go to tools > data inspector you'll need it
5. Put the cursor afer the MODL header that includes the cape (not on the 'L' on the byte after it)
6. read the long int number on the Data Inspector, this is how many bytes are afer it. There will be a 4-byte long- int after each header telling how many bytes come after it.
7. Put cursor on last byte of the long int.
8. Go to address > go to. Select relative down, and type in the long int you read before (press ok for those who are literal)
9. This will put you at the end of the cape's MODL chunk. Make sure you are indeed at the end and not selecting another header.
10. Hold SHIFT and press the up arrow till you return to the begining of the cape's MODL chunk (the data should turn red)
11. Copy (CTRL + C) it and make a new file. Paste it and save this file as "sniper_cape" so you can use it over and over again. Make sure you got all of the cape, and only the cape MODL chunk.
[/quote]
Step 7 deals with getting to the end of the MODL chunk. I posted an alternative route, so that he doesn't have to mess with long ints at all, at least not in this portion of the tutorial. He did say
fiddler_on_the_roof wrote:I can do the rest, just I don't know how to find the last byte.


He was asking how to find the last byte, AKA how to get to the end of the MODL chunk.
fiddler_on_the_roof
1st Lieutenant
1st Lieutenant
Posts: 460
Joined: Wed Nov 12, 2008 5:28 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Re: 2 questions-- hex-editing--spaceships

Post by fiddler_on_the_roof »

Ok, thanks guys.

Just one more quick question about the hex-editing.
1. At the way beginning is the HEDR header. After this is a 4-byte long int that tells how long the file is after HEDR and the 4-byte long int. Use the data inspector to read it.
2. Go back to your cape MODL chunk you saved to a different file.
3. Put your cursor at the way end and read the address on the bottom left. Put this in a calculator.
4. Place the cursor on the first byte of the long int directly after HEDR (address is 4, remember, counting starts at 0).
5. Read the long int number in the data-inspector. Add this to the number in the calculator, and add 1 to the sum (cause reading the cape started at 0, now we want to count starting at 1)
6. Got to tools > encode number and type the result of step 5 and check the long int box, make sure to overwrite at current address (press ok).
7. The number should be encoded in binary format now.

MSH2

1. Read the long int after the MSH2 header (I assume you know how to do this by now)
2. Add the long int + cape size + 1
3. Encode the sum from step 2 after MSH2.
Mainly the stuff in red I don't get. Where exactly do I find that longint number? When I click the last bytes in the cape, 3 of them don't have longint's, and the 4th has a like 8 digit longint.

thanks
User avatar
Fiodis
Master of the Force
Master of the Force
Posts: 4145
Joined: Wed Nov 12, 2008 9:27 pm
Projects :: Rannoch + Tientia + Tools Programming

Re: 2 questions-- hex-editing--spaceships

Post by Fiodis »

The address is not the same thing as the long int. The address can be found at the very, very bottom-left of the application's window.
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: 2 questions-- hex-editing--spaceships

Post by Maveritchell »

Fiodis wrote:
fiddler_on_the_roof wrote:Ok, how do I find the last byte, as it says in step 7.
Step 7 deals with getting to the end of the MODL chunk. I posted an alternative route, so that he doesn't have to mess with long ints at all, at least not in this portion of the tutorial. He did say
fiddler_on_the_roof wrote:I can do the rest, just I don't know how to find the last byte.


He was asking how to find the last byte, AKA how to get to the end of the MODL chunk.
Yes, you can do it your way. But;
a) That wasn't the question he's asking
b) He doesn't understand what's going on and it's best not to modify instructions until something is understood
c) A MODL chunk doesn't always follow another MODL chunk.
fiddler_on_the_roof wrote:Mainly the stuff in red I don't get. Where exactly do I find that longint number? When I click the last bytes in the cape, 3 of them don't have longint's, and the 4th has a like 8 digit longint.
The part in red isn't talking about the longint. You're told to find one thing - the size of the MODL chunk. To do this, he's telling you to find the end of the MODL chunk by:
a) reading the longint, and
b) going to the last byte of the longint then doing a "relative down" move based on the size of the longint

The "long int" is the four bytes that follow "MODL" None of what you're talking about is the MODL's longint.
User avatar
Fiodis
Master of the Force
Master of the Force
Posts: 4145
Joined: Wed Nov 12, 2008 9:27 pm
Projects :: Rannoch + Tientia + Tools Programming

Re: 2 questions-- hex-editing--spaceships

Post by Fiodis »

Maveritchell wrote:a) That wasn't the question he's asking
b) He doesn't understand what's going on and it's best not to modify instructions until something is understood
c) A MODL chunk doesn't always follow another MODL chunk.
a) From my point of view, yes, it is. And so, from my point of view, I answer him.
b) That's your opinion. And I agree with it when you're making a major change to the instructions, but I'm not. I'm just suggesting a way to get around something he doesn't understand. My philosophy is that, to use a metaphor, it is better to find a way around a chasm and try to build a bridge from the other side, if you know what I mean. Your philosophy, as I understand it, is to stop at the closer edge and start building. Why don't we let fiddler choose which path to follow? Either one works well.
c) But in this case, it does. I checked it myself. I would not post something that led him astray when he tries it out.
fiddler_on_the_roof
1st Lieutenant
1st Lieutenant
Posts: 460
Joined: Wed Nov 12, 2008 5:28 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Re: 2 questions-- hex-editing--spaceships

Post by fiddler_on_the_roof »

Ok, thanks both of you, this has been extremely helpful, and I mean all of the advice.

Thanks :bowdown:
User avatar
Fiodis
Master of the Force
Master of the Force
Posts: 4145
Joined: Wed Nov 12, 2008 9:27 pm
Projects :: Rannoch + Tientia + Tools Programming

Re: 2 questions-- hex-editing--spaceships

Post by Fiodis »

You're welcome. Congrats on figuring it out.
Post Reply