How to remove character slots

Results 1 to 10 of 10
  1. #1
    m70b1jr#9501 m70b1jr is offline
    Grand MasterRank
    May 2013 Join Date
    North CarolinaLocation
    862Posts

    How to remove character slots

    I'm trying to change 5 character slots to 1.
    How do i change that?
    Also, how do i change/remove the statistics thing to the right of the main menu?


  2. #2
    ¿ aLca is offline
    Grand MasterRank
    Apr 2013 Join Date
    /dev/nullLocation
    549Posts

    Re: How to remove character slots

    It's somewhere in the Source, as i can remember just almost a year ago, u can set this from 1 to 5 Chars.

  3. #3
    Developer DNC is offline
    DeveloperRank
    Oct 2011 Join Date
    2,493Posts

    Re: How to remove character slots

    FrontEndWarZ.cpp

    Start here and take a look around:

    Code:
    void FrontendWarZ::initFrontend()
    {
    	IsRentServer = false;
    	//LoadKillInject();
    	market_.initialize(&gfxMovie);
    	initInventoryItems();
    
    	m_RentGameNeedInput = false;
    
    	// send survivor info
    	Scaleform::GFx::Value var[20];
    	for(int i=0; i< gUserProfile.ProfileData.NumSlots; ++i)
    	{
    		addClientSurvivor(gUserProfile.ProfileData.ArmorySlots[i], i);
    	}
    
    	updateSurvivorTotalWeight(gUserProfile.SelectedCharID);
    
    	for(int i=0; i<r3dInputMappingMngr::KS_NUM; ++i)
    	{
    		Scaleform::GFx::Value args[2];
    		args[0].SetStringW(gLangMngr.getString(InputMappingMngr->getMapName((r3dInputMappingMngr::KeybordShortcuts)i)));
    		args[1].SetString(InputMappingMngr->getKeyName((r3dInputMappingMngr::KeybordShortcuts)i));
    		gfxMovie.Invoke("_root.api.addKeyboardMapping", args, 2);
    	}
    
    	SyncGraphicsUI();
    
    	gfxMovie.SetVariable("_root.api.SelectedChar", gUserProfile.SelectedCharID);
    	m_Player->uberAnim_->anim.StopAll();	
    	m_Player->UpdateLoadoutSlot(gUserProfile.ProfileData.ArmorySlots[gUserProfile.SelectedCharID]);
    
    
    
    	gfxMovie.Invoke("_root.api.showSurvivorsScreen", "");
    
    	gfxMovie.Invoke("_root.api.setLanguage", g_user_language->GetString());
    
    	gfxMovie.SetVariable("_root.api.ChangeName_Price",80); // 80 is price
    	gfxMovie.SetVariable("_root.api.PremiumAccount_Price",1500); // premium account price
    
    
    	InitButtons(); // Set Server Buttons
    
    	if (/*gUserProfile.ProfileData.isPunisher*/ gUserProfile.ProfileData.isPremium)
    		gfxMovie.SetVariable("_root.api.Main.SurvivorsAnim.Survivors.PremiumAcc.visible", true);
    
    	// init clan icons
    	// important: DO NOT CHANGE THE ORDER OF ICONS!!! EVER!
    	{
    		gfxMovie.Invoke("_root.api.addClanIcon", "$Data/Menu/clanIcons/clan_survivor.dds");
    		gfxMovie.Invoke("_root.api.addClanIcon", "$Data/Menu/clanIcons/clan_bandit.dds");
    		gfxMovie.Invoke("_root.api.addClanIcon", "$Data/Menu/clanIcons/clan_lawman.dds");
    		// add new icons at the end!
    	}
    	{
    		//public function addClanSlotBuyInfo(buyIdx:uint, price:uint, numSlots:uint)
    		Scaleform::GFx::Value var[3];
    		for(int i=0; i<6; ++i)
    		{
    			var[0].SetUInt(i);
    			var[1].SetUInt(gUserProfile.ShopClanAddMembers_GP[i]);
    			var[2].SetUInt(gUserProfile.ShopClanAddMembers_Num[i]);
    			gfxMovie.Invoke("_root.api.addClanSlotBuyInfo", var, 3);
    		}
    	}

    for(int i=0; i< gUserProfile.ProfileData.NumSlots; ++i) <--- this here I'd say easily change either the number slots available by tracking down the definitions or reduce the for loop. don't forget if you do to validate the other solutions. (forgot to put that)
    Last edited by DNC; 12-06-14 at 04:54 AM.

  4. #4
    m70b1jr#9501 m70b1jr is offline
    Grand MasterRank
    May 2013 Join Date
    North CarolinaLocation
    862Posts

    Re: How to remove character slots

    Quote Originally Posted by DNC View Post
    FrontEndWarZ.cpp

    Start here and take a look around:

    Code:
    void FrontendWarZ::initFrontend()
    {
        IsRentServer = false;
        //LoadKillInject();
        market_.initialize(&gfxMovie);
        initInventoryItems();
    
        m_RentGameNeedInput = false;
    
        // send survivor info
        Scaleform::GFx::Value var[20];
        for(int i=0; i< gUserProfile.ProfileData.NumSlots; ++i)
        {
            addClientSurvivor(gUserProfile.ProfileData.ArmorySlots[i], i);
        }
    
        updateSurvivorTotalWeight(gUserProfile.SelectedCharID);
    
        for(int i=0; i<r3dInputMappingMngr::KS_NUM; ++i)
        {
            Scaleform::GFx::Value args[2];
            args[0].SetStringW(gLangMngr.getString(InputMappingMngr->getMapName((r3dInputMappingMngr::KeybordShortcuts)i)));
            args[1].SetString(InputMappingMngr->getKeyName((r3dInputMappingMngr::KeybordShortcuts)i));
            gfxMovie.Invoke("_root.api.addKeyboardMapping", args, 2);
        }
    
        SyncGraphicsUI();
    
        gfxMovie.SetVariable("_root.api.SelectedChar", gUserProfile.SelectedCharID);
        m_Player->uberAnim_->anim.StopAll();    
        m_Player->UpdateLoadoutSlot(gUserProfile.ProfileData.ArmorySlots[gUserProfile.SelectedCharID]);
    
    
    
        gfxMovie.Invoke("_root.api.showSurvivorsScreen", "");
    
        gfxMovie.Invoke("_root.api.setLanguage", g_user_language->GetString());
    
        gfxMovie.SetVariable("_root.api.ChangeName_Price",80); // 80 is price
        gfxMovie.SetVariable("_root.api.PremiumAccount_Price",1500); // premium account price
    
    
        InitButtons(); // Set Server Buttons
    
        if (/*gUserProfile.ProfileData.isPunisher*/ gUserProfile.ProfileData.isPremium)
            gfxMovie.SetVariable("_root.api.Main.SurvivorsAnim.Survivors.PremiumAcc.visible", true);
    
        // init clan icons
        // important: DO NOT CHANGE THE ORDER OF ICONS!!! EVER!
        {
            gfxMovie.Invoke("_root.api.addClanIcon", "$Data/Menu/clanIcons/clan_survivor.dds");
            gfxMovie.Invoke("_root.api.addClanIcon", "$Data/Menu/clanIcons/clan_bandit.dds");
            gfxMovie.Invoke("_root.api.addClanIcon", "$Data/Menu/clanIcons/clan_lawman.dds");
            // add new icons at the end!
        }
        {
            //public function addClanSlotBuyInfo(buyIdx:uint, price:uint, numSlots:uint)
            Scaleform::GFx::Value var[3];
            for(int i=0; i<6; ++i)
            {
                var[0].SetUInt(i);
                var[1].SetUInt(gUserProfile.ShopClanAddMembers_GP[i]);
                var[2].SetUInt(gUserProfile.ShopClanAddMembers_Num[i]);
                gfxMovie.Invoke("_root.api.addClanSlotBuyInfo", var, 3);
            }
        }

    for(int i=0; i< gUserProfile.ProfileData.NumSlots; ++i) <--- this here I'd say easily change either the number slots available by tracking down the definitions or reduce the for loop. don't forget if you do to validate the other solutions. (forgot to put that)
    Ah okay thank you.
    What about the Stats area (last map, Reputation, etc) how do i remove that?
    Also, do you know where i can change the play game button?

  5. #5
    Sorcerer Supreme The Owl is offline
    Member +Rank
    Oct 2013 Join Date
    376Posts

    Re: How to remove character slots

    You mean locations? @m70b1jr

  6. #6
    m70b1jr#9501 m70b1jr is offline
    Grand MasterRank
    May 2013 Join Date
    North CarolinaLocation
    862Posts

    Re: How to remove character slots

    Quote Originally Posted by The Unknown View Post
    You mean locations? @m70b1jr
    Yess.

  7. #7
    Sorcerer Supreme The Owl is offline
    Member +Rank
    Oct 2013 Join Date
    376Posts

    Re: How to remove character slots

    Play button is useless. I have played around with this for ages. It is not source side, but it is swf side. Same with slots, if you take the code out for it the slots will still be there as they are hardcoded in flash. You need to either edit the fla, or use my SwiX tutorial.

    Wish there was anyother way to edit the menus.

  8. #8
    Developer DNC is offline
    DeveloperRank
    Oct 2011 Join Date
    2,493Posts

    Re: How to remove character slots

    I would like to remove swf or create swf from scratch.
    Could take the AS and create our own / recreate a user friendly version.

  9. #9
    Sorcerer Supreme The Owl is offline
    Member +Rank
    Oct 2013 Join Date
    376Posts

    Re: How to remove character slots

    Quote Originally Posted by DNC View Post
    I would like to remove swf or create swf from scratch.
    Could take the AS and create our own / recreate a user friendly version.
    Have already started on this. Just need to find out how to properly link it and I will be set. Already remade from scratch the loading screen, and have been wanting to do a simple FrontEnd for the longest time.

  10. #10
    Developer DNC is offline
    DeveloperRank
    Oct 2011 Join Date
    2,493Posts

    Re: How to remove character slots

    @The Unknown

    You extract all of it that you can. Redesign the fla sprites etc. Shoot me a copy compiled / not compiled. Then I can show you how the scripts get merged and am able to add one to Community Edition. ;0)



Advertisement