Thing that scales player and stuff down

So I’ve heard alot of fuss about this thing that can scale players and stuff down to make it seem as if really big maps are nearly endless and even bigger. Does anyone know if this thing is released and/or if there is a thread somewhere about it?

Sorry If it is in the wrong section but it is a request for the source of this thing which is 90% likely to be Lua, therefore it SHOULD go into this section :v:

http://www.garrysmod.org/downloads/?a=view&id=84054 . Maybe this one?

Nah, the thing I’m looking for isn’t a STool, it’s a Lua script that would basically auto load at server startup or something like that. I’ve heard it mentioned alot of times in the Map Pimpage threads and got rather interested in it.

So anyone have anything on this? It would be great for many mappers to have this.

See my post below.

Untested.

Thanks, I’ll see if I can get that working somehow then.

If that works, spacebuild just got a whole load more fun.

Ahh okay. I just tested it and it didn’t work.

Here’s a working version.

[lua]if SERVER then

AddCSLuaFile( "autorun/sh_playerscale.lua" )

local PlayerScale = CreateConVar( "sv_playerscale", "1", FCVAR_REPLICATED + FCVAR_NOTIFY + FCVAR_ARCHIVE )

hook.Add( "PlayerSpawn", "ResizeDem", function( ply )

	local scale = PlayerScale:GetFloat()
	
	ply:SetHull( Vector( -16 * scale, -16 * scale, 0 ), Vector( 16 * scale, 16 * scale, 72 * scale ) )
	ply:SetHullDuck( Vector( -16 * scale, -16 * scale, 0 ), Vector( 16 * scale, 16 * scale, 36 * scale ) )
	
	ply:SetViewOffset( Vector( 0, 0, 64 * scale ) )
	ply:SetViewOffsetDucked(  Vector( 0, 0, 28 * scale ) )
	
	ply.ModelScale = scale
	
	umsg.Start( "PlayerScale:SetScale" )
		umsg.Entity( ply )
		umsg.Float( scale )
	umsg.End( )
	
end )

elseif CLIENT then

usermessage.Hook( "PlayerScale:SetScale", function( um )
	local ply = um:ReadEntity( )
	local scale = um:ReadFloat( )
	
	if !ply.ModelScale or ( ply.ModelScale != scale ) then
		
		ply:SetHull( Vector( -16 * scale, -16 * scale, 0 ), Vector( 16 * scale, 16 * scale, 72 * scale ) )
		ply:SetHullDuck( Vector( -16 * scale, -16 * scale, 0 ), Vector( 16 * scale, 16 * scale, 36 * scale ) )
		
		ply:SetViewOffset( Vector( 0, 0, 64 * scale ) )
		ply:SetViewOffsetDucked(  Vector( 0, 0, 28 * scale ) )
		
		ply.ModelScale = scale
		
	end
end )

hook.Add("RenderScreenspaceEffects","PlayerScale.RenderScreenspaceEffects", function()
	for k,v in pairs( player.GetAll() ) do
		if v and v.ModelScale then
			v:SetModelScale( Vector( v.ModelScale, v.ModelScale, v.ModelScale ) )
		end
	end
end )

end[/lua]

Now do one that auto sizes all props, npcs, entities and vehicles unless someone wants to recreate everything in 1/16th scale… :confused:

It is not actually possible to do it to entities - they have to be created at that size, apparently.

I think it would be really great to scale everything down, just wondering if it would work with something’s/player’s phys box and not just it’s model.

Notes:
It would also require speed to be scaled down aswell(you dont want a small jeep that seems like it is extremely fast lol).
Also requires scaling of effects such as the phys gun beam(dont want a huge ass beam coming out of a player).