[SCRIPT] REWRITE Benny's Motorworks SP Mod into a ASI performence increased script
Hey guys, and hello to the pro scripters
The Benny's Motorworks SP mod is pretty outdated and have alot of problems.
This script use also the buggie NativeUI plugin which drops your frames from 60 to 30 (If you are not using a 1080)
This is a known problem but it can't be get fixed.
ASI scripts runs much smoother, support more natives and just works most of the time after a new GTA V update. But it also support to create a menu like the Script Hook V trainer.
So i talk to the skilled scripters if someone can rewrite this script into a ASI file please?
It would help alot of people with problems plus me
ps: if someone want to know how to look into the script, just PM me
OK, I have some inquiries about your thread....
NativeUI drops frames:
NativeUI is nothing fancy, it uses built-in natives to draw stuff, nothing you can perfect with C++ modding.
C++ supports more natives:
Wait WHAT?!? lol do you even mod bro? The .NET hook is basically a wrapper around the C++ hook, but it also gives us the functionality to call native functions directly to the hook, using
so I don't where you pulled that up from..
C++ script works most of the time after a GTA 5 update
While this may be true SOME of the time, that's just because the offsets are updated and the .net hook devs need to update that themselves. But still it clearly says on the download page, you DONT need to update it every time SHV is updated.
Support for a menu like the Native Trainer
Wow, what a coincedence:
All created with .NET scripthook
So please clear these thoughts for me.
@MrGTAmodsgerman I don't know if you run a potato or so but I don't get any drops with that script. When it's like locked on 30 de- and activate Vsync if you are using that.
@GTAVModder4Life So do you will rewrite this mod?
And yea some people tell me that Asi scripting supports more stuff, more possibilitys
@Kwebbl Say that to my 980Ti without VSync and a i7.
Gudmaz knows about that problem.
I am not alone with that.
Can you watch this FB video?
Its still in the group
One thing I have seen confirmed as a limitation of SHVDN, is the inability to use threads for any API calls. That was asked on their Gitter page and was confirmed by Croisire I believe.
Apparently even the Rage plugin had a threading option (called Fibres on there) so that's one area where performance could be increased. I also know (again from Gitter) that scripthook has access to some functionality in the ScriptHookV lib that isn't exposed through SHVDN, like the texture management processes tied into the UI.DrawSprite function.
SHVDN might be a wrapper but it doesn't wrap and expose everything that is available to be used by developers... as far as I have read from SHVDN devs anyway.
@TobsiCred Read this thread
@MrGTAmodsgerman Yeah I said I don't know what PC you have but I don't get any lags.
Read this topic also that i post to TobsiCred
@Kwebbl The point is from that, this mod is overall bugged, some people have problems with the camera, some can't get into the garage, and so on.
Interesting thread here, I'm not modder but I've been using both ASI and SHV mods. I have mediocre hardware on my PC, but I have never noticed any considerable impact performance in either of these scripts. Currently Benny's Motorwork mod works perfectly fine for me, and was working throughout several versions of SP GTA V, those who can't make it to work probably have something missing or can't configure it correctly in .xml. You can easily spot thousands of users here who can't install simplest script.
That being said, now I'm curious how these scripts work performance wise and what should regular user be aware of, I don't recall seeing any threads on this topic. Links or proper explanation would be most welcome.
@Forrest-Gimp Script Hook V mods are Asi mods, i think you mean Script Hook V.Net mod. But the problem is with NativeUI! Once the menu was drawn, the frames drops from 60 to 30. If you read my gta forums threard about that, then you will see that i have a very High File I/O usage on NativeUI. So we need to invite all users to a comparing thread. Which system, SSD drive or not, and so on.
But the problem appears on NativeUI, so why we not making it easy and use SV menu as base to build a overall faster script. And don't tell me i have installed anything wrong! I am just a modder with alot of knowledge of modding and i also do script mods.
NativeUI seems to spam invisible errors, that would explain why it slows down
So what the hell?
This is not the right thread for it
Does someone will rewrite it or not?
@MrGTAmodsgerman Do you have frame drops when using Simple Trainer?
@stillhere No, only script mods that use a NativeUI Menu elements. Once any of these Menu open, i lost 50% of my frames
So will someone do it or not? Otherwise i will do it by my self like always.
@MrGTAmodsgerman I support you m8, and I did fix the garage door https://www.gta5-mods.com/scripts/benny-s-motorworks-garage-door-fix
@MrGTAmodsgerman I'm pretty sure the problem with NativeUI lies with the fact that it makes tons of unneeded calculations every frame. In some places it is making the same calculation more than once per frame. There is also quite a bit of Linq usage which is never nice on performance..
is there anyway we can use backgroundworker or Threading.Thread?
@ImNotMentaL From what I saw posted on the Gitter page, you can use threads but you can't call any SHVDN API calls from them.
@ImNotMentaL Rewrite the script in c++ and the main big FPS problem is away.
I wish this rewrite for all other NativeUI scripts too!!
@MrGTAmodsgerman Wouldn't the better solution be to rewrite NativeUI in C++ if it really does gain extra performance?
That way, any scripts that use NativeUI, would also gain the benefit, rather than just this one mod.
@LeeC2202 I totally agree NativeUI.asi
@LeeC2202 Yea good idea, but i don't think its possible to write .Net script mods then with NativeUI database function. All NativeUI scripts have to be rewritten!
And why rewriting NativeUI as ASI when we already can script performence stable scripts in C++ without an plugin?
First we need to know why exactly NativeUI drops 30 frames!
@MrGTAmodsgerman It shouldn't make any difference what language the library is written in, if it exposes the same function calls to anything using it. All it would need is the mods to be built against a different reference, which is a lot quicker than completely re-writing scripts.
If you think about it, ScriptHookVDotNet is an ASI and we can call functions in that. The simple fact is, NativeUI is middleware and when middleware suffers from issues, you don't rewrite everything else to work with it, you fix the middleware.
I know I wouldn't waste time re-writing a script simply because the middleware it used wasn't performing properly... and I think you'll find every other scripter will say the same thing. If NativeUI is the genuine problem, then that's what needs to be fixed. I have never had any issues with NativeUI performance wise though, so I can't offer any insight into what is causing the problem.
But that means the people who are having the problem, need to get together and put together some definitive answers on what situations cause the problem. It needs a set of test mods creating with different menu types, to narrow down the actual cause. Then when you have some answers, you give them to the person responsible for NativeUI and say "Here, this is what is causing the problem".
@Frazzlee That is very true and all those people who created scripts using NativeUI aren't going to rewrite them either. Stalemate, I'd say.