PDA

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


raydan
07-06-2011, 02:14
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:

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:

monster_dump // show current CEntity count



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

skill.cfg

// ===========
// 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 (http://obsidianconflict.net/), 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 (http://forums.alliedmods.net/showthread.php?t=39439)


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


Credits:
Obsidian Conflict (http://obsidianconflict.net/), CEntity (http://forums.alliedmods.net/showthread.php?t=87500)

raydan
07-06-2011, 02:15
:3

Change Log:

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/showthread.php?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

KyleS
07-06-2011, 02:25
This is great! Thanks for releasing it!

Zephyrus
07-06-2011, 04:32
glad you changed your mind

xbatista
07-06-2011, 05:35
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

raydan
07-06-2011, 05:41
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

xbatista
07-06-2011, 05:46
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...

raydan
07-06-2011, 05:55
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

xbatista
07-08-2011, 05:37
Any Updates ^_^ ?
Also server crash can't test anything

miniman
07-08-2011, 05:43
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

klausenbusk
07-08-2011, 10:03
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:
2011-07-07 (04:03 PM)
Reply submitted

raydan
07-09-2011, 09:44
first time compile this extension in linux, it give alot error.
i am not going to release linux version

xbatista
07-09-2011, 11:54
Can you fix please crash on windows?

miniman
07-09-2011, 13:40
yeah well it crashes right when you try to load it into sourcemod ,reinstalled it now but it doesn't solve the problem

mikehawk1339
07-09-2011, 15:17
Here is a short video of this in a coop map in CSS

http://www.youtube.com/watch?v=kteX_UtwsDo

For those having crash problems, this is what works for me.
1. install MM 1.9.0 dev and SM 1.4.0 dev
2. install patch.zip, install core_plugin.zip
3. install monster.cstrike.games.txt and overwrite the existing. (the one that's posted under attachments)
4. install monster.ext.dll
5. either enter sm exts load monster.ext in console or compile monster_core.sp and add it to your plugins folder


(https://forums.alliedmods.net/attachment.php?attachmentid=88794&d=1310219302)

xbatista
07-10-2011, 09:06
raydan How to set NPC spawn count via SM, which keyvalue can be?

CrimsonGT
07-10-2011, 10:34
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

I would recommend using Predcrab's CEntity Framework as this will actually make them recognized as entities. Then you can use Set/GetEntData and so on from a Plugin.

mikehawk1339
07-10-2011, 12:09
Here is a quick demo of spawning the NPCs in de_dust2. None of the NPC health and damage cvars were set up, so most don't do damage and die in 1 hit.

http://www.youtube.com/watch?v=HCXe5Z0uWL0

klausenbusk
07-10-2011, 12:27
Here is a short video of this in a coop map in CSS

http://www.youtube.com/watch?v=kteX_UtwsDo

For those having crash problems, this is what works for me.
1. install MM 1.9.0 dev and SM 1.4.0 dev
2. install patch.zip, install core_plugin.zip
3. install monster.cstrike.games.txt and overwrite the existing. (the one that's posted under attachments)
4. install monster.ext.dll
5. either enter sm exts load monster.ext in console or compile monster_core.sp and add it to your plugins folder


(https://forums.alliedmods.net/attachment.php?attachmentid=88794&d=1310219302)
Can i get the map used in the video?

asherkin
07-10-2011, 19:36
I would recommend using Predcrab's CEntity Framework as this will actually make them recognized as entities. Then you can use Set/GetEntData and so on from a Plugin.

It's already using CEntity, which is why it doesn't work.
Considering you wrote so much with CEntity, you should know that it wont.
The datatable is offsets from the CBE, whereas the actual variables are offset from the CE, there have been a few proposals for possible workarounds, but none have been implemented.

xbatista
07-11-2011, 12:30
Also I've noticed that when I create 20+ zombies in the same place they walk/run laggggeed, CPU usage only 25%...

Nail
07-12-2011, 12:59
Сan somebody make a version for linux?

add plz npc_turret_floor, npc_crow, npc_dog, npc_pigeon, npc_seagull

D@Ni1986
07-16-2011, 13:26
Does not work. Server crashes at startup.
Windows 2003 32bit.

Peace-Maker
07-17-2011, 09:59
Does not work. Server crashes at startup.
Windows 2003 32bit.
Make sure to use the latest mm1.9 and sm1.4 snapshots and use the gamedata file attached to the post instead of the one in the archive.

xbatista
07-18-2011, 05:30
HL2 COOP maps pis**** you? Or bugged as hell?
Not a problem, here I made SM monster creator tool:
Write in console: cmonster . It will open menu to spawn monsters where you want, how many and for how long. It creates/spawns monsters at where you aim to.
Write in console: cmonster_del . To delete whole currently playing monster map CFG file also remove all yours created monsters.

Note : At spawn count menu "0" value means instant spawn.
Requirements : SDKHooks (http://forums.alliedmods.net/showthread.php?t=106748).

Plugin works without any crashes and errors in log.

Peace-Maker
07-18-2011, 08:17
Lot's of co-op maps for gmod or similar don't have the correct spawnpoints, so the teams are always considered as "full".
To work around this without the need to create a stripper entry for each map you want to test, there are some simple steps to get you spawned.

Type mp_limitteams 0
mp_autoteambalance 0
mp_ignore_round_win_conditions 1 in rcon and change to a coop map (http://games.softpedia.com/get/Maps/Half-Life-2-Action-Co-op-Map-Pack.shtml).


Change your team with a plugin (http://forums.alliedmods.net/showthread.php?p=549446)
Spawn yourself with a plugin (http://forums.alliedmods.net/showthread.php?p=984087)
Enable noclip on yourself and search a place which looks like a spawning area :S
Give (http://forums.alliedmods.net/showthread.php?p=944597) yourself some weapons
Enable infinite ammo (http://forums.alliedmods.net/showthread.php?p=1135688) on your weapons. The ammopacks in the map don't work, so you'd run out of ammo quite fastly.
Start raping those zombies!

Some of those maps use HudMsg usermessage to show information on the client's screen. That message is disabled in CS:S, so you need to install the clientfix (http://forums.alliedmods.net/showthread.php?t=154354) shipped with SM:Conquest to be able to see those.

raydan
07-18-2011, 09:11
use the following Stripper:Source (http://forums.alliedmods.net/showthread.php?t=39439) config can play hl2dm coop maps





;;EXAMPLE - remove all physics props
;remove:
;{
;"classname" "/prop_physics.*/"
;}
;;EXAMPLE - replace all garbage cans with a hostage
;modify:
;{
; match:
; {
; "model" "models/props_junk/garbage_metalcan002a.mdl"
; "classname" "prop_physics_multiplayer"
; }
; replace:
; {
; "classname" "hostage_entity"
; }
; delete:
; {
; "model" "models/props_junk/garbage_metalcan002a.mdl"
; }
; insert:
; {
; "scale" "0.99"
; }
;}
modify:
{
match:
{
"classname" "info_player_combine"
}
replace:
{
"classname" "info_player_terrorist"
}
}
modify:
{
match:
{
"classname" "info_player_deathmatch"
}
replace:
{
"classname" "info_player_counterterrorist"
}
}
modify:
{
match:
{
"classname" "weapon_rpg"
}
replace:
{
"classname" "weapon_awp"
}
insert:
{
"mm_respawn" "1"
}
}
modify:
{
match:
{
"classname" "weapon_shotgun"
}
replace:
{
"classname" "weapon_m3"
}
insert:
{
"mm_respawn" "1"
}
}
modify:
{
match:
{
"classname" "weapon_357"
}
replace:
{
"classname" "weapon_deagle"
}
insert:
{
"mm_respawn" "1"
}
}
modify:
{
match:
{
"classname" "weapon_ar2"
}
replace:
{
"classname" "weapon_ak47"
}
insert:
{
"mm_respawn" "1"
}
}
modify:
{
match:
{
"classname" "weapon_pistol"
}
replace:
{
"classname" "weapon_usp"
}
insert:
{
"mm_respawn" "1"
}
}
modify:
{
match:
{
"classname" "weapon_smg1"
}
replace:
{
"classname" "weapon_mp5navy"
}
insert:
{
"mm_respawn" "1"
}
}
modify:
{
match:
{
"classname" "weapon_crossbow"
}
replace:
{
"classname" "weapon_famas"
}
insert:
{
"mm_respawn" "1"
}
}

modify:
{
match:
{
"classname" "weapon_crowbar"
}
replace:
{
"classname" "weapon_knife"
}
insert:
{
"mm_respawn" "1"
}
}

modify:
{
match:
{
"classname" "item_ammo_smg1_grenade"
}
replace:
{
"classname" "weapon_hegrenade"
}
insert:
{
"mm_respawn" "1"
}
}
modify:
{
match:
{
"classname" "weapon_frag"
}
replace:
{
"classname" "weapon_hegrenade"
}
insert:
{
"mm_respawn" "1"
}
}
modify:
{
match:
{
"classname" "weapon_stunstick"
}
replace:
{
"classname" "weapon_knife"
}
insert:
{
"mm_respawn" "1"
}
}

modify:
{
match:
{
"classname" "item_box_buckshot"
}
replace:
{
"classname" "ammo_buckshot"
}
insert:
{
"mm_respawn" "1"
}
}
modify:
{
match:
{
"classname" "item_ammo_crossbow"
}
replace:
{
"classname" "ammo_338mag"
}
insert:
{
"mm_respawn" "1"
}
}

modify:
{
match:
{
"classname" "item_ammo_crossbow"
}
replace:
{
"classname" "ammo_57mm"
}
insert:
{
"mm_respawn" "1"
}
}
modify:
{
match:
{
"classname" "item_rpg_round"
}
replace:
{
"classname" "ammo_338mag"
}
insert:
{
"mm_respawn" "1"
}
}
modify:
{
match:
{
"classname" "item_ammo_ar2_altfire"
}
replace:
{
"classname" "ammo_762mm"
}
insert:
{
"mm_respawn" "1"
}
}

modify:
{
match:
{
"classname" "item_ammo_smg1"
}
replace:
{
"classname" "ammo_556mm"
}
insert:
{
"mm_respawn" "1"
}
}
modify:
{
match:
{
"classname" "item_ammo_smg1_large"
}
replace:
{
"classname" "ammo_556mm"
}
insert:
{
"mm_respawn" "1"
}
}
modify:
{
match:
{
"classname" "item_ammo_357_large"
}
replace:
{
"classname" "ammo_50ae"
}
insert:
{
"mm_respawn" "1"
}
}
modify:
{
match:
{
"classname" "item_ammo_357"
}
replace:
{
"classname" "ammo_50ae"
}
insert:
{
"mm_respawn" "1"
}
}

modify:
{
match:
{
"classname" "weapon_slam"
}
replace:
{
"classname" "weapon_hegrenade"
}
insert:
{
"mm_respawn" "1"
}
}

modify:
{
match:
{
"classname" "item_ammo_pistol"
}
replace:
{
"classname" "ammo_45acp"
}
insert:
{
"mm_respawn" "1"
}
}
modify:
{
match:
{
"classname" "item_ammo_pistol_large"
}
replace:
{
"classname" "ammo_45acp"
}
insert:
{
"mm_respawn" "1"
}
}
modify:
{
match:
{
"classname" "item_ammo_ar2"
}
replace:
{
"classname" "ammo_9mm"
}
insert:
{
"mm_respawn" "1"
}
}
modify:
{
match:
{
"classname" "item_ammo_ar2_large"
}
replace:
{
"classname" "ammo_9mm"
}
insert:
{
"mm_respawn" "1"
}
}
modify:
{
match:
{
"classname" "func_recharge"
}
replace:
{
"classname" "item_suitcharger"
}
}

xbatista
07-18-2011, 09:35
raydan please upload your latest .dll monster extension :)

raydan
07-19-2011, 01:07
beta release!

xbatista
07-19-2011, 03:02
Great! Thank you!

EDIT And if you need:
Failed to load sound "npc\stalker\stalker_ambient01.wav", file probably missing from disk/repository
Failed to load sound "npc\stalker\stalker_alert3b.wav", file probably missing from disk/repository
Failed to load sound "npc\stalker\stalker_ambient01.wav", file probably missing from disk/repository
Failed to load sound "npc\antlion_guard\frustrated_growl3.wav", file probably missing from disk/repository
Failed to load sound "npc\stalker\stalker_ambient01.wav", file probably missing from disk/repository
Failed to load sound "npc\stalker\stalker_ambient01.wav", file probably missing from disk/repository
Failed to load sound "npc\stalker\stalker_alert2b.wav", file probably missing from disk/repository
Failed to load sound "npc\stalker\stalker_ambient01.wav", file probably missing from disk/repository
Failed to load sound "npc\stalker\stalker_ambient01.wav", file probably missing from disk/repository
Failed to load sound "npc\stalker\stalker_alert1b.wav", file probably missing from disk/repository
Failed to load sound "npc\stalker\stalker_alert2b.wav", file probably missing from disk/repository
Failed to load sound "npc\stalker\stalker_ambient01.wav", file probably missing from disk/repository
Failed to load sound "npc\stalker\stalker_ambient01.wav", file probably missing from disk/repository
Failed to load sound "npc\stalker\stalker_alert3b.wav", file probably missing from disk/repository
Failed to load sound "npc\stalker\stalker_ambient01.wav", file probably missing from disk/repository
Failed to load sound "npc\stalker\stalker_pain1.wav", file probably missing from disk/repository
Failed to load sound "npc\stalker\stalker_pain2.wav", file probably missing from disk/repository
Failed to load sound "npc\stalker\stalker_pain3.wav", file probably missing from disk/repository
Failed to load sound "npc\stalker\stalker_pain1.wav", file probably missing from disk/repository
x

raydan
07-19-2011, 10:08
All missing npc sound can be find in Obsidian Conflict (http://obsidianconflict.net/) mod, all sounds just 24MB (15MB zipped)

Anyone make a Linux version?

xbatista
07-19-2011, 10:26
What is this Revision e531f292c6 (linux) pushed by raydanhk - linux (code google), you trying to manage it with linux? :)

And why monster.cstrike.games.txt is needed? For yours C++ coding?(Is it obvious for those who have a MonsterMod server)

raydan
07-19-2011, 11:06
What is this , you trying to manage it with linux? :)

And why monster.cstrike.games.txt is needed? For yours C++ coding?(Is it obvious for those who have a MonsterMod server)

i still unable compile in linux, still alot error

klausenbusk
07-19-2011, 14:50
I run linux on all my computer, but i don't have c++ knowledge..
But say if i can help :D

xbatista
07-20-2011, 05:10
New version of NPC spawner 1.2
Fixed some manor bugs, added antlion worker to spawn menu.

Usage:
Console command: cmonster - Opens monster spawn menu.
Console command: cmonster_del - Deletes current playing map monster cfg file.

Requirements: SDKHooks (http://forums.alliedmods.net/showthread.php?t=106748).
Note: In spawn count menu "0" value means instant spawn.

P.S. raydan keep trying configure monster mod for linux :)

dormantlemon
07-20-2011, 13:19
hmm this project looks really interesting, however i have some probably daft questions. I am vaguely familiar with sourcemod, and i understand kind of how things work, but being a mapper, how would one go about including any npc_xxx entity in hammer? I mean via inclusion of an fgd? or adjusting any other configuration? or simply by adding the half life 2 fgd
Or am i being stupid and its nothing like that at all?

Regardless good luck with this project, i cant believe noone has done it before.

CrimsonGT
07-20-2011, 15:46
Yeah, it has been almost a year though since I did any large-scale SM coding so I am bit rusty. Not sure how I missed that this was using CEntity though.

It's already using CEntity, which is why it doesn't work.
Considering you wrote so much with CEntity, you should know that it wont.
The datatable is offsets from the CBE, whereas the actual variables are offset from the CE, there have been a few proposals for possible workarounds, but none have been implemented.

Fearts
07-23-2011, 23:59
Hi,

This looks like a very interesting ext however I am having issues trying to get it to run at all.

I have a Windows server and have installed:

SM 1.4.0-hg3363

MM 1.9.0-hg762

Sdkhooks 2.0.0-hg127

I installed patch.zip and core_plugin.zip.
Added monster.cstrike.games.txt to gamedata folder.
Placed monster.ext.dll into extensions folder.
I restarted the server and typed into console: sm exts load monster.ext

This crashes my server instantly.

Any help would be much appreciated.

Thanks.

mikehawk1339
07-24-2011, 00:01
Hi,

This looks like a very interesting ext however I am having issues trying to get it to run at all.

I have a Windows server and have installed:

SM 1.4.0-hg3363

MM 1.9.0-hg762

Sdkhooks 2.0.0-hg127

I installed patch.zip and core_plugin.zip.
Added monster.cstrike.games.txt to gamedata folder.
Placed monster.ext.dll into extensions folder.
I restarted the server and typed into console: sm exts load monster.ext

This crashes my server instantly.

Any help would be much appreciated.

Thanks.

Try adding monster.cstrike.games.txt to gamedata/monster

Fearts
07-24-2011, 00:04
Yes this seems to have worked. Dumb mistake on my part thank you.

Fearts
07-24-2011, 00:45
Mike what configs/scripts are you using in your video. The NPC I am spawning don't explode like in that vid.

mikehawk1339
07-24-2011, 01:00
Which video? The one in the custom map or the ones in de_dust2? If it's the custom map video you're talking about, then the NPC's and their attributes were coded into the map itself.

Morell
07-24-2011, 04:03
Please release the linux version.

Nail
07-24-2011, 10:07
Add please Vehicle with gun.... and if posible add weapon from hl2

donrevan
07-24-2011, 13:43
Add please Vehicle with gun.... and if posible add weapon from hl2
I think he should fix the current version first and get it to work on linux :S

anyway : great work ! :D

D@Ni1986
07-25-2011, 21:25
Attempted to create unknown entity type env_headcrabcanister!

Nail
07-31-2011, 09:43
Planned upgrades? or project dead?

RedSword
07-31-2011, 13:29
Dude I watched your video and I must say great extension ! <3

Mitchell
07-31-2011, 15:18
When ever a turret gets knocked over it crashes.

mikehawk1339
07-31-2011, 17:50
When ever a turret gets knocked over it crashes.
They worked in a test coop map.
http://www.youtube.com/watch?v=-3AYOR8OEdw

However if they are spawned manually and are tipped over, it does crash.

zeroibis
08-01-2011, 01:12
Is there/can there be a way for a given NPC to only attack a particular team?

Zephyrus
08-01-2011, 08:42
is it possible to detect who killed the monsters? id like to create a ranking system

Mitchell
08-01-2011, 20:04
They worked in a test coop map.
http://www.youtube.com/watch?v=-3AYOR8OEdw

However if they are spawned manually and are tipped over, it does crash.
See far warning, ive been using ent_create, and it seems zombies dont do any damage either..

Zephyrus
08-01-2011, 21:12
nvm

mikehawk1339
08-02-2011, 11:18
See far warning, ive been using ent_create, and it seems zombies dont do any damage either..

In that map, the NPCs HP and damage are set from within the map itself.

// Zombie
sk_zombie_health "50"
sk_zombie_dmg_one_slash "10"
sk_zombie_dmg_both_slash "25"When you use ent_create, none of these are specified so they have 0 HP and don't do any damage. The ones that do damage after being spawned are the stalker, rollermine and I think there were a couple others.

Morell
08-23-2011, 03:44
Linux version?

Nail
08-24-2011, 09:15
Looks like project dead

sejin513
09-05-2011, 11:34
sad P:

Starbish
10-11-2011, 04:33
....huh...
https://code.google.com/p/sourcemod-npc-in-css/source/detail?r=e531f292c6e4b3f3e91cde485d77ac9afc73 6464

This can be used if i compile it?

Blowst
10-11-2011, 07:28
....huh...
https://code.google.com/p/sourcemod-npc-in-css/source/detail?r=e531f292c6e4b3f3e91cde485d77ac9afc73 6464

This can be used if i compile it?

maybe it will work. maybe possible

because raydan is using this well

Starbish
10-14-2011, 07:19
but raydan uses Windows... not a linux build..
he was used windows but not now.

Blowst
10-14-2011, 07:28
but raydan uses Windows... not a linux build..
he was used windows but not now.

'NPC in CS:S' is originally not support Linux

you need Linux version source(or extention) of NPC in CS:S

but maybe raydan will not share that :|

a754060604
10-16-2011, 02:21
Change how I installed on my server.
Has been unable to load plug-ins.
MM: 1.8.7 SM: 1.4.0

a754060604
10-16-2011, 06:44
[MONSTER DEBUG] FireOutput - FAIL
[MONSTER DEBUG] SetNextThink - FAIL
[MONSTER DEBUG] SimThink_EntityChanged - FAIL
[MONSTER DEBUG] SetSolid - FAIL
[MONSTER DEBUG] SetSolidFlags - FAIL
[MONSTER DEBUG] SetLocalOrigin - FAIL
[MONSTER DEBUG] SetAbsVelocity - FAIL
[MONSTER DEBUG] AutoMovement - FAIL
[MONSTER DEBUG] EndTaskOverlay - FAIL
[MONSTER DEBUG] SetAbsAngles - FAIL
[MONSTER DEBUG] Dissolve - FAIL
[MONSTER DEBUG] SetAbsOrigin - FAIL
[MONSTER DEBUG] SetLocalAngles - FAIL
[MONSTER DEBUG] EmitSound_char_float_pfloat - FAIL
[MONSTER DEBUG] EmitSound_filter_int_char_vector_float_pfloat - FAIL
[MONSTER DEBUG] EmitSoundByHandle - FAIL
[MONSTER DEBUG] MoveLimit - FAIL
[MONSTER DEBUG] SetupVPhysicsHull - FAIL
[MONSTER DEBUG] PhysicsImpactSound - FAIL
[MONSTER DEBUG] AddStepDiscontinuity - FAIL
[MONSTER DEBUG] PhysicsMarkEntitiesAsTouching - FAIL
[MONSTER DEBUG] MarkPartitionHandleDirty - FAIL
[MONSTER DEBUG] CreateServerRagdoll - FAIL
[MONSTER DEBUG] CAI_TacticalServices_FindLosNode - FAIL
[MONSTER DEBUG] CheckHasGamePhysicsSimulation - FAIL
[MONSTER DEBUG] g_SoundController - FAIL
[MONSTER DEBUG] g_TouchTrace - FAIL
[MONSTER DEBUG] AI_Waypoint_t_s_Allocator - FAIL
L 10/16/2011 - 18:38:41: [MONSTER] Some Signature counld not found.


How can I do

mikehawk1339
10-16-2011, 10:20
I think the monster.gamedata needs to be updated at least.

sejin513
10-21-2011, 23:01
anybody doing update?

Stinkyfax
11-09-2011, 10:01
Would love to see it on linux.

donrevan
11-11-2011, 06:45
As Stinky said.. it would be awesome to see a linux build.. signatures for linux should be no a hard problem since you can use objdump

Fearts
12-24-2011, 23:05
wish there was a update for this

raydan
01-03-2012, 11:00
still looking someone to help me compile a linux version:wink:

the source code in google are old and all offsets & signatures are changed.

i updated alot of things on last source code release. few days ago i successful make a npc_combine_s work in cs:s.

want to see how it work? join my cs:s coop server

xbatista
01-04-2012, 03:38
You better upload your latest files ^_^
And please keep working on it, this monster mod is awesome, really. It's very unique in CS:S.

raydan
01-05-2012, 00:52
i only updated the gamedata file, the extension should be able to run in lastest css version. But the extension is not the lastest version.

Fearts
01-05-2012, 13:02
I still can't get this to load on my windows server. I know I installed everything correctly and I added the Stripper code to global and set the test map. But When I try to start the sever it wont start. I keep getting this error in logs:


L 01/05/2012 - 12:59:38: Info (map "test_coop") (file "errors_20120105.log")
L 01/05/2012 - 12:59:38: [MONSTER] Helper failed to Initialize. Server may Crash!


Running:

MetaMod:Source v1.9.0-devV
Stripper v1.2.2
SourceMod v1.4.2-dev
SDKhooks
and monter_core.smx and that's it.

xbatista
01-07-2012, 07:15
Yep the same :)

raydan
01-07-2012, 07:28
Yep the same :)

just open monster.cstrike.games.txt
change "CGameMovement_OnLadder"
to "OnLadder"

Fearts
01-07-2012, 16:26
Where does the skill.cfg go?

xbatista
01-08-2012, 06:37
Fearts to cfg folder.
raydan please make those zombies corpses fade(dissapear).

raydan
01-08-2012, 07:51
corpses & skill.cfg are NOT releated to this extension
all setting & config are completely same as HL2DM or GMOD
learn HL2DM or GMOD setting first

g_ragdoll_maxcount

xbatista
01-13-2012, 05:49
raydan I mean this flag: 512 : Fade Corpse , I could make in my plugin so they can dissapear, but in your c++ code I don't see offset of fading :)

FreedomHouseMD
02-26-2012, 06:25
Hello :) Tell me somebody, this plugin will be updated, or not? If not, please, DO IT! :D I think it will be VERY cool.. play on HL2 maps (co-op or original) in CS:S))))))))) This is like Counter-Life (CS:S with HL1 maps) - http://www.youtube.com/watch?v=VJ0ZORrArNU
Cooomeee ooon)))))))))

Zephyrus
02-26-2012, 23:06
it is updated but kept private

raydan
03-02-2012, 04:35
i just update the public version, should be able to load the extension in current css version & fixed alot of bugs

xbatista
03-02-2012, 04:45
What did you updated there? I'm just curious :)

bl4nk
03-02-2012, 08:13
should be able to load the extension in current css version & fixed alot of bugs

Marcos
03-03-2012, 22:02
@raydan
Great Extension and thanks for updating.
I just tested the updated version.
And i noticed some issues.
1.The headcrab has a lot of chance to jump through your head but didn't do any damage.
2.Is there a way to remove the npc's ragdoll?

raydan
04-18-2012, 05:27
updated two crash bugs & headcrab jump fix

@Marcos
npc ragdoll won't auto remove on client side?
the default setting is max. 8 npc ragdolls on client side, more than that will start fade out (client rejoin server will remove all ragdoll)
search g_ragdoll_maxcount for more information

Marcos
04-22-2012, 22:37
updated two crash bugs & headcrab jump fix

@Marcos
npc ragdoll won't auto remove on client side?
the default setting is max. 8 npc ragdolls on client side, more than that will start fade out (client rejoin server will remove all ragdoll)
search g_ragdoll_maxcount for more information

@Raydan
I just tested the newest version
1.I am glad to see headcrab jump fixed.
2.If it is possible to increase the NPC's "GetAutoAimRadius" Offset ,i think the NPCs will act more aggressive?

svN7
04-26-2012, 11:09
can't load monster_download.txt
how to active the txt file from cmd ?
otherwise the cmonster not working i try type in console
cmonster
cmonster monster_dump npc_fastzombie
cmonster npc_fastzombie
monster_dump npc_fastzombie
also with rcon not working
please help me with monster_download.txt its include what i want to download from the server

svN7
04-27-2012, 11:38
auuuuugggghhh

i still can't load monster_download.txt
i have another question why vortigaunts can't die me and my friends we used all kind of weapons and still can't be die :@
so where i put skill.cfg and how to load it ?

jacek2144
05-02-2012, 15:21
Can somehow make this work in team fortress 2?

napredator
05-03-2012, 12:25
how can i find server's running this?

Agent Wesker
05-23-2012, 12:51
Can you update this the plugin gives error

L 05/23/2012 - 09:49:03: [MONSTER] Some Signature counld not found.

I assume because the gamedata is outdated?

Koldas7
06-14-2012, 05:36
Hi i hope this mod havent die and some 1 coud help me. Well i have problem and have no idea why :/ T.y. for any help. Look picture thx ;) ] If u can help fast pls write to skype for me ;) http://**************/photo/my-images/831/22763760.jpg/

PreFix
06-16-2012, 13:59
Can anyone compile this to linux?

raydan
06-28-2012, 01:22
updated all signature, can load the extension in current css version

PreFix
07-02-2012, 20:25
what about linux?

raydan
07-04-2012, 04:04
update for current css vserion

what about linux?

linux version never happen

zrayz
07-05-2012, 18:40
Latest version of this extension don't load:

L 07/06/2012 - 02:38:10: [SM] Error parsing gameconfig file "D:\gameservers\33186\css\cstrike\addons\sourc emod\gamedata\monster\monster.cstrike.games.t xt":
L 07/06/2012 - 02:38:10: [SM] Error 1 on line 0, col 0: Stream failed to open

Agent Wesker
07-10-2012, 15:07
It loads for me but the player is frozen and cannot move.

edit:

nevermind fixed.

hkkelvin1995
07-15-2012, 14:30
My server crashed after I do everything
https://dl.dropbox.com/u/26459393/crash.jpg
What should I do???

PreFix
07-17-2012, 19:52
Latest version of this extension don't load:

L 07/06/2012 - 02:38:10: [SM] Error parsing gameconfig file "D:\gameservers\33186\css\cstrike\addons\sourc emod\gamedata\monster\monster.cstrike.games.t xt":
L 07/06/2012 - 02:38:10: [SM] Error 1 on line 0, col 0: Stream failed to open


Can i ask , why? Just borrow from someone linux virtual private host :)

dbscjf1997
09-01-2012, 13:05
I want new signature and offset txt file..
please update..

Xseba360
09-25-2012, 13:38
Hey guys.
Any way it would work in HL2DM?
Wanted to make a coop server with proper working NPCs and other features it has.

Bubka3
12-04-2012, 22:09
Can anyone make a new gamedata file for this? I would but this is way above my level of knowledge.

Mitchell
12-04-2012, 22:41
Can anyone make a new gamedata file for this? I would but this is way above my level of knowledge.

some of them are located here:
http://sourcemodplugins.org/vtableoffsets

punica
01-06-2013, 09:41
Can anyone make a new gamedata, this is nice plugin and very funny

some of them are located here:
http://sourcemodplugins.org/vtableoffsets (http://sourcemodplugins.org/vtableoffsets)

but have no idea what

StrikerMan780
01-14-2013, 08:52
I'm wondering, if this plugin could be adapted to work with TF2 as well?

Oshizu
01-23-2013, 09:16
I'm wondering, if this plugin could be adapted to work with TF2 as well?

I'm not good in extensions but after reading whole this extension source code i think we just need to remove cs:s related things that may crash server on other game and compile it for team fortress 2 with updated gamedata for all values. I may be wrong

Mitchell
01-23-2013, 10:30
with updated gamedata for all values.
That would take forever to find them all and replace them.

Zephyrus
01-23-2013, 10:56
That would take forever to find them all and replace them.

thats the case for css too anyway

madman200
02-11-2013, 20:13
It would be nice to get this in CS:GO or other source mods.

Mitchell
02-12-2013, 23:43
It would be nice to get this in CS:GO or other source mods.
Pretty sure this died when the gamedata file is missing +100 signatures or what ever.
Plus we ARE NOT even sure cs:go (since it's on a new engine and what not) would have the npc's etc.

RedSword
02-13-2013, 00:08
Pretty sure this died when the gamedata file is missing +100 signatures or what ever.
Plus we ARE NOT even sure cs:go (since it's on a new engine and what not) would have the npc's etc.

I highly doubt it would work easily on CSGO, as it is in common/ folder, and therefore I believe it is not using .gcf files; meaning it is missing a shitload of files.

lagers
02-23-2013, 14:30
Raydan, write please detailed instruction how to build this extension and make a new gamedata, and we will continue your work.
I tried to compile under Linux, but it writes errors:
mypc@N53Jg:~/sourceSDK/sourcemod-central/extensions/sourcemod-npc-in-css$ make ENGINE=orangebox
if [ "true" = "true" ] && [ "true" = "false" ]; then \
echo "You must supply ENGINE=left4dead or ENGINE=orangebox or ENGINE=original"; \
exit 1; \
fi
mkdir -p Release.orangebox/sdk
ln -sf ../../../hl2sdk-ob/lib/linux/vstdlib_i486.so vstdlib_i486.so;
ln -sf ../../../hl2sdk-ob/lib/linux/tier0_i486.so tier0_i486.so;
make -f Makefile extension
make[1]: Entering directory `/home/mypc/sourceSDK/sourcemod-central/extensions/sourcemod-npc-in-css'
if [ "true" = "true" ] && [ "true" = "false" ]; then \
echo "You must supply ENGINE=left4dead or ENGINE=orangebox or ENGINE=original"; \
exit 1; \
fi
gcc -I../../../hl2sdk-ob/public/tier3 -I../sourcemod-npc-in-css/CEntity -I../../../hl2sdk-ob/public/game/server -I../../../hl2sdk-ob/game/server -I../../../hl2sdk-ob/common -I../../../hl2sdk-ob/game/shared -I../../../hl2sdk-ob/public/toolframework -I. -I.. -Isdk -I../../../hl2sdk-ob/public -I../../../hl2sdk-ob/public/engine -I../../../hl2sdk-ob/public/mathlib -I../../../hl2sdk-ob/public/tier0 -I../../../hl2sdk-ob/public/tier1 -I../../../mmsource-central/core -I../../../mmsource-central/core/sourcehook -I../../public -I../../public/extensions -I../../public/sourcepawn -DSOURCE_ENGINE=3 -DSE_EPISODEONE=1 -DSE_DARKMESSIAH=2 -DSE_ORANGEBOX=3 -DSE_BLOODYGOODTIME=4 -DSE_EYE=5 -DSE_CSS=6 -DSE_ORANGEBOXVALVE=7 -DSE_LEFT4DEAD=8 -DSE_LEFT4DEAD2=9 -DSE_ALIENSWARM=10 -D_LINUX -DPOSIX -Dstricmp=strcasecmp -D_stricmp=strcasecmp -D_strnicmp=strncasecmp -Dstrnicmp=strncasecmp -D_snprintf=snprintf -D_vsnprintf=vsnprintf -D_alloca=alloca -Dstrcmpi=strcasecmp -DCOMPILER_GCC -Wno-switch -Wall -Werror -Wno-uninitialized -Wno-invalid-offsetof -Wno-unused -mfpmath=sse -msse -DSOURCEMOD_BUILD -DHAVE_STDINT_H -m32 -DNDEBUG -O3 -funroll-loops -pipe -fno-strict-aliasing -fvisibility=hidden -Wno-non-virtual-dtor -fno-exceptions -fno-rtti -fno-threadsafe-statics -fvisibility-inlines-hidden -o Release.orangebox/extension.o -c extension.cpp
In file included from extension.h:18:0,
from extension.cpp:2:
../../../hl2sdk-ob/game/shared/IEffects.h:23:6: error: use of enum ‘ShakeCommand_t’ without previous declaration
In file included from ../../../hl2sdk-ob/game/shared/igamemovement.h:19:0,
from extension.h:22,
from extension.cpp:2:
../../../hl2sdk-ob/game/shared/imovehelper.h:20:6: error: use of enum ‘PLAYER_ANIM’ without previous declaration
In file included from ../../../hl2sdk-ob/game/shared/igamemovement.h:19:0,
from extension.h:22,
from extension.cpp:2:
../../../hl2sdk-ob/game/shared/imovehelper.h:81:35: error: ‘PLAYER_ANIM’ has not been declared
In file included from extension.h:38:0,
from extension.cpp:2:
sign_func.h:22:6: error: use of enum ‘Navigation_t’ without previous declaration
sign_func.h:32:6: error: use of enum ‘FlankType_t’ without previous declaration
In file included from extension.h:38:0,
from extension.cpp:2:
sign_func.h:164:28: error: ‘Navigation_t’ has not been declared
sign_func.h:168:171: error: ‘FlankType_t’ has not been declared
In file included from CEntity/AI/CAI_NetworkManager.h:5:0,
from extension.cpp:3:
CEntity/AI/CAI_Network.h:18:6: error: use of enum ‘Hull_t’ without previous declaration
CEntity/AI/CAI_Network.h:58:28: error: ‘Hull_t’ has not been declared
In file included from CEntity/AI/CAI_NetworkManager.h:5:0,
from extension.cpp:3:
CEntity/AI/CAI_Network.h:96:66: error: ‘Hull_t’ has not been declared
CEntity/AI/CAI_Network.h:97:47: error: ‘Hull_t’ has not been declared
In file included from extension.cpp:3:0:
CEntity/AI/CAI_NetworkManager.h: In member function ‘virtual void CEAI_NetworkManager::m_pNetworkPropTracker::I nitProp(CEntity*)’:
CEntity/AI/CAI_NetworkManager.h:22:2: error: ‘dynamic_cast’ not permitted with -fno-rtti
extension.cpp: In member function ‘virtual void __SourceHook_FHCls_IServerGameDLLServerActiva te0::CMyDelegateImpl::DeleteThis()’:
extension.cpp:60:1: error: deleting object of polymorphic class type ‘__SourceHook_FHCls_IServerGameDLLServerActiv ate0::CMyDelegateImpl’ which has non-virtual destructor might cause undefined behaviour [-Werror=delete-non-virtual-dtor]
extension.cpp: In member function ‘virtual void __SourceHook_FHCls_IServerGameClientsSetComma ndClient0::CMyDelegateImpl::DeleteThis()’:
extension.cpp:61:1: error: deleting object of polymorphic class type ‘__SourceHook_FHCls_IServerGameClientsSetComm andClient0::CMyDelegateImpl’ which has non-virtual destructor might cause undefined behaviour [-Werror=delete-non-virtual-dtor]
extension.cpp: In member function ‘virtual bool Monster::SDK_OnLoad(char*, size_t, bool)’:
extension.cpp:162:66: error: ‘VirtualQuery’ was not declared in this scope
extension.cpp:165:27: error: NULL used in arithmetic [-Werror=pointer-arith]
cc1plus: all warnings being treated as errors
make[1]: *** [Release.orangebox/extension.o] Error 1
make[1]: Leaving directory `/home/mypc/sourceSDK/sourcemod-central/extensions/sourcemod-npc-in-css'
make: *** [all] Error 2
mypc@N53Jg:~/sourceSDK/sourcemod-central/extensions/sourcemod-npc-in-css$


What could I do wrong?

zeroibis
02-24-2013, 05:36
HL2 COOP maps pis**** you? Or bugged as hell?
Not a problem, here I made SM monster creator tool:
Write in console: cmonster . It will open menu to spawn monsters where you want, how many and for how long. It creates/spawns monsters at where you aim to.
Write in console: cmonster_del . To delete whole currently playing monster map CFG file also remove all yours created monsters.

Note : At spawn count menu "0" value means instant spawn.
Requirements : SDKHooks (http://forums.alliedmods.net/showthread.php?t=106748).

Plugin works without any crashes and errors in log.

Does this work even without the NPC extension?

zeroibis
02-24-2013, 05:44
Raydan, write please detailed instruction how to build this extension and make a new gamedata, and we will continue your work.
I tried to compile under Linux, but it writes errors:
mypc@N53Jg:~/sourceSDK/sourcemod-central/extensions/sourcemod-npc-in-css$ make ENGINE=orangebox
if [ "true" = "true" ] && [ "true" = "false" ]; then \
echo "You must supply ENGINE=left4dead or ENGINE=orangebox or ENGINE=original"; \
exit 1; \
fi
mkdir -p Release.orangebox/sdk
ln -sf ../../../hl2sdk-ob/lib/linux/vstdlib_i486.so vstdlib_i486.so;
ln -sf ../../../hl2sdk-ob/lib/linux/tier0_i486.so tier0_i486.so;
make -f Makefile extension
make[1]: Entering directory `/home/mypc/sourceSDK/sourcemod-central/extensions/sourcemod-npc-in-css'
if [ "true" = "true" ] && [ "true" = "false" ]; then \
echo "You must supply ENGINE=left4dead or ENGINE=orangebox or ENGINE=original"; \
exit 1; \
fi
gcc -I../../../hl2sdk-ob/public/tier3 -I../sourcemod-npc-in-css/CEntity -I../../../hl2sdk-ob/public/game/server -I../../../hl2sdk-ob/game/server -I../../../hl2sdk-ob/common -I../../../hl2sdk-ob/game/shared -I../../../hl2sdk-ob/public/toolframework -I. -I.. -Isdk -I../../../hl2sdk-ob/public -I../../../hl2sdk-ob/public/engine -I../../../hl2sdk-ob/public/mathlib -I../../../hl2sdk-ob/public/tier0 -I../../../hl2sdk-ob/public/tier1 -I../../../mmsource-central/core -I../../../mmsource-central/core/sourcehook -I../../public -I../../public/extensions -I../../public/sourcepawn -DSOURCE_ENGINE=3 -DSE_EPISODEONE=1 -DSE_DARKMESSIAH=2 -DSE_ORANGEBOX=3 -DSE_BLOODYGOODTIME=4 -DSE_EYE=5 -DSE_CSS=6 -DSE_ORANGEBOXVALVE=7 -DSE_LEFT4DEAD=8 -DSE_LEFT4DEAD2=9 -DSE_ALIENSWARM=10 -D_LINUX -DPOSIX -Dstricmp=strcasecmp -D_stricmp=strcasecmp -D_strnicmp=strncasecmp -Dstrnicmp=strncasecmp -D_snprintf=snprintf -D_vsnprintf=vsnprintf -D_alloca=alloca -Dstrcmpi=strcasecmp -DCOMPILER_GCC -Wno-switch -Wall -Werror -Wno-uninitialized -Wno-invalid-offsetof -Wno-unused -mfpmath=sse -msse -DSOURCEMOD_BUILD -DHAVE_STDINT_H -m32 -DNDEBUG -O3 -funroll-loops -pipe -fno-strict-aliasing -fvisibility=hidden -Wno-non-virtual-dtor -fno-exceptions -fno-rtti -fno-threadsafe-statics -fvisibility-inlines-hidden -o Release.orangebox/extension.o -c extension.cpp
In file included from extension.h:18:0,
from extension.cpp:2:
../../../hl2sdk-ob/game/shared/IEffects.h:23:6: error: use of enum ‘ShakeCommand_t’ without previous declaration
In file included from ../../../hl2sdk-ob/game/shared/igamemovement.h:19:0,
from extension.h:22,
from extension.cpp:2:
../../../hl2sdk-ob/game/shared/imovehelper.h:20:6: error: use of enum ‘PLAYER_ANIM’ without previous declaration
In file included from ../../../hl2sdk-ob/game/shared/igamemovement.h:19:0,
from extension.h:22,
from extension.cpp:2:
../../../hl2sdk-ob/game/shared/imovehelper.h:81:35: error: ‘PLAYER_ANIM’ has not been declared
In file included from extension.h:38:0,
from extension.cpp:2:
sign_func.h:22:6: error: use of enum ‘Navigation_t’ without previous declaration
sign_func.h:32:6: error: use of enum ‘FlankType_t’ without previous declaration
In file included from extension.h:38:0,
from extension.cpp:2:
sign_func.h:164:28: error: ‘Navigation_t’ has not been declared
sign_func.h:168:171: error: ‘FlankType_t’ has not been declared
In file included from CEntity/AI/CAI_NetworkManager.h:5:0,
from extension.cpp:3:
CEntity/AI/CAI_Network.h:18:6: error: use of enum ‘Hull_t’ without previous declaration
CEntity/AI/CAI_Network.h:58:28: error: ‘Hull_t’ has not been declared
In file included from CEntity/AI/CAI_NetworkManager.h:5:0,
from extension.cpp:3:
CEntity/AI/CAI_Network.h:96:66: error: ‘Hull_t’ has not been declared
CEntity/AI/CAI_Network.h:97:47: error: ‘Hull_t’ has not been declared
In file included from extension.cpp:3:0:
CEntity/AI/CAI_NetworkManager.h: In member function ‘virtual void CEAI_NetworkManager::m_pNetworkPropTracker::I nitProp(CEntity*)’:
CEntity/AI/CAI_NetworkManager.h:22:2: error: ‘dynamic_cast’ not permitted with -fno-rtti
extension.cpp: In member function ‘virtual void __SourceHook_FHCls_IServerGameDLLServerActiva te0::CMyDelegateImpl::DeleteThis()’:
extension.cpp:60:1: error: deleting object of polymorphic class type ‘__SourceHook_FHCls_IServerGameDLLServerActiv ate0::CMyDelegateImpl’ which has non-virtual destructor might cause undefined behaviour [-Werror=delete-non-virtual-dtor]
extension.cpp: In member function ‘virtual void __SourceHook_FHCls_IServerGameClientsSetComma ndClient0::CMyDelegateImpl::DeleteThis()’:
extension.cpp:61:1: error: deleting object of polymorphic class type ‘__SourceHook_FHCls_IServerGameClientsSetComm andClient0::CMyDelegateImpl’ which has non-virtual destructor might cause undefined behaviour [-Werror=delete-non-virtual-dtor]
extension.cpp: In member function ‘virtual bool Monster::SDK_OnLoad(char*, size_t, bool)’:
extension.cpp:162:66: error: ‘VirtualQuery’ was not declared in this scope
extension.cpp:165:27: error: NULL used in arithmetic [-Werror=pointer-arith]
cc1plus: all warnings being treated as errors
make[1]: *** [Release.orangebox/extension.o] Error 1
make[1]: Leaving directory `/home/mypc/sourceSDK/sourcemod-central/extensions/sourcemod-npc-in-css'
make: *** [all] Error 2
mypc@N53Jg:~/sourceSDK/sourcemod-central/extensions/sourcemod-npc-in-css$

What could I do wrong?

I do not think the extension ever did support linux, only windows. Would be nice to see a way to have this thing maintained easily by the community even if just for windows.

lagers
02-24-2013, 06:33
In linux missing several enums and structures. They can be taken from windows, but I have no windows. I need:
enum ShakeCommand_t
enum PLAYER_ANIM
enum Navigation_t
enum FlankType_t
enum Hull_t

lagers
02-24-2013, 07:20
I fix some errors. Now it writes such errors:
mypc@N53Jg:~/sourceSDK/sourcemod-central/extensions/sourcemod-npc-in-css$ make ENGINE=orangebox
if [ "true" = "true" ] && [ "true" = "false" ]; then \
echo "You must supply ENGINE=left4dead or ENGINE=orangebox or ENGINE=original"; \
exit 1; \
fi
mkdir -p Release.orangebox/sdk
ln -sf ../../../hl2sdk-ob/lib/linux/vstdlib_i486.so vstdlib_i486.so;
ln -sf ../../../hl2sdk-ob/lib/linux/tier0_i486.so tier0_i486.so;
make -f Makefile extension
make[1]: Entering directory `/home/mypc/sourceSDK/sourcemod-central/extensions/sourcemod-npc-in-css'
if [ "true" = "true" ] && [ "true" = "false" ]; then \
echo "You must supply ENGINE=left4dead or ENGINE=orangebox or ENGINE=original"; \
exit 1; \
fi
gcc -I../../../hl2sdk-ob/public/tier3 -I../sourcemod-npc-in-css/CEntity -I../../../hl2sdk-ob/public/game/server -I../../../hl2sdk-ob/game/server -I../../../hl2sdk-ob/common -I../../../hl2sdk-ob/game/shared -I../../../hl2sdk-ob/public/toolframework -I. -I.. -Isdk -I../../../hl2sdk-ob/public -I../../../hl2sdk-ob/public/engine -I../../../hl2sdk-ob/public/mathlib -I../../../hl2sdk-ob/public/tier0 -I../../../hl2sdk-ob/public/tier1 -I../../../mmsource-central/core -I../../../mmsource-central/core/sourcehook -I../../public -I../../public/extensions -I../../public/sourcepawn -DSOURCE_ENGINE=3 -DSE_EPISODEONE=1 -DSE_DARKMESSIAH=2 -DSE_ORANGEBOX=3 -DSE_BLOODYGOODTIME=4 -DSE_EYE=5 -DSE_CSS=6 -DSE_ORANGEBOXVALVE=7 -DSE_LEFT4DEAD=8 -DSE_LEFT4DEAD2=9 -DSE_ALIENSWARM=10 -D_LINUX -DPOSIX -Dstricmp=strcasecmp -D_stricmp=strcasecmp -D_strnicmp=strncasecmp -Dstrnicmp=strncasecmp -D_snprintf=snprintf -D_vsnprintf=vsnprintf -D_alloca=alloca -Dstrcmpi=strcasecmp -DCOMPILER_GCC -Wno-switch -Wall -Werror -Wno-uninitialized -Wno-invalid-offsetof -Wno-unused -mfpmath=sse -msse -DSOURCEMOD_BUILD -DHAVE_STDINT_H -m32 -DNDEBUG -O3 -funroll-loops -pipe -fno-strict-aliasing -fvisibility=hidden -Wno-non-virtual-dtor -fno-exceptions -fno-rtti -fno-threadsafe-statics -fvisibility-inlines-hidden -o Release.orangebox/extension.o -c extension.cpp
In file included from ../../../hl2sdk-ob/game/server/ai_tacticalservices.h:8:0,
from sign_func.h:15,
from extension.h:38,
from extension.cpp:2:
../../../hl2sdk-ob/game/server/ai_component.h:31:38: error: ISO C++ forbids declaration of ‘DECLARE_CLASS_NOBASE’ with no type [-fpermissive]
In file included from extension.cpp:3:0:
CEntity/AI/CAI_NetworkManager.h: In member function ‘virtual void CEAI_NetworkManager::m_pNetworkPropTracker::I nitProp(CEntity*)’:
CEntity/AI/CAI_NetworkManager.h:22:2: error: ‘dynamic_cast’ not permitted with -fno-rtti
extension.cpp: In member function ‘virtual void __SourceHook_FHCls_IServerGameDLLServerActiva te0::CMyDelegateImpl::DeleteThis()’:
extension.cpp:60:1: error: deleting object of polymorphic class type ‘__SourceHook_FHCls_IServerGameDLLServerActiv ate0::CMyDelegateImpl’ which has non-virtual destructor might cause undefined behaviour [-Werror=delete-non-virtual-dtor]
extension.cpp: In member function ‘virtual void __SourceHook_FHCls_IServerGameClientsSetComma ndClient0::CMyDelegateImpl::DeleteThis()’:
extension.cpp:61:1: error: deleting object of polymorphic class type ‘__SourceHook_FHCls_IServerGameClientsSetComm andClient0::CMyDelegateImpl’ which has non-virtual destructor might cause undefined behaviour [-Werror=delete-non-virtual-dtor]
extension.cpp: In member function ‘virtual bool Monster::SDK_OnLoad(char*, size_t, bool)’:
extension.cpp:162:66: error: ‘VirtualQuery’ was not declared in this scope
extension.cpp:165:27: error: NULL used in arithmetic [-Werror=pointer-arith]
cc1plus: all warnings being treated as errors
make[1]: *** [Release.orangebox/extension.o] Error 1
make[1]: Leaving directory `/home/mypc/sourceSDK/sourcemod-central/extensions/sourcemod-npc-in-css'
make: *** [all] Error 2

Help plz fix them

lagers
02-24-2013, 08:41
... Would be nice to see a way to have this thing maintained easily by the community even if just for windows.
Good idea, css has all basic modes, except cooperative. I too think that this extension should be maintained by the community. On its basis many different games can be created

Peace-Maker
02-25-2013, 07:37
I fix some errors. Now it writes such errors:
mypc@N53Jg:~/sourceSDK/sourcemod-central/extensions/sourcemod-npc-in-css$ make ENGINE=orangebox
if [ "true" = "true" ] && [ "true" = "false" ]; then \
echo "You must supply ENGINE=left4dead or ENGINE=orangebox or ENGINE=original"; \
exit 1; \
fi
mkdir -p Release.orangebox/sdk
ln -sf ../../../hl2sdk-ob/lib/linux/vstdlib_i486.so vstdlib_i486.so;
ln -sf ../../../hl2sdk-ob/lib/linux/tier0_i486.so tier0_i486.so;
make -f Makefile extension
make[1]: Entering directory `/home/mypc/sourceSDK/sourcemod-central/extensions/sourcemod-npc-in-css'
if [ "true" = "true" ] && [ "true" = "false" ]; then \
echo "You must supply ENGINE=left4dead or ENGINE=orangebox or ENGINE=original"; \
exit 1; \
fi
gcc -I../../../hl2sdk-ob/public/tier3 -I../sourcemod-npc-in-css/CEntity -I../../../hl2sdk-ob/public/game/server -I../../../hl2sdk-ob/game/server -I../../../hl2sdk-ob/common -I../../../hl2sdk-ob/game/shared -I../../../hl2sdk-ob/public/toolframework -I. -I.. -Isdk -I../../../hl2sdk-ob/public -I../../../hl2sdk-ob/public/engine -I../../../hl2sdk-ob/public/mathlib -I../../../hl2sdk-ob/public/tier0 -I../../../hl2sdk-ob/public/tier1 -I../../../mmsource-central/core -I../../../mmsource-central/core/sourcehook -I../../public -I../../public/extensions -I../../public/sourcepawn -DSOURCE_ENGINE=3 -DSE_EPISODEONE=1 -DSE_DARKMESSIAH=2 -DSE_ORANGEBOX=3 -DSE_BLOODYGOODTIME=4 -DSE_EYE=5 -DSE_CSS=6 -DSE_ORANGEBOXVALVE=7 -DSE_LEFT4DEAD=8 -DSE_LEFT4DEAD2=9 -DSE_ALIENSWARM=10 -D_LINUX -DPOSIX -Dstricmp=strcasecmp -D_stricmp=strcasecmp -D_strnicmp=strncasecmp -Dstrnicmp=strncasecmp -D_snprintf=snprintf -D_vsnprintf=vsnprintf -D_alloca=alloca -Dstrcmpi=strcasecmp -DCOMPILER_GCC -Wno-switch -Wall -Werror -Wno-uninitialized -Wno-invalid-offsetof -Wno-unused -mfpmath=sse -msse -DSOURCEMOD_BUILD -DHAVE_STDINT_H -m32 -DNDEBUG -O3 -funroll-loops -pipe -fno-strict-aliasing -fvisibility=hidden -Wno-non-virtual-dtor -fno-exceptions -fno-rtti -fno-threadsafe-statics -fvisibility-inlines-hidden -o Release.orangebox/extension.o -c extension.cpp
In file included from ../../../hl2sdk-ob/game/server/ai_tacticalservices.h:8:0,
from sign_func.h:15,
from extension.h:38,
from extension.cpp:2:
../../../hl2sdk-ob/game/server/ai_component.h:31:38: error: ISO C++ forbids declaration of ‘DECLARE_CLASS_NOBASE’ with no type [-fpermissive]
In file included from extension.cpp:3:0:
CEntity/AI/CAI_NetworkManager.h: In member function ‘virtual void CEAI_NetworkManager::m_pNetworkPropTracker::I nitProp(CEntity*)’:
CEntity/AI/CAI_NetworkManager.h:22:2: error: ‘dynamic_cast’ not permitted with -fno-rtti
extension.cpp: In member function ‘virtual void __SourceHook_FHCls_IServerGameDLLServerActiva te0::CMyDelegateImpl::DeleteThis()’:
extension.cpp:60:1: error: deleting object of polymorphic class type ‘__SourceHook_FHCls_IServerGameDLLServerActiv ate0::CMyDelegateImpl’ which has non-virtual destructor might cause undefined behaviour [-Werror=delete-non-virtual-dtor]
extension.cpp: In member function ‘virtual void __SourceHook_FHCls_IServerGameClientsSetComma ndClient0::CMyDelegateImpl::DeleteThis()’:
extension.cpp:61:1: error: deleting object of polymorphic class type ‘__SourceHook_FHCls_IServerGameClientsSetComm andClient0::CMyDelegateImpl’ which has non-virtual destructor might cause undefined behaviour [-Werror=delete-non-virtual-dtor]
extension.cpp: In member function ‘virtual bool Monster::SDK_OnLoad(char*, size_t, bool)’:
extension.cpp:162:66: error: ‘VirtualQuery’ was not declared in this scope
extension.cpp:165:27: error: NULL used in arithmetic [-Werror=pointer-arith]
cc1plus: all warnings being treated as errors
make[1]: *** [Release.orangebox/extension.o] Error 1
make[1]: Leaving directory `/home/mypc/sourceSDK/sourcemod-central/extensions/sourcemod-npc-in-css'
make: *** [all] Error 2
Help plz fix them

You should start with the right sdk. It's hl2sdk-css or hl2sdk-ob-valve instead of just hl2sdk-ob.
I actually updated the gamedata once 90%, but still have some class member variable offsets to find. psychonic changed the sdk to merge a fix by raydan and other stuff related to sound used by this extension.

This gamedata isn't done completely yet and still needs some work. Maybe raydan himself could share some of them. Someone could pick it up. I added the linux symbol/offset when a change was needed, so there is still some more linux gamedata missing.

Peace-Maker
02-26-2013, 20:33
I'm at a loss here. I guess CAI_BaseNPC has changed somehow, but don't know how to detect such changes or if it actually is a problem in there.

It crashes in the CAI_BaseNPC::RunAI when a npc spawns.

I've attached my current changes to get it to compile and load.

Edit: Also added a sample extension msvc10 solution to build it for CSS

lagers
02-27-2013, 10:52
Thanks, I will try to build under Linux during week-end. Can anything be done to it has been included in the standard sourcemod package?

StrikerMan780
02-28-2013, 11:11
I'm at a loss here. I guess CAI_BaseNPC has changed somehow, but don't know how to detect such changes or if it actually is a problem in there.

It crashes in the CAI_BaseNPC::RunAI when a npc spawns.

I've attached my current changes to get it to compile and load.

Edit: Also added a sample extension msvc10 solution to build it for CSS
It's awesome that you're trying to get this going. :)

lagers
03-02-2013, 07:40
With ENGINE=css it writes errors:
...

extension.cpp:334:82: error: no matching function for call to ‘ISoundEmitterSystemBase::AddSoundOverrides(c onst char [43])’
extension.cpp:334:82: note: candidate is:
In file included from extension.h:14:0,
from extension.cpp:2:
../../../hl2sdk-css/public/SoundEmitterSystem/isoundemittersystembase.h:257:17: note: virtual void ISoundEmitterSystemBase::AddSoundOverrides(co nst char*, bool)
../../../hl2sdk-css/public/SoundEmitterSystem/isoundemittersystembase.h:257:17: note: candidate expects 2 arguments, 1 provided
extension.cpp:335:82: error: no matching function for call to ‘ISoundEmitterSystemBase::AddSoundOverrides(c onst char [43])’
extension.cpp:335:82: note: candidate is:
In file included from extension.h:14:0,
from extension.cpp:2:
../../../hl2sdk-css/public/SoundEmitterSystem/isoundemittersystembase.h:257:17: note: virtual void ISoundEmitterSystemBase::AddSoundOverrides(co nst char*, bool)
../../../hl2sdk-css/public/SoundEmitterSystem/isoundemittersystembase.h:257:17: note: candidate expects 2 arguments, 1 provided
extension.cpp:336:86: error: no matching function for call to ‘ISoundEmitterSystemBase::AddSoundOverrides(c onst char [47])’
extension.cpp:336:86: note: candidate is:
In file included from extension.h:14:0,
from extension.cpp:2:
../../../hl2sdk-css/public/SoundEmitterSystem/isoundemittersystembase.h:257:17: note: virtual void ISoundEmitterSystemBase::AddSoundOverrides(co nst char*, bool)
../../../hl2sdk-css/public/SoundEmitterSystem/isoundemittersystembase.h:257:17: note: candidate expects 2 arguments, 1 provided

...

.

lagers
03-21-2013, 12:01
I tried to make correct makefile and add necessary header files in extension.h, but number of errors only increases. Obviously I do something wrong, but there is no any documentation... Some classes in extension conflict with classes in sdk. So, its necessary to completely rewrite the extension...

Peace-Maker
03-21-2013, 18:11
You'll have to include paths of this extension first and the sdk afterwards, since it modifies some classes and replaces them with its own. Some classes and methods changed (like the AddSoundOverrides one having a parameter more), which you'll have to address too.

No need to completely rewrite the extension.

kadet.89
08-20-2013, 05:26
I managed to build this extension for windows. It is not very difficult:

Start/Пуск -> Settings (Optional)-> Control Panel/Панель управление -> System/Система -> Advanced/Дополнительные параметры системы -> Environment Variables/Параметры среды

ADD:
HL2SDKCSS C:\...\...\hl2sdk-css (http://hg.alliedmods.net/hl2sdks/hl2sdk-css/archive/tip.zip)
MMSOURCE C:\...\...\mmsource (http://hg.alliedmods.net/mmsource-central/archive/tip.zip)
SOURCEMOD C:\...\...\sourcemod-central (http://hg.alliedmods.net/sourcemod-central/archive/tip.zip)

Peace-Maker's fixed fersion: sourcemod-npc-in-css.7z (http://rghost.ru/48267206)

Open sourcemod-npc-in-css\msvc10\sdk.vcxproj in Microsoft Visual Studio 2010 and press ctrl+shift+b

--------------------------------------------------

Can somebody help me to get new gamedata?
I made a dump of offsets, but I can not find some of the offsets (m_Conditions, m_LocalToGlobal, ...) How can i find them? All signatures are broken server_hl2mp_signatures (http://rghost.ru/48289358):(

kadet.89
08-22-2013, 07:39
Iv updated gamedata, but can not find a signature for "g_Collisions" , and I have no idea how to do it. I think I can build a linux version , but first I need to get it working on windows.
Can somebody share server.dll (07-04-12) I can use it to find necessary signatures
Added signatures for Linux:

kadet.89
08-28-2013, 11:38
I managed to get this extension work on the windows server. All you need to run the extension:
CSS server v72 (and client)
MetaMod:Source v1.9.0
SourceMod v1.4.8-dev
SDKhooks

I can share all the necessary files.

I also made ​​a list of new signatures: http://rghost.ru/48429824 (all the table offsets may be wrong )
100% correct gamedata for css72 with binares: http://rghost.ru/48430006 ( it will help to find the necessary signatures in the future)
http://rutube.ru/video/5e29fc344a314535d1f8905d6e3cf536/
Conslole log:
[SDKTOOLS] Sigscan for FireOutput failed - Disabling detour to prevent crashes
[MONSTER] Getting g_AI_SensedObjectsManager - Success
[MONSTER] Getting g_vecAttackDir - Success
[MONSTER] Getting m_DefaultRelationship - Success
[MONSTER] Getting m_lastInteraction - Success
[MONSTER] Getting g_SoundController - Success
[MONSTER] Getting decalsystem - Success
[MONSTER] Getting g_pPredictionSystems - Success
[MONSTER] Getting te - Success
[MONSTER] Getting my_g_MultiDamage - Success
[MONSTER] Getting g_Templates - Success
[MONSTER] Getting g_EntityListPool - Success
[MONSTER] Getting g_CEventQueue - Success
[MONSTER] Getting g_TouchTrace - Success
[MONSTER] Getting g_PostSimulationQueue - Success
[MONSTER] Getting EventQueuePrioritizedEvent_t_s_Allocator - Success
[MONSTER] Getting gm_AllHints - Success
[MONSTER] Getting s_GameSystems - Success
[MONSTER] Getting AI_Waypoint_t_s_Allocator - Success
[MONSTER] Getting g_AIFriendliesTalkSemaphore - Success
[MONSTER] Getting g_AIFoesTalkSemaphore - Success
[MONSTER] Getting Valve System g_CheckClient - Success
[MONSTER] Getting Valve System g_PropDataSystem - Success
[MONSTER] Getting Valve System g_SoundEmitterSystem - Success
[MONSTER] Getting Valve System g_FlexSceneFileManager - Success
[MONSTER] Getting Valve System g_pResponseSystem - Success
********************************************* *******
Monster Extension Core LOADED
By ZombieX2.net
********************************************* *******
Executing dedicated server config file server.cfg
[MONSTER] Server may crash at this time!
[MONSTER] Getting g_EntityCollisionHash - Success
[MONSTER] Getting g_WorldEntity - Success
[MONSTER] Getting m_pActivitySR - Success
[MONSTER] Getting m_iNumActivities - Success
[MONSTER] Getting m_pEventSR - Success
** Duplicate Hammer Node IDs: SoundEmitter: adding map sound overrides from scripts/sm_monster/game_sounds_BaseNpc.txt [4 total, 0 replacements, 0 duplicated replacements]
SoundEmitter: adding map sound overrides from scripts/sm_monster/npc_sounds_headcrab.txt [12 total, 0 replacements, 0 duplicated replacements]
SoundEmitter: adding map sound overrides from scripts/sm_monster/npc_sounds_fastheadcrab.txt [7 total, 0 replacements, 0 duplicated replacements]
SoundEmitter: adding map sound overrides from scripts/sm_monster/npc_sounds_blackheadcrab.txt [14 total, 0 replacements, 0 duplicated replacements]
SoundEmitter: adding map sound overrides from scripts/sm_monster/npc_sounds_zombie.txt [17 total, 0 replacements, 0 duplicated replacements]
SoundEmitter: adding map sound overrides from scripts/sm_monster/npc_sounds_fastzombie.txt [19 total, 0 replacements, 0 duplicated replacements]
SoundEmitter: adding map sound overrides from scripts/sm_monster/npc_sounds_poisonzombie.txt [11 total, 0 replacements, 0 duplicated replacements]
SoundEmitter: adding map sound overrides from scripts/sm_monster/npc_sounds_manhack.txt [13 total, 0 replacements, 0 duplicated replacements]
SoundEmitter: adding map sound overrides from scripts/sm_monster/npc_sounds_antlionguard.txt [15 total, 0 replacements, 0 duplicated replacements]
SoundEmitter: adding map sound overrides from scripts/sm_monster/npc_sounds_antlionguard_episodic2.txt [2 total, 0 replacements, 0 duplicated replacements]
SoundEmitter: adding map sound overrides from scripts/sm_monster/npc_sounds_antlionguard_episodic.txt [9 total, 0 replacements, 0 duplicated replacements]
SoundEmitter: adding map sound overrides from scripts/sm_monster/npc_sounds_stalker.txt [24 total, 0 replacements, 0 duplicated replacements]
SoundEmitter: adding map sound overrides from scripts/sm_monster/npc_sounds_antlion.txt [22 total, 0 replacements, 0 duplicated replacements]
SoundEmitter: adding map sound overrides from scripts/sm_monster/game_sounds_weapons.txt [16 total, 0 replacements, 0 duplicated replacements]
SoundEmitter: adding map sound overrides from scripts/sm_monster/game_sounds_items.txt [12 total, 0 replacements, 0 duplicated replacements]
SoundEmitter: adding map sound overrides from scripts/sm_monster/npc_sounds_vortigaunt.txt [428 total, 0 replacements, 0 duplicated replacements]
SoundEmitter: adding map sound overrides from scripts/sm_monster/npc_sounds_rollermine.txt [16 total, 0 replacements, 0 duplicated replacements]
SoundEmitter: adding map sound overrides from scripts/sm_monster/npc_sounds_antlion_episodic.txt [12 total, 0 replacements, 0 duplicated replacements]
SoundEmitter: adding map sound overrides from scripts/sm_monster/npc_sounds_combine_cannon.txt [1 total, 0 replacements, 0 duplicated replacements]
SoundEmitter: adding map sound overrides from scripts/sm_monster/npc_sounds_env_headcrabcanister.txt [6 total, 0 replacements, 0 duplicated replacements]
SoundEmitter: adding map sound overrides from scripts/sm_monster/npc_sounds_turret.txt [29 total, 0 replacements, 0 duplicated replacements]

Unfortunately, after spending a week I did not understand how it all works, even though I am a good c++ programmer. The source code is very strange. Need to be a a genius to write such a code without any documentation and information about all of this. I have tried to talk with raydan to get at least some kind of information, but he does not want to talk. No one from the community can help.
It seems all this will remain a mystery. Even so, if someone decides to take on this, I am always ready to help. I'm pretty sure that in the community there are people who can make sense of this...

I do not know exactly how it works, but maybe in some cases it is possible to use the old dll, instead of searching for signatures in the new dll. Just put the old dll next to the new dll and make calls from it

Oshizu
03-10-2014, 17:33
I"il try updating gamedata tonight or tommorow :D
I'il begin now


Edit:
1/5 updated

There are some things weird thought i'm unable to find offset of g_pGameRules in CGameRules and PassesTriggerFilters in CBaseAnimating

Edit 2:
1/4 updated

arthurdead
03-10-2014, 18:27
I"il try updating gamedata tonight or tommorow :D
I'il begin now



fix it fix it fix it fix it fix it fix it fix it fix it

Oshizu
03-10-2014, 18:45
If i'il be able to fix it for CS:S without slight problems i might even consider porting it onto TF :D
Thought updates would break it often i guess :(

arthurdead
03-10-2014, 18:50
If i'il be able to fix it for CS:S without slight problems i might even consider porting it onto TF :D
Thought updates would break it often i guess :(

then you update it :bacon:

Oshizu
03-10-2014, 19:15
Found some mystery offsets:

"CalcYawSpeed"
{
"windows" "0"
}
"OnCalcBaseMove"
{
"windows" "1"
}
"OnObstructionPreSteer"
{
"windows" "2"
}
"OnFailedSteer"
{
"windows" "3"
}
"OnFailedLocalNavigation"
{
"windows" "4"
}
"OnInsufficientStopDist"
{
"windows" "5"
}
"OnMoveBlocked"
{
"windows" "6"
}
"OnMoveExecuteFailed"
{
"windows" "8"
}



Hopefully they dont't need to get updated
I'm starting getting offsets for CBaseFlex

arthurdead
03-10-2014, 19:29
Found some mystery offsets
Hopefully they dont't need to get updated
I'm starting getting offsets for CBaseFlex


wish i could help but idk how to get offsets

Oshizu
03-10-2014, 19:36
Offsets are piece of cheese here
The apocalyptic is going to be getting signatures
There's over 50 of them :down:

arthurdead
03-10-2014, 20:52
Offsets are piece of cheese here
The apocalyptic is going to be getting signatures
There's over 50 of them :down:

progress ?

Oshizu
03-11-2014, 07:57
Finished offsets
Now only two things are left
1. Signatures
2. Variable Offsets (I don't know how to get them (yet))

I'il finish stuff tommorow as long as somebody helps me with variable offsets
https://forums.alliedmods.net/showthread.php?t=236762

Update:

Here's the gamedata
IT IS NOT READY YET

I've finished offsets and most of signatures
Only one stuff left are some harder signatures and damned variable offsets also g_pGameRules which seems to be variable offset also and some other stuff i marked with words NO or NOPE

Update:

Gamedata uses now few functions from SourceMod Official Gamedata they might work better than ida script generated ones

kadet.89
03-11-2014, 10:50
RoundRespawn

old pseudocode:

int __thiscall sub_10281EA0(void *this)
{
void *v1; // ST08_4@1

v1 = this;
(*(void (**)(void))(*(_DWORD *)this + 1452))();
sub_10281290(0);
sub_1025F050(v1, 0);
*((_DWORD *)v1 + 650) = 0;
sub_100F9AB0(-1.0, 0);
*((_BYTE *)v1 + 4344) = 1;
sub_10278F30(v1);
sub_10278DF0(v1);
return sub_1027D7D0(v1);
}


clue - 2-nd "reload\n"

new pseudocode:

int __thiscall sub_1026E1B0(void *this)
{
void *v1; // ST08_4@1

v1 = this;
(*(void (**)(void))(*(_DWORD *)this + 1480))();
sub_1026B150(0);
sub_1024AD90(v1, 0);
*((_DWORD *)v1 + 656) = 0;
sub_100D6210(dword_103930E8, 0);
*((_BYTE *)v1 + 4352) = 1;
sub_102644C0(v1);
sub_10264380(v1);
return sub_102697E0(v1);
}

signature:
.text:1026E1B0 55 push ebp
.text:1026E1B1 8B EC mov ebp, esp
.text:1026E1B3 51 push ecx
.text:1026E1B4 89 4D FC mov [ebp+var_4], ecx
.text:1026E1B7 8B 45 FC mov eax, [ebp+var_4]
.text:1026E1BA 8B 10 mov edx, [eax]
.text:1026E1BC 8B 4D FC mov ecx, [ebp+var_4]
.text:1026E1BF 8B 82 C8 05 00 00 mov eax, [edx+5C8h]
.text:1026E1C5 FF D0 call eax
.text:1026E1C7 6A 00 push 0
.text:1026E1C9 8B 4D FC mov ecx, [ebp+var_4]
.text:1026E1CC E8 7F CF FF FF call sub_1026B150
.text:1026E1D1 6A 00 push 0
.text:1026E1D3 8B 4D FC mov ecx, [ebp+var_4]
.text:1026E1D6 51 push ecx
.text:1026E1D7 E8 B4 CB FD FF call sub_1024AD90
.text:1026E1DC 83 C4 08 add esp, 8
.text:1026E1DF 8B 55 FC mov edx, [ebp+var_4]
.text:1026E1E2 C7 82 40 0A 00 00 00 00 00 00 mov dword ptr [edx+0A40h], 0
.text:1026E1EC 6A 00 push 0
.text:1026E1EE 51 push ecx

linux clue "Player: %s1 - Damage Taken\n"

linux pseudocode:
int __cdecl CCSPlayer::RoundRespawn(int a1)
{
(*(void (__cdecl **)(int))(*(_DWORD *)a1 + 1484))(a1);
CCSPlayer::State_Transition(a1, 0);
respawn(a1, 0);
*(_DWORD *)(a1 + 2644) = 0;
CBaseEntity::SetNextThink(a1, -1082130432, 0);
*(_BYTE *)(a1 + 4372) = 1;
CCSPlayer::OutputDamageGiven(a1);
CCSPlayer::OutputDamageTaken(a1);
return CCSPlayer::ResetDamageCounters(a1);
}

signature: _ZN9CCSPlayer12RoundRespawnEv

use old dll to find the clue :)

Now what we have about g_pGameRules:
sign_func.cpp
if(!g_pGameConf->GetMemSig("CreateGameRulesObject", (void **)&addr) || !addr)
return false;

if(!g_pGameConf->GetOffset("g_pGameRules", &offset) || !offset)
return false;

my_g_pGameRules = *reinterpret_cast<void ***>(addr + offset);

CreateGameRulesObject sig address: 10170620 + g_pGameRules offset = 10170625:
.text:10170620 55 push ebp
.text:10170621 8B EC mov ebp, esp
.text:10170623 8B 0D F4 C0 5A 10 mov ecx, dword_105AC0F4
.text:10170629 85 C9 test ecx, ecx
.text:1017062B 74 09 jz short loc_10170636
.text:1017062D 8B 01 mov eax, [ecx]
.text:1017062F 8B 50 34 mov edx, [eax+34h]
.text:10170632 6A 01 push 1
.text:10170634 FF D2 call edx

dword_105AC0F4 = g_pGameRules

old windows pseudocode:

int __usercall sub_10170620<eax>(int a1<esi>, char *a2)
{
int v2; // eax@3
int result; // eax@7

if ( dword_105AC0F4 )
...
}

linux pseudocode:
int __cdecl CreateGameRulesObject(const char *s)
{
int v1; // eax@3
int v2; // esi@5
size_t v3; // eax@5
int result; // eax@5

if ( LODWORD(g_pGameRules) )
...
}

linux new offset 9
linux new signature _Z21CreateGameRulesObjectPKc
windows new offset 5
windows new signature:
.text:101521D0 55 push ebp
.text:101521D1 8B EC mov ebp, esp
.text:101521D3 8B 0D C4 31 52 10 mov ecx, dword_105231C4
.text:101521D9 85 C9 test ecx, ecx
.text:101521DB 74 09 jz short loc_101521E6
.text:101521DD 8B 01 mov eax, [ecx]
.text:101521DF 8B 50 34 mov edx, [eax+34h]
.text:101521E2 6A 01 push 1
.text:101521E4 FF D2 call edx
.text:101521E6
.text:101521E6 loc_101521E6: ; CODE XREF: sub_101521D0+Bj
.text:101521E6 56 push esi
.text:101521E7 8B 35 FC 33 52 10 mov esi, dword_105233FC
.text:101521ED 57 push edi
.text:101521EE 8B 7D 08 mov edi, [ebp+arg_0]
.text:101521F1 C7 05 C4 31 52 10 00 00 00 00 mov dword_105231C4, 0
.text:101521FB 85 F6 test esi, esi
.text:101521FD 74 18 jz short loc_10152217
.text:101521FF 90 nop

as we can see here, we don't need the old dll to find signateres and offsets for fields like g_pGameRules. There is quite enough information in the new server.so file

Oshizu
03-11-2014, 10:58
Thanks
But i'm unsure where to get old one :(
And problem will be also compiling extension (Extension & Latest CSS_SDK have quite big differences)
Hopefully it won't be necessary with updated gamedata

Oh and i forgot to reply
That would take forever to find them all and replace them.

Took me three hours to fix atleast 4/5 of stuff :bacon:

kadet.89
03-11-2014, 11:47
Because of these differences is difficult to rewrite the extension. The first version of the extension contains little code, perhaps it will be easier to understand. There is only headcrab NPC in this version: https://code.google.com/p/sourcemod-npc-in-css/source/detail?r=d1206c652b8011fd0ce478ba7b49bfe48d6f b7bc

Oshizu
03-11-2014, 12:12
I wouldn't say it contains little code
But gamedata requiements are quite smaller :)

robotortoise
09-15-2014, 21:18
Looks neat! Any plans to make it work on more games and platforms? (i.e. Linux TF2 )

friagram
09-16-2014, 08:34
Looks neat! Any plans to make it work on more games and platforms? (i.e. Linux TF2 )

is it your mission to install as many plugins/extensions on your server as possible?

robotortoise
09-16-2014, 10:11
is it your mission to install as many plugins/extensions on your server as possible?

Darn it, you've caught me!

No, but in all seriousness, I was hoping that if I could get this in TF2, I could use Stripper to place some HL2 crows on the maps. I always thought the birds in Super Mario 3D Land made it visually more interesting even though they fly away when you get near them, and I've always thought a similar approach would be fun in tf2.


So uh....basically.....I want birds that fly away in TF2. Yeah. Uh....

friagram
09-16-2014, 17:49
Kill a lot of scouts, every hundred or so a dove will escape.

robotortoise
09-16-2014, 18:24
Kill a lot of scouts, every hundred or so a dove will escape.

That's not a dove that just chills out at the map, though. I want doves that sit at various points in the map until shot at or moved towards. Then they fly away.

TheLastRevenge
11-03-2014, 07:20
Updated at 2014-11-02
i can't be sure it is work well.

- Alice Margatroid -