Spastic Chinchilla Posted April 13, 2016 Posted April 13, 2016 I see there is a modelscale.cfg in my Japlus server's folder, but is it also possible to add a modelscale for Admin control?It'd improve alot of things and make Roleplay more fluent for our server, and other servers. Is it possible to add?
Raz0r Posted April 14, 2016 Posted April 14, 2016 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.
Spastic Chinchilla Posted April 14, 2016 Author Posted April 14, 2016 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
Raz0r Posted April 14, 2016 Posted April 14, 2016 I'll see what I can do at home tonight, it's sitting on my desktop somewhere. For now, let me know if you have issues with the amluaexec method.
Fuse294 Posted April 14, 2016 Posted April 14, 2016 Why not just make a standard command out of it rather than a new configuration file? That way people can just type /scale like on OJP. MB2 Beta Tester / MB2 FA Assistant Dev
Raz0r Posted April 14, 2016 Posted April 14, 2016 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
Spastic Chinchilla Posted April 14, 2016 Author Posted April 14, 2016 How does one find an Entity ID? Because when I try it with a model name and 0.85 Scale it results in Error: [string 'GetEntity( ahsoka ):Scale( 0.85 )']:1: attempt to index a nil value What am I doing wrong?
ensiform Posted April 14, 2016 Posted April 14, 2016 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.
Fuse294 Posted April 14, 2016 Posted April 14, 2016 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
Spastic Chinchilla Posted April 14, 2016 Author Posted April 14, 2016 I seemed to fix it. /amstatus to find a player ID And then the/rcon lua GetEntity( entityID ):Scale( 100 ) with some editing Thanks for your help! I hope your modelscales will be finished
Exmirai Posted April 15, 2016 Posted April 15, 2016 also you could do /amluaexec GetPlayer( [playernickname] ).entity:Scale( 100 )
Raz0r Posted April 16, 2016 Posted April 16, 2016 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 Merek likes this
dark soul Posted May 3, 2016 Posted May 3, 2016 Sorry didn't read this before, will test tomorrow I am hosting Jedi Outcast and Jedi Academy servers for free up to 8 servers. Contact me if you are in need of a server for your community.
AngelModder Posted March 19, 2017 Posted March 19, 2017 Added WIP modelscale plugin to repo: https://github.com/Razish/japp-assets/blob/master/lua/sv/modelscale/plugin.luaDoes not yet support reading modelscale.cfgAdds modelscale <scale> command for clientsAdds 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 scalesSo 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 understandset japp_modelScaleRange "0.5" "1.3" <--- This I wasn't sure about how the "#" should be set up...
Raz0r Posted April 3, 2017 Posted April 3, 2017 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) Merek and Smoo like this
Warlock Posted May 7, 2017 Posted May 7, 2017 By the way, there's an error in the plugin.lua that I found that was causing our models to jump to Giant size when we re-spawned. I believe line 96 should read: local scale = 100 That seemed to fix it for us. Smoo and Merek like this
Raz0r Posted May 13, 2017 Posted May 13, 2017 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.
Pityesz Posted June 21, 2017 Posted June 21, 2017 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.
Warlock Posted June 25, 2017 Posted June 25, 2017 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now