Grantus Posted February 6, 2006 Share Posted February 6, 2006 (edited) Can any one give me a tutorial on how to code the main.SCM in SA, like give different weapons to your gang members instead of the crappy pistols they have I already know how to make spawn points for vehicles and weapons but i want to change gang members weapons. if you know where a tutorial is please post the link aswell Thanx Edited February 6, 2006 by Grantus Link to comment Share on other sites More sharing options...
Y_Less Posted February 6, 2006 Share Posted February 6, 2006 Do a search, this has been covered before. Link to comment Share on other sites More sharing options...
Grantus Posted February 6, 2006 Author Share Posted February 6, 2006 (edited) I have looked but there is non that go through the process enough Edited February 6, 2006 by Grantus Link to comment Share on other sites More sharing options...
Demarest Posted February 6, 2006 Share Posted February 6, 2006 The process is: imitate existing code. How did you accomplish the things you say you've accomplished? You did it how they did it before you. Same thing. Link to comment Share on other sites More sharing options...
ZAZ Posted February 6, 2006 Share Posted February 6, 2006 I have looked but there is non that go through the process enough Specified tuts are not exist. But there exist mountains of exemple scripts here in the mission coding forum Didn´t you see the topic:"give n' take mod"? CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
Plaka Posted February 6, 2006 Share Posted February 6, 2006 Intriguing ... I wonder what your "Grove Mod" does then, if you have to ask this type of question ... Plaka thinks Demarest was probably correct ... In other Topic/Mod Showrooom Link to comment Share on other sites More sharing options...
Y_Less Posted February 6, 2006 Share Posted February 6, 2006 How to make a mission for n00bs who expect you to explain it in a single post cos they can't be bothered to read the long tutorials and want it put simpler. By Alex "Y_Less" Cole Note the ammusing annecdotes at the bottom . Open Mission Builder and either decompile your main.scm or use a provided text mission file. Add a number of OpCodes in a certain order to achieve the desired ingame effect. The OpCodes are detailed in opcodes.txt or at vc-db.webtools4you.net, there is an SA version. Properties are defined at the top of the file and missions at the bottom. The code still running while you are not in a mission is called MAIN and uses ££ to define jump addresses over the MISSION segments £ (except when referencing labels in MAIN when they too use ££), labels are defined by a ':' prefix and are one word. Code run at the games start mostly comes before the first create_thread line. That line is used to create a looping thread at a given label, this is most likely where your code will go. All loops must have a wait command, wait 0 is valid. Models must be loaded before use. Savegames are not compatible except when using Darkpact (appending to MAIN and using mission code to run threads and rewite code). The mission structure is documented in the MB readme. To run a mission you will need a sniffer thread to trigger it. Naming threads is advisable. Float structure: [\d]+\.[\d]+ If structure: if (#args-1) arg 0 agr 1 ... jf £[£]?[\w]+ Annecdotes: The create thread lines are null delimited and may thus have up to 16 parameters (engine limited). You can create your own OpCodes by hooking the pointer for 0124 using "setplayerhandlingresponsiveness -5035& 8524424&&" (note the MB o.22 syntax) to set an address according to the formula "param1*114h+7DBCB0h+68h". Then just save some ASM into 32bit ints in MB (signed, little endian, 8?? on - you will need to comment out all the variables in VICESCM.INI) to run your OpCode then admire in-game. Further reading: Manipulating game memory for fun and profit revisited - contains links to the original topic by CyQ. Link, link - applications of mem hacking. Darkpact - SA version. Sorry, those tutorials are long to make it simple. But as you wanted it in a post, here it is. I had to skimp a bit on some areas but you should get the idea. Link to comment Share on other sites More sharing options...
Grantus Posted February 7, 2006 Author Share Posted February 7, 2006 How to make a mission for n00bs who expect you to explain it in a single post cos they can't be bothered to read the long tutorials and want it put simpler. By Alex "Y_Less" Cole Note the ammusing annecdotes at the bottom . Open Mission Builder and either decompile your main.scm or use a provided text mission file. Add a number of OpCodes in a certain order to achieve the desired ingame effect. The OpCodes are detailed in opcodes.txt or at vc-db.webtools4you.net, there is an SA version. Properties are defined at the top of the file and missions at the bottom. The code still running while you are not in a mission is called MAIN and uses ££ to define jump addresses over the MISSION segments £ (except when referencing labels in MAIN when they too use ££), labels are defined by a ':' prefix and are one word. Code run at the games start mostly comes before the first create_thread line. That line is used to create a looping thread at a given label, this is most likely where your code will go. All loops must have a wait command, wait 0 is valid. Models must be loaded before use. Savegames are not compatible except when using Darkpact (appending to MAIN and using mission code to run threads and rewite code). The mission structure is documented in the MB readme. To run a mission you will need a sniffer thread to trigger it. Naming threads is advisable. Float structure: [\d]+\.[\d]+ If structure: if (#args-1) arg 0 agr 1 ... jf £[£]?[\w]+ Annecdotes: The create thread lines are null delimited and may thus have up to 16 parameters (engine limited). You can create your own OpCodes by hooking the pointer for 0124 using "setplayerhandlingresponsiveness -5035& 8524424&&" (note the MB o.22 syntax) to set an address according to the formula "param1*114h+7DBCB0h+68h". Then just save some ASM into 32bit ints in MB (signed, little endian, 8?? on - you will need to comment out all the variables in VICESCM.INI) to run your OpCode then admire in-game. Further reading: Manipulating game memory for fun and profit revisited - contains links to the original topic by CyQ. Link, link - applications of mem hacking. Darkpact - SA version. Sorry, those tutorials are long to make it simple. But as you wanted it in a post, here it is. I had to skimp a bit on some areas but you should get the idea. Thanx that has actually helped me Link to comment Share on other sites More sharing options...
Y_Less Posted February 7, 2006 Share Posted February 7, 2006 Im assuming then you can already program in perl and understand the nice regex expressions used . And glad to hear it. 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