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

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


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
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:
    26 
    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, 645 views)
    __________________

    Last edited by Silvers; 12-04-2021 at 14:01.
    Silvers is offline
     



    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 15:37.


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