Skocz do zawartości

Nowy szablon forum

mygo.pl

Stworzyliśmy dla Was nowy wygląd forum. Z pewnością znajdziesz rzeczy, które wg Ciebie mogą zostać zmienione - wspomnij o tym w specjalnym wątku.

Czytaj więcej

Jak założyć własną sieć

serwerów CS

Zastanawiasz się nad prowadzeniem własnej sieci serwerów? Przeczytaj podstawowe informacje, na które należy zwrócić uwagę, przy takim projekcie.

Czytaj więcej

Tworzymy spis sieci

dodaj swoją

Dodaj sieć do której należysz, pozwoli to na promocję i budowę ogólnopolskiej bazy sieci CS.

Czytaj więcej

[NMRiH] Supply Chances (v1.0, 19/06/2018)


MYGO.pl
 Udostępnij

Rekomendowane odpowiedzi

  • RSSy
Enables a hot-swappable config for defining the random chances inventory boxes have of containing particular items.

Configs can define multiple "box types". A box type has a weight (how likely it is to be picked) and can override the spawn chances for its three categories: weapons, gear and ammo.

The weapon and gear categories are interchangeable; weapon and medical items can appear in either. The ammo category is handled differently by the game and should be restricted to just ammo types.

The weight system is designed to be similar NMRiH's random_spawner:
  • If the sum of all weights is greater than 100.0, they'll be normalized such that their sum equals 100.0
  • If the sum of all weights is less than 100.0, they're left as-is with the difference being the chance for a normal item or box to spawn
  • If an item or box type has a weight of 0 then it will never be selected

ConVars
  • sm_supply_chances_config ""
    • Name of supply chance config file (excluding extension). Configs should be placed in sourcemod/configs

Example config
PHP Code:

"custom-chances"
{
    
"lucky loot"
    
{
        
"weight" "90" // Will be picked 90 out N times where N is sum of weight of all box types
        // If N is less than 100, the difference (100 - N) is the chance for a vanilla inventory box to spawn

        
"weapons"
        
{
            
// 0.5% chance for saws to spawn
            
"me_chainsaw" "0.5"
            "me_abrasivesaw" "0.5"

            
// 2% chance for a particular tool
            
"tool_extinguisher" "2"
            "tool_welder" "2"
        
}

        
"gear"
        
{
            
// 3% chance to spawn a grenade of any type
            
"exp_molotov" "1"
            "exp_grenade" "1"
            "exp_tnt" "1"
        
}
    }

    
"no boards!"
    
{
        
// Default weight is 100

        
"ammo"
        
{
            
"ammobox_board" "0"  // 0% chance to spawn boards
        
}
    }

    
"just .22"
    
{
        
"weight" "5" // This box is far less likely to be picked than a box with 100 weight

        
"weapons"
        
{
            
"fa_mkiii" "60"
            "fa_1022" "30"
            "fa_1022_25mag" "10"
        
}

        
"ammo"
        
{
            
"ammobox_22lr" "100"
        
}
    }



Attached Files
File Type: zip nmrih-supply-chances-1.0.zip (23.6 KB)

Wyświetl pełny artykuł

Odnośnik do komentarza
Udostępnij na innych stronach

Jeśli chcesz dodać odpowiedź, zaloguj się lub zarejestruj nowe konto

Jedynie zarejestrowani użytkownicy mogą komentować zawartość tej strony.

Zarejestruj nowe konto

Załóż nowe konto. To bardzo proste!

Zarejestruj się

Zaloguj się

Posiadasz już konto? Zaloguj się poniżej.

Zaloguj się
 Udostępnij

  • Ostatnio przeglądający   0 użytkowników

    • Brak zarejestrowanych użytkowników przeglądających tę stronę.
×
×
  • Dodaj nową pozycję...