Results 1 to 3 of 3

Thread: Material group resets to default

  1. #1

    Material group resets to default

    Unit loses setted material group when affected by skill (es fissure, bristle's spray, tide's smash etc.)

    Datadriven class of unit is full copy of npc_dota_greevil except baseClass changed to npc_dota_creature. Also unit have AttachWearables block.

    Lua code:
    Code:
    local greevil = CreateUnitByName("npc_dota_greevil_custom", vSpawnLocation, true, nil, nil, nTeam );
    greevil:SetMaterialGroup("4");
    material_groups_demo.png




    Full code of datadriven class
    Code:
    	"npc_dota_greevil_custom"
    	{
    		// General
    		//
    		"BaseClass"					"npc_dota_creature"		// Class of entity of link to.
    		"Model"						"models\courier\greevil\greevil.mdl"	// Model.
    		"SoundSet"					"Greevil"										// Name of sound set.
    		"ModelScale"				"1"
    		// "AnimationModifier"			"miniboss"
    		"MinimapIconSize"			"1"
    				
    		// Abilities
    		//----------------------------------------------------------------		
    		"Ability1"					""			// Ability 1.
    		"Ability2"					""			// Ability 2.
    		"Ability3"					""			// Ability 3.
    		"Ability4"					""			// Ability 4.
    
    		// Armor
    		//----------------------------------------------------------------
    		"ArmorPhysical"				"1"		// Physical protection.
    		"MagicalResistance"			"1"		// Magical protection.
    
    		// Attack
    		//----------------------------------------------------------------
    		"AttackCapabilities"		"DOTA_UNIT_CAP_NO_ATTACK"
    		// "AttackDamageMin"			"31"		// Damage range min.
    		// "AttackDamageMax"			"34"		// Damage range max.	
    		// "AttackRate"				"1.8"		// Speed of attack.
    		// "AttackAnimationPoint"		"0.5"		// Normalized time in animation cycle to attack.
    		// "AttackAcquisitionRange"	"600"		// Range within a target can be acquired.
    		// "AttackRange"				"128"		// Range within a target can be attacked.
    
    		// Bounty
    		//----------------------------------------------------------------
    		"BountyXP"					"0"		// Experience earn.
    		"BountyGoldMin"				"0"		// Gold earned min.
    		"BountyGoldMax"				"0"		// Gold earned max.
    
    		// Bounds
    		//----------------------------------------------------------------
    		"RingRadius"				"55"
    		"HealthBarOffset"			"170"
    		"BoundsHullName"			"DOTA_HULL_SIZE_REGULAR"	
    
    		// Movement
    		//----------------------------------------------------------------
    		"MovementCapabilities"		"DOTA_UNIT_CAP_MOVE_GROUND"			// Type of locomotion - ground, air
    		"MovementSpeed"				"300"								// Speed
    		"MovementTurnRate"			"0.4"								// Turning rate.
    
    		// Status
    		//----------------------------------------------------------------
    		"StatusHealth"				"600"		// Base health.
    		"StatusHealthRegen"			"5"			// Health regeneration rate.
    		"StatusMana"				"600"		// Base mana.
    		"StatusManaRegen"			"5"			// Mana regeneration rate.
    
    		// Team
    		//----------------------------------------------------------------
    		"TeamName"					"DOTA_TEAM_NEUTRALS"
    		"CombatClassAttack"			"DOTA_COMBAT_CLASS_ATTACK_HERO"
    		"CombatClassDefend"			"DOTA_COMBAT_CLASS_DEFEND_HERO"
    		"UnitRelationshipClass"		"DOTA_NPC_UNIT_RELATIONSHIP_TYPE_DEFAULT"
    		
    		// Vision
    		//----------------------------------------------------------------
    		"VisionDaytimeRange"		"1800"		// Range of vision during day light.
    		"VisionNighttimeRange"		"800"		// Range of vision at night time.
    
    		"Creature"
    	    {
    	     "AttachWearables"
    			{
    			    "Wearable1" { "ItemDef" "10072" } 
    			    "Wearable2" { "ItemDef" "10073" } 
    			    "Wearable3" { "ItemDef" "10075" } 
    			    "Wearable4" { "ItemDef" "10078" } 
    			    "Wearable5" { "ItemDef" "10081" } 
    		    	    "Wearable6" { "ItemDef" "10084" } 
    		    	    "Wearable7" { "ItemDef" "10087" } 
    		    	    "Wearable8" { "ItemDef" "10090" } 
    			}
    	    }
    	}

  2. #2
    Basic Member Toyoka's Avatar
    Join Date
    Oct 2013
    Location
    Current position co-ordinates non-tracable. Unknown space.
    Posts
    833
    This might be entirely wrong but I speculate that this might have something to do with certain abilities that create status effects on models. There could be some sort of incompatibility that doesn't allow for status effects to render on top of models that use several different skins. It could also be related to how you got the material groups to work in the first place, or what type of unit you're using. Again, just speculating. I'm not sure how this would be fixed, but good luck!

  3. #3
    Got it. The problem is wrong extension ".mdl" instead of "vmdl" (in npc_units.. txt file). Just fix to second one and all works fine.
    Last edited by dotyer.ua; 10-21-2017 at 02:12 PM.

Tags for this Thread

Posting Permissions

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