Ukotas wrote: ↑Tue Mar 08, 2022 1:11 am
I reckon it is meaningless to try and search for a change in id since it is the address that change, not the id itself.
-Yes. Every weapon or item has its own data structure. We are just changing the 'type' within its own structure. That being said, there
may be a single address that stores this data (e.g. that checks for item being held by player or similar), but I did not find anything like that. It proved easier to just find an instruction that handles that dynamic data.
We also have to consider that there are different ID's for each weapon. For example, there is an ID for weapon for mechanics (which we have), an ID for UI/weapon icon (which we have), an ID for labels and probably 3D components etc.. We are calling them ID's but they are really just values. I am just saying that changing the weapon in this game cannot be done by simply changing a single value; there are several values that need to be changed, and we have to find them all. I have not found everything yet, which is why it is not yet finished.
To make things more difficult, the values that we need to find are not handled by the same addresses, so we cannot simply search for changed/unchanged etc., we need to find where the data is being handled, then figure out where, exactly, in the sub-routine it is being applied. Oftentimes, you may not even be looking in the right sub-routine. It can take a lot of time.
I suspected that it would be this way, which is why I did not really want to put much time into it since I knew that it would be tedious and time-consuming. It is similar to the invincible vehicle feature...where there were about 7 different injection points for that because there are all kinds of different damage that can occur to vehicles. Even I did not find them all, but I have most of them, which is good enough.
Another thing to consider, which adds to the complexity of this, is that changing the 3D object may not even be possible without simultaneously changing several other values, else the target may crash. So, we may never even know what to change. This is why I also tried other approaches, such as using the outfit changer or manipulating the in-game spawner to give us what we want. The work in these areas is not yet finished, as I have only briefly looked at them. There are many creative angles that can be looked at.
Now, there may be a way to change a single value, since all data structures/objects/entities etc. will likely have a base, where we can simply swap it out with something else, then everything underneath it in the pointer tree updates with it, which is ultimately what we would like to find. However, if we cannot find that, then we settle with the major things, like mechanics and hopefully 3D mesh/object data.
I am sure that there are probably people that are much more experienced and knowledgeable, that might laugh at me because they know of a much better/easier way to go about it, but I can only speculate and I just have to work with what I have for now.