Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    1. Red Dead Redemption 2

      1. Gameplay
      2. Missions
      3. Help & Support
    2. Red Dead Online

      1. Gameplay
      2. Find Lobbies & Outlaws
      3. Help & Support
    1. Crews & Posses

      1. Recruitment
    2. Events

    1. GTA Online

      1. Arena War
      2. After Hours
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Grand Theft Auto Series

    3. GTA Next

    4. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    5. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA Mods
    6. GTA Chinatown Wars

    7. GTA Vice City Stories

    8. GTA Liberty City Stories

    9. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    10. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    11. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    12. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    13. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    3. Featured Mods

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption

    2. Rockstar Games

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Programming
      5. Movies & TV
      6. Music
      7. Sports
      8. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. News

    2. Forum Support

    3. Site Suggestions

sleeper777

Tutorial Links and Mission Coding Information

Recommended Posts

Y_Less
[email protected] - These are local variables, they are only used within 1 thread and range from 0 - 17 (apparently there is a 19, but that only works between waits, and I don't know about 18). These can be floating-point or integer, and have their own OpCodes which work for both types.

[email protected] and [email protected] are timers, so they increase by 1 for every milisecond that passes. Didn't think that was clear in that section.

Yeah, I should have mentioned that.

 

So does anyone yet know what [email protected] does?

 

Demarest once said something about [email protected] being another special variable, but that still left a gap (18) and I never understood what he was on about. Dem?

Share this post


Link to post
Share on other sites
Barton Waterduck

In the VC MB, local vars higher than 17 aren't supported and can't be used.

 

Share this post


Link to post
Share on other sites
sleeper777

There has been some talk about maximum sizes for the sections of the Main.scm file. According to the gurus the sizes are follows

 

Vice City

The First four segments can be no bigger than 225,512 bytes.

and Missions can be no bigger than 35,000 bytes.

 

If there is any reason to doubt this information or if there is any new information i don't know about please feel free to PM me about it.

 

ph34r.gif

Edited by sleeper777

Share this post


Link to post
Share on other sites
ayrton2388

I want to add some working clothes pickup to my game. How do i do this?

Share this post


Link to post
Share on other sites
ayrton2388

...and what are the floating-points? (just curious)

Share this post


Link to post
Share on other sites
Justin
@ Guy above me - You'd be better posting a new topic about it in this forum. This topic is supposed to be just for tutorials and links.

Share this post


Link to post
Share on other sites
Y_Less

I wrote a whole topic on floating point numbers, its in my topic in the tutorial section.

Share this post


Link to post
Share on other sites
SMG

How about updating this for San Andreas?

 

I have no modding experiance before, and I see all these main.scm mods coming out, but I don't know what tools I need to do it!

Share this post


Link to post
Share on other sites
DuPz0r

I can spawn stuff for SA now, i wanna learn something new, what would be the best thing to try now?

suggestions/links would be good.

Share this post


Link to post
Share on other sites
Demarest
Do some while loops. Try manually spawning a car, executing a fade and fade back, etc. All depends on what you're looking to accomplish. Maybe grab somebody else's mod, use it in game and see if you can on your own figure out how they did it. Then look at their code, notice the differences between what they used and what you expected to see and try to determine if you understand why it was implimented the way it was. If not, ask, etc. Many directions to go smile.gif

Share this post


Link to post
Share on other sites
DuPz0r

I wanna be able to make a racing minigame, and i want to be able to put the modshop markers anywhere i wish.

That would be ideal.

I just need to know where to start...

Share this post


Link to post
Share on other sites
Xanarki

It'd be great if there was a version of this for San Andreas.

Share this post


Link to post
Share on other sites
Y_Less
Alot of the coding is the same, you just need to convert it slightly.

Share this post


Link to post
Share on other sites
Xanarki

Since I can't convert worth a crap.

 

XD

Share this post


Link to post
Share on other sites
Demarest

First of all, coding is coding. Doesn't matter what language it's in, an if/then statement is still an if/then statement. Loops, variables, and gosubs are the same, etc...

 

As for "converting", I don't know why so many people shriek at the mention. It's really quite simple. Let's say you're going for a direct conversion of a VC mod. Say the line in MB 0.22 for VC is

01AF:   car  4016??  0? ()near_point  95.3! -1468.3!  9.5! radius  1.5!  1.5!  3!

...search the SA code for opcode 01AF. In MB 0.33 for SA, it's

01AF:   car @74  0 ()near_point @143 @150 @157 radius  .2  .2  1.0

Looks as if all that's changed is the lack of datatypes. Assuming you've read the readme for both apps, making that conversion should be a breeze. Tedious, but easy as.

Share this post


Link to post
Share on other sites
Xanarki

Hmm, intersting. But you see, I can't convert a turf coding from Vice City into San Andreas...cause Vice City didn't have turfs (to take over).

 

I looked at all the other data files, and there is nothing about taking over turfs in San Andreas (I made a topic bout this in the Misc Forum). And so, the last file I need to check is main.scm and all the blocks are gettin' in meh way.

Share this post


Link to post
Share on other sites
Demarest

I've seen topics made on the subject. Did you check them out?

 

Going back to the original idea you brought up, this tutorial is meant to be a starter's guideline. So to cover every single aspect of the games in question is not only outside the scope of this thread, but I would think it to be a task far grander than a single thread could handle. Maybe check those threads out, see who's in the know, and encourage them to post a thread in the tutorial section on how to manipulate those.

Share this post


Link to post
Share on other sites
Xanarki

I've looked at msot of those topics. Not many topics talk about the gang turfs and such.

Share this post


Link to post
Share on other sites
alexrw

i'm realy wanting to learn coding but i don't know where to start

i can't find a tutorial for SA

what am i supposed to do?

Share this post


Link to post
Share on other sites
random_download

Read a VC tutorial, most things still apply in SA, or you could wait until a coding tutorial for SA is released.

Share this post


Link to post
Share on other sites
YeTi

 

Read a VC tutorial, most things still apply in SA, or you could wait until a coding tutorial for SA is released.

Funnily enough i have wrote a SA coding tutorial today and am just waiting for it to be approved. Although it is similar to VC Coding i have also wrote tutorials about that too links in my sig smile.gif .

 

EDIT: It's been approved. Here.

Edited by YeTi

Share this post


Link to post
Share on other sites
Y_Less

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 smile.gif.

 

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.

Share this post


Link to post
Share on other sites
chaosislife

Actually I kind of see Barton's point(at least I hope this is what he was thinking),it's prolly better to have newbies use the newest programs as they're usually the most stable and easiest to start with.If you already use the earlier ones then fine,but it might be more helpful to us newer folk to use something that doesn't die on us for no apparent reason or seem to require you to already be a master coder to use it.---------ok so apparently i'm replying to something that was written about a year ago when the topic was started...oh well

Share this post


Link to post
Share on other sites
Y_Less

Err, well to which post are you reffering? BW removed alot of useful functionality in the later versions, meaning it is no longer possible to decompile and recompile the script and reproduce it exactly the same due to gaps now ignored in variables. He also removed DMA which doesn't affect most people but does some.

 

I have also never had a problem with 0.22 wheras I can crash 1.5 trying to make up for lost functionality.

Share this post


Link to post
Share on other sites
chaosislife

 

Posting old links to old files should be against the forum rules. It's not a secret that the newest mission builder is version 1.3 for Vice and 5.0 for GTA 3. The links are in my signature.

 

New users: I'm sorry you have to read crap like this. Some people think they own this forum, so they post what their egos dictate. Just read the readme included with the latest versions and forget you ever heard about this forum.

 

Oh, and since this topic is pinned, the 0.22 version of the Vice mission builder doesn't work at all with some of the newer opcodes because the number of parameters are wrong. Your game WILL CRASH if you use them.

 

If somebody were to build a wodden hammer, label it "PRE ALPHA TEST VERSION" and hit you in the head with it, would it hurt ? If it does, keep it to yourself please.

That was what i was talking about,and yeah i'm begining to wonder about the funtionality myself as i've just opened up the editor and tried to find where to put the new code thread so I can add Demarest's steed mod and maybe amorall to my SCM.....Dem's GTA3 tutorial say's to search for "genstuf" with the finder, but when i search for it I get nothing.Maybe it truly isn't in there but I'd think Dem would have edited his tutorial to state that if this was indeed the case.I'm going to have to try opening up the 0.22 version and see if I can find it with that one I guess

 

 

Yay! i figured out how to quote! I was worried just how that'd turn out for a while.

 

 

ummm..editing again to save a new post.... A question.. I've seen these symbols(££) used in the SCM in order to add the new thread,but where exactly on the keyboard would I find those keys? Cuz I'm looking and I ain't findin em'.do I just cut and paste them or what here?It looks to me like the sign brits use for money so I WAs thinkin to use my $ sign but thats also used in the coding so now I'm clueless(or should that be clue less?)

Edited by chaosislife

Share this post


Link to post
Share on other sites
Y_Less

It is a pound sign yes, and is used for jump locations. It should be alt-0163 if you don't have it as shift-3

 

Also, 0.22 doesn't work with GTA 3, it was never even intended to, you need a GTA 3 builder for that.

Share this post


Link to post
Share on other sites
chaosislife

ah ok thanks Y_less,tho on my key board it should come up as a tictactoe board ( # )so i wonder if it will work like that in the builder.(tho cut and paste works fine too)also I should have stated that i was working on Vice's SCM and not gta which is what Dem's tutorial was written for.But i found a tutorial for vice here that helped,got the code in,and got it working.Now my only issues going to be getting the game to work properly as i'm trying that out for the Vice City Deluxe mod

Edited by chaosislife

Share this post


Link to post
Share on other sites
Y_Less

This is sort of Mission Coding Information, so I've put it here so it doesn't get lost.

 

Stripped SA SCM, curtousy of Demarest:

 

 

DEFINE VERSION SA 0.330002: jump ££Second_SegmentDEFINE MEMORY 43800; Equals Mission Builder type global variable range $2 to $10949:Second_Segment0002: jump ££Third_SegmentDEFINE OBJECTS 3DEFINE OBJECT MOO; This is an unused object. You can put anything here.DEFINE OBJECT BRIBE; Object number -1DEFINE OBJECT HEALTH; Object number -2:Third_Segment0002: jump ££Fourth_SegmentDEFINE MISSIONS 0:Fourth_Segment0002: jump ££Fifth_SegmentDEFINE EXTERNAL_SCRIPTS 0:Fifth_Segment0002: jump ££Sixth_SegmentDEFINE UNKNOWN_FIFTH_SEGMENTDEFINE UNKNOWN1 0:Sixth_Segment0002: jump ££MAIN_1DEFINE UNKNOWN_SIXTH_SEGMENTDEFINE UNKNOWN3 574;-------------MAIN---------------:MAIN_103A4: name_thread 'MAIN'016A: fade 0 () 0 ms01F0: set_max_wanted_level_to 60111: set_wasted_busted_check_to 0 (disabled)00C0: set_current_time 10 00007: @10 = -300.00007: @11 = -150.00007: @12 = 0.004E4: unknown_refresh_game_renderer_at @10 @1103CB: set_camera @10 @11 @120053: $PLAYER_CHAR = create_player #NULL at @10 @11 @1201F5: $PLAYER_ACTOR = create_emulated_actor_from_player $PLAYER_CHAR0629: change_stat 181 (islands unlocked) to 4; integer see statdisp.dat01B6: set_weather 1070D: $PLAYER_CHAR04BB: select_interior 0;; select render area01B4: set_player $PLAYER_CHAR frozen_state 1 (unfrozen)01B7: release_weather016C: restart_if_wasted at @10 @11 @12 angle 0.0 unknown 0016D: restart_if_busted at @10 @11 @12 angle 0.0 unknown 0016A: fade 1 () 1000 ms0001: wait 200 ms03E6: remove_text_box:MAIN_30001: wait 2500 ms0002: jump ££MAIN_3 

 

Share this post


Link to post
Share on other sites
azzza

hi all, I am woundering if you can help me out with timers for gta3, vice city and sa. It's been i long time since i worked with timers and i've got afew questions about them, and the are ->

 

1) what are the timer? eg [email protected] [email protected]?

 

2) what is a minute for gta3, vc, sa?

 

3) how are timer's are used?

 

Some more questions for sa ->

 

1) how can i get the player to lift an object from a point to a car?

 

Note: i woundd look this information up myself, but my pc is getting reparied and i'm use public access pc's to access the internet. And thanks in advance, if you can help me out.

Share this post


Link to post
Share on other sites
Demarest
Long time no see. Correct me if I'm wrong, but you've ripped me in the past, tossed out the advice given to you repeatedly by many coders, etc. You're on your own.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

  • 1 User Currently Viewing
    0 Members, 0 Anonymous, 1 Guest

×

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.