Thread: [Plugin] Dynamic Difficulty

Results 1 to 10 of 10
  1. #1
    Registered User CubeMath's Avatar
    Join Date
    Dec 2016
    Posts
    26

    [Plugin] Dynamic Difficulty

    Dynamic Difficulty

    Enter in Chat: diff <Number 0 - 100>
    To vote a Difficulty
    0 - Beginners Difficulty
    30 - Easy Difficulty
    50 - Normal Difficulty
    70 - Hard Difficulty
    99.99999 - Impossible Difficulty
    100 - Maximum Difficulty


    Difficulty manipulates skill, sk-Values and some of the HL-Entities.
    It generates a skill.cfg file on this path: scripts/plugins/store/skill.cfg

    Important:
    Use: "skillcfgfile scripts/plugins/store/skill.cfg"
    in your console or as a config, to get the generated skill.cfg-file.
    Becareful, a map_skl.cfg-file will overwrite the generated file.


    If Difficulty is Maximum, then you only have 1HP,
    always gib on death, Heal-Items have no effects and Scientist will kill you.


    This Script no longer uses a Vote-System.
    It now depends of Number of People to calculate the Difficulty.

    The old Script uses "Median" on the Votes to calculate the Difficulty.


    Download: DynamicDifficulty9.as
    Old Version: DynamicDifficulty7.as

    Enjoy this Plugin
    Last edited by CubeMath; 20-01-2019 at 07:40 AM.

  2. #2
    Server Owner Enrory's Avatar
    Join Date
    Dec 2016
    Location
    Austria
    Posts
    116

    Re: [Plugin] Dynamic Difficulty

    thanks for this

  3. #3
    Registered User
    Join Date
    Jun 2017
    Posts
    2

    Re: [Plugin] Dynamic Difficulty

    Big thanks for this.

  4. #4
    incognico nico's Avatar
    Join Date
    Aug 2015
    Posts
    441

    Re: [Plugin] Dynamic Difficulty

    Very good script but I have a few considerations:

    1. The last 2 values (120 & 10000) of sk_hwgrunt_minipellets are way too much for multiplayer, it will cause instant lag, maybe go with 12 and 24.

    2. Would it be possible to have an array of maps where the script is allowed? Right now it can be enabled globally or not.
    To allow the script for only a bunch of maps you would have to maybe symlink the skill.cfg to mapname_skl.cfg which it quite a lot of work and gets messy after a while.

    Would it even be possible to use AS to exec a ServerCommand like "skillcfgfile scripts/plugins/store/skill.cfg" in the script itself? I don't think you can change the skillfile pre game, maybe in MapAcvtivate with that way, or can you?

  5. #5
    Registered User CubeMath's Avatar
    Join Date
    Dec 2016
    Posts
    26

    Re: [Plugin] Dynamic Difficulty

    Plugin Updated. Max-Value of sk_hwgrunt_minipellets is now 50.
    50 will no longer causes too much Lag.

    "array of maps"... I don't think that it is possible to overwrite the map_skl.cfg data.
    Plugins are only allowed to write Text-Files into scripts/plugins/store-Folder.

  6. #6
    incognico nico's Avatar
    Join Date
    Aug 2015
    Posts
    441

    Re: [Plugin] Dynamic Difficulty

    Quote Originally Posted by CubeMath View Post
    "array of maps"... I don't think that it is possible to overwrite the map_skl.cfg data.
    Plugins are only allowed to write Text-Files into scripts/plugins/store-Folder.
    No I mean to have an array of maps where the script is allowed/enabled so it will be disabled on all other maps. I've done this by myself now, seems to work good.

  7. #7
    Registered User Joce's Avatar
    Join Date
    Feb 2016
    Location
    Paris
    Posts
    100

    Re: [Plugin] Dynamic Difficulty

    Broken plugin since the last update.

    Code:
    ERROR: c:/tcafiles/users/joce/9443/svencoop/scripts/plugins/DynamicDifficulty.as (659, 15) : Invalid operation on method
    ERROR: c:/tcafiles/users/joce/9443/svencoop/scripts/plugins/DynamicDifficulty.as (670, 32) : Invalid operation on method
    ERROR: c:/tcafiles/users/joce/9443/svencoop/scripts/plugins/DynamicDifficulty.as (685, 15) : Invalid operation on method
    ERROR: c:/tcafiles/users/joce/9443/svencoop/scripts/plugins/DynamicDifficulty.as (695, 32) : Invalid operation on method
    ERROR:  (0, 0) : Warnings are treated as errors by the application
    ERROR: Plugin script compilation failed
    Last edited by Joce; 20-01-2019 at 06:52 AM.

  8. #8
    Registered User CubeMath's Avatar
    Join Date
    Dec 2016
    Posts
    26

    Re: [Plugin] Dynamic Difficulty

    "you used length instead of length() didn't you?" ~KernCore (Discord)
    Bug fixed V7 and V9 updated.

  9. #9
    Registered User
    Join Date
    Jan 2019
    Posts
    5

    Re: [Plugin] Dynamic Difficulty

    That was an amazing plugin but 100% difficulty is gone :/ What we can do to bring that fun back to the official servers ?

  10. #10
    Registered User CubeMath's Avatar
    Join Date
    Dec 2016
    Posts
    26

    Re: [Plugin] Dynamic Difficulty

    Open the file DynamicDifficulty9.as with any Texteditor and you'll find the Array called diffPerPeep.
    Code:
    /**
    * Difficulty choosed using number of People connected
    */
    private array<double> diffPerPeep = {
        0.7  , //0
        0.7  , //1
        0.75 , //2
        ...
        1.000, //31
        1.000  //32
    };
    Each value goes from 0.0 to 1.0.
    For example 0.7 means 70% difficulty.
    Every server operator can configure the difficulty.

    The difficulty will be only calculated at map begin.
    (actually the value of connected people at map end will be used)

    It really depends what difficulty the server operator has configured.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •