Jump to content
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. Los Santos Drug Wars
      2. Updates
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Red Dead Online

      1. Blood Money
      2. Frontier Pursuits
      3. Find Lobbies & Outlaws
      4. Help & Support
    3. Crews

    1. Grand Theft Auto Series

      1. Bugs*
      2. St. Andrews Cathedral
    2. GTA VI

    3. GTA V

      1. Guides & Strategies
      2. Help & Support
    4. GTA IV

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
    5. GTA San Andreas

      1. Classic GTA SA
      2. Guides & Strategies
      3. Help & Support
    6. GTA Vice City

      1. Classic GTA VC
      2. Guides & Strategies
      3. Help & Support
    7. GTA III

      1. Classic GTA III
      2. Guides & Strategies
      3. Help & Support
    8. Portable Games

      1. GTA Chinatown Wars
      2. GTA Vice City Stories
      3. GTA Liberty City Stories
    9. Top-Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. Red Dead Redemption 2

      1. PC
      2. Help & Support
    2. Red Dead Redemption

    1. GTA Mods

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Red Dead Mods

      1. Documentation
    3. Mod Showroom

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

      1. Design Your Own Mission
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Rockstar Games

    2. Rockstar Collectors

    1. Off-Topic

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

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

    2. Support

    3. Suggestions

[SA:DE] Modify External Scripts (by altering mainV1.scm)


Akronym
 Share

Recommended Posts

Akronym

  

Hello everyone,

 

for my mod I have altered a few mission scripts in mainV1.scm with Sanny Builder v3.8.0 and already successfully tested the changes ingame. Furthermore I want to change external scripts as well and have trouble to do so.

I have changed the following line within the external script ":DEALER":

 

03FE: set_actor [email protected] money 2000

So, 2000 to 200.

 

In the original game this change works as intended and reduces the dropped money looted from a dealer accordingly, if changed in main.scm.

 

In SA:DE it won't work at all. Even if I delete/comment out the mentioned code line, it doesn't affect the game at all, nor crashing it. Dealers still drop ~$2000.

 

A few things i am aware of:

 

  • I know there is CLEO Redux, but so far I have no intention to add additional scripts, but rather only change (mostly int values) in the mainv1.scm.
  • I have already altered mainv1.scm and made changes that did affect the game, so there is no problem e.g. with packing or using wrong folder paths.
  • External scripts are saved within the script.img (now also named scriptv1.img), which is why I included that in my .pak file - still no change.

 

So I dug deeper and checked the other folders of the unpacked game. There is a "cooked" scriptv1.img within the following folder: ..\GTA San Andreas - Definitive Edition\Gameface\Content\SanAndreas\GameData\IMG

It is in an unreal data format ".uasset/.uexp". My assumption is that the game uses these files over the one in  ..\GTA San Andreas - Definitive Edition\Gameface\Content\OriginalData\GTASA\data\script

 

So I thought I might repack the one created from the compilation process with sanny builder and place it accordingly in the folder to overwrite it. Therefore I installed Unreal Engine v4.26.2.

 

Solutions I tried so far and did no work:

  • Including scriptv1.img in the .pak and place it in the folder: Gameface\Content\OriginalData\GTASA\data\script
  • Renaming: To script.img/scriptv1.img
  • Open/import the mentioned .uasset(.uexp in a new Unreal Engine Project, then pack again. --> The files are not displayed when placed in the folder. Other files (like .png) work.
  • Open/import the img file and repack it to an .uasset. --> This is also because Unreal Engine doesn't except the file format.
  • Unpacking/Export the .uasset with UModel.  UModel cannot export the .img file from the .uasset, from what I have read it is only for textures/audio.

 

So my question is: Has anyone of you already successfully changed external scripts in any way or might have an idea how to do so and point me in the right direction?

If you did use Cleo Redux, I might consider using it and rewrite my mod in JS or sth. But this I would rather only do if there is no other solution, because all other changes so far do work...

 

Happy to hear your thoughts/tips and inputs on this matter!

 

Thanks in advance!

Link to comment
Share on other sites

DavidReyes2250

At the moment it is not possible. It must be said that the game does ignore the scriptv1.img file, but not the cooked scriptv1.img file. You could even remove the external scripts from mainv1.scm and they will still be working as if you hadn't removed them.
Quite possibly they used a modified version of UE4 to make it recognize IMG files along with other file extensions and unique file properties (such as ped variations, vehicle tire recognition, vehicle color density, etc.)

 

Edit: One more reason why I hate these new games. They made the modding more difficult :/

Edited by DavidReyes2250
Link to comment
Share on other sites

  • 3 weeks later...
Akronym
Posted (edited)

Thanks for your reply. Here my late response, in case somebody has the same problem:

 

I managed to modify the mentioned scriptv1.uexp by using HxD (HxD is a hex editor). I searched for "2000" (Tab: Integer Number) and changed the hex 7DO (in the editor it's "D0 07", byte order is in little endian) to a value of my choice. Placing the scriptv1.uexp in File structure \Gameface\Content\SanAndreas\GameData\IMG, paking the folder and put into ~mods and it worked.

 

In case you know nothing about Hex Editors, this video might help:

 

CS420 - 4 - How to Hex Edit Games - Game Hacking Course

 

Cheers.

 

Edited by Akronym
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

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

×
×
  • Create New...

Important Information

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