GTAMP.com

Grand Theft Auto Media Press
It is currently Thu May 25, 2017 4:54 am

All times are UTC




Post new topic Reply to topic  [ 50 posts ]  Go to page Previous  1, 2, 3
Author Message
PostPosted: Tue Dec 15, 2015 4:52 pm 
Offline
Car Jacker

Joined: Wed Aug 08, 2012 9:25 pm
Posts: 49
Quote:
I would want so much to wrap those messy hacks into one function call, such as: frame = get_framecount(). I thought this could be done in JavaScript, so you write the new style code there and "compile" it into MIS file which contains all those ugly hacks and temporary variables etc. When it is made in JS, anyone could tamper with the code and develop further easily without needing to dl any tools, also insta cross-platform.

In my opinion the next/first step would be adding this feature in B-$hep and your's compiler. Add get_framecount as an internal declared function which will converted to the right bytecodes :) Not sure if adding the JS layer would be worth all the trouble.


Top
 Profile  
 
PostPosted: Thu Dec 17, 2015 1:56 am 
Offline
Car Jacker

Joined: Wed Dec 09, 2015 2:18 pm
Posts: 30
Has anyone tried to get the address of the memory at the time of the declaration of a new Object in the script, it is possible?

It would be very helpful to declare the Objects COUNTERS/DOORS/OBJECTS/CARS/CHARS in the game. You can then create an external engine and load your scripts without compilation.

I have previously suggested is here viewtopic.php?f=4&t=815#p9571
Quote:
16. There was more epic question: Is it possible to create an external engine (for multiplayer) that will use their scripts and work through the memory game (server -> client-side)?

We need to find addresses Declaration objects to create/delete dynamically through memory. Then you can forget about the complexities of the language syntax: add many missing features to work with files (load/save data to a file) and make full GTA2 base for mods.

I think this is the most important step to create something new in GTA2

_________________
[GTA2 Map] F-Industry-Live
[GTA2 FAQ] Help for scripters


Top
 Profile  
 
PostPosted: Thu Dec 17, 2015 3:40 am 
Offline
Boss
User avatar

Joined: Tue Mar 04, 2008 6:51 am
Posts: 1243
Location: GTAMP.com
We already have the memory addresses to change the coordinates of existing objects. New object creation is best done by hooking GTA2 and executing the existing functions, rather than just writing to memory. I don't know how to execute existing functions from external code but I know it's possible.


Top
 Profile  
 
PostPosted: Thu Dec 17, 2015 2:24 pm 
Offline
User avatar

Joined: Fri Jan 29, 2010 3:00 pm
Posts: 941
Location: F21B3EED
Sektor wrote:
I've only seen a few other people even attempt to use these memory addresses but making it easier might attract some more scripters.

Indeed! Its too tedious currently, so not many people dare to mess with the code.

_________________
My GTA2 related projects:


Top
 Profile  
 
PostPosted: Thu Dec 17, 2015 6:13 pm 
Offline
User avatar

Joined: Fri Apr 24, 2009 9:43 pm
Posts: 491
Location: Estonia
If i could have memory addresses and examples how each can be used then i could add single or two commands into mis2 syntax and write this all into .scr file.

So users dont have to mess with direct memory. But can just script it.

_________________
Always wear safety glasses while programming.


Top
 Profile  
 
PostPosted: Sat Jan 02, 2016 6:42 pm 
Offline
Lunatic

Joined: Sat Jul 19, 2008 2:14 pm
Posts: 456
Location: Poland / Szczecin
Quote:
We need to find addresses Declaration objects to create/delete dynamically through memory. Then you can forget about the complexities of the language syntax: add many missing features to work with files (load/save data to a file) and make full GTA2 base for mods.

I think this is the most important step to create something new in GTA2


Can't WAIT! I would definitely back to gta2 if there was no desync and you just could join to servers :)

I'll just stay here and stalk those changes

B-$heep - I agree some mapmakers like kamil/heri would definetly use that.

Cheers!


Top
 Profile  
 
PostPosted: Mon Aug 22, 2016 7:29 am 
Offline
Boss
User avatar

Joined: Tue Mar 04, 2008 6:51 am
Posts: 1243
Location: GTAMP.com
Run faster than Usain Bolt!

pedsprite + 57 = walk/run speed. Speed 1 to 3 walk, 4 and above run. Any faster than 12 and you will outrun the camera.

Syntax: [ Download ] [ Hide ]
Using GTA2 Script Syntax Highlighting
IF (NOT(IS_CHARACTER_IN_ANY_CAR(p1)))
  COUNTER speed = 12
  COUNTER speed_addr
  COUNTER pedsprite_ptr
  COUNTER pedsprite_addr
  SET pedsprite_ptr = (p1+360)
  CHANGE_GANG_CHAR_RESPECT (pedsprite_ptr, pedsprite_addr, 104) //read pedsprite address
  SET speed_addr = (pedsprite_addr+57)
  CHANGE_GANG_CHAR_RESPECT (speed_addr, speed, 114) //write player speed value
ENDIF
Parsed in 0.009 seconds, using GeSHi 1.0.8.10


Top
 Profile  
 
PostPosted: Sat Jan 14, 2017 11:59 am 
Offline
Boss
User avatar

Joined: Tue Mar 04, 2008 6:51 am
Posts: 1243
Location: GTAMP.com
p1car + 88 = car pointer + 64 = car X speed
p1car + 88 = car pointer + 68 = car Y speed

Slide a car very slowly to the right (change carspeed=100 to a higher value to increase slide speed or set it to a negative to go left)

GTA2 only reads this memory address if a ped is in the car or if there's a collision, so I put a ped in there to make the sprite update.
Syntax: [ Download ] [ Hide ]
Using GTA2 Script Syntax Highlighting
PLAYER_PED p1 = (137.0, 150.8, 255.0) 6 180
CAR_DATA p1car = (135.5, 154.0, 255.0) 1 180 T2000GT

COUNTER loop = 1
COUNTER car_addr
COUNTER car_ptr
COUNTER carspeedaddress
COUNTER carspeed

LEVELSTART

GIVE_DRIVER_AND_BRAKE (p1car)

WHILE_EXEC (loop = 1)

SET car_ptr=(p1car+88)
CHANGE_GANG_CHAR_RESPECT (car_ptr,car_addr,104)
SET carspeedaddress = (car_addr+64)
SET carspeed=100
CHANGE_GANG_CHAR_RESPECT (carspeedaddress, carspeed, 114)

ENDWHILE //main while

LEVELEND
 
Parsed in 0.009 seconds, using GeSHi 1.0.8.10


Top
 Profile  
 
PostPosted: Sat Feb 11, 2017 11:51 pm 
Offline
Boss
User avatar

Joined: Tue Mar 04, 2008 6:51 am
Posts: 1243
Location: GTAMP.com
Play a vocal without displaying a message by writing 4 bytes to 5E202C. 1 to 62.

1 INSANE STUNT BONUS!
2 GRAND THEFT AUTO!
3 WIPEOUT!
4 EXPEDITIOUS EXECUTION!
5 GENOCIDE!
6 COP KILLA!
7 CAR JACKA!
8 ELVIS HAS LEFT THE BUILDING!
9 ACCURACY BONUS!
10 BACK-TO-FRONT-BONUS!
11 MEDICAL EMERGENCY!
12 KILL FRENZY!
17 BUSTED!
18 FRENZY FAILED!
19 FRENZY PASSED!
20 FRYING TONIGHT!
22 [1124] JOB COMPLETE!
23 [1125] JOB FAILED!
24 AND REMEMBER, RESPECT IS EVERYTHING!
25 SHOCKING!
26 MMM... SOMETHIN'S COOKIN!
27 [5015] TIME'S UP, PAL!
28 TOASTED!
29 WASTED!
30 bombarmed.wav (weird one)
31 laugh6.wav
32 LAUGH (changes each time you play it)
33 [5501] RACE OVER!
34 [5502] SECOND LAP!
35 [5503] FINAL LAP!
36 [5504] RACE ON!
37 [5505] HEY! 30 PEOPLE DOWN! MULTIPLIER X2
38 [5506] OOH! 60 PEOPLE DOWN! MULTIPLIER X3
39 [5507] NICE! 90 PEOPLE DOWN! MULTIPLIER X4
40 [5508] GREAT! 120 PEOPLE DOWN! MULTIPLIER X5
41 [5509] OUTSTANDING! 150 PEOPLE DOWN! MULTIPLIER X6
42 [5510] TIME OUT!
43 [5000] YOUR TIME IS EXTENDED!
44 [5015] TIME'S UP, PAL! (duplicate)
45 [5031] Oh, sorry about that... Did that hurt?
46 [5032] Nice work!
47 [5050] CHOCTASTIC!
48 [5051] RASPBERRY RIPPLE!
49 [5052] YOU SHOT YOUR LOAD!
50 [5053] OOH... DID THAT HURT?
51 [5054] DEATH TO ICE-CREAM VANS!
52 [5055] CRISPY CRITTER!
53 [5056] YOU'RE TOAST, BUDDY!
54 [5057] EAT LEADEN DEATH, PUNK!
55 [5058] THAT'S GOTTA HURT!
56 [5059] SORRY ABOUT THAT!
57 [5060] XIN LOI, MY MAN!
58 [5061] DAMN SUNDAY DRIVERS!
59 [5062] SUCK IT AND SEE!
60 [5063] TASTE MY WRATH, ICE-CREAM BOY!
61 HALLELUJAH, ANOTHER SOUL SAVED!
62 DAMNATION, NO DONATION, NO SALVATION!

So now we can finally play the unused vocals "FRYING TONIGHT!", "MMM... SOMETHIN'S COOKIN!" and "BOMB ARMED!"

Syntax: [ Download ] [ Hide ]
Using GTA2 Script Syntax Highlighting
PLAYER_PED p1 = (117.0,133.5,2.0) 10 270

COUNTER vocaladdr = 6168620
COUNTER vocalvalue = 1

LEVELSTART

SET vocalvalue = 26 // something's cooking!
CHANGE_GANG_CHAR_RESPECT (vocaladdr,vocalvalue, 114)

LEVELEND
Parsed in 0.008 seconds, using GeSHi 1.0.8.10


Still don't know how to play gameover.wav.


Top
 Profile  
 
PostPosted: Mon Mar 06, 2017 3:33 pm 
Offline

Joined: Sat May 16, 2009 6:14 am
Posts: 884
Location: London, UK
Sweet, didn't know about those two audio announcements.

_________________
GTA5 Race, DM & Capture | GTA2 Levels & Coding | GTA2 YouTube Videos
Gran Turismo 6 custom track club(Sign in with PSN details, then follow link again.)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 50 posts ]  Go to page Previous  1, 2, 3

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group