Raised This Month: $89 Target: $400
 22% 

[ANY] Neon Beams (1.2) [27-Aug-2019]


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Silvers
AlliedModders Donor
Join Date: Aug 2010
Location: SpaceX
Plugin ID:
6684
Plugin Version:
1.2
Plugin Category:
Fun Stuff
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Spawn and save Neon Beams to the map.
    Old 08-19-2019 , 19:00   [ANY] Neon Beams (1.2) [27-Aug-2019]
    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.
      - Please create and share custom presets! See post #2 below for various presets and screenshots.
      - All preset names must be unique.
    • 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 9 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_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.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. Click "Get Plugin" and put the .smx file into your servers \addons\sourcemod\plugins\ 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. (Tested on: L4D, L4D2, CS:GO, TF2)
    Attached Files
    File Type: zip neon_beams.zip (114.3 KB, 38 views)
    File Type: sp Get Plugin or Get Source (neon_beams.sp - 34 views - 85.6 KB)
    __________________

    Last edited by Silvers; 08-27-2019 at 07:36.
    Silvers is offline
    Silvers
    AlliedModders Donor
    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.


    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, 12 views)
    File Type: cfg Checkpoint_Arrows.cfg (6.2 KB, 1 views)
    __________________

    Last edited by Silvers; 09-06-2019 at 12:49.
    Silvers is offline
    Silvers
    AlliedModders Donor
    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
    Member
    Join Date: Nov 2017
    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
    Senior 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
    AlliedModders Donor
    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
    AlliedModders Donor
    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
    New Member
    Join Date: Aug 2019
    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
    AlliedModders Donor
    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 22:55.


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