Page 1 of 1

2 questions-- hex-editing--spaceships

Posted: Mon Jan 12, 2009 9:19 pm
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:

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

Posted: Mon Jan 12, 2009 10:18 pm
by 666rulerofclones
i think you need to mod the maps files to add in the Arc-170s spawn

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

Posted: Tue Jan 13, 2009 4:38 am
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.

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

Posted: Tue Jan 13, 2009 6:16 pm
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?

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

Posted: Wed Jan 14, 2009 4:48 am
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

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

Posted: Wed Jan 14, 2009 6:24 am
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.

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

Posted: Wed Jan 14, 2009 4:48 pm
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.

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

Posted: Wed Jan 14, 2009 4:49 pm
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.

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

Posted: Wed Jan 14, 2009 6:01 pm
by fiddler_on_the_roof
Ok, thanks

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

Posted: Thu Jan 15, 2009 1:52 pm
by MercuryNoodles
I don't know how I missed that. Sorry. :P

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

Posted: Thu Jan 15, 2009 4:46 pm
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.

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

Posted: Thu Jan 15, 2009 5:12 pm
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.

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

Posted: Thu Jan 15, 2009 6:39 pm
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.

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

Posted: Thu Jan 15, 2009 6:59 pm
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

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

Posted: Thu Jan 15, 2009 7:13 pm
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.

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

Posted: Thu Jan 15, 2009 7:23 pm
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.

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

Posted: Thu Jan 15, 2009 7:35 pm
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.

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

Posted: Thu Jan 15, 2009 8:51 pm
by fiddler_on_the_roof
Ok, thanks both of you, this has been extremely helpful, and I mean all of the advice.

Thanks :bowdown:

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

Posted: Thu Jan 15, 2009 9:13 pm
by Fiodis
You're welcome. Congrats on figuring it out.