Quantcast

Jump to content

» «
Photo

ASI SCRIPTING

19 replies to this topic
SkullBoy
  • SkullBoy

    GTA SkullBoy

  • Members
  • Joined: 18 Sep 2013

#1

Posted 22 November 2013 - 04:16 PM

Hello everyone,i'm sorry if i create this topic in wrong category.
So...i learn C++,but i dont know how to do asi scripts.
I see in another topic that asi files are dll but renamed.Ok...but nobody create a tutorial to learn us about asi scripting.Can someone to do that?
That will help me more guys.PLEASE DO THAT...

ChopTheDog.
  • ChopTheDog.

    War. War never changes.

  • Members
  • Joined: 31 May 2010
  • None

#2

Posted 22 November 2013 - 06:38 PM Edited by ChopTheDog., 22 November 2013 - 06:39 PM.

I believe you need to create a DLL project in your IDE then use your knowledge of C++ to hook game functions and code your script.

 

After building the DLL just rename it to ASI and place it in your game directory.

 

If I remember correctly, Vice City does not require an ASI Loader but San Andreas does.

 

The ASI Loader is pretty self explanatory. 


Deji
  • Deji

    Coding like a Rockstar!

  • Feroci Racing
  • Joined: 24 Dec 2007
  • None

#3

Posted 22 November 2013 - 06:42 PM

Yes, for example if you use Visual Studio, you simply create a "Win32" project, make it a DLL and change the destination extension to '.asi' in the project configuration. You could set it to output to GTASA's program directory, even.


SkullBoy
  • SkullBoy

    GTA SkullBoy

  • Members
  • Joined: 18 Sep 2013

#4

Posted 22 November 2013 - 06:53 PM

thanks for replies guys.I use Visual C++ 6.0(if its not good tell me ).thats my problem,
I want to know how to hook game function .

ChopTheDog.
  • ChopTheDog.

    War. War never changes.

  • Members
  • Joined: 31 May 2010
  • None

#5

Posted 22 November 2013 - 07:01 PM Edited by ChopTheDog., 22 November 2013 - 07:02 PM.

I too have asked this question, you can view my topic here.

 

Thanks to K^2 and BadBoy for the replies.


SkullBoy
  • SkullBoy

    GTA SkullBoy

  • Members
  • Joined: 18 Sep 2013

#6

Posted 22 November 2013 - 07:03 PM

thank you,i will read your topic

SkullBoy
  • SkullBoy

    GTA SkullBoy

  • Members
  • Joined: 18 Sep 2013

#7

Posted 22 November 2013 - 07:09 PM

I too have asked this question, you can view my topic here.
 
Thanks to K^2 and BadBoy for the replies.

you can give me links to tutorials ?
Or can do a small tutorial?

ChopTheDog.
  • ChopTheDog.

    War. War never changes.

  • Members
  • Joined: 31 May 2010
  • None

#8

Posted 22 November 2013 - 07:15 PM

 

I too have asked this question, you can view my topic here.
 
Thanks to K^2 and BadBoy for the replies.

you can give me links to tutorials ?
Or can do a small tutorial?

 

 

Did you not understand the snippets in that topic?

 

I'd advise you to try the console snippet first then edit it yourself to get it working in an ASI file.

 

I am not an experienced C++ programmer, in fact I don't even program in the language anymore since I (admittedly) didn't have the patience to learn.

 

The only reason I can code in SCM and CLEO is because that was a piece of piss to learn.


SkullBoy
  • SkullBoy

    GTA SkullBoy

  • Members
  • Joined: 18 Sep 2013

#9

Posted 22 November 2013 - 07:26 PM

yeah...your topic was useful for me to understand how to a asi script!Thank u very much!
  • ChopTheDog. likes this

Deji
  • Deji

    Coding like a Rockstar!

  • Feroci Racing
  • Joined: 24 Dec 2007
  • None

#10

Posted 22 November 2013 - 07:56 PM

MSVC 6.0 is a little old. 2010 has a much better C++ implementation and has a damn powerful debugger which can help you debug your code.


SkullBoy
  • SkullBoy

    GTA SkullBoy

  • Members
  • Joined: 18 Sep 2013

#11

Posted 22 November 2013 - 08:02 PM

MSVC 6.0 is a little old. 2010 has a much better C++ implementation and has a damn powerful debugger which can help you debug your code.

so... I think i get it tommorow and start to scripting.

ChopTheDog.
  • ChopTheDog.

    War. War never changes.

  • Members
  • Joined: 31 May 2010
  • None

#12

Posted 23 November 2013 - 01:22 PM

MSVC 6.0 is a little old. 2010 has a much better C++ implementation and has a damn powerful debugger which can help you debug your code.

 

What about the 2012 version?

 

I'm intrigued as to why you mentioned 2010 over 2012.

 

Any major differences between them? 


Deji
  • Deji

    Coding like a Rockstar!

  • Feroci Racing
  • Joined: 24 Dec 2007
  • None

#13

Posted 23 November 2013 - 02:10 PM Edited by Deji, 23 November 2013 - 02:12 PM.

 

MSVC 6.0 is a little old. 2010 has a much better C++ implementation and has a damn powerful debugger which can help you debug your code.

 

What about the 2012 version?

 

I'm intrigued as to why you mentioned 2010 over 2012.

 

Any major differences between them? 

 

 

Newer can be better, but 2012 removes macro features, has a horrible UI, requires an update to even target Windows XP (I would personally hate to find out I have to wait another half our for an update to install to do something I'd expected it to do already), doesn't run on anything older than Windows 7 and in my opinion already adopts too much of Microsoft's crappy "metro" direction. Quite a lot of people prefer 2010 (especially the masses that still run XP) and project files can be upgraded to new versions, but as far as I'm aware they can't be downgraded. So to use VS2012 would mean you're not able to share solutions with the large portion of the community (particularly the modding community) who prefer and use VS2010.

 

So not really much too drastic is different between them, but I've never been let down VS2010 yet and it is a very good suit to modding GTA, which were all written in really old versions of visual studio. The only addition to VS2012 I'd consider upgrading for is the improved, more automatic intellisense. But all that does is save me having to press Ctrl+Space a few times :p

  • ChopTheDog. likes this

ChopTheDog.
  • ChopTheDog.

    War. War never changes.

  • Members
  • Joined: 31 May 2010
  • None

#14

Posted 23 November 2013 - 02:15 PM Edited by ChopTheDog., 23 November 2013 - 02:15 PM.

 

 

MSVC 6.0 is a little old. 2010 has a much better C++ implementation and has a damn powerful debugger which can help you debug your code.

 

What about the 2012 version?

 

I'm intrigued as to why you mentioned 2010 over 2012.

 

Any major differences between them? 

 

 

Newer can be better, but 2012 removes macro features, has a horrible UI, requires an update to even target Windows XP (I would personally hate to find out I have to wait another half our for an update to install to do something I'd expected it to do already), doesn't run on anything older than Windows 7 and in my opinion already adopts too much of Microsoft's crappy "metro" direction. Quite a lot of people prefer 2010 (especially the masses that still run XP) and project files can be upgraded to new versions, but as far as I'm aware they can't be downgraded. So to use VS2012 would mean you're not able to share solutions with the large portion of the community (particularly the modding community) who prefer and use VS2010.

 

So not really much too drastic is different between them, but I've never been let down VS2010 yet and it is a very good suit to modding GTA, which were all written in really old versions of visual studio. The only addition to VS2012 I'd consider upgrading for is the improved, more automatic intellisense. But all that does is save me having to press Ctrl+Space a few times :p

 

 

I see, thank you for the explanation. :cookie:


maxorator
  • maxorator

    VC:MP lead developer

  • Members
  • Joined: 24 Feb 2006

#15

Posted 24 November 2013 - 01:17 PM Edited by maxorator, 24 November 2013 - 01:23 PM.

Newer can be better, but 2012 removes macro features, has a horrible UI, requires an update to even target Windows XP (I would personally hate to find out I have to wait another half our for an update to install to do something I'd expected it to do already), doesn't run on anything older than Windows 7 and in my opinion already adopts too much of Microsoft's crappy "metro" direction. Quite a lot of people prefer 2010 (especially the masses that still run XP) and project files can be upgraded to new versions, but as far as I'm aware they can't be downgraded. So to use VS2012 would mean you're not able to share solutions with the large portion of the community (particularly the modding community) who prefer and use VS2010.
 

 

So not really much too drastic is different between them, but I've never been let down VS2010 yet and it is a very good suit to modding GTA, which were all written in really old versions of visual studio. The only addition to VS2012 I'd consider upgrading for is the improved, more automatic intellisense. But all that does is save me having to press Ctrl+Space a few times :p

 

I don't actually think it's that bad. And downloading updates should be done anyway, so the XP issue is a non-issue, unless you actually develop on XP. Also, macros feel very clumsy once you learn how regex replace works.

 

As for UI, once I changed the color theme and the uppercase menus, I actually like it (I dislike metro mode itself, but I like the simplistic design on some desktop applications).

 

2012 seems a bit snappier to me, although it's hard to actually measure this objectively.

 

 

On-topic: if you want to write .asi mods, then you should first be somewhat fluent in C or C++. As for the phrase "ASI scripting", I find it a bit funny since there is actually no such thing. They are just (pretty much) ordinary .dll files written in C/C++ that just use some tricks to modify the game code/memory. There's pretty much just three concepts to it: creating hooks to redirect game code to code inside your program, calling game functions from your program, modifying variables in game memory.


SkullBoy
  • SkullBoy

    GTA SkullBoy

  • Members
  • Joined: 18 Sep 2013

#16

Posted 24 November 2013 - 01:40 PM

yeah,i know the asi files are dll but renamed,but i want to learn how to edit game memory,and many others

Deji
  • Deji

    Coding like a Rockstar!

  • Feroci Racing
  • Joined: 24 Dec 2007
  • None

#17

Posted 24 November 2013 - 03:34 PM

yeah,i know the asi files are dll but renamed,but i want to learn how to edit game memory,and many others

 

No, you don't want to learn that, not really. Many people say "I want to know how to edit game memory".. it's as vague as saying "I want to learn how to mod games". You sort of need to know what you want to edit, how and why. If I had it my way, I would never have to mess around with low-level hacks on game memory to realise my ideas. The problem is that there's a huge amount of "game memory" and a huge amount of ways to edit it. No doubt, though, you'll want to achieve a specific purpose, and that is what makes it more doable, since you at least know what to look for in such a huge (and ever growing/shrinking/changing) area.

 

There are many tricks to figure out. The most hardcore and useful of which is rewriting (not just writing) assembler while the game is running. That requires knowledge of ASM, the x86 instruction set (knowing what the bytes ASM assembles to mean), various traits of .exe files (segments, access, protection, stack allocation) and many more things. There's unfortunately not many tutorials on these subjects. What's hard to learn is even harder to teach... but the way I learnt was just sticking to the more simple things at first. Just getting used to reading and writing memory in CLEO based on already available documentation, exploring memory using CheatEngine and calling simple functions, again, mostly based on the documentation available and not my own findings. I didn't start that until after I'd already started injecting ASM via CLEO and disassembling the .exe - a knowledge of C kinda helps, but I think it works better the other way around.


SkullBoy
  • SkullBoy

    GTA SkullBoy

  • Members
  • Joined: 18 Sep 2013

#18

Posted 24 November 2013 - 04:15 PM

i want to know the basics only

fastman92
  • fastman92

    фастман92 | ف

  • Members
  • Joined: 28 Jul 2009
  • None

#19

Posted 24 November 2013 - 08:13 PM Edited by fastman92, 24 November 2013 - 08:18 PM.

i want to know the basics only

You need to be able to analyze, conclude and learn in order to archieve your goal.
These basic abilities cannot be acquired to decent level, in other words if you're able to make a progress in GTA modding but you're just a beginner at this stage, then you need to already posses these abilities.
I don't want to sound rude, but don't make much hopes for learning, if you can, then you'll surely learn it.

ChopTheDog.
  • ChopTheDog.

    War. War never changes.

  • Members
  • Joined: 31 May 2010
  • None

#20

Posted 24 November 2013 - 09:14 PM

i want to know the basics only

 

Modding different games also helps.

 

I (with the help of other people) managed to write a wall hack for Call of Duty 2 about a year ago.

 

Only for educational purposes to teach myself though, I'd say I understood 25% of the code and although it was tedious and I needed help from others I still managed to learn something, even if it was only learning tiny bits of code.

 

The point is, I still learnt the steps and mindset needed to achieve this.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users