ScriptHookVDotNetEnhanced Progress #1
Replies: 12 comments 27 replies
-
|
Hey, thanks for taking the time to do this. You should try posting about this on a GTA V mods discord server, so you can get suggestions from people with experience in this kind of thing so your work is smooth. |
Beta Was this translation helpful? Give feedback.
-
|
Small update: I have underestimated the scope of this Port when I thought I'd be done in a couple of days 😅, but I'm surely making progress. Currently, the biggest challenge (in addition to the amount of changes) is having to reimplement functions that are inlined in Enhanced but not in Legacy. In Legacy, these only required a pattern scan to get the address of the function, and a delegate in order to be able to call this function, but in Enhanced, they are not a standalone function anymore, but rather inlined inside other functions, and so they have to be reimplemented. For those interested, you can look at s_getPtfxAddressFunc as an example. and then use them to reimplement it, but I'm currently not 100% sure about some details like a vfunc call at 0x28 of the vtable of the passed entity that verifies if its a valid entity as i haven't done it before, but I'll get it to work :). I'll let you know once everything is ready, but expect it to take a bit longer than we initially hoped for. |
Beta Was this translation helpful? Give feedback.
-
|
Update: I have successfully reimplemented the checks for s_getPtfxAddress. It took so long because i had to understand how to do it, now the others should be much quicker :D. Edit: This keeps coming back to haunt me. Calling a vfunc of an entity on the same frame it is created has nothing to do with crashing the game, i missed yet another argument 🥲. This is good news, since having to time the call would have been very unstable (even if FPS-based). Also the address returned for the ptfx is mostly 0 (Not for the entity which can be obtained using s_getScriptEntity, but for the ptfx itself). I'll test it on Legacy to see if that's the case there too. Last Edit for this i promise 😂: I finally got it to work and return the correct address every time. At least i learned alot trying to get it to work. |
Beta Was this translation helpful? Give feedback.
-
|
Update: I've done great progress so far, yet I still have many patterns to cover. A realistic estimate for when I'm done is around 10 days give or take (including testing). After that I will publish everything in a beta state so that you can help me iron out any bugs that might have slipped through. Edit: The published version would cover 100% of the API that shvdn has for legacy, and potentially add some functionality, hence why it wasn't a quick release. |
Beta Was this translation helpful? Give feedback.
-
|
Almost done. Was traveling during the weekend so i couldn't get much work done. If everything goes well, i should finish all the patterns tomorrow :). Then i'll adapt the pool structs because their struct layout was shifted, and I'll start the testing. I'll then look into the configuration stuff, since apparently i can use the same assembly name and versioning, so that even old abandoned mods would work as is , given that they don't use any memory patterns themselves. In the case they do, you could either ask their developer (or if it's you) to update them, and if they can't find them and I have time, i could help out with that. I'll talk more about that in the release. Edit: In the first release, I'll release v2 (if it works) and v3 for compatibility reasons as mentioned, so that all scripts work, and that would be the last release for v2/v3 (except for potential fixes for NativeMemory.cs), then I'll start working on a v4 which adds more functionality : a lot more pools that i found (i'll have to reverse their items tho to understand what they are and how they are used), as well as other stuff. Although I'll be working with a slower pace on v4, since uni is almost back. |
Beta Was this translation helpful? Give feedback.
-
|
Starting the testing phase now. Adapted the pool structs, shifting them by 0x08 as every access I've seen in enhanced was shifted by 0x08 compared to legacy, but still not sure if all fields remain the same. I'll check that out through testing. Edit: Will also revisit the first pattern that i've done on the first days, since i know much more now than back then. I also hardcoded the obfuscation keys they used for the fwBasePool pointers when i first started the project, I'll come back to those and get them dynamically. |
Beta Was this translation helpful? Give feedback.
-
|
So i reimplemented all the pools correctly now, but I Still have to fix pool management. The crash upon Reload() is also fixed now,
Edit: The crash is indeed related to some functions i implemented at the start. Im trying to fix them now. |
Beta Was this translation helpful? Give feedback.
-
|
Allright. I spent the whole day fixing some bugs and making sure everything worked well. I Also added 1 pool for now : pickupObjectPlacementPool, which you can iterate over to get all the pickups on the map. The class PickupObjectPlacement that I added only has a Position attribute for now that you can get, but i'll add more stuff to it in future releases (like pickup type and so on). I also identified a couple more pools that could be interesting, and will be added in future releases, as well as more features. Now given that i had to make some changes that could affect Legacy, I'll just need to do 1 more test on Legacy to make sure nothing broke. Had to delay the release a bit again, but I'm just making sure everything goes well. In some hours, when I wake up, I'll do the last bits of testing and then finally release SHVDNE. As an unrelated note, the Turbo attribute on the Vehicle class isn't currently used properly. For the value set to take effect, first of all the car needs the turbo mod toggled, as well as 3 memory patches to instructions that write to the Turbo, since it's being overwritten many times a second. |
Beta Was this translation helpful? Give feedback.
-
|
Annnnd released :) |
Beta Was this translation helpful? Give feedback.
-
|
I see that for some reason it won't let me upload photos. I'll leave it written here: Pd: I'm not running any scripts right now, I don't have a scripts folder created yet.. scripthookVdonet.log asiloader.log |
Beta Was this translation helpful? Give feedback.
-
|
I'm also running it on a cracked version of the game, do you think that could be the problem? |
Beta Was this translation helpful? Give feedback.
-
|
Can you please update to 3.7 API version? My downloaded scripts are for SHVDN3 3.7, but yours seems to currently have the 3.6 API. |
Beta Was this translation helpful? Give feedback.


Uh oh!
There was an error while loading. Please reload this page.
-
I'll be sharing progress updates about SHVDNE here. Feel free to ask me questions or make suggestions.
Beta Was this translation helpful? Give feedback.
All reactions