Post: Question for a real coder
09-26-2010, 08:17 PM #1
(adsbygoogle = window.adsbygoogle || []).push({}); ok so i seem to be able to modify my gsc's but only if i have same byte for byte results

for example if i want to replace


himynameis1

with

himynameis11

then i have to find someone i can delete a character so that its the same exact length

can anyone tell me how to go about adding characters to a gsc without getting errors?

see i have plenty of extra 00's in my file im trying to edit but if i replace a single 00 then i get black screened :(

whoever can help with this will get there name in my patch tho im sure you probably dont care, either way, ill REALLY appreciate it, btw im signing up for paypal now so i can donate to ngu ill be a premium soon so dont think im just a leecher!

thanks everyone,
jeff
(adsbygoogle = window.adsbygoogle || []).push({});
09-26-2010, 08:19 PM #2
fightinillini94
Climbing up the ladder
Originally posted by jeffadkins51 View Post
ok so i seem to be able to modify my gsc's but only if i have same byte for byte results

for example if i want to replace


himynameis1

with

himynameis11

then i have to find someone i can delete a character so that its the same exact length

can anyone tell me how to go about adding characters to a gsc without getting errors?

see i have plenty of extra 00's in my file im trying to edit but if i replace a single 00 then i get black screened :(

whoever can help with this will get there name in my patch tho im sure you probably dont care, either way, ill REALLY appreciate it, btw im signing up for paypal now so i can donate to ngu ill be a premium soon so dont think im just a leecher!

thanks everyone,
jeff


if you need more space in your patch delete a dev comment. dev comments begin with //
09-26-2010, 08:34 PM #3
shiver
chaos personified
Originally posted by jeffadkins51 View Post
ok so i seem to be able to modify my gsc's but only if i have same byte for byte results

for example if i want to replace


himynameis1

with

himynameis11

then i have to find someone i can delete a character so that its the same exact length

can anyone tell me how to go about adding characters to a gsc without getting errors?

see i have plenty of extra 00's in my file im trying to edit but if i replace a single 00 then i get black screened :(

whoever can help with this will get there name in my patch tho im sure you probably dont care, either way, ill REALLY appreciate it, btw im signing up for paypal now so i can donate to ngu ill be a premium soon so dont think im just a leecher!

thanks everyone,
jeff


If by adding a single character black screens you, you are doing it wrong.

Sounds like you just want to edit someone's patch and stick your name on it.

The following user thanked shiver for this useful post:

XxprokillahxX
09-26-2010, 08:37 PM #4
You're doing it completely wrong.. you don't need to remove other stuffs (if your just editing the name), just put your name there and compress it back.
09-26-2010, 08:49 PM #5
im not replacing someone's name or that would be simply to delete 8 characters and add 8...

im trying to add code like 120 characters or 30 characters etc and i dont want to try to find 120 characters to delete. so i need to know how to add characters to a gsc recompress it and reinsert it without getting blackscreened

currently im just editing the 00000002.dat recompressing it into a blank file at the correct offset then im hex'ing the recompressed file, and writing over the original hex in the b4a0 or w/e dat it is, then im packzipping b4a0 at correct offset into patch_mp.ff

it works fine as long as i dont add or subtract any characters... but if i add 20 i have to delete 20...
09-26-2010, 09:18 PM #6
ghowden
Pokemon Trainer
You edit the length attribute in the header for the GSC to be the new length, and the main patch header too
09-26-2010, 09:28 PM #7
Originally posted by ghowden View Post
You edit the length attribute in the header for the GSC to be the new length, and the main patch header too


ya thats always confused me b/c ok i pulled up a premodded patch and i look and all the headers are already wrong

yet it doesnt effect anything supposedly

if i look at there headers itll be like 9a af or something but the real size is actually like 01 00 10

which sucks b/c how am i supposed to change 9a af into 01 00 10 :(

sigh... so much to learn
09-26-2010, 10:02 PM #8
ghowden
Pokemon Trainer
9AAF is the length for one of the zlib blocks in the patch if I remember right. you only need to worry about that if the zlib block compressed is longer than that, if you change the size of the GSC you need to edit the first set of numbers in it's header (in the decompressed zlib not the patch file) You might have made the gsc longer, but that doesnt mean it's compressed size is more too, lots of repeated characters means it could end up smaller
09-26-2010, 10:16 PM #9
Originally posted by ghowden View Post
9AAF is the length for one of the zlib blocks in the patch if I remember right. you only need to worry about that if the zlib block compressed is longer than that, if you change the size of the GSC you need to edit the first set of numbers in it's header (in the decompressed zlib not the patch file) You might have made the gsc longer, but that doesnt mean it's compressed size is more too, lots of repeated characters means it could end up smaller


im looking fora header in the decompressed zlib (00000002.dat) and i really dont see one, where is it located? thx a ton..
09-26-2010, 11:24 PM #10
PS3LUV3R
Too Beast
You need to match the header with the file size of the decompressed GSC.

Find the file size of the 00000002.dat file, convert it to hex. Ad those 4 values before the FF FF FF FF. There are many tuts on NGU if you don't know what I'm talking about.

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo