Quantcast

Jump to content

» «
Photo

Can only edit the MAIN.SCM once?

9 replies to this topic
TheHeggy
  • TheHeggy

    Conan Rules

  • Members
  • Joined: 17 Jun 2004

#1

Posted 12 June 2005 - 05:14 PM Edited by TheHeggy, 12 June 2005 - 06:10 PM.

I've been playing around with the main.scm file adding cars, weapon pickups and stuff and it seems that I can only re-compile my main.scm file ONCE.

For example, I added this car spawn location right above the first parked_car generator in the file:

CODE
014B: $cj_alley = init_parked_car_generator  424 -1 -1  1 alarm  0 door_lock  0  0  10000 at  2481.145 -1699.303  13.52679 angle  90.0
014C: set_parked_car_generator $cj_alley cars_to_generate_to  101


It compiles and runs perfectly. Then if I use the San Andreas Mission Builder to open it again, my code has changed to:

CODE
014B: $10949 = init_parked_car_generator  424 -1 -1  1 alarm  0 door_lock  0  0  10000 at  2481.145 -1699.303  13.52679 angle  90.0
014C: set_parked_car_generator $10949 cars_to_generate_to  101


Even without changing anything after re-opening it, I get the following error when trying to re-compile it:

QUOTE
Can't Compile
Label not found: LABEL0195A0


The same thing happens if I try to modify an already changed scm, like the 100% complete version floating around out there. Is this something I'm doing incorrectly, or is this just a problem with the program?

Edit:

Figured it out. Turns out you have to copy over the SCRIPT.IMG file the program generates... Didn't see that in there smile.gif Works fine now.

BCspeed34
  • BCspeed34

    CEO

  • $outh $ide Hoodz
  • Joined: 24 Jun 2004

#2

Posted 15 June 2005 - 09:56 PM

Wait, what do you mean by copy over? I'm having the same problem here.

Craig Kostelecky
  • Craig Kostelecky

    GTA:LC Team Leader

  • The Connection
  • Joined: 28 Jan 2004

#3

Posted 16 June 2005 - 04:12 AM

The way to solve that problem is to use the main.txt file (and not to re-decompile the main.scm). Then you can keep your variable and label names.

Opius
  • Opius

    General

  • Members
  • Joined: 27 Jun 2002

#4

Posted 16 June 2005 - 07:44 AM

Compiling removes all variable names, label names, comments, etc.

Anything that isn't directly used by the game is ignored when compiled. Why are you decompiling the file each time? Surely you'd have to notice that it's saved as a text file, right?

RIGHT?

BCspeed34
  • BCspeed34

    CEO

  • $outh $ide Hoodz
  • Joined: 24 Jun 2004

#5

Posted 16 June 2005 - 10:33 PM

So when you edit it, you can just save the main.txt instaed and your new code(s) still work ingame?

Craig Kostelecky
  • Craig Kostelecky

    GTA:LC Team Leader

  • The Connection
  • Joined: 28 Jan 2004

#6

Posted 16 June 2005 - 11:01 PM

There's three files that you really need to worry about.

main.scm - this is the file that's read by the game and contains the mission script. It is generated every time you compile a main.txt file. Decompiling this file genereates a new main.txt file.

script.img - this contains all of the scripts for the mini games that are used in San Andreas. It is also generated every time you compile a main.txt file (unless SA is running when you're compliling)

main.txt - this is the decompiled main.scm (plus any changes you've made) It's also known as the source code. It contains all of the script from the main.scm and the script.img files. If you always open the main.txt you will keep you're variable and label names as well as comments. It's also much quicker to open this file than to re-decompile the scm. Compiling this file generates a new main.scm and script.img.

BCspeed34
  • BCspeed34

    CEO

  • $outh $ide Hoodz
  • Joined: 24 Jun 2004

#7

Posted 18 June 2005 - 07:54 PM

Ok, so lets say I want to edit that 100% game save one.

What would I have to do to make that one work if I edited it?

Whenever I try, it still says LABEL NOT FOUND. What do I do?

KillahCJ
  • KillahCJ

    Player Hater

  • Members
  • Joined: 18 Jun 2005

#8

Posted 18 June 2005 - 09:42 PM Edited by KillahCJ, 18 June 2005 - 09:45 PM.

This is a good question. I'd like to be able to place my own cars, weapons, items, etc, etc. into the SANGA mod by Opius or the Opened Up mod by Craig. From what I read, I understand that custom labels and a few other things are removed on compiling, so decompiling will give you an error of label not found when trying to recomplie it.

I also noticed that the source code is included in the SANGA mod, so I attempted to put it into the original main.scm file. First I received errors for weapon pickups and item pickups that used the equates (#M4) instead of the item numbers. I'm not sure why. When I looked at other weapon and item pickups, they mostly used the actual number. I decided that for what I was doing, I didn't need the items or weapons, so I tried to just delete all lines that had that problem. Tried to compile again, this time it tells me I need to adjust my define memory statement to above 43805. After doing this, the script compiled, but would crash everytime.

I want to eventually create missions that will take place after beating Tenpenny, but in order to test anything outside of Los Santos would require me to:

1) play and beat it through opening the two levels every time I changed the code.

2) use a mod such as this to build and test the true meat of the code, then move it over to the original once complete, adding the proper adjustments to activate it once you complete whatever mission.

If someone could help me get this going, I'd really appreciate it. It'd be really nice for testing purposes. If I decide to release my mods (for now they are for personal enjoyment), I will give whoever proper recognition for the use of their base. If your wondering, right now I'm trying to develop some big trick\air missions, hopefully much like the rooftop mission from Vice City. Thanks in advance for any help.

random_download
  • random_download

    :o

  • Members
  • Joined: 07 Mar 2004

#9

Posted 18 June 2005 - 09:49 PM

Create a mission sphere on the first city, eg. where you first spawn, then use the scm to put_player near to where you want the mission to start. Then create your mission sphere there.

TheHeggy
  • TheHeggy

    Conan Rules

  • Members
  • Joined: 17 Jun 2004

#10

Posted 18 June 2005 - 09:51 PM

QUOTE (Opius @ Jun 16 2005, 03:44)
Compiling removes all variable names, label names, comments, etc.

Anything that isn't directly used by the game is ignored when compiled. Why are you decompiling the file each time? Surely you'd have to notice that it's saved as a text file, right?

RIGHT?

LOL yes I know, I was trying to figure out how it would work with one of those pre-compiled 100% SCMs




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users