Jump to content

Modelscales


Recommended Posts

I have a JPLua plugin I've been working on (slowly..) which will allow per-model scaling (reads the JA+ modelscale.cfg) with per-client (or admin-restricted) commands for scaling, server owners can also set minimum/maximum scale allowed.

Not sure when it'll be done, but I'll try to at-least post a WIP version soon before an official release on the site.

 

The JPLua system already allows scaling, so admins with amluaexec privileges can do:

/amluaexec GetEntity( entityID ):Scale( 100 )

 

Added to issue tracker to make sure it gets done.

Link to comment

I have a JPLua plugin I've been working on (slowly..) which will allow per-model scaling (reads the JA+ modelscale.cfg) with per-client (or admin-restricted) commands for scaling, server owners can also set minimum/maximum scale allowed.

Not sure when it'll be done, but I'll try to at-least post a WIP version soon before an official release on the site.

 

The JPLua system already allows scaling, so admins with amluaexec privileges can do:

/amluaexec GetEntity( entityID ):Scale( 100 )

 

Added to issue tracker to make sure it gets done.

Do you think you can link me that when you're done? My new Server needs it and could be a good testing ground

Link to comment

rather than a new configuration file?

Because it's a JA+ feature that JA++ is replicating, hence reading from the JA+ format configuration file.

 

That way people can just type /scale like on OJP.

with per-client (or admin-restricted) commands for scaling

Link to comment

You don't use a model name. You use player number as it says above. For players, the entity number is the same as client number. Like for banning etc.

 

I tried it just now and it still displays the same error when you replace the ( entity ID ) with a client number.

 

Maybe an active example of how it's suppose to look when typed would help cos we're clearly typing something wrong.

 

EDIT: We discovered it only worked when done as /rcon lua GetEnity( ID ):Scale( <Value> )

MB2 Beta Tester / MB2 FA Assistant Dev

Link to comment
  • 3 weeks later...
  • 10 months later...

Added WIP modelscale plugin to repo: https://github.com/Razish/japp-assets/blob/master/lua/sv/modelscale/plugin.lua

Does not yet support reading modelscale.cfg

Adds modelscale <scale> command for clients

Adds japp_modelScaleCmd 0-1 cvar for servers to enable/disable model scaling via cmd ^

Adds japp_modelScaleRange <min> <max> cvar for servers to limit the range of allowed scales

So here is my simple question... I'm trying to add this to my server, dled the LUA you linked to, do I just put that in my servers Japlus folder? Of do I just add these said cvars and any one with the same LUA can then use the model scaling withing the Cvar perimeters preset in my server config using the Japp_modelScaleRange "Min" "Max"... A bit of a noob question, but this is my first time tweaking with JA++ to this scale... Pun not intended.

 

if it belongs in the servers Japlus folder, do I have to add a Cvar to tell it to load said .LUA?

 

P.S. Is this correct for the servers .cfg?

set japp_modelScaleCmd "1" <--- this I understand

set japp_modelScaleRange "0.5" "1.3" <--- This I wasn't sure about how the "#" should be set up...

Link to comment
  • 2 weeks later...

It belongs on the server in the same folder structure as in the repo. japlus/lua/sv/modelscale/plugin.lua - no clients need to download it at all. It doesn't have to be inside a .pk3 (but it can be)

It will read a file named modelscale.cfg inside the japlus folder: sample

 

After that you can enable japp_modelScaleCmd 1 on the server if you wish clients to be able to set their own modelscale with modelscale <percent> so long as percent is within the range specified by japp_modelScaleRange on the server (default is "80 120" so 100 is regular size)

Using modelscale command with no argument will show your current modelscale (from .cfg or overridden)

Using modelscales command (in server console) will show the list of predefined modelscales (from .cfg)

Smoo and Merek like this
Link to comment
  • 1 month later...
  • 1 month later...

The plugin works for us, it is really handy since we wasn't able to scale the models since JA+. However it seems like the game not loads the "modelscale.cfg". After starting the game and creating a solo match for example I can use the scale commands, as well I can list the file's content (the pre-set scales) however it does not apply no matter what we do.

 

That respawning glitch which makes you overgrow could be easily fixed by forcing the value to refresh. It is enough to use the "modelscale 100" to scale it back to 100, or whatever value was it originally. Also discovered an interesting thing that may help you a little. You will overgrow if you change your name. This bug should do something with the reloading of the information, or at least it looks like that.

Link to comment

That would not fix it. That variable is only ever used for printing your current scale on /modelscale. It's not used for setting the scale.

 

I love how coders say "that won't do what you said it did" because logically it doesn't make sense to them. I'm just going by what happened man. Before I changed it, our models kept going giant size when respawned. After I changed it, everything is working. You can choose to disbelieve me if you like, I'm just saying it worked for us so if someone else has that issue they can try it and maybe it'll work.  *shrug*  We haven't once had someone go giant size since we changed that value. We don't have to refresh anything. It just works as intended.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...