Jonnykatt_no1 Posted November 15, 2005 Share Posted November 15, 2005 Is it possible to add a new stat to the stats page in SA? A couple of weeks ago I hacked together my own custom hi-jacking mission. It works great, no problems encountered since people in these forums helped me finalize the code. The only thing that is missing in my opinion is a record of hi-jacking activity. I would love to add a "Vehicles Hi-Jacked" count to the Misc section of stats, and maybe even a "Money from Hi-Jacking" stat in money. Before I waste a lot of time trying to figure out how to do this, I wanted to put these questions out there: Can it be done? Is doing it reasonable? And if anyone has any advice on what lines would need to be added to my code and/or the main code, please do tell! Link to comment Share on other sites More sharing options...
random_download Posted November 15, 2005 Share Posted November 15, 2005 I'm pretty sure that the names etc. of stats are hardcoded. It may be possible to add one by code injection, but this is pretty advanced and not easy. You won't be able to do it through the scm. Link to comment Share on other sites More sharing options...
Jonnykatt_no1 Posted November 15, 2005 Author Share Posted November 15, 2005 I'm pretty sure that the names etc. of stats are hardcoded. It may be possible to add one by code injection, but this is pretty advanced and not easy. You won't be able to do it through the scm. So, I guess it's not something that can be reasonably done. I was afraid of that. I don't want to mess with any hard coding for something like this. I'm glad that I came here to ask before wasting a lot of my time trying to figure out something that can't be done... Thanks again r_d! Link to comment Share on other sites More sharing options...
tomworld10 Posted November 17, 2005 Share Posted November 17, 2005 Hi, the solution i can give you is to use an already existing stat, there is next to 400 of them so i'm pretty sure you can found one taht is not as usefull as it seems, it depends too if your mod will be using the missions stats, but i think it's the best workaround you'll get. But something else i don't agree with random_download (and by the way i salute him for the time he always spend helping, my hat down to you mate) about the stats name because if i remember well, i understand you right, and i'm not mistaking (sorry for the case of any of those happend...) the names of the stats are in the text files so just to rename them find in the "yourownlanguage".gtx and you'll be next to done just drop down on SA opcode database get the stats maths opcodes. Then you'll get your own highjacking stats.... Hope it helped Have fun Link to comment Share on other sites More sharing options...
DeeZire Posted January 11, 2006 Share Posted January 11, 2006 ^ Thats excatly the way to do it. I did that with my Pizza Boy mission to record 'number of pizzas delivered'. In your case, you may be better using stat 218 (amount of drugs bought) for your 'number of hijacks' and then stat 61 (drugs budget) for your 'money made from hijacking' - none of those two are used in the game (unless somebody knows differently?) and both will appear on the stats page when you record something in them Link to comment Share on other sites More sharing options...
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