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

[ANY] Neon Beams (1.14) [04-Dec-2021]


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Plugin ID:
6684
Plugin Version:
1.14
Plugin Category:
Fun Stuff
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
    15 
    Plugin Description:
    Spawn and save Neon Beams to the map.
    Old 08-19-2019 , 19:00   [ANY] Neon Beams (1.14) [04-Dec-2021]
    Reply With Quote #1



    (CS:GO: custom particles, beams and presets saved to the map)


    (L4D2: particles, beams and presets saved to the map)


    (Preset with 100 beams saved 41 times - 4,100 beams. Plugin loaded 5,300 beams in 26 seconds @ 0.1 interval)
    [Client was in windowed mode - this crashes fullscreen clients so max beams/particles must be limited]




    Thanks:
    • "Don't Fear The Reaper" for the rotation matrix code
    • "Boikinov" for 3 functions used in rotation
    • "Dragokas" - Testing and scripting advice
    • "Lux" - Scripting advice
    • "Visual77" - Scripting advice
    • "Mr. Man" - Testing



    Features:
    • Maximum Beams:
      - Avoid spawning more than 700 in one visible area (CSGO particles - client crash) or 2,000 (L4D2 - buffer error, see screenshot 2).
      - It's possible to spawn 60,000 beams/particles with clients in windowed mode but the map will start to disappear.
      - CRASH: Fullscreen clients will crash with far fewer beams or particles. This is why I've added cvars to set their max limits.
    • Painting:
      - VIP command to spawn temporary beams every second (controlled by neon_paints cvar) in a line where your crosshair is aiming.
    • Presets:
      - Create presets to save and load multiple beams/particles at once. Forced to be created on a flat wall with specific angles as other surfaces will mis-align.
      - All preset names must be unique. Required: replace spaces with underscores in the filename and preset names.
      - Please create and share custom presets! See post #2 below for various presets and screenshots.
      - Extra config presets by "Marttt" providing letters and numbers found here.
    • Save to Map:
      - Auto spawn individual beams and presets on round start which were saved to the map.
      - The cvar neon_late controls if new clients connecting after round start are individually sent the saved beams.
      - Loads 32 (neon_cfg_max) beams every 0.2 seconds (neon_cfg_time) at round start after (neon_cfg_load) seconds.
    • Custom Beam Colors:
      - You can define your RGB color list used in menus by editing the \addons\sourcemod\data\neon\menu.cfg config.
    • Particles:
      - Games using the custom particles/materials can create 10 particles (L4D2 uses 37 inbuilt particles), with the same features as standard beams. Their color cannot be changed.



    Admin Commands:
    • Requires "z" - ADMFLAG_ROOT flag
    PHP Code:
    sm_neon             // Open the main menu for Neon Beams.
    sm_neon_temp        // Menu to spawn temporary Beams at your crosshair.
    sm_neon_save        // Menu to spawn and save Beams at your crosshair.
    sm_neon_preset      // Create or edit a preset with Beams: sm_neon_preset <config file/preset name>.
    sm_neon_preset_temp // Opens the Preset menu list, to spawn temporary presets.
    sm_neon_preset_save // Opens the Preset menu list, allowing you to save them to the map.
    sm_neon_preset2     // Create or edit a preset with particles (if game supports). Usage: sm_neon_preset2 <config file/preset name>.
    sm_neon_save2       // Menu to spawn and save particles (if game supports) at your crosshair.
    sm_neon_temp2       // Menu to spawn temporary particles (if game supports) at your crosshair.

    sm_neon_point       // Menu to spawn temporary Beams from your eye location. Usage: sm_neon_point [optional range from eyes]
    sm_neon_point2      // Menu to spawn temporary Particles from your eye location. Usage: sm_neon_point2 [optional range from eyes]
    sm_neon_points      // Menu to spawn save Beams from your eye location. Usage: sm_neon_points [optional range from eyes]
    sm_neon_points2     // Menu to spawn save Particles from your eye location. Usage: sm_neon_points2 [optional range from eyes]
    sm_neon_preset_eye  // Opens the Preset menu list, spawns them from your eye location. Usage: sm_neon_preset_eye [optional range from eyes]
    sm_neon_preset_eyes // Opens the Preset menu list, spawns them from your eye location and saves to map. Usage: sm_neon_preset_eyes [optional range from eyes]

    sm_neon_delpre      // Remove the last saved beam from the currently selected preset. Or delete a preset config, usage: sm_neon_delpre <preset name>
    sm_neon_del         // Remove the last placed preset or beam from the saved map config (regardless of who placed it).
    sm_neon_wipe        // Delete all beams and presets saved to the current maps config.
    sm_neon_load        // Reloads the Preset and current Map configs, used to refresh the plugin after manual changes to the data config file.
    sm_neon_overload    // Overrides the duplicate load prevention, and loads the auto spawn data config for the current map.
    sm_neon_stats       // Shows details about how many beams were spawned and how long it took etc. 


    VIP Commands:
    PHP Code:
    sm_neon_paint       // Menu to start and stop painting (continuous spawning of beams) with color selection.
    sm_neon_paint2      // Menu to start and stop painting (continuous spawning of particles) with color selection. 



    ConVars:
    • Saved to neon_beams.cfg in your servers \cfg\sourcemod\ folder.
    PHP Code:
    // 0=Plugin off. 1=Plugin on.
    neon_allow "1"

    // 0.0=Off. After round start and all connected players have spawned, wait this long before spawning beams and particles saved to map.
    neon_cfg_load "5.0"

    // Max beams and particles to load in 1 frame. More than 32 cannot be loaded at once due to engine limitations.
    neon_cfg_max "32"

    // If beams or particles are deleted on round restart you can enable them to load here. 0=None. 1=Load beams on round_start. 2=Load particles on round_start. 3=Both.
    neon_cfg_round "2"

    // Interval to wait before loading the next set of beams and particles.
    neon_cfg_time "0.2"

    // Distance from the wall to spawn beams, particles and presets.
    neon_distance "1.5"

    // 0=Off. 1=Send clients the saved beams map data when joining after round start. 2=Send particles (attempts to hide from others). 3=Both.
    neon_late_load "3"

    // The sprite halo used for beams.
    neon_mat_halo "materials/sprites/glow.vmt"

    // The sprite material used for beams.
    neon_mat_sprite "materials/sprites/laserbeam.vmt"

    // Maximum number of beams allowed on the map.
    neon_max_beams "768"

    // Maximum number of particles allowed on the map.
    neon_max_parts "768"

    // Transparency of beams. 0=Invisible. 255=Solid.
    neon_opacity "128"

    // Interval between each paint.
    neon_paints "0.5"

    // Width of beams.
    neon_size "2" 



    Natives for developers:
    See post #3 below for details and examples.


    Config Paths:
    • Plugin data saved to \addons\sourcemod\data\neon\ folder.

      All comments in the preset/map configs will be lost. Manual changes will be lost if the plugin saves data and the configs were not reloaded via command.

      For manual changes to take affect, you must either:
      A) Use this command sm_neon_load
      B) Reload the plugin.
      C) Change map.



    Changes:
    Code:
    1.14 (04-Dec-2021)
        - Changes to fix warnings when compiling on SourceMod 1.11.
        - Changes to better support TF2 and Nuclear Dawn.
    
    1.13 (30-Jun-2021)
        - Fixed late loading particles counting toward total spawned and blocking them. Thanks to "Tonblader" for reporting.
        - Fixed plugin not waiting for all clients to load before spawning after server start or a new map.
        - Hopefully loading beams and late loading beams to clients still works for all games.
    
    1.12 (10-Apr-2021)
        - L4D2: Fixed a particle from version 1.8 update not working. Thanks to "Marttt" for reporting and fixing.
    
    1.11 (02-Apr-2021)
        - Fixed presets using temporary beams not displaying to other players. Thanks to "Tonblader" for reporting.
    
    1.10 (01-Apr-2021)
        - Added commands "sm_neon_preset_eye" and "sm_neon_preset_eyes" to spawn presets from your eye position.
        - Commands also allow setting how far from the eyes they are placed. Requested by "Tonblader".
    
    1.9 (29-Mar-2021)
        - Added commands "sm_neon_point", "sm_neon_points", "sm_neon_point2", "sm_neon_points2" to place beams from your eye position.
        - Commands also allow setting how far from the eyes they are placed. Requested by "Tonblader".
    
    1.8 (26-Feb-2021)
        - Added 28 new particles in L4D2. Thanks to "Marttt" for adding and scripting.
            @ Notes:
                - Lights Moving particles don't kill the entity. 
                - Resource expensive. Doesn't kill the entity and refreshes the particle very often.
        
        - Fixed invalid client errors when late loading beams. Thanks to "Tonblader" for reporting.
    
    1.7 (30-Sep-2020)
        - Fixed compile errors on SM 1.11.
    
    1.6 (10-May-2020)
        - Removed Listen server block.
        - Various changes to tidy up code.
        - Various optimizations and fixes.
    
    1.5 (20-Jan-2020)
        - Fixed "sm_neon_delpre" not deleting a preset filename from the menu when it has no presets and the file was deleted.
        - Various changes to warn and prevent using spaces in preset filenames and preset names.
        - Menus will display spaces for ease of readability.
        - Thanks to "Apeboy21" for reporting the issue.
    
    1.4 (17-Jan-2020)
        - Fixed Invalid timer handle errors. Thanks to "AK978" for reporting.
    
    1.3 (10-Jan-2020)
        - Fixed "Spawning Blocked" error not resetting on map change, except on config error. Thanks to "Marttt" for reporting.
        - Added "Silvers.cfg" and "Checkpoint_Arrows.cfg" preset configs to "neon_beams.zip".
    
    1.2 (27-Aug-2019)
        - Fixed "Spawning Blocked" error when beams are time limited and not permanent. They are simply not counted.
    
    1.1 (22-Aug-2019)
        - Added command "sm_neon_wipe" to delete all beams and presets saved to the current maps config.
    
    1.0 (20-Aug-2018)
        - Initial release.
        - Originally created on 02-Jan-2012.



    Known Issues:
    1. (NoFix) The engine can only load 32 beams in 1 frame. If you really think other plugins are conflicting (eg tracers), and preventing some beams from loading, you may want to consider lowering the neon_cfg_max cvar. You might only need to increase the neon_cfg_time cvar if some saved beams fail to appear when first loading after round_start.
    2. (NoFix) Cannot remove beams/particles once they're placed because the entity is deleted. Only a map change or round restart will clear them (depending on the game).
    3. (NoFix) Linux: Particles created for late loading clients are not hidden, they will be sent to everyone and stacked. Linux bug with SetTransmit and FL_EDICT_ALWAYS.
    4. (NoFix) Clients cannot see beams created during the process of alt-tabbing.
    5. (WontFix) Dedicated servers only, I don't support listen servers.
    6. (WontFix) When multiple plugins spawn presets or arrays at the same time they're prevented from loading data while the servers spawning is already progress. HardFix: use an asynchronous method for queuing the data.
    7. (Bug) Creating presets on angled surfaces or walls which are not vertical and aligned at 0,90,180,270 degrees to the map will mis-align. Current fix only allows presets to be created on the required walls. Don't know how to fix. The problem iirc is a small mis-alignment most likely from the position setup and rotation matrix.
    8. (Bug) Some presets spawned on angled surfaces don't align to that surface slope correctly or spawn slightly off 90 degreees from the players view. Don't know how to fix. Possibly using TraceHull or multiple traces to find an average surface angle.
    9. Spawning beams on round_start might fail for untested games, please request support.
    10. Possibly other bugs, please report. I tested as much as I can over the years.



    Installation:
    1. Download the .zip and extract the files to their respective folders in your servers \addons\sourcemod\ folder.
    2. For custom particles (not L4D/2) download the .zip and extract the \materials\ and \particles\ folders to your servers main game folder.
    1. Optionally: download presets from post #2 below and extract to your servers \addons\sourcemod\data\neon\presets\ folder.
    2. Optionally: download presets from post #32 below by "Marttt" providing letters and numbers.
    (Tested on: L4D, L4D2, CS:GO, TF2)
    Attached Files
    File Type: zip neon_beams.zip (116.9 KB, 637 views)
    __________________

    Last edited by Silvers; 12-04-2021 at 14:01.
    Silvers is offline
    Silvers
    SourceMod Plugin Approver
    Join Date: Aug 2010
    Location: SpaceX
    Old 08-19-2019 , 19:01   Re: [ANY] Neon Beams (1.0) [20-Aug-2019]
    Reply With Quote #2

    Please post your custom preset configs with screenshots and I will upload them here.

    You MUST replace spaces with underscores in the filename and preset names.


    Preset Configs:
    Silvers.cfg (by SilverShot):

    This config was made for ALL games except L4D/2, for those you would need to edit the config to set the correct particle color numbers. I might make a command to convert configs from ALL games to L4D/2.

    Checkpoint_Arrows.cfg (by moekai):

    Made for L4D/2, can be used in all other games.


    How:
    I created decals or sprays to trace their shapes in-game and avoid creating symmetrical shapes by hand.

    Configs:
    Attached Files
    File Type: cfg Silvers.cfg (5.1 KB, 601 views)
    File Type: cfg Checkpoint_Arrows.cfg (6.2 KB, 456 views)
    __________________

    Last edited by Silvers; 01-19-2020 at 09:26.
    Silvers is offline
    Silvers
    SourceMod Plugin Approver
    Join Date: Aug 2010
    Location: SpaceX
    Old 08-19-2019 , 19:01   Re: [ANY] Neon Beams (1.0) [20-Aug-2019]
    Reply With Quote #3

    Natives for developers:
    • Requests and suggestions are welcome.
    Spoiler



    Example Demo Plugins (found in the .zip):
    Spoiler
    __________________
    Silvers is offline
    xZk
    Senior Member
    Join Date: Nov 2017
    Location: cl
    Old 08-21-2019 , 21:38   Re: [ANY] Neon Beams (1.0) [20-Aug-2019]
    Reply With Quote #4

    Awesome!. I just needed some particle that would allow me to draw on the map or in the air, to try to create a plugin that would indicate places to live players. Thanks Silvers eres genial!
    xZk is offline
    PC Gamer
    Veteran Member
    Join Date: Mar 2014
    Old 08-21-2019 , 23:42   Re: [ANY] Neon Beams (1.0) [20-Aug-2019]
    Reply With Quote #5

    Nice! Is there a way to delete the beam(s) you are looking at? If not, is there a way to delete all active beams?
    PC Gamer is offline
    Silvers
    SourceMod Plugin Approver
    Join Date: Aug 2010
    Location: SpaceX
    Old 08-22-2019 , 00:40   Re: [ANY] Neon Beams (1.0) [20-Aug-2019]
    Reply With Quote #6

    Quote:
    Originally Posted by PC Gamer View Post
    Nice! Is there a way to delete the beam(s) you are looking at? If not, is there a way to delete all active beams?
    Thank you both.

    Basically no. Because the entity is deleted after creation the beams/particles are permanent until round restart/map change (depending on game).

    The delete command (sm_neon_del) will only remove the last entry from the map saved config. Same for presets (sm_neon_delpre) will only remove the last entry from their config.

    Either command can be entered several times to delete the last few entries, however the beams themselves will still be visible on the map. Theres nothing I can do about this.

    I will add a command to wipe all the saved beams from the current maps config. Presets have their own command (sm_neon_delpre) to delete the last entry or by specifying the preset name to delete the whole file itself.

    You can edit presets by using the command sm_neon_preset or sm_neon_preset2 and specifying an existing config name, it will spawn those beams and display the menu letting you add more to that config.
    __________________
    Silvers is offline
    Silvers
    SourceMod Plugin Approver
    Join Date: Aug 2010
    Location: SpaceX
    Old 08-22-2019 , 13:34   Re: [ANY] Neon Beams (1.0) [20-Aug-2019]
    Reply With Quote #7

    Quote:
    Originally Posted by PC Gamer View Post
    is there a way to delete all active beams?
    Done

    Quote:
    1.1 (22-Aug-2019)
    - Added command "sm_neon_wipe" to delete all beams and presets saved to the current maps config.
    __________________
    Silvers is offline
    kazya3
    Member
    Join Date: Aug 2019
    Location: CN
    Old 08-23-2019 , 06:42   Re: [ANY] Neon Beams (1.1) [22-Aug-2019]
    Reply With Quote #8

    哇,太棒了,这绝对是csgo地图制作者的福音,之前我每次做csgo地图都要破坏csgo的v pk来添加粒子文件,现在只需用插件调用来测试,谢谢你,你的插件的永远是那么的棒!

    Google translate

    Wow, that's great. This is a gift for csgo mappers. Before I did csgo maps , I had to destroy csgo's vpk to add particle files, now I just need to use the plugin to test, thank you, your plugins are always great!
    kazya3 is offline
    Silvers
    SourceMod Plugin Approver
    Join Date: Aug 2010
    Location: SpaceX
    Old 08-24-2019 , 06:55   Re: [ANY] Neon Beams (1.1) [22-Aug-2019]
    Reply With Quote #9

    Thank you!

    I have updated the list of Known Issues, specifically:
    Quote:
    (NoFix) Cannot remove beams/particles once they're placed because the entity is deleted. Only a map change or round restart will clear them (depending on the game).

    (NoFix) Linux: Particles created for late loading clients are not hidden, they will be sent to everyone and stacked. Linux bug with SetTransmit and FL_EDICT_ALWAYS.
    __________________
    Silvers is offline
    Dagothur
    Member
    Join Date: Dec 2014
    Old 08-24-2019 , 09:08   Re: [ANY] Neon Beams (1.1) [22-Aug-2019]
    Reply With Quote #10

    Very cool.

    The only preset I could find is the test preset. Did you plan on sharing the ones you've created seen in your screenshots?
    Dagothur is offline
    Reply


    Thread Tools
    Display Modes

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

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

    Forum Jump


    All times are GMT -4. The time now is 01:45.


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