GTAMP.com

Grand Theft Auto Multiplayer
It is currently Sat Aug 17, 2019 11:10 pm

All times are UTC




Post new topic Reply to topic  [ 9 posts ] 
Author Message
PostPosted: Sun Mar 24, 2019 8:25 am 
Offline
Ped

Joined: Sat Mar 23, 2019 5:36 pm
Posts: 4
Hello, I wanted to change the weapons of some gangs in Residential district. But I didn't have success yet.

I used Epic GTA2 Map editor to decompile ste.scr and it worked well. It also asked if I want to decompile the mission scripts and I did that too.

Then I made the changes to the decompiled ste.mis and saved it. I only changed the weapons of the gangs. Script Pad highlighted the weapon names so they should be correct?

Next I tried to compile the script but I got stuck. Script Pad didn't seem to do anything when I clicked the compile button. Or perhaps I did something wrong.

MisPad (Vike's version) complained that some external scripts couldn't be found so I took the decompiled mission scripts and put them into the folder where it was searching from. Now the script was compiled but I got some error messages about forward declaration being illegal now??? I got an SCR file but when I put it into GTA2 folder, the game crashed when I tried to start the map.

Miss2.exe (DMA Design compiler) didn't give me a working SCR either.

So what am I doing wrong and what is the proper method to compile these scripts? [frenzy]


Top
 Profile  
 
PostPosted: Sun Mar 24, 2019 1:40 pm 
Offline
User avatar

Joined: Fri Jan 29, 2010 3:00 pm
Posts: 957
Location: F21B3EED
Epic GTA2 script decompiler does not decompile everything from SCR files, that might be the problem here.

_________________
My GTA2 related projects:


Top
 Profile  
 
PostPosted: Sun Mar 24, 2019 3:37 pm 
Offline
Serial Killer

Joined: Wed Dec 09, 2015 2:18 pm
Posts: 219
irrelevant.


Last edited by Logofero on Sun Mar 31, 2019 5:46 pm, edited 1 time in total.

Top
 Profile  
 
PostPosted: Mon Mar 25, 2019 5:58 pm 
Offline
Ped

Joined: Sat Mar 23, 2019 5:36 pm
Posts: 4
Hm, so does this mean that I can't change the gang weapons that way? Someone on GTAforums.com told to do it like this, a long time ago.

Why is it necessary to recompile the mission scripts when one only wants to edit the main level script?

When I tried to compile the script, the resulting ste.scr file had (almost?) equal size compared to the original. But it didn't work. There was something wrong.

What is the proper way to change the gang weapons then? (Or to do other simple changes to the level script?) The weapon IDs should be simple so should I just use a hex editor? Is there documentation available about the compiled script structure?


Top
 Profile  
 
PostPosted: Mon Mar 25, 2019 8:08 pm 
Offline
Serial Killer

Joined: Wed Dec 09, 2015 2:18 pm
Posts: 219
irrelevant.


Last edited by Logofero on Sun Mar 31, 2019 5:43 pm, edited 1 time in total.

Top
 Profile  
 
PostPosted: Wed Mar 27, 2019 5:54 pm 
Offline
User avatar

Joined: Fri Jan 29, 2010 3:00 pm
Posts: 957
Location: F21B3EED
If you edit main script file: you need to recompile all mission scripts (if the pointers change).
If you edit just a mission script: you need to recompile just that mission script.
All mission scripts refers to the main script, so if main script is modified, the references can get wrong in mission scripts.

Currently the fastest way would be to edit the SCR files directly with hex editors etc. Since my Epic GTA2 script decompiler does not decompile everything; IF/WHILE structures are missing etc.

I would like to have this simplified though... raw SCR data editing i mean, because hex editors are pain in the ass. I did start to make such editor once but didnt finish it. Maybe some day...

If my decompiler did decompile everything, then it would be possible to recompile it and have exactly same output as original SCR files, because original SCR files does not contain any hidden stuff that is not possible to decompile/recompile. (i went through them all, one command at time).

BBBean wrote:
Hm, so does this mean that I can't change the gang weapons that way? Someone on GTAforums.com told to do it like this, a long time ago.

You can check the decompiler source code to see how gang weapons are defined, and use that information to modify the SCR file with hex-editor. Changing a byte to another does not require recompilation of mission scripts.

SCR Decompiler:
viewtopic.php?f=4&t=447

_________________
My GTA2 related projects:


Top
 Profile  
 
PostPosted: Sat Mar 30, 2019 9:54 am 
Offline
Ped

Joined: Sat Mar 23, 2019 5:36 pm
Posts: 4
Ok, thanks. So looks like hex editor is the way to go for now.

But this raises more questions. I wonder how people have done this before. Were they able to decompile and compile all Residential district scripts? Did they use a hex editor? Or didn't they actually do it themselves?

Has anyone ever released modded versions of the single player maps? Industrial district scripts are provided with the official compiler so they should work?

It seems that there aren't any other decompilers available. Or are there?

I think it's also strange that the compiled ste.scr had almost(?) equal size compared to the original. It suggests that all parts of it were compiled. Or is there some placeholder space in the file?

It seems that Script Pad and MisPad come with the official compiler and its files. Is that all they use to compile the scripts?


Top
 Profile  
 
PostPosted: Sun Mar 31, 2019 2:42 pm 
Offline
Ped

Joined: Sat Mar 23, 2019 5:36 pm
Posts: 4
Anyway, I got something done. [frenzy]

https://www.youtube.com/watch?v=E3uwDR23DDI

I got some other ideas as well but they would require inserting new commands into the script and I guess it's hard with a hex editor...

I also tried Electro Baton. It works but it's not dropped on death. They only drop Pistols. :|


Top
 Profile  
 
PostPosted: Mon Apr 08, 2019 1:13 pm 
Offline
User avatar

Joined: Fri Jan 29, 2010 3:00 pm
Posts: 957
Location: F21B3EED
BBBean wrote:
It seems that there aren't any other decompilers available. Or are there?

I dont think so.

BBBean wrote:
I think it's also strange that the compiled ste.scr had almost(?) equal size compared to the original. It suggests that all parts of it were compiled. Or is there some placeholder space in the file?

Those missing commands doesnt take many bytes each, and there arent that many such commands in the scripts. Also there is some unnecessary padding in the output SCR files when you use official compiler.

BBBean wrote:
It seems that Script Pad and MisPad come with the official compiler and its files. Is that all they use to compile the scripts?

Thats right.

_________________
My GTA2 related projects:


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


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:  
Powered by phpBB® Forum Software © phpBB Group