Workshop – http://steamcommunity.com/sharedfiles/filedetails/?id=264467687
GitHub – https://github.com/Mista-Tea/improved-stacker
What is the Stacker Tool?
The Stacker Tool can be used to easily stack props in various directions and angles. It is one of the most common building tools for Sandbox servers.
How does Improved Stacker compare to the original Stacker Tool?
The Improved Stacker tool is a complete rewrite of the original Stacker tool and includes many bug fixes and new features that both clients and server owners can benefit from.
Unlike the other versions of the tool, the Improved Stacker tool is also currently being actively maintained.
What is new about Improved Stacker?
1.) Improved Stacker addresses several prominent crashes and bugs:
• Prevented a crash from players using very high X/Y/Z offset values.
• Prevented a crash from players using very high P/Y/R rotate values.
• Prevented a crash from very specific constraint settings.
• Fixed applying halos to ghosted props and fixed the massive FPS drop they were previously causing
• Fixed material and color saving when duping stacked props.
• Fixed incorrect stack angles when trying to create a stack on an existing stack.
• Fixed incorrect stack angles when stacking in a direction other than Front
2.) Improved Stacker added support for new functionality that can greatly improve your building experience:
• Added support for applying materials to the stacked props (toggleable)
• Added support for applying colors to the stacked props (toggleable)
• Added support for applying skins to props with multiple skins (automatic)
• Added support for applying physical properties (gravity, physics material) from the Physical Properties tool to the stacked props (toggleable)
• Added support for applying weight to the stacked props (toggleable, under Physical Properties)
• Added a toggleable axis and axis labels for showing a prop’s orientation
• Added presets functionality to save your settings so you can reuse them
• Added language support (like with my Improved Weight tool)
• Switched over to the new tool HUD style
• Added more control via key combinations:
- Right-click creates a single prop in the stack
- Shift (or E) + Left-click increases the stack size
- Shift (or E) + Right-click decreases the stack size, and Reload ® changes the stack direction
3.) Improved Stacker caters to developers and server admins:
• Added easy access to admin settings via an in-game Utilities menu
• Added console variables that server operators can control from console:
stacker_improved_max_per_player -inf/inf (less than 0 == no limit) stacker_improved_max_per_stack -inf/inf (less than 0 == no limit) stacker_improved_max_offsetx -inf/inf stacker_improved_max_offsety -inf/inf stacker_improved_max_offsetz -inf/inf stacker_improved_force_stayinworld 0/1 stacker_improved_force_weld 0/1 stacker_improved_force_freeze 0/1 stacker_improved_force_nocollide 0/1 stacker_improved_force_nocollide_all 0/1 stacker_improved_delay 0/inf
• Added console commands that server admins can control from in-game:
stacker_improved_set_max_per_player -inf/inf (less than 0 == no limit) stacker_improved_set_max_per_stack -inf/inf (less than 0 == no limit) stacker_improved_set_maxoffset -inf/inf stacker_improved_set_maxoffsetx -inf/inf stacker_improved_set_maxoffsety -inf/inf stacker_improved_set_maxoffsetz -inf/inf stacker_improved_set_force_stayinworld 0/1 stacker_improved_set_weld 0/1 stacker_improved_set_freeze 0/1 stacker_improved_set_nocollide 0/1 stacker_improved_set_nocollide_all 0/1 stacker_improved_set_delay 0/inf
• Added Stacker hooks to support external prop protections/anti-spam addons:
StackerEntity has been added to allow servers to control over each entity that the player spawns within a stack. This allows you to write your own logic, like assigning prop ownership, handling anti-spam, etc.
hook.Add( "StackerEntity", "Test", function( ent, owner ) -- returning any value other than nil will stop the current stack, so it is your responsibility to remove the entity -- this hook will be executed directly after the entity has been created with ents.Create( "prop_physics" ) -- for example, to prevent players from stacking a specific model, you could do the following: if ( ent:GetModel() == "some/bad/model.mdl" ) then ent:Remove() -- you have to manually remove the prop yourself return false -- returning false (or anything non-nil) will prevent any more props in the stack from being created end end )
StackerMaxPerStack has been added to allow servers to control the maximum number of props a player can stack (independent from the improved_stacker_max_per_stack cvar). This allows you to write your own logic for stack sizes (e.g., you can make it team based or job based).
hook.Add( "StackerMaxPerStack", "Test", function( ply, count, isRightClick ) -- returning a number here will determine the maximum amount of props a player can used per stack -- for example, to allow players in the Admin usergroup to spawn to an infinite amount, return -1 if ( ply:IsAdmin() ) then return -1 end end )
StackerMaxPerPlayer has been added to allow servers to control the maximum number of Stacker entities a player can have spawned out at any given time (independent from the improved_stacker_max_per_player cvar). This allows you to write your own logic.
hook.Add( "StackerMaxPerPlayer", "Test", function( ply, numSpawned ) -- returning a number here will determine the total number of Stacker entities a player can have spawned out at any given time -- for example, this will allow players in the Admin usergroup to spawn an infinite amount of Stacker entities, while making everyone else use the server's improved_stacker_max_per_player setting return ply:IsAdmin() and -1 or nil end )
StackerDelay has been added to allow servers to control the delay (in seconds) between a player’s usage of the Stacker tool. This allows you to write your own logic for delay times.
hook.Add( "StackerDelay", "Test", function( ply, lastStackTime ) -- returning a number here will determine the number of seconds that must pass before the player can use Stacker -- for example, this will allow players in the Admin usergroup to use the tool with no delay, while everyone else must wait 1 second between each tool use return ply:IsAdmin() and 0 or 1 end )
StackerConVar has been added to allow servers to control which players can change Stacker convars. This allows you to write your own logic.
hook.Add( "StackerConVar", "Test", function( ply, cmd, arg ) -- returning a value here will determine whether the player is allowed or blocked from changing the cvar (cmd) -- return true: allow them -- return false: block them -- return nil (default): fallback to a ply:IsAdmin() check -- for example, this will prevent anyone except for players in the Super Admin usergroup from changing the settings, -- rather than just default to a ply:IsAdmin() check return ply:IsSuperAdmin() end )
• OverloadUT (STEAM_0:1:5250809) – Wrote the original Stacker Tool back in 2006 (release thread)
• Marii (STEAM_0:1:16015332) – Updating OverloadUT’s Stacker Tool for GMod 13, also being the starting code for Improved Stacker
Please DO NOT reupload this tool (verbatim or small tweaks) to the workshop or other public file-sharing websites.
I actively maintain this tool, so reuploading it may lead to people using outdated, buggy, or malicious copies.
If there is an issue with the tool, LET ME KNOW via one of the following pages:
- GitHub: https://github.com/Mista-Tea/improved-stacker
- Workshop: http://steamcommunity.com/sharedfiles/filedetails/?id=264467687
- Facepunch: http://forum.facepunch.com/showthread.php?t=1399120
- May 27th, 2014 :: Added to GitHub - May 28th, 2014 :: Added to Workshop - Jun 5th, 2014 :: Massive overhaul - Jul 24th, 2014 :: Large update - Aug 12th, 2014 :: Optimizations - Jun 30th, 2015 :: Bug fixes/features - Jul 11th, 2015 :: Bug fixes - Oct 26th, 2015 :: Bug fixes - Aug 3rd, 2016 :: Bug fixes - Aug 31st, 2016 :: Bug fixes - Sep 2nd, 2016 :: Added Bulgarian language support