Raised This Month: $32 Target: $400
 8% 

[EXTENSION] NPC in CS:S - Updated 2012-7-4


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
raydan
Senior Member
Join Date: Aug 2006
Old 07-06-2011 , 02:14   [EXTENSION] NPC in CS:S - Updated 2012-7-4
Reply With Quote #1

Monster Extension - NPC in CS:S

Features:
spawn hl2 npc, play coop map in cs:s
press E on object can pickup
fix ammo_hegrenade_max work
fix some crash (ie. CAI_BaseNPC::OnTakeDamage_Alive, valve won't do that)
CEntity support non networked entity
make info_target reset on round restart (make sure env_gunfire work)
ONLY cstrike can load this extension

THIS EXTENSION MAY MAKE YOUR SERVER CRASH!


Currently ONLY for windows cstrike

Custom entity:
Code:
ai_relationship
env_headcrabcanister
floorturret_tipcontroller
func_tank
func_tanklaser
func_tankpulselaser
func_useableladder
grenade_beam
grenade_beam_chaser
grenade_spit
info_npc_spawn_destination
item_ammo_crate
item_battery
item_healthcharger
item_healthkit
item_healthvial
item_suitcharger
npc_alyx
npc_antlion
npc_antlion_template_maker
npc_antlionguard
npc_bullseye
npc_fastzombie
npc_fastzombie_torso
npc_gman
npc_headcrab
npc_headcrab_black
npc_headcrab_fast
npc_headcrab_poison
npc_maker
npc_manhack
npc_poisonzombie
npc_rollermine
npc_stalker
npc_template_maker
npc_turret_floor
npc_vortigaunt
npc_zombie
npc_zombie_torso
player_pickup
point_antlion_repellant
trigger_physics_trap
trigger_weapon_strip
Server Command:
Code:
monster_dump // show current CEntity count

Known Bugs:
ammo_338mag won't drop to ground
infinite loop (server freeze)

skill.cfg
Code:
// ===========
//  NPCs
// ============
// Barnacle
sk_barnacle_health  "35"
// Barney
sk_barney_health  "35"
// Bullseye
sk_bullseye_health  "35"
// Bullsquid
//sk_bullsquid_health "120"
//sk_bullsquid_dmg_bite "15"
//sk_bullsquid_dmg_whip "25"
// Citizen
sk_citizen_health  "40"
// Combine Soldier
sk_combine_s_health  "50"
sk_combine_s_kick  "10"
// Combine Guard
sk_combine_guard_health "70"
sk_combine_guard_kick "15"
// strider
sk_strider_health  "350"
sk_strider_num_missiles1 "5"
sk_strider_num_missiles2 "7"
sk_strider_num_missiles3 "7"
// Headcrab
sk_headcrab_health  "10"
sk_headcrab_melee_dmg "5"
// Fast Headcrab
sk_headcrab_fast_health "50"
// Poison Headcrab
sk_headcrab_poison_health "35"
// Houndeye
//sk_houndeye_health  "80"
//sk_houndeye_dmg_blast "25"
// Manhack
sk_manhack_health  "300"
sk_manhack_melee_dmg "5"
// Metropolice
sk_metropolice_health "40"
sk_metropolice_stitch_reaction "1.0"
sk_metropolice_stitch_tight_hitcount "2"
sk_metropolice_stitch_at_hitcount "1"
sk_metropolice_stitch_behind_hitcount "3"
sk_metropolice_stitch_along_hitcount "2"
// Rollermine
sk_rollermine_shock  "10"
sk_rollermine_stun_delay "3"
sk_rollermine_vehicle_intercept "1"
// Scanner (City)
sk_scanner_health  "30"
sk_scanner_dmg_dive  "25"
// Stalker
sk_stalker_health  "150"
sk_stalker_melee_dmg "5"
// Vortigaunt
sk_vortigaunt_health "100"
sk_vortigaunt_dmg_claw "10"
sk_vortigaunt_dmg_rake "25"
sk_vortigaunt_dmg_zap "50"
sk_vortigaunt_armor_charge "30"
// Zombie
sk_zombie_health "50"
sk_zombie_dmg_one_slash "10"
sk_zombie_dmg_both_slash "25"
// Poison Zombie
sk_zombie_poison_health  "175"
sk_zombie_poison_dmg_spit "20"
//Antlion
sk_antlion_health   "30"
sk_antlion_swipe_damage  "5"
sk_antlion_jump_damage  "5"
//Antlion Guard
sk_antlionguard_health  "500"
sk_antlionguard_dmg_charge "20"
sk_antlionguard_dmg_shove "10"
//Antlion Grub
//sk_antliongrub_health  "5"
//Ichthyosaur
sk_ichthyosaur_health  "200"
sk_ichthyosaur_melee_dmg "8"
// Combine Gunship
sk_gunship_burst_size  "15"
sk_gunship_health_increments "5"
sk_npc_dmg_gunship  "40"
sk_npc_dmg_gunship_to_plr "3"
// Combine Helicopter
sk_npc_dmg_helicopter   "6"
sk_npc_dmg_helicopter_to_plr "3"
sk_helicopter_grenadedamage  "30"
sk_helicopter_grenaderadius  "275"
sk_helicopter_grenadeforce  "55000"
// Combine Dropship
sk_npc_dmg_dropship  "2"
// Combine APC
sk_apc_health    "750"
 
// HEALTH/SUIT CHARGE DISTRIBUTION
sk_suitcharger  "75"
sk_suitcharger_citadel  "500"
sk_suitcharger_citadel_maxarmor "500"
sk_battery   "15"
sk_healthcharger  "50"
sk_healthkit  "25"
sk_healthvial  "10"
// Combine balls
sk_combineball_seek_angle "15"
sk_combineball_guidefactor "1.0"
// NPC damage adjusters
sk_npc_head  "5"
sk_npc_chest "1"
sk_npc_stomach "1"
sk_npc_arm  "1"
sk_npc_leg  "1"
// player damage adjusters
sk_player_head  "3"
sk_player_chest  "1"
sk_player_stomach "1"
sk_player_arm  "1"
sk_player_leg  "1"
// Allies
sk_ally_regen_time "0.2"
// Jeep
sk_max_gauss_round "30"
 
ai_enable_fear_behavior "1"
// zombine
sk_zombie_soldier_health "100"
// Episodic APC - Experimental
sk_apc_missile_damage "50"
// Antlion air attack
sk_antlion_air_attack_dmg  "10"
// Antlion worker
sk_antlion_worker_spit_speed "600"
sk_antlion_worker_health "60"
// Vortigaunt charge limit
sk_vortigaunt_armor_charge  "15"
sk_vortigaunt_armor_charge_per_token "5"
sk_vortigaunt_dmg_zap   "25"
// Poison headcrab
sk_headcrab_poison_npc_damage "20.0"
// advisor
//sk_advisor_health "1000" 
 
 
// Custom ConVar in this extension
sv_css_weapon_respawn_time 1 // mapper add "mm_respawn" keyvalue to weapon wil make weapon respawn, just like hl2dm coop
sv_css_item_respawn_time 1
sk_battery_max 100
sk_healthcharger_rechargetime 5
sk_hevcharger_rechargetime 5
sk_suitcharger_citadel_increase 10
sk_rollermine_bullet_hit  8 // CS:S haven't rocket, can't kill rollermine,  bullet hit rollermine X times will kill it
sk_npc_turret_floor_bullet_damage 5
test_coop.zip = simple coop map
core_plugin.zip = monster sourcmod plugin, preload npc mdl & read monster_download.txt
patch.zip = include antlion_worker.mdl, spitball_*.mdl, stalker.mdl (this model in hl2dm broken, copy from Obsidian Conflict, client NO need download this), antlion_worker sounds & materials, sound scripts

install core_plugin.zip & patch.zip
put monster.ext.dll to sourcemod extension folder


Linux doesn't support!!


How to play hl2dm coop map in cs:s?
use Stripper:Source


source code https://code.google.com/p/sourcemod-npc-in-css/


Credits:
Obsidian Conflict, CEntity
Attached Files
File Type: zip test_coop.zip (2.65 MB, 2186 views)
File Type: zip patch.zip (4.29 MB, 2963 views)
File Type: zip core_plugin.zip (2.0 KB, 2228 views)
File Type: dll monster.ext.dll (2.21 MB, 1708 views)
File Type: txt monster.cstrike.games.txt (61.2 KB, 1779 views)

Last edited by raydan; 07-04-2012 at 04:03.
raydan is offline
raydan
Senior Member
Join Date: Aug 2006
Old 07-06-2011 , 02:15   Re: [EXTENSION] NPC
Reply With Quote #2



Change Log:
Code:
0.0.0.3 free: 2012-7-4
 update all signature & binary, due to mempool.h & IEngineSound.h changed
 added npc_create_equipment convar
 added npc_create command
 
0.0.0.2 free: 2012-6-28
 update all signature
 
0.0.0.2 free: 2012-4-18
 crash fix
 headcrab jump fix
 
0.0.0.2 free: 2012-3-2
 update all public source codes from private version
 fix 0xcccccccc error http://forums.alliedmods.net/showthr...t=87500&page=4
 
 
0.0.0.1 beta: 2011-7-19
  add more npc & hl2 entities (npc_turret_floor, env_headcrabcanister, npc_antlion_template_maker, func_tank)
  add hook valve auto system
  download everything and install (upgrade or fresh install)
  still wating people donation:)
 
0.0.0.1 alpha: 2011-7-6
  first release

Last edited by raydan; 07-04-2012 at 04:02.
raydan is offline
KyleS
SourceMod Plugin Approver
Join Date: Jul 2009
Location: Segmentation Fault.
Old 07-06-2011 , 02:25   Re: [EXTENSION] NPC
Reply With Quote #3

This is great! Thanks for releasing it!
KyleS is offline
Zephyrus
Cool Pig B)
Join Date: Jun 2010
Location: Hungary
Old 07-06-2011 , 04:32   Re: [EXTENSION] NPC in CS:S
Reply With Quote #4

glad you changed your mind
Zephyrus is offline
xbatista
Veteran Member
Join Date: Mar 2008
Location: Lithuania
Old 07-06-2011 , 05:35   Re: [EXTENSION] NPC in CS:S
Reply With Quote #5

Ohh my fu***** god thats great, keep on updating it! Well done!
Please if you can , compile it for Linux ;)
Also make a Console command to open monster menu for admins that they can edit monsters on the map. Also save it for example to monster_*mapname.cfg
__________________

Last edited by xbatista; 07-06-2011 at 05:38.
xbatista is offline
Send a message via Skype™ to xbatista
raydan
Senior Member
Join Date: Aug 2006
Old 07-06-2011 , 05:41   Re: [EXTENSION] NPC in CS:S
Reply With Quote #6

Quote:
Originally Posted by xbatista View Post
Ohh my fu***** god thats great, keep on updating it! Well done!
Please if you can , compile it for Linux ;)
Also make a Console command to open monster menu for admins that they can edit monsters on the map. Also save it for example to monster_*mapname.cfg

i haven't linux, can't make linux version.
monster menu or spawn monster can be done in sourcemod plugin, NOT in this extension
raydan is offline
xbatista
Veteran Member
Join Date: Mar 2008
Location: Lithuania
Old 07-06-2011 , 05:46   Re: [EXTENSION] NPC in CS:S
Reply With Quote #7

Quote:
Originally Posted by raydan View Post
i haven't linux, can't make linux version.
monster menu or spawn monster can be done in sourcemod plugin, NOT in this extension
Ohh well, what we need to do to spawn monster?
Create entity for example npc_antlionguard? Could you give full creation of entity to know what we need to write to be sure that will work fine Such as collision,gravity,speed,movetype etc...
__________________

Last edited by xbatista; 07-06-2011 at 05:49.
xbatista is offline
Send a message via Skype™ to xbatista
raydan
Senior Member
Join Date: Aug 2006
Old 07-06-2011 , 05:55   Re: [EXTENSION] NPC in CS:S
Reply With Quote #8

Quote:
Originally Posted by xbatista View Post
Ohh well, what we need to do to spawn monster?
Create entity for example npc_antlionguard? Could you give full creation of entity to know what we need to write to be sure that will work fine Such as collision,gravity,speed,movetype etc...
use CreateEntityByName, DispatchSpawn,
DispatchKeyValue also work

S/GetEntData DOESN'T work, because the data address not in CBaseEntity

this extension contains too much settings, if someone make a document to show everything how it work would be very helpful

Last edited by raydan; 07-06-2011 at 07:28.
raydan is offline
miniman
Senior Member
Join Date: Aug 2009
Location: Israel
Old 07-08-2011 , 05:43   Re: [EXTENSION] NPC in CS:S
Reply With Quote #9

dude you fucking rock thanks for releasing it ,I will try to help with linux offsets/sigs when I get some time ,if you need
miniman is offline
klausenbusk
AlliedModders Donor
Join Date: Jan 2011
Old 07-08-2011 , 10:03   Document for CVARs
Reply With Quote #10

Document for CVARs

NPCs
  • Barnacle
    • sk_barnacle_health "35"
      Barnacle spawn health. Default 35.
  • Barney
    • sk_barney_health "35"
      Barney's spawn health
  • Bullseye
    • sk_bullseye_health "35"
      ?
  • Bullsquid
    • sk_bullsquid_health "120"
      Bullsquid spawn health.
    • sk_bullsquid_dmg_bite "15"
      Bullsquid bite damage.
    • sk_bullsquid_dmg_whip "25"
      Maximum health an enemy has for bullsquid to attempt a tailwhip.
  • Citizen
    • sk_citizen_health "40"
      A citizen's spawn health.
  • Combine Soldier
    • sk_combine_s_health "50"
      A regular/Nova Prospekt soldier's spawn health
    • sk_combine_s_kick "10"
      A regular/Nova Prospekt soldier's melee damage
  • Combine Guard
    • sk_combine_guard_health "70"
      A Combine Elite Soldier's spawn health
    • sk_combine_guard_kick "15"
      A Combine Elite Soldier's melee damage
  • Strider
    • sk_strider_health "350"
      Strider spawn health.
    • sk_strider_num_missiles1 "5"
      Rockets required to take down an easy strider.
    • sk_strider_num_missiles2 "7"
      Rockets required to take down a medium strider.
    • sk_strider_num_missiles3 "7"
      Rockets required to take down a hard strider.
  • Headcrab
    • sk_headcrab_health "10"
      A headcrab's spawn health
    • sk_headcrab_melee_dmg "5"
      Melee damage
  • Fast Headcrab
    • sk_headcrab_fast_health "50"
      A fast headcrab's spawn health
  • Poison Headcrab
    • sk_headcrab_poison_health "35"
      A poison headcrab's spawn health
  • Houndeye
    • sk_houndeye_health "80"
      ?
    • sk_houndeye_dmg_blast "25"
      ?
  • Manhack
    • sk_manhack_health "300"
      A manhack's spawn health.
    • sk_manhack_melee_dmg "5"
      Melee damage.
  • Metropolice
    • sk_metropolice_health "40"
      A metrocop's spawn health. Affected by the "Gordon pre-criminal" global state.
    • sk_metropolice_stitch_reaction "1.0"
      How close to the airboat should Metrocops begin stitching?
    • sk_metropolice_stitch_tight_hitcount "2"
      Number of times a stitching Metrocop can hit a player from behind.
    • sk_metropolice_stitch_at_hitcount "1"
      Number of times a stitching Metrocop can hit a nearby player.
    • sk_metropolice_stitch_behind_hitcount "3"
      Number of times a stitching Metrocop can hit a nearby player.
    • sk_metropolice_stitch_along_hitcount "2"
      Number of times a stitching Metrocop can hit a player looking left/right.
  • Rollermine
    • sk_rollermine_shock "10"
      ?
    • sk_rollermine_stun_delay "3"
      ?
    • sk_rollermine_vehicle_intercept "1"
      ?
  • Scanner (City)
    • sk_scanner_health "30"
      A scanner's spawn health.
    • sk_scanner_dmg_dive "25"
      When this scanner hits another entity that isn't a scanner, it will damage the entity by this value.
  • Stalker
    • sk_stalker_health "150"
      A stalker's spawn health. (Default 50?)
    • sk_stalker_melee_dmg "5"
      Melee damage
  • Vortigaunt
    • sk_vortigaunt_health "100"
      Vortigaunt spawn health.
    • sk_vortigaunt_dmg_claw "10"
      Damage from a claw melee attack.
    • sk_vortigaunt_dmg_rake "25"
      Damage from a rake melee attack.
    • sk_vortigaunt_dmg_zap "50"
      Damage from a zap range attack.
    • sk_vortigaunt_armor_charge "30"
      Amount of energy to charge the player with.
  • Zombie
    • sk_zombie_health "50"
      A zombie's spawn health
    • sk_zombie_dmg_one_slash "10"
      Melee damage
    • sk_zombie_dmg_both_slash "25"
      Melee damage
  • Poison Zombie
    • sk_zombie_poison_health "175"
      A poison zombie's spawn health.
    • sk_zombie_poison_dmg_spit "20"
      ?
  • Antlion
    • sk_antlion_health "30"
      ?
    • sk_antlion_swipe_damage "5"
      ?
    • sk_antlion_jump_damage "5"
      ?
  • Antlion Guard
    • sk_antlionguard_health "500"
      An antlion guard's spawn health
    • sk_antlionguard_dmg_charge "20"
      ?
    • sk_antlionguard_dmg_shove "10"
      ?
  • Antlion Grub
    • sk_antliongrub_health "5"
      ?
  • Ichthyosaur
    • sk_ichthyosaur_health "200"
      ?
    • sk_ichthyosaur_melee_dmg "8"
      ?
  • Combine Gunship
    • sk_gunship_burst_size "15"
      Fire off this many bullets in a burst
    • sk_gunship_health_increments "5"
      Number of times the gunship must be struck by explosive damage (multiplied for skill settings)
    • sk_npc_dmg_gunship "40"
      Used by ammotype "CombineCannon"
    • sk_npc_dmg_gunship_to_plr "3"
      Used by ammotype "CombineCannon"
  • Combine Helicopter
    • sk_npc_dmg_helicopter "6"
      Damage helicopter shots deal to everything but the player
    • sk_npc_dmg_helicopter_to_plr "3"
      Damage helicopter shots deal to the player
      Used in ammotype "HelicopterGun"
    • sk_helicopter_grenadedamage "30"
      The amount of damage the helicopter grenade deals.
    • sk_helicopter_grenaderadius "275"
      The damage radius of the helicopter grenade.
    • sk_helicopter_grenadeforce "55000"
      The physics force that the helicopter grenade exerts.
  • Combine Dropship
    • sk_npc_dmg_dropship "2"
      Dropship container cannon damage
  • Combine APC
    • sk_apc_health "750"
      ?

I need to find out what all the CVARs with a ? do , and add missing cvar to list..

Changelog:
Quote:
2011-07-07 (04:03 PM)
Reply submitted

Last edited by klausenbusk; 07-08-2011 at 10:13.
klausenbusk is offline
Reply


Thread Tools
Display Modes

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 13:18.


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