[TUTORIAL] Adding options in FrontEnd.swf

01001100 01000011 01000011 01000010
Decennium
Joined
Apr 23, 2013
Messages
1,180
Reaction score
2,158
IncreaseFPS- FrontEnd.swf
Credits: - [LCCB]


Image :
Custom :
LukasCCB - [TUTORIAL] Adding options in FrontEnd.swf - RaGEZONE Forums


Other :
LukasCCB - [TUTORIAL] Adding options in FrontEnd.swf - RaGEZONE Forums
//////////////////////////////




Download the file :


IncreaseFPS & FastLoad - FrontEnd.swf 28.8 MB





Warning!!
In my case, in my code, I put on Increase FPS being active in the OPTIONS only if the quality is in CUSTOM !!!!
-=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=-
-=--=--=--=--=--=--=-Tutorial=--=--=--=--=--=--=--=--=-
-=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=-


In C:\WarZ\bin\Data\LangPack\NameLang.lang


Search
$FR_optTexturesQual


Add
$FR_optIncreaseFPS=INCREASE FPS


Search
$FR_optAudio=AUDIO


Add
$FR_optEXTRA=EXTRAS


-=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=-
-=--=--=--=--=--=--=--=Next step-=--=--=--=--=--=-
-=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=-


Client code - EclipseStudio [WarZ.sln]


Search


Code:
    void FrontendWarZ::eventOptionsApply(r3dScaleformMovie* pMovie, const Scaleform::GFx::Value* args, unsigned argCount)
    {
Search this
Code:
    int old_increase = r_increase_fps_player->GetInt(); // INCREASE FPS
        r_increase_fps_player ->SetInt(0);
Change to
Code:
    int old_increase = r_increase_fps_player->GetInt(); // INCREASE FPS
        r_increase_fps_player            ->SetInt((int)args[23].GetNumber()-1);


Search
Code:
    gfxMovie.Invoke("_root.api.setOptions", var, 30);


and


Code:
    Scaleform::GFx::Value var[30];




and change to
Code:
    gfxMovie.Invoke("_root.api.setOptions", var, 31);
and
Code:
    Scaleform::GFx::Value var[31];


There are two of these, do not forget, change the 2 as will adding new functions.


------------------------------------------------------------------------------------------------------


Now to add these options in FrontEnd.swf




You must have the .fla files [Need Adobe Flash CS6]




In C:\WarZ\menu\src\classes\warz\frontend\Frontend.as




Search
Code:
    public var Opt_MeshT :Number;




Add
Code:
    public var Opt_IncreaseFPS :Number; // Increase FPS - [LCCB]




Search
Code:
    Opt_MeshT=meshT;




Add
Code:
    Opt_IncreaseFPS=increaseFPS; // Increase FPS - [LCCB]




Search
Code:
    fullscreen:Number, vsync:Number




Add
Code:
    , increaseFPS:Number)




Ready, next file
in classes\warz\frontend\FrontendDebug.as




Search and add more two number [Exemple ,2,1]
Code:
    api.setOptions(1, 1, 0.95, 0.25, 0.1, 0.2, 0.3, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.5, 1, 0, 0, 1, 2, 1);




Ready, next file
in classes\warz\frontend\OptionsGeneral.as




Search
Code:
    public var Opt_MeshT :Object;




Add
Code:
    public var Opt_IncreaseFPS :Object; // Increase FPS - [LCCB]




Search
Code:
    Opt_MeshT = new Object();




Add
Code:
    Opt_IncreaseFPS = new Object(); // Increase FPS - [LCCB]




Search
Code:
    Opt_Fullscreen.myValue,    Opt_VSync.myValue+1




Add
Code:
    , Opt_IncreaseFPS.myValue+1




Search
Code:
    Opt_MeshT.myValue = api.Opt_MeshT-1;




Add
Code:
    Opt_IncreaseFPS.myValue = api.Opt_IncreaseFPS-1; // Increase FPS - [LCCB]




Search
Code:
            OptionsGeneralClip.OptStat22.Name.text = "$FR_optTexturesQual";        
            OptionsGeneralClip.OptStat22.Value.Text.text = arLMH[Opt_MeshT.myValue];
//            OptionsGeneralClip.OptStat22.Value.gotoAndPlay("start");
            OptionsGeneralClip.OptStat22.ArrowLeft.Btn.addEventListener(MouseEvent.MOUSE_OVER, arrowRollOverFn);
            OptionsGeneralClip.OptStat22.ArrowLeft.Btn.addEventListener(MouseEvent.MOUSE_OUT, arrowRollOutFn);
            OptionsGeneralClip.OptStat22.ArrowLeft.Btn.addEventListener(MouseEvent.CLICK, arrowPressFn);
            OptionsGeneralClip.OptStat22.ArrowRight.Btn.addEventListener(MouseEvent.MOUSE_OVER, arrowRollOverFn);
            OptionsGeneralClip.OptStat22.ArrowRight.Btn.addEventListener(MouseEvent.MOUSE_OUT, arrowRollOutFn);
            OptionsGeneralClip.OptStat22.ArrowRight.Btn.addEventListener(MouseEvent.CLICK, arrowPressFn);
            OptionsGeneralClip.OptStat22.ArrowLeft.ActionFunction = function() { me.onArrowClick(-1, me.Opt_MeshT, me.arLMH, this); }
            OptionsGeneralClip.OptStat22.ArrowRight.ActionFunction = function() { me.onArrowClick(+1, me.Opt_MeshT, me.arLMH, this); }




Add
Code:
            OptionsGeneralClip.OptStat23.Name.text = "$FR_optIncreaseFPS";
            OptionsGeneralClip.OptStat23.Value.Text.text = arNY[Opt_IncreaseFPS.myValue];
//            OptionsGeneralClip.OptStat32.Value.gotoAndPlay("start");
            OptionsGeneralClip.OptStat23.ArrowLeft.Btn.addEventListener(MouseEvent.MOUSE_OVER, arrowRollOverFn);
            OptionsGeneralClip.OptStat23.ArrowLeft.Btn.addEventListener(MouseEvent.MOUSE_OUT, arrowRollOutFn);
            OptionsGeneralClip.OptStat23.ArrowLeft.Btn.addEventListener(MouseEvent.CLICK, arrowPressFn);
            OptionsGeneralClip.OptStat23.ArrowRight.Btn.addEventListener(MouseEvent.MOUSE_OVER, arrowRollOverFn);
            OptionsGeneralClip.OptStat23.ArrowRight.Btn.addEventListener(MouseEvent.MOUSE_OUT, arrowRollOutFn);
            OptionsGeneralClip.OptStat23.ArrowRight.Btn.addEventListener(MouseEvent.CLICK, arrowPressFn);
            OptionsGeneralClip.OptStat23.ArrowLeft.ActionFunction = function() { me.onArrowClick(-1, me.Opt_IncreaseFPS, me.arNY, this); }
            OptionsGeneralClip.OptStat23.ArrowRight.ActionFunction = function() { me.onArrowClick(+1, me.Opt_IncreaseFPS, me.arNY, this); }




Search
Code:
                OptionsGeneralClip.OptStat22.alpha = 1;
                OptionsGeneralClip.OptStat22.State = "none";
                OptionsGeneralClip.OptStat22.ArrowRight.useHandCursor = OptionsGeneralClip.OptStat22.ArrowLeft.useHandCursor = true;




Add
Code:
                // Increase FPS - [LCCB]
                OptionsGeneralClip.OptStat23.alpha = 1;
                OptionsGeneralClip.OptStat23.State = "none";
                OptionsGeneralClip.OptStat23.ArrowRight.useHandCursor = OptionsGeneralClip.OptStat23.ArrowLeft.useHandCursor = true;




Search
Code:
                OptionsGeneralClip.OptStat22.alpha = 0.5;
                OptionsGeneralClip.OptStat22.State = "disabled";
                OptionsGeneralClip.OptStat22.ArrowRight.useHandCursor = OptionsGeneralClip.OptStat22.ArrowLeft.useHandCursor = false;




Add
Code:
                // Increase FPS  - [LCCB]
                OptionsGeneralClip.OptStat23.alpha = 0.5;
                OptionsGeneralClip.OptStat23.State = "disabled";
                OptionsGeneralClip.OptStat23.ArrowRight.useHandCursor = OptionsGeneralClip.OptStat23.ArrowLeft.useHandCursor = false;


Next file
In C:\WarZ\menu\src\classes\warz\events\FrontEndEvents.as
Search
Code:
    fullscreen:Number, vsync:Number


Add
Code:
    , increaseFPS:Number


Search
Code:
    PostProc, MeshT, fullscreen, vsync


Add
Code:
    , increaseFPS


the same for other options, by just adding more numbers
Okay, so now add the code in the client, this is easy.



b17d7424f946a315f9bc9db101bc6cda - [TUTORIAL] Adding options in FrontEnd.swf - RaGEZONE Forums
 
Last edited:
when i try to find this cmd " int old_increase = r_increase_fps_player->GetInt(); // INCREASE FPS
r_increase_fps_player ->SetInt(0);"
i can't find it on my src can you maybe help me =D
 
when i try to find this cmd " int old_increase = r_increase_fps_player->GetInt(); // INCREASE FPS
r_increase_fps_player ->SetInt(0);"
i can't find it on my src can you maybe help me =D

Try pasting bits of the code, not the whole code. Every emulator has a slightly different source (Not those copy-paste codex ones).

Like this;

Code:
 [COLOR=#666666]r_increase_fps_player [/COLOR]


or

Code:
 [COLOR=#666666][COLOR=#666666]    int old_increase = r[/COLOR] [/COLOR]


Good luck:)
 
Someone know how fix that little error

UNDEFINED and if I click on the arrow I have YES \ NON and UNDEFINED never comeback until I press reset.
If I select DISABLE GRASS : YES, when I go in game, no grass (so that button works) but if I set it to NO, grass doesnt come back, I have to reset my graph to have my grass back.
 
Last edited:
Back