Yes, all missions are script based. They will get the current game time, store it inside a (script) local variable and then compare to it. Now it could also be a global variable, but I assume for most missions it will be local. You will have a hard time changing those as they are not easily accessible.
Glad to hear you enjoy it!
That sounds a lot like memory scanning for an unknown initial value, then looking for a decreased value etc. This process will (usually) allow you to find the address in memory that stores the ammo count. From there on, by setting a breakpoint on it, you can find the code that modifies it and for instance NOP it so that it no longer does anything. Cheat Engine is a great tool for that and all you really need initially. A more powerful debugger would be x64dbg (which is free). For static analysis you could use Ghidra (free) or IDA Pro (very expensive), but I'd recommend starting out with just Cheat Engine initially.
Once you know what to patch, you could just write a small C++ library that scans the game's memory for the location to patch and then applies the patch. I use Visual Studio for that. Game archives vary wildly and you usually have to rely on a third party tool (like OpenIV) or try to document it yourself, usually by using a Hex Editor and studying the code to parse the files. That's a different story, though. For the hitmarker no files are touched, but only game code (compiled code) is modified to skip a certain portion used to render the hitmarker (essentially removing an if-block).
I have updated the mod and included an option to disable any reticle changes.
Ideally you would work on a smaller game with less DRM as it can be quite frustrating. Maybe pick an older shooter game and see if you can find the code that changes your ammo or health. RDR2 uses DRM which might make it less accessible for beginners. If you want to skip all that and just write some code, you can use one of the available script hooks (such as the C++ ScriptHook by Alexander Blade or RAGE Plugin Hook by MulleDK19 and myself targeting .NET) to interact with the game's scripting engine. You can create a lot of cool stuff that way! We have some tutorials here: https://www.mod-rdr.com/wiki/tutorials/
And no, I am not affiliated with OpenIV.
Sure, I'll add an ini option in the next version to allow you to toggle the "no change at all" behavior.
The coding itself is very simple (can be reduced to a one liner of actual mod-specific code), but the research required to figure out what to patch and where, I wouldn't recommend for a beginner. It is a highly abstracted UI system that you need to delve through for quite a bit. There are many other things you can work on first instead if you just want to play around with memory patching.
Preventing it from turning red is actually easier and was what I managed to do before I was able to just disable the hitmarker. There are a few internal states of the reticle (for valid targets, invalid targets, enemy targets etc.). I am not sure how easy it is to remove just the enemy bit but I could add an option to disable any reticle change altogether which is very simple. It will then no longer be grayed out for your personal horse for instance, though.
If you want to try it yourself, you would need to be at least somewhat proficient with reverse engineering and x64 assembly as I am changing game code to prevent the hitmarker from rendering. I am happy to give you some pointers if that's what you are looking for.
That behavior sounds more like you are reaching some internal task sequence/pool limit. Have you tried using this right after performing the sequence to free it?
I haven't really worked with components in a long time, but you should be able to toggle them via category hashes:
NativeFunction.Call(0x0DF631E4BCE1B1FC4, ped, slotHash, 0, 0);
NativeFunction.Call(0xCC8CA3E88256E58F, ped, 0, 1, 1, 1, 0);
It could be an on screen effect that needs to be applied. Perhaps looking at the screenshot mode script could help, it allows to toggle various effects. I believe all of it is script controlled.
You need to pass the entity handle to _PROMPT_GET_GROUP_ID_FOR_TARGET_ENTITY, I am not sure if that's what you are doing. Try spawning a ped for debugging purposes and attach the prompt to it instead.
Just half a year late, we are happy to release our official trailer for RDRFR! We hope to make the mod available publicly soon™
Thank you to all of our Patreon subscribers for the support and special thanks to willpv23 for the trailer.
Check it out here:
Interesting - so you are saying when using Pimp My Horse all components work but when normally mounting a wild horse they do not? I suspect it is because horse/animal components are the same for SP and MP and the game presumably uses the SP flag whereas Pimp My Horse can use the MP one.