Raised This Month: $51 Target: $400
 12% 

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


Post New Thread Reply   
 
Thread Tools Display Modes
Peace-Maker
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Old 02-26-2013 , 20:33   Re: [EXTENSION] NPC in CS:S - Updated 2012-7-4
Reply With Quote #121

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
Attached Files
File Type: diff npc-in-css.diff (23.3 KB, 232 views)
File Type: dll monster.ext.2.css.dll (2.46 MB, 215 views)
File Type: zip msvc10.zip (9.9 KB, 161 views)
__________________

Last edited by Peace-Maker; 02-26-2013 at 20:36.
Peace-Maker is offline
lagers
Junior Member
Join Date: Feb 2013
Old 02-27-2013 , 10:52   Re: [EXTENSION] NPC in CS:S - Updated 2012-7-4
Reply With Quote #122

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?
lagers is offline
StrikerMan780
AlliedModders Donor
Join Date: Jul 2009
Location: Canada
Old 02-28-2013 , 11:11   Re: [EXTENSION] NPC in CS:S - Updated 2012-7-4
Reply With Quote #123

Quote:
Originally Posted by Peace-Maker View Post
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.
StrikerMan780 is offline
lagers
Junior Member
Join Date: Feb 2013
Old 03-02-2013 , 07:40   Re: [EXTENSION] NPC in CS:S - Updated 2012-7-4
Reply With Quote #124

With ENGINE=css it writes errors:
Code:
...

extension.cpp:334:82: error: no matching function for call to ‘ISoundEmitterSystemBase::AddSoundOverrides(const 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(const 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(const 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(const 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(const 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(const char*, bool)
../../../hl2sdk-css/public/SoundEmitterSystem/isoundemittersystembase.h:257:17: note:   candidate expects 2 arguments, 1 provided

...

.

Last edited by lagers; 03-02-2013 at 07:41.
lagers is offline
lagers
Junior Member
Join Date: Feb 2013
Old 03-21-2013 , 12:01   Re: [EXTENSION] NPC in CS:S - Updated 2012-7-4
Reply With Quote #125

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...
lagers is offline
Peace-Maker
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Old 03-21-2013 , 18:11   Re: [EXTENSION] NPC in CS:S - Updated 2012-7-4
Reply With Quote #126

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.
__________________
Peace-Maker is offline
kadet.89
Veteran Member
Join Date: Nov 2012
Location: Serbia
Old 08-20-2013 , 05:26   Re: [EXTENSION] NPC in CS:S - Updated 2012-7-4
Reply With Quote #127

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
MMSOURCE C:\...\...\mmsource
SOURCEMOD C:\...\...\sourcemod-central

Peace-Maker's fixed fersion: sourcemod-npc-in-css.7z

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
Attached Files
File Type: zip offsets.zip (225.3 KB, 154 views)

Last edited by kadet.89; 08-22-2013 at 05:04.
kadet.89 is offline
Send a message via Skype™ to kadet.89
kadet.89
Veteran Member
Join Date: Nov 2012
Location: Serbia
Old 08-22-2013 , 07:39   Re: [EXTENSION] NPC in CS:S - Updated 2012-7-4
Reply With Quote #128

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:
Attached Files
File Type: txt monster.cstrike.games.txt (82.4 KB, 441 views)

Last edited by kadet.89; 08-24-2013 at 13:36.
kadet.89 is offline
Send a message via Skype™ to kadet.89
kadet.89
Veteran Member
Join Date: Nov 2012
Location: Serbia
Old 08-28-2013 , 11:38   Re: [EXTENSION] NPC in CS:S - Updated 2012-7-4
Reply With Quote #129

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/5e29fc344a314...8905d6e3cf536/
Conslole log:
Code:
[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

Last edited by kadet.89; 02-22-2014 at 11:20.
kadet.89 is offline
Send a message via Skype™ to kadet.89
Oshizu
Veteran Member
Join Date: Nov 2012
Location: Warsaw
Old 03-10-2014 , 17:33   Re: [EXTENSION] NPC in CS:S - Updated 2012-7-4
Reply With Quote #130

I"il try updating gamedata tonight or tommorow
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
__________________
...

Last edited by Oshizu; 03-10-2014 at 18:19.
Oshizu is offline
Reply



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

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

Forum Jump


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


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