Raised This Month: $ Target: $400
 0% 

Model settings


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Vojtoun
Member
Join Date: Apr 2009
Old 04-16-2011 , 22:34   Model settings
Reply With Quote #1

Hi, I'm trying to set up default and only human and zombie classes for zombie escape maps and I want to ask if it's possible to give admins different model than one given to regular players. So far I've been using 'random' parameter for model path, but the problem is, admins are sometimes given normal model instead of the admin one. Is there anything I can do to make it work reliably without being forced to split that class into two seperate ones? Thanks for any help in advance

My playerclasses.txt and models.txt look like this:

Code:
"models"
{
    "panic"
    {
        "name"      "z2"
        "path"      "models/player/techknow/zp/"
        "team"      "zombies"
        "access"    "public"
        "group"     ""
    }
    
    "smoker"
    {
        "name"      "smoker"
        "path"      "models/player/techknow/left4dead/"
        "team"      "zombies"
        "access"    "public"
        "group"     ""
    }
    
    "hunter"
    {
        "name"      "hunter"
        "path"      "models/player/techknow/left4dead/"
        "team"      "zombies"
        "access"    "public"
        "group"     ""
    }
    
    "bones"
    {
        "name"      "bones"
        "path"      "models/player/slow/bones/"
        "team"      "zombies"
        "access"    "public"
        "group"     ""
    }

    "witch"
    {
        "name"      "witch"
        "path"      "models/player/techknow/left4dead/"
        "team"      "zombies"
        "access"    "public"
        "group"     ""
    }

    "spitter"
    {
        "name"      "spitter"
        "path"      "models/player/kuristaja/l4d2/spitter/"
        "team"      "zombies"
        "access"    "public"
        "group"     ""
    }

    "husk"
    {
        "name"      "slow"
        "path"      "models/player/slow/mass_effect/husk/"
        "team"      "zombies"
        "access"    "admins"
        "group"     ""
    }

    "umbrella"
    {
        "name"      "umbrella_sas_rx"
        "path"      "models/player/natalya/umbrella_sas/"
        "team"      "humans"
        "access"    "public"
        "group"     ""
    }

    "nanosuit"
    {
        "name"      "slow_nanosuit"
        "path"      "models/player/slow/nanosuit/"
        "team"      "humans"
        "access"    "admins"
        "group"     ""
    }
}
Code:
"classes"
{
    // ------------------------------------------
    //
    // Zombie classes
    //
    // ------------------------------------------
    "zombie_classic"
    {
        // General
        "enabled"               "yes"
        "team"                  "0"
        "team_default"          "yes"
        "flags"                 "0"
        "group"                 ""
        
        "name"                  "Zombie"
        "description"           "Regular Zombie Class"
        
        // Model
        "model_path"            "random"
        "alpha_initial"         "255"
        "alpha_damaged"         "255"
        "alpha_damage"          "0"
        
        // Hud
        "overlay_path"          ""
        "nvgs"                  "no"
        "fov"                   "90"
        
        // Effects
        "has_napalm"            "no"
        "napalm_time"           "0.0"
        
        // Player behaviour
        "immunity_mode"         "0"
        "immunity_amount"       "0.0"
        "no_fall_damage"        "yes"
        
        "health"                "5000"
        "health_regen_interval" "0.0"
        "health_regen_amount"   "0"
        "health_infect_gain"    "250"
        "kill_bonus"            "2"
        
        "speed"                 "325"
        "knockback"             "4"
        "jump_height"           "1.0"
        "jump_distance"         "1.0"
    }
    
    // ------------------------------------------
    //
    // Human classes
    //
    // ------------------------------------------
    
    "human_normal"
    {
        // General
        "enabled"               "yes"
        "team"                  "1"
        "team_default"          "yes"
        "flags"                 "0"
        "group"                 ""
        
        "name"                  "Survivor"
        "description"           "Regular Human Class"
        
        // Model
        "model_path"            "random"
        "alpha_initial"         "255"
        "alpha_damaged"         "255"
        "alpha_damage"          "0"
        
        // Hud
        "overlay_path"          ""
        "nvgs"                  "no"
        "fov"                   "90"
        
        // Effects
        "has_napalm"            "no"
        "napalm_time"           "0.0"
        
        // Player behaviour
        "immunity_mode"         "0"
        "immunity_amount"       "0.0"
        "no_fall_damage"        "no"
        
        "health"                "100"
        "health_regen_interval" "0.0"
        "health_regen_amount"   "0"
        "health_infect_gain"    "0"
        "kill_bonus"            "0"
        
        "speed"                 "300"
        "knockback"             "0"
        "jump_height"           "1.0"
        "jump_distance"         "1.0"
    }
}
__________________
Vojtoun is offline
rhelgeby
Veteran Member
Join Date: Oct 2008
Location: 0x4E6F72776179
Old 04-17-2011 , 06:00   Re: Model settings
Reply With Quote #2

No. The random selection will only include admin models if it's an admin, but not guarantee that a admin model is selected. Currently, using one public and one admin-only class is the only way to do it.

However, this thread seems good to discuss how I should make this possible in the next release.

In addition to a improved authentication system, I'm going to make model collections. Then there can be custom model collections for various categories (admin models, vip, public, etc.). You can even make a collection per class so that each class can have their own set of models.

A collection will
  • have a unique name
  • have one or more references to models (names)
  • belong to a team (zombies, mother zombies or humans)

I'm wondering how I should apply this to classes. Theres already a model attribute in class settings, so this could be expanded to a list format. That list could accept model names, some predefined options and collections. The technical syntax might look like this:

Code:
Syntax:
<option> | {<filter> | <model> | c:<collection> | <filter:collection>} ...

Options:
default | no_change

Filters:
random | random_public | random_admin | random_mother_zombie
This should make it possible to
  • use a option to use default CS:S models or not change model at all
  • use a filter to select any model from the global model list (as in beta2)
  • apply one or more models
  • apply one or more collections
  • apply filters to individual collections
  • give priority to entries where first entry get highest priority

This is flexible. But maybe not that user friendly unless we give enough examples.

The first post is a good example; assign admin models to admins and regular models to others in one class. That will need at least one collection of admin models. Then it might look like this:

Code:
c:MyAdminModels random_public
It would attempt to assign a admin model if player is admin or select a random public model otherwise.

Though I see a weakness in my idea, it doesn't fall back to a default. If you remove random_public it won't have a model to apply on regular players. But maybe that's how it should act, and just log a warning instead.
__________________
Richard Helgeby

Zombie:Reloaded | PawnUnit | Object Library
(Please don't send private messages for support, they will be ignored. Use the forum.)

Last edited by rhelgeby; 04-17-2011 at 09:14.
rhelgeby is offline
Send a message via MSN to rhelgeby
Vojtoun
Member
Join Date: Apr 2009
Old 04-17-2011 , 07:16   Re: Model settings
Reply With Quote #3

Maybe adding 'random_specific' (just name suggestion) variable to model path which would behaved exactly as you described and as I want it to behave. But of course I don't know how hard it would be to implement such function. Anyway your idea about zombie collections is really interesting and I've been thinking about same thing myself last night while setting up zombie classes for zombie camp maps, because right now I'm using two identical classes (only model path is different) just because I want players to have more options while choosing zombie model.
__________________
Vojtoun is offline
Vojtoun
Member
Join Date: Apr 2009
Old 04-17-2011 , 07:25   Re: Model settings
Reply With Quote #4

As for model collections, is it possible to code this example?

playerclasses.txt
Code:
"classes"
{
    "zombie_classic"
    {
        // General
        "enabled"               "yes"
        "team"                  "0"
        "team_default"          "yes"
        "flags"                 "0"
        "group"                 ""
        
        "name"                  "Classic Zombie"
        "description"           "Arrgh!! Brainzzz!"
        
        // Model
        "model_path"            "collection"
        "model_collection"      "classic"
        "alpha_initial"         "255"
        "alpha_damaged"         "255"
        "alpha_damage"          "0"
        
        // Hud
        "overlay_path"          ""
        "nvgs"                  "no"
        "fov"                   "90"
        
        // Effects
        "has_napalm"            "no"
        "napalm_time"           "15.0"
        
        // Player behaviour
        "immunity_mode"         "0"
        "immunity_amount"       "0.0"
        "no_fall_damage"        "yes"
        
        "health"                "4500"
        "health_regen_interval" "0.0"
        "health_regen_amount"   "0"
        "health_infect_gain"    "250"
        "kill_bonus"            "2"
        
        "speed"                 "350"
        "knockback"             "5"
        "jump_height"           "1.0"
        "jump_distance"         "1.1"
    }
}


models.txt

Code:
"models"
{
    "panic"
    {
        "name"      "z2"
        "path"      "models/player/techknow/zp/"
        "team"      "zombies"
        "access"    "public"
        "group"     ""
    }
    
    "smoker"
    {
        "name"      "smoker"
        "path"      "models/player/techknow/left4dead/"
        "team"      "zombies"
        "access"    "public"
        "group"     ""
    }
}


New modelcollections.txt

Code:
"collections"
{
    "classic"
    {
        "panic"
        "smoker"
    }
}
__________________
Vojtoun is offline
rhelgeby
Veteran Member
Join Date: Oct 2008
Location: 0x4E6F72776179
Old 04-17-2011 , 08:48   Re: Model settings
Reply With Quote #5

Here's a draft of my ideas: http://helgeby.no-ip.org/zrdev/modelsys.txt

It will be update as I modify it. Remember that I must write the parser myself, so I want to keep it as simple as possible, but still very flexible. The new model attribute in classes would accept a simple query format similar to my ideas in that draft.

Other ideas for different architectures are welcome too. I updated my earlier post with the new syntax example. I think it should cover many uses now.
__________________
Richard Helgeby

Zombie:Reloaded | PawnUnit | Object Library
(Please don't send private messages for support, they will be ignored. Use the forum.)

Last edited by rhelgeby; 04-17-2011 at 09:07.
rhelgeby is offline
Send a message via MSN to rhelgeby
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 17:46.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode