[HL2DM] Remove Map Overlays, Map game_ext and Map Music
- Painkiller
- Senior Member
- Posts: 751
- Joined: Sun Mar 01, 2015 8:09 am
- Location: Germany
- Contact:
[HL2DM] Remove Map Overlays, Map game_ext and Map Music
Hi can anybody wrote a script for remove map overlays?
The Similar this plugin: https://forums.alliedmods.net/showthread.php?p=892142
but for overlays in bsp file.
Thanks in Advance
Painkiller
The Similar this plugin: https://forums.alliedmods.net/showthread.php?p=892142
but for overlays in bsp file.
Thanks in Advance
Painkiller
Last edited by Painkiller on Wed Jan 26, 2022 1:09 pm, edited 1 time in total.
- L'In20Cible
- Project Leader
- Posts: 1536
- Joined: Sat Jul 14, 2012 9:29 pm
- Location: Québec
Re: [HL2DM] Remove Map Overlays
Syntax: Select all
from entities import BaseEntityGenerator
from entities.entity import BaseEntity
from entities.helpers import baseentity_from_edict
from listeners import OnEntityCreated
from listeners import OnServerActivate
from memory import get_object_pointer
from memory import make_object
_marked_for_deletion = set()
@OnServerActivate
def on_server_activate(edicts, edict_count, max_clients):
_marked_for_deletion.clear()
for edict in edicts:
if edict.classname != 'game_text':
continue
_marked_for_deletion.add(
get_object_pointer(edict.server_unknown).address)
@OnEntityCreated
def on_entity_created(base_entity):
ptr = get_object_pointer(base_entity).address
if ptr not in _marked_for_deletion:
return
_marked_for_deletion.remove(ptr)
base_entity.remove()
- Painkiller
- Senior Member
- Posts: 751
- Joined: Sun Mar 01, 2015 8:09 am
- Location: Germany
- Contact:
Re: [HL2DM] Remove Map Overlays
You have invite game_text what is the command for overlay?
r_screenoverlay?
r_screenoverlay?
- L'In20Cible
- Project Leader
- Posts: 1536
- Joined: Sat Jul 14, 2012 9:29 pm
- Location: Québec
- Painkiller
- Senior Member
- Posts: 751
- Joined: Sun Mar 01, 2015 8:09 am
- Location: Germany
- Contact:
Re: [HL2DM] Remove Map Overlays
I have
It is still displayed
Is this plugin only for map.bsp overlays
or remove this my kill overlays ?
Code: Select all
if edict.classname != 'game_text':
replace to
if edict.classname != 'env_screenoverlay':
It is still displayed
Is this plugin only for map.bsp overlays
or remove this my kill overlays ?
- L'In20Cible
- Project Leader
- Posts: 1536
- Joined: Sat Jul 14, 2012 9:29 pm
- Location: Québec
Re: [HL2DM] Remove Map Overlays
This remove only those created by the map.
- Painkiller
- Senior Member
- Posts: 751
- Joined: Sun Mar 01, 2015 8:09 am
- Location: Germany
- Contact:
Re: [HL2DM] Remove Map Overlays
So i have test it.
This work not for me.


This work not for me.


Re: [HL2DM] Remove Map Overlays
Try removing point_clientcommand

My plugins: Map Cycle • Killstreaker • DeadChat • Infinite Jumping • TripMines • AdPurge • Bot Damage • PLRBots • Entity AntiSpam
Hail, Companion. [...] Hands to yourself, sneak thief.

- Painkiller
- Senior Member
- Posts: 751
- Joined: Sun Mar 01, 2015 8:09 am
- Location: Germany
- Contact:
Re: [HL2DM] Remove Map Overlays
Sry not work.
Is there still another solution for the problem?
Is there still another solution for the problem?
Re: [HL2DM] Remove Map Overlays
Start your client, create a new game on that map and enter the following commands in your console:
This should create debug overlays for all entities. Then go to the overlays, make a screenshot and post it here. If you have done that, we will know which entities we need to delete.
Code: Select all
sv_cheats 1
developer 1
ent_text *
Re: [HL2DM] Remove Map Overlays
I should've mentioned this, but I decompiled the map and the entity to create the overlay was indeed env_screenoverlay

My plugins: Map Cycle • Killstreaker • DeadChat • Infinite Jumping • TripMines • AdPurge • Bot Damage • PLRBots • Entity AntiSpam
Hail, Companion. [...] Hands to yourself, sneak thief.

- L'In20Cible
- Project Leader
- Posts: 1536
- Joined: Sat Jul 14, 2012 9:29 pm
- Location: Québec
Re: [HL2DM] Remove Map Overlays
What is the map in question?
Re: [HL2DM] Remove Map Overlays

My plugins: Map Cycle • Killstreaker • DeadChat • Infinite Jumping • TripMines • AdPurge • Bot Damage • PLRBots • Entity AntiSpam
Hail, Companion. [...] Hands to yourself, sneak thief.

- L'In20Cible
- Project Leader
- Posts: 1536
- Joined: Sat Jul 14, 2012 9:29 pm
- Location: Québec
Re: [HL2DM] Remove Map Overlays
Okay, I tested and it seems that on HL2:DM, OnServerActivate is called AFTER the entities has been created so the entity is never marked for deletion. Since this is for a single map, and that we know the index, I guess we can safely do the following:
Syntax: Select all
from engines.server import global_vars
from listeners import OnEntityCreated
# Index of the env_screenoverlay to remove...
INDEX = 23
@OnEntityCreated
def on_entity_created(base_entity):
if global_vars.map_name != 'dm_stalker_pripyat_aw_kb':
return
if base_entity.classname != 'env_screenoverlay':
return
if base_entity.index != INDEX:
return
base_entity.remove()
Re: [HL2DM] Remove Map Overlays
Why not check hammerid instead? Is index in this case guaranteed to be the same?

My plugins: Map Cycle • Killstreaker • DeadChat • Infinite Jumping • TripMines • AdPurge • Bot Damage • PLRBots • Entity AntiSpam
Hail, Companion. [...] Hands to yourself, sneak thief.

- L'In20Cible
- Project Leader
- Posts: 1536
- Joined: Sat Jul 14, 2012 9:29 pm
- Location: Québec
Re: [HL2DM] Remove Map Overlays
iPlayer wrote:Why not check hammerid instead?
Because this listener is called when it is allocated and added to the global list while a lot of stuff is done/linked in the post constructor. Which is the main reason why we manually link m_pNetworkable on the edict_t instance before calling the registered callbacks otherwise our conversion functions are raising due to unlinked instances they need. In short, trying to get hammerid at this stage will simply return 0 (or -1).
Yes, it should always use the same index when the map is loading.iPlayer wrote:Is index in this case guaranteed to be the same?
- Painkiller
- Senior Member
- Posts: 751
- Joined: Sun Mar 01, 2015 8:09 am
- Location: Germany
- Contact:
Re: [HL2DM] Remove Map Overlays
L'In20Cible wrote:Okay, I tested and it seems that on HL2:DM, OnServerActivate is called AFTER the entities has been created so the entity is never marked for deletion. Since this is for a single map, and that we know the index, I guess we can safely do the following:Syntax: Select all
from engines.server import global_vars
from listeners import OnEntityCreated
# Index of the env_screenoverlay to remove...
INDEX = 23
@OnEntityCreated
def on_entity_created(base_entity):
if global_vars.map_name != 'dm_stalker_pripyat_aw_kb':
return
if base_entity.classname != 'env_screenoverlay':
return
if base_entity.index != INDEX:
return
base_entity.remove()
Hello, that does not work.
And I have there are several maps that have exactly the same.
- L'In20Cible
- Project Leader
- Posts: 1536
- Joined: Sat Jul 14, 2012 9:29 pm
- Location: Québec
Re: [HL2DM] Remove Map Overlays
You are doing something wrong. I tested it and it work just fine.Painkiller wrote:Hello, that does not work.
Re: [HL2DM] Remove Map Overlays
And I have there are several maps that have exactly the same.
Well, you'll have to have individual approach for each map.

My plugins: Map Cycle • Killstreaker • DeadChat • Infinite Jumping • TripMines • AdPurge • Bot Damage • PLRBots • Entity AntiSpam
Hail, Companion. [...] Hands to yourself, sneak thief.

- L'In20Cible
- Project Leader
- Posts: 1536
- Joined: Sat Jul 14, 2012 9:29 pm
- Location: Québec
Re: [HL2DM] Remove Map Overlays
At this point, I think you want to remove them all no matter what:
Since you seem to have trouble installing the codes, please read the following article: http://wiki.sourcepython.com/developing ... rst-plugin
Syntax: Select all
from listeners import OnEntityCreated
@OnEntityCreated
def on_entity_created(base_entity):
if base_entity.classname != 'env_screenoverlay':
return
base_entity.remove()
Since you seem to have trouble installing the codes, please read the following article: http://wiki.sourcepython.com/developing ... rst-plugin
Who is online
Users browsing this forum: No registered users and 64 guests