Post: Sacrifice a GSC, Save up to 263 Unique Strings!
02-13-2012, 08:28 PM #1
Amanda
Can’t trickshot me!
(adsbygoogle = window.adsbygoogle || []).push({}); Note: All these things below have been tested and work perfectly on PC. I need someone to test them on PS3 too. If it works, then we will have endless posibilities for Mods and MW2 style Menus Smile

With 263 more strings available we can create over 200 sub-menus, with unlimited options in the same patch, or use a MW2 style menu with over 200 options!

The only limitation to this method is that we need the rank.gsc intact in the patch. This means that if we rename it in order to clear it and write our own scripts in it, then the game will read it from the disc and the trick will not work.

The method to save strings is simple! We just make the game not to read and precache all the challenge names from the .csv file, but we give all challenges a name of our choice, the same name! For example if someone in the game achieves 100 Headshots with the M40A3 the following message would appear: CHALLENGE COMPLETED. M40A3 EXPERT. ACHIEVE 100 HEADSHOTS WITH THIS WEAPON. Now with the modified data this message will appear when the player completes the same challenge or any other challenge: CHALLENGE COMPLETED. HIDDEN CHALLENGE!


Here is the only change you should do in rank.gsc
Find the function BuildChallengeInfo() and modify it as shown in the picture!


You must login or register to view this content.

Here is some proof that actually works on PC! I believe that it works on a PS3 too because they both read the strings from the .csv file and then precache them, but need someone to test for sure!

You must login or register to view this content.

You must login or register to view this content.

Function used for the test:

    StringTest() {
display = createFontString("default",1.5 ,self);
display setPoint("CENTER","CENTER",0,0);
i=0;
for(;Winky Winky
{
display setText("^6We love Patty " + i + " <3");
i++;
wait 1;
}
}


as a sub thread on PlayerSpawned();



Results:
PC originally supports up to 90 extra strings!
By removing the challenges names, it supports 353 custom strings such as Menu Options etc.
So we saved 353 - 90 = 263 more strings!
263 is almost the number of challenges that exist in the game!
PS3 supports near 30 strings, 60 less than PC.
But it shares the same 263 challenges...
So what if we remove their names?
If this works the same way, that means that we will have 233 free strings to use on a PS3 without worrying for an overflow anymore!

The only limitation we will have is the size of the rawfiles Winky Winky
(adsbygoogle = window.adsbygoogle || []).push({});

The following 37 users say thank you to Amanda for this useful post:

aerosoul94, Baby-panama, BossamBemass, Choco, codybenti, Correy, d7w7z, DlBSY993, EpiiiCxDGx, Full-Evil, FutureOps, IELIITEMODZX, iiReFuZee, iPROFamily, iReset Nigga, IVI40A3Fusionz, Jacob-And-Britt, KCxFTW, Kush Friendly, Loxy, oCmKs_4_LiFe, Cmd-X, Rainbow Gravity, Right, Taylor, TheFuziioN-, ThePhantom410., Uk_ViiPeR, Vampytwistッ, x_DaftVader_x, xHeAVeN, xMrCheatVisionx, xMrSuperMoDzZ--
02-14-2012, 02:38 PM #47
Great idea!!!!thank you Amanda Winky Winky
02-14-2012, 03:37 PM #48
Originally posted by iReset
This is AMAZING thanks alot me and Newelly are working on a few Mw2 Style Menus.....on pc crashes at 355 lol
u have just made urself my fav cod4 coder Happy
well if you use scale overtime, flashing text, and all that shit mw2 menu's use then it will still overflow (just like when people use \n without this fix) so your better off useing \n with this fix for a bug free menu Happy

The following 2 users say thank you to IELIITEMODZX for this useful post:

Karoolus, x_DaftVader_x
02-14-2012, 05:23 PM #49
Amanda
Can’t trickshot me!
Originally posted by IELIITEMODZX View Post
well if you use scale overtime, flashing text, and all that shit mw2 menu's use then it will still overflow (just like when people use \n without this fix) so your better off useing \n with this fix for a bug free menu Happy


No, it will not overflow! Just tested it Winky Winky I tried a function that really abused my setText()

    StringTest_V2() {
display = createFontString("default",1.5 ,self);
display setPoint("CENTER","CENTER",0,0);
i=0;
for(;Winky Winky
{
display setText("^7We love Patty " + i + " <3");
//display.glowColor = ( 1.0, 0.0, 0.0 );
//display.glowAlpha = 1;
//display.color = ( 0.9, 1.0, 0.0 );
r = randomfloat(1);
g = randomfloat(1);
b = randomfloat(1);
display.glowColor = ( 1.0, 0, 0 );
display.glowAlpha = 1;
display.color = ( r, g, b );

display.alpha = 1;
//display.glowColor = (255, 1, 1);
display.glowAlpha = 1;
//display ChangeFontScaleOverTime(0.3);
display.fontScale=randomfloat(3);
i++;
wait 0.1;
//display ClearAllTextAfterHudelem();
}
}

It still overflows at 353 strings!

This happens because the game creates a global array when it initializes all the variables and sorts the strings in this array. When we exceed the size of this array then the game overflows... Color, size, fontscale and any other elements are built in objects referring to each entity, string or Hud Elem. Also GSC auto frees memory when a Hud Elem is destroyed or a color in a font changes etc. But for some reason it doesn't delete the strings. It seems that it does not allocate them dynamically and this is why it always chrashes when the same exact number of strings is reached.

And yes we can have MW2 Menus :love: :love:
Just make sure that the use less than 250 strings, practically near 200 different options!

For example we can create 10 Menus with 19 options each one ( (19 Options + 1 for titles) * 10 Menus ) = 200 strings.
We have also other 50+ strings, to use in your functions, such as Progress Bars, Messages, DoHearts() etc!
Practically UNLIMITED.
And if you want more than 200 options, there is always the new line method or the println!
02-14-2012, 05:32 PM #50
Originally posted by Amanda View Post
No, it will not overflow! Just tested it Winky Winky I tried a function that really abused my setText()

    StringTest_V2() {
display = createFontString("default",1.5 ,self);
display setPoint("CENTER","CENTER",0,0);
i=0;
for(;Winky Winky
{
display setText("^7We love Patty " + i + " <3");
//display.glowColor = ( 1.0, 0.0, 0.0 );
//display.glowAlpha = 1;
//display.color = ( 0.9, 1.0, 0.0 );
r = randomfloat(1);
g = randomfloat(1);
b = randomfloat(1);
display.glowColor = ( 1.0, 0, 0 );
display.glowAlpha = 1;
display.color = ( r, g, b );

display.alpha = 1;
//display.glowColor = (255, 1, 1);
display.glowAlpha = 1;
//display ChangeFontScaleOverTime(0.3);
display.fontScale=randomfloat(3);
i++;
wait 0.1;
//display ClearAllTextAfterHudelem();
}
}

It still overflows at 353 strings!

This happens because the game creates a global array when it initializes all the variables and sorts the strings in this array. When we exceed the size of this array then the game overflows... Color, size, fontscale and any other elements are built in objects referring to each entity, string or Hud Elem. Also GSC auto frees memory when a Hud Elem is destroyed or a color in a font changes etc. But for some reason it doesn't delete the strings. It seems that it does not allocate them dynamically and this is why it always chrashes when the same exact number of strings is reached.

And yes we can have MW2 Menus :love: :love:
Just make sure that the use less than 250 strings, practically near 200 different options!

For example we can create 10 Menus with 19 options each one ( (19 Options + 1 for titles) * 10 Menus ) = 200 strings.
We have also other 50+ strings, to use in your functions, such as Progress Bars, Messages, DoHearts() etc!
Practically UNLIMITED.
And if you want more than 200 options, there is always the new line method or the println!
if you have lots of people useing the menu it will overflow if you use the mw2 way.
02-14-2012, 06:24 PM #51
Amanda
Can’t trickshot me!
The game doesn't care how many clients use the Menu or how many times the same string appears. It only cares how many unique strings appear on the screen! If before the end of the match less than 300 unique strings are displayed it will never overflow!

Here is why MW2 could overflow if too many people were verified! Everything has its explanation!

When someone was in the lobby the following message would appear:

"Welcome" + player.name "in" + level.hostname + "Lobby"!
"Status:" + player.status

This welcome message can spent over 18 strings! For example:
"Welcome Player_1_Elite at my Lobby"
"Welcome Player_2_Pro at my Lobby"
"Welcome Player_3_Camper at my Lobby"
...
"Welcome Quickscopez at my Lobby"

up to 18 strings!

Status: VIP
Status: ADMIN
Status: Host
Status: Co-Host


4 strings

18 + 4 = 22 Strings Spared for Nothing!

Method 2:
Instead we could have used: "Welcome to my server! \n Status:" + status, where status can be ADMIN, HOST, VIP
We only used 3 strings for the same thing!


What if we use the first method that consumes 22 strings and then all 18 players leave the game and, some other 18 NEW players join?
The game will create other 18 new strings for player Menu & other 18 for the welcome message!
So we have 18 + 18 + 22 = 58 strings

If we use 150 options in the Menu and the max strings size is 200, then it will overflow somewhere in middle match!
We also use strings for functions ( Press [] to enter the Helicopter ), progress Bars ( Unlocking... ), Lower Messages ( Capturing Carepackage ) and many other things...

EXAMPLE 2: ->A Stat or Clan Tag Editor that consists of the symbols 0-9 , A-Z spares 26 + 10 = 36 strings.
->An RGB editor can spend 255 strings ( numbers 0 - 255 to be displayed as a string )

So we won't put numbers in the RGB Editor, or we will use println!
Also it is not recommented to use a Stat Editor if our Menu has over 200 options ( uses over 200 strings )
It is recommented to leave a few unused strings, (about 10 - 20 unused) if we use player's Menu, so we can handle the situation when new players join.
We should also count how many players left the game and if the number exceeds our max string limit, we should either disable players menu or disable join game...


If you use all the 200 available strings wisely, like in method 2, then the only way for the patch to overflow is when you have a player's manu and a Huge number of different players leave and join the game. This is practically impossible to Happen!!

OR NOT ??
WHAT IF
THE GAME LAST FOR HOURS AND MANY DIFFERENT PLAYERS JOIN...
OR
WE ABUSE THE SPAWN BOTS???
WE SPAWN A BOT AND THEN WE KICK IT!
WHAT WILL HAPPEN IF WE SPAWN 100 BOTS?
REMEMBER THAT EACH TEST CLIENT NAME HAS A UNIQUE NUMBER NEXT TO ITS NAME...

I hope you got the idea, now it's time for MW2 Menus...

The following user thanked Amanda for this useful post:

02-14-2012, 06:36 PM #52
Originally posted by Amanda View Post
The game doesn't care how many clients use the Menu or how many times the same string appears. It only cares how many unique strings appear on the screen! If before the end of the match less than 300 unique strings are displayed it will never overflow!
say i have got 20 sub menu's with 10 options (without \n) and ive opened all of the sub menu's, then someone else in my lobby opens the menu and dose the same thing it will still count to the amount of strings, and overflow :/
02-14-2012, 06:38 PM #53
nay1995
The Master
Originally posted by Amanda View Post
Note: All these things below have been tested and work perfectly on PC. I need someone to test them on PS3 too. If it works, then we will have endless posibilities for Mods and MW2 style Menus Smile

With 263 more strings available we can create over 200 sub-menus, with unlimited options in the same patch, or use a MW2 style menu with over 200 options!

The only limitation to this method is that we need the rank.gsc intact in the patch. This means that if we rename it in order to clear it and write our own scripts in it, then the game will read it from the disc and the trick will not work.

The method to save strings is simple! We just make the game not to read and precache all the challenge names from the .csv file, but we give all challenges a name of our choice, the same name! For example if someone in the game achieves 100 Headshots with the M40A3 the following message would appear: CHALLENGE COMPLETED. M40A3 EXPERT. ACHIEVE 100 HEADSHOTS WITH THIS WEAPON. Now with the modified data this message will appear when the player completes the same challenge or any other challenge: CHALLENGE COMPLETED. HIDDEN CHALLENGE!


Here is the only change you should do in rank.gsc
Find the function BuildChallengeInfo() and modify it as shown in the picture!


You must login or register to view this content.

Here is some proof that actually works on PC! I believe that it works on a PS3 too because they both read the strings from the .csv file and then precache them, but need someone to test for sure!

You must login or register to view this content.

You must login or register to view this content.

Function used for the test:

    StringTest() {
display = createFontString("default",1.5 ,self);
display setPoint("CENTER","CENTER",0,0);
i=0;
for(;Winky Winky
{
display setText("^6We love Patty " + i + " <3");
i++;
wait 1;
}
}


as a sub thread on PlayerSpawned();



Results:
PC originally supports up to 90 extra strings!
By removing the challenges names, it supports 353 custom strings such as Menu Options etc.
So we saved 353 - 90 = 263 more strings!
263 is almost the number of challenges that exist in the game!
PS3 supports near 30 strings, 60 less than PC.
But it shares the same 263 challenges...
So what if we remove their names?
If this works the same way, that means that we will have 233 free strings to use on a PS3 without worrying for an overflow anymore!

The only limitation we will have is the size of the rawfiles Winky Winky


many appoligies this does work on waw i have got to 391 strings
02-14-2012, 06:41 PM #54
Karoolus
I'm the W@W Menu Guy !
Originally posted by IELIITEMODZX View Post
say i have got 20 sub menu's with 10 options (without \n) and ive opened all of the sub menu's, then someone else in my lobby opens the menu and dose the same thing it will still count to the amount of strings :/


yes.. look at it like this:

the strings are stored in level.strings (just to show you that it's for ALL players, not just self)
rank menu for example will be the same for all players, so it's still only the same amount of strings, no matter how many players open the submenu
02-14-2012, 06:45 PM #55
Originally posted by Karoolus View Post
yes.. look at it like this:

the strings are stored in level.strings (just to show you that it's for ALL players, not just self)
rank menu for example will be the same for all players, so it's still only the same amount of strings, no matter how many players open the submenu


wait lol are you saying im rong ?

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo