Quantcast

Jump to content

» «
Photo

Rebirth v1 San Andreas

25 replies to this topic
Demarest
  • Demarest

    what could be

  • BUSTED!
  • Joined: 12 Jul 2003

#1

Posted 13 September 2005 - 01:50 AM

Rebirth v1 is a Code Tool more than a mod. For those of you that don't know, my Code Tools are code mods that are meant to work with your existing save game. They do not adhere to the old addage that you must start a new game to use the code mod. Rebirth actually REPLACES the original code. Any save made with either the original code or Rebirth can be used with either.

So what does Rebirth do? A few things. First of all, it makes it so that when you are killed or arrested, you will not lose your weapons or any cash kind of like when you get Katie up to 100%. This feature won't kick in until you start most missions. Secondly, it acts like Trip Skip, but instead of skipping the trip from the start of the mission to wherever the mission takes place, it takes you straight to where the mission starts. Ever play Wrong Side of the Tracks only to fail and be in the middle of nowhere? Rebirth will take you right back to the mission beginning even if you failed the mission by dieing or getting arrested. And you don't have to start a new game to use it.

How does it work? Any time you fail most missions or otherwise quite before they're completed (like Vigilante), a 30 second timer will appear on screen (not always immediately for reasons beyond my control). While that timer is on screen, you may press Sprint and Aim together and you will start that mission over. It is very important that you do not save your game while this timer is on screen. Let's say the mission you were playing was Vigilante. Using Rebirth will put you in the same vehicle, at the same spot, angle, and speed as where you started it last time. A TRUE second chance. Note: Any changes in your weapons/ammo since then will remain; Rebirth does nothing to your ammo besides allow you to keep it after getting arrested or killed.

How do I install it? VERY easy. Download it by clicking here. Go to your San Andreas's /data/script/ folder and backup your main.scm any way you like, possibly by renaming it to mainORIGINAL.scm. Now put Rebirth's main.scm into your /data/script/ folder. You are done! Just load your game and all of Rebirth's benefits are yours for using. You can even do this while San Andreas is running.

Are there any exceptions? Yes there are. One is quite good while the others aren't. The good one is the Chiliad Challenge. Even if you pass one, you can use Rebirth to start the next one, even if it's outside the racing times. No more having to fight your way back up the mountain! cool.gif The following is a list of missions NOT supported by Rebirth v1: Cesar Vialpando, Wu Zi Mu, Farewell My Love..., all Catalina missions, the Train missions, the Gym fights, and all races from the 4 racing hubs. Yes I plan on releasing a v2 with most of these missions supported. It will take me time and studying however, so for me to release this as is now will allow people to benefit from it until I'm capable of the rest. Worry not as the original game and all versions of Rebirth will be interchangeable. If however you should notice any bugs, feel free to report them here, but know that much has been tested smile.gif Note: The Train missions and Gym fights are likely to never be supported.

user posted image

The following is for coders and those that understand coding only.

If you have used Darkpact to inject a code mod into your SCM, you will need to download Rebirth v1's source code and add whatever mods you've injected to JUST BEFORE the Rebirth thread (first occurance of the word rebirth) in order for it to be compatible with your saves. Rebirth works by calling a thread in MAIN. At the end of MAIN in fact to maintain savegame compatibility. This thread must be terminated before saving or else the save it creates will NOT be compatible with original code until the game is again saved without it running. It is easy to tell when it is running because of the onscreen timer. The create_thread (found in most mission's failed routines) passes the thread various information that the thread will use. They are as follows:

parameter 1 - The X value of the mission start sphere (or where to put you)
parameter 2 - The Y value of the mission start sphere (or where to put you)
parameter 3 - The Z value of the mission start sphere (or where to put you)
parameter 4 - Is not used for most calls. If a mission starts inside an interior however, this flag will be set to 1. If a mission starts inside a vehicle such as the Chiliad Challenge, Pimping, etc, this flag will be set to 2.

When parameter 4 is set to 1, parameter 5 indicates which interior to use. This is used for the casino, heist, mafia, and driving school missions.

When parameter 4 is set to 2, the following parameters are also passed (they are assigned at the BEGINNING of the actual thread):
parameter 5 - ID of the vehicle you're driving
parameter 6 - Z angle of the vehicle you're driving
parameter 7 - Speed of the vehicle you're driving
parameter 8 - Mission number Rebirth autolaunches once placing you inside an identical vehicle. Missions that start inside a vehicle are the ONLY missions that Rebirth launches automatically. For all others, it merely places you where you need to be and allows the sniffer to detect you and start the mission as it normally would.

What was changed: Each mission that counts towards 100% was given spaceeinstein's 08DD and 08DE to allow you to keep your weapons and cash after being killed or arrested. The only reason they all have it despite only needing to be set once is becuase there is no telling where in the game any user will be. It's 8 bytes more per mission, so negligible when compared to the 69,000 byte limit. Also, a create_thread ££REBIRTH was added to each mission where applicable including all parameters that mission needs to pass. Mission that you start in a vehicle also had
CODE
03C0: @6 = actor $PLAYER_ACTOR car
00AA: store_car @6 position_to @0 @1 @2
0441: @3 = car @6 model
0174: @4 = car @6 z_angle
02E3: @5 = car @6 speed
added at the very beginning so that the create_thread would know what to pass Rebirth. Last but not least, missions that you can start even after you've finished them were given checks to ONLY launch Rebirth if the mission was actually still needed. This can also be found at the beginning of the thread just before the end_thread command. Labels added to this area were given B, C, D, etc notations. This area contains the create_thread instead of the mission fail area. These ifs are compound for stacked missions such as BMX / NRG-500 and Courier. The final change made was the Rebirth MAIN thread itself, which is as follows
CODE
:REBIRTH
03A4: name_thread 'REBIRTH'
00D6: if  0
0038:   $119 ==  0 ;; integer values
004D: jump_if_false ££REBIRTH0
0215: destroy_pickup $669
0215: destroy_pickup $670
0004: $119 =  1

:REBIRTH0
00D6: if  0
0038:   $126 ==  0 ;; integer values
004D: jump_if_false ££REBIRTH1
0215: destroy_pickup $671
0004: $126 =  1

:REBIRTH1
0004: $5353 =  30000
014E: set_timer_to $5353 type  1

:REBIRTH2
0001: wait  100 ms
00D6: if  1
0018:   $5353 >  0
0038:   $ON_MISSION ==  0 ;; integer values
004D: jump_if_false ££REBIRTHEND
00D6: if  0
0256:   player $PLAYER_CHAR defined
004D: jump_if_false ££REBIRTH2
00D6: if  2
80DF:   NOT   actor $PLAYER_ACTOR driving
00E1:   key_pressed  0  6
00E1:   key_pressed  0  16
004D: jump_if_false ££REBIRTH2
01B4: set_player $PLAYER_CHAR frozen_state  0 (frozen)
00D6: if  0
0039:   @3 ==  1 ;; integer values
004D: jump_if_false ££REBIRTH3
077E: @5 = active_interior
00D6: if  0
803B:   NOT   @5 == @4 ;; integer values
004D: jump_if_false ££REBIRTH6
04BB: select_interior  @4
091B: (unknown)
0860: link_actor $PLAYER_ACTOR to_interior  @4
0002: jump ££REBIRTH6

:REBIRTH3
00D6: if  0
0039:   @3 ==  2 ;; integer values
004D: jump_if_false ££REBIRTH6
0247: request_model @4
038B: load_requested_models

:REBIRTH4
0001: wait  0 ms
00D6: if  0
0248:   model @4 available
004D: jump_if_false ££REBIRTH4
00A5: @8 = create_car @4 at @0 @1 @2
0175: set_car @8 z_angle_to @5
05CB: action_sequence actor $PLAYER_ACTOR enter_car_as_driver @8  0 ms
0249: release_model @4

:REBIRTH5
0001: wait  0 ms
00D6: if  0
00DB:   actor $PLAYER_ACTOR in_car @8
004D: jump_if_false ££REBIRTH5
04BA: set_car @8 speed_instantly @6
01C3: remove_references_to_car @8
0004: $ON_MISSION =  1
0417: start_mission @7
01B4: set_player $PLAYER_CHAR frozen_state  1 (unfrozen)
02EB: restore_camera_with_jumpcut
0373: set_camera_directly_behind_player
0002: jump ££REBIRTHEND

:REBIRTH6
00A1: put_actor $PLAYER_ACTOR at @0 @1 @2

:REBIRTHEND
014F: stop_timer $5353
004E: end_thread

JMAN069
  • JMAN069

    Player Hater

  • Members
  • Joined: 06 Aug 2005

#2

Posted 13 September 2005 - 03:04 AM

Top notch, bout time something like this comes around. Nice work on not having to replace previously saved games. That gets old real quick.

DigitallyInsane^
  • DigitallyInsane^

    Simplicity Advanced.

  • BUSTED!
  • Joined: 06 Mar 2005

#3

Posted 13 September 2005 - 03:19 AM

Wonderful, you've done it again Dem, this will open a whole new world of modding to me, as I have never bothered with starting new games just to try a mission mod.

Again, big ups, fantastic work.

cookie.gif cookie.gif cookie.gif cookie.gif cookie.gif

Demarest
  • Demarest

    what could be

  • BUSTED!
  • Joined: 12 Jul 2003

#4

Posted 13 September 2005 - 03:52 AM

QUOTE (DigitallyInsane^ @ Sep 12 2005, 23:19)
this will open a whole new world of modding to me, as I have never bothered with starting new games just to try a mission mod.

Stick by me then. Ever since CyQ taught me byte counting, savegame compatibility has been my primary focus for all 3 games. If this is your first exposure, then be sure to look into the rest of my Code Tools as well as Darkpact. I'm even going to soon be working on advanced authoring for Darkpact that will allow even more mods to be injectable into existing savegames smile.gif

Y_Less
  • Y_Less

    629

  • Members
  • Joined: 14 Mar 2004

#5

Posted 13 September 2005 - 09:50 AM

Hmm, I'm going to have to update my variable writing code to be compatible with darkpact, then you can utilise it as well to write data to anywhere without a new game, actually, I can start on that for VC now if you're interested.

dertyjerzian
  • dertyjerzian

    I have a custom member title. I call it "Solid Snake"

  • BUSTED!
  • Joined: 08 Jun 2005

#6

Posted 13 September 2005 - 10:54 AM

QUOTE
Using Rebirth will put you in the same vehicle, at the same spot, angle, and speed as where you started it last time. A TRUE second chance.

Doesn't anyone else see the utter beauty in that?

"man, If I could do it again, the same way" Deeper than SA...

Awesome Demarest. I'm waiting for the drag and drop code writing suite next biggrin.gif

DigitallyInsane^
  • DigitallyInsane^

    Simplicity Advanced.

  • BUSTED!
  • Joined: 06 Mar 2005

#7

Posted 13 September 2005 - 12:57 PM

QUOTE (Demarest @ Sep 13 2005, 03:52)
QUOTE (DigitallyInsane^ @ Sep 12 2005, 23:19)
this will open a whole new world of modding to me, as I have never bothered with starting new games just to try a mission mod.

Stick by me then. Ever since CyQ taught me byte counting, savegame compatibility has been my primary focus for all 3 games. If this is your first exposure, then be sure to look into the rest of my Code Tools as well as Darkpact. I'm even going to soon be working on advanced authoring for Darkpact that will allow even more mods to be injectable into existing savegames smile.gif

I'll do that, thanks again!

More cookies I found in my back pocket for you

cookie.gif cookie.gif cookie.gif

Demarest
  • Demarest

    what could be

  • BUSTED!
  • Joined: 12 Jul 2003

#8

Posted 13 September 2005 - 03:00 PM

@Y_Less: Yes, savegame compatibility is a beautiful thing. I hope together we can working on tearing down the remaining limitations instead of having to work around them.

@derty: I'm no tooler, but I've thought of getting into it. Have yet to meet a language I didn't pick up quickly. I'd rather make a few tweaks to MB to remove some of its limitations, but that would require having the duck's source code and I don't even known if anybody knows how to get a hold of him. Knowing him, he probably trashed all his sources anyways.

@insane: Eww, melty chocolate tounge.gif

pozer
  • pozer

    Square Civilian

  • Members
  • Joined: 21 Jan 2004

#9

Posted 14 September 2005 - 08:38 AM

Trust you man on any of your mod, i just downloaded this one now and i haven't try it yet, but man, i trust you. Thanks for open a new way of main.scm coding without starting a new game, this will be sample for all main.scm file modders to follow as i don't know how to code one myself, i wish anyway. Thanks.

Psalm
  • Psalm

    Player Hater

  • BUSTED!
  • Joined: 14 Sep 2005

#10

Posted 14 September 2005 - 09:41 AM

Nice work demrast, this will prove extremely helpful.

Demarest
  • Demarest

    what could be

  • BUSTED!
  • Joined: 12 Jul 2003

#11

Posted 14 September 2005 - 12:50 PM

I think maybe my marketing skills have gone downhill lol.gif I devised Darkpact and Code Tools that use that technique and people are still mostly impressed with not having to start a new game. Still, it is worth celebrating, so you guys be sure to spread the word. For those wondering, SA Code Tools ARE on my to do list and now that this is out, I may begin Time Vault for SA.

ThAtSgOtTaHuRt
  • ThAtSgOtTaHuRt

    T_G_H

  • Members
  • Joined: 31 Jul 2003

#12

Posted 16 September 2005 - 02:36 AM

WOW! Great work! I would really like for this to develop and open up a whole now world of modding. Keep up the good work, I cant wait to see what you (or others) will come up with next.

rah.gif rahkstar2.gif rah.gif

HippieCommunist
  • HippieCommunist

    PWR2DPPL

  • Members
  • Joined: 25 Jan 2003

#13

Posted 16 September 2005 - 07:40 AM

oh dear Demarest! such a nice work...

would it be rude to ask wether you gonna make another mindblowing time twister? blush.gif

GREAT JOB!

Simon.
  • Simon.

    Gangsta

  • The Connection
  • Joined: 01 Feb 2005

#14

Posted 16 September 2005 - 11:04 AM

Ah, great this will stop some annoyances,

I hate failing long missions without tripskips confused.gif

Good Work as always Demarest.

Demarest
  • Demarest

    what could be

  • BUSTED!
  • Joined: 12 Jul 2003

#15

Posted 17 September 2005 - 12:48 AM

QUOTE (HippieCommunist @ Sep 16 2005, 03:40)
would it be rude to ask wether you gonna make another mindblowing time twister? blush.gif

Not rude, just off-topic tounge.gif GTA3's TT will probably see a v2 at some point with TTVC's improvements included in it. TTVC doesn't really need another version, though I do regret removing a lot of the cutscenes. As for SA, my understanding is that Patrick has made a mod that will allow you to play any SA mission anytime, which is the core of TT's purpose (thought not all of it). Furthermore, my grasp on SA is nowhere near as advanced as it would need to be to write something as authoritative as that on the subject, as evidenced by the fact that this here release is incomplete confused.gif

HippieCommunist
  • HippieCommunist

    PWR2DPPL

  • Members
  • Joined: 25 Jan 2003

#16

Posted 17 September 2005 - 06:55 AM

with all the respect to all the modders here, i have never seen a better mod then the TT, its the ultimate way to play after youve finished the game a dosen times dozingoff.gif

so plz dont give up on the idea of TTSA coz ill wait a year for that one happy.gif

keep up the good work...

pozer
  • pozer

    Square Civilian

  • Members
  • Joined: 21 Jan 2004

#17

Posted 17 September 2005 - 10:12 AM

I really support your opinion thou, HippieCommunist, no better mod than all Demarest TT mod and i can even wait any year if he decided to do it. Your excellency, King Demarest.

HippieCommunist
  • HippieCommunist

    PWR2DPPL

  • Members
  • Joined: 25 Jan 2003

#18

Posted 17 September 2005 - 11:09 AM

long live the king biggrin.gif *raises toast*

for the king!

Demarest
  • Demarest

    what could be

  • BUSTED!
  • Joined: 12 Jul 2003

#19

Posted 18 September 2005 - 02:43 AM

You guys... blush.gif

And I apologize. I somehow have gotten in the habit of not looking who's posting (mostly know by avs, etc). I didn't realize HC was in the house. Always have to pay my respects there. Glad you're still around.

I'll keep it in mind for sure. But it would make more sense to cheer on Time Vault SA. If I can pull that off, then MOST of my understanding of SA in a timeless state will be complete and such a thing would be possible. As for me, I'd find it irritating to have Cesar calling you from the start to alert you of people driving around the countryside. That's just me though.

HippieCommunist
  • HippieCommunist

    PWR2DPPL

  • Members
  • Joined: 25 Jan 2003

#20

Posted 18 September 2005 - 04:59 PM

im sure you can make CJ call ceaser himself, im sure his phone has outgoing calls aswell music.gif

and on that other topic, ive always been here...
some1's gotto find small irritatin' bugs here and there tounge2.gif

Xanarki
  • Xanarki

    Li'l G Loc

  • Members
  • Joined: 21 Jul 2005

#21

Posted 21 September 2005 - 06:59 PM

Rebirth looks pretty good. Next version to be even better I suppose.

brokenfish
  • brokenfish

    Homie

  • Members
  • Joined: 11 Jul 2003

#22

Posted 25 September 2005 - 02:16 AM

I just had to give kudos for this. I haven't had time to play any games for a few months now, but I'll be sure to use this (as well as the GTA 3 and VC ones).

Like some others have said, you really have opened up a new world of modding. smile.gif

Keep up the truly awesome work.

Demarest
  • Demarest

    what could be

  • BUSTED!
  • Joined: 12 Jul 2003

#23

Posted 25 September 2005 - 03:10 AM

Always good to see you around colgate.gif

QUOTE (brokenfish @ Sep 24 2005, 22:16)
I'll be sure to use this (as well as the GTA 3 and VC ones).

You must mean the Darkpact technique. Rebirth only exists for SA. A conversion should be plenty easy though.

Edmachine
  • Edmachine

  • Andolini Mafia Family
  • Joined: 14 May 2005
  • None

#24

Posted 04 November 2005 - 04:03 PM

Could you put Rebirth in Space all in one mod v1.1?

Demarest
  • Demarest

    what could be

  • BUSTED!
  • Joined: 12 Jul 2003

#25

Posted 05 November 2005 - 03:49 AM

Sort of. It's been a long time since I wrote Rebirth, so I can't answer for sure. I know there's one main thread at the end of MAIN that you would have to put at the end of all in 1's MAIN (to retain savegame compatibility) and then each mission has a create_thread in it that points to that thread, passing it all the necessary parameters. You'd be better off asking space actually since I have no idea how close his mod is to being full, etc.

platt
  • platt

    Player Hater

  • Members
  • Joined: 17 Jun 2005

#26

Posted 15 June 2006 - 05:56 PM Edited by platt, 16 June 2006 - 12:56 AM.

Demarest,
I have a question about this code mod. I wanted to try to convert this to xbox so i could get mods to work with the autoload game feature the xbox has. I have decompiled the xbox code and read thru it and noticed that it is dofferent than the pc version. SO i was wondering were there any other changes you have made to the main.scm that was not listed in your first post? If those are all the changes then do you think this mod will work on an xbox main.scm

Edit: Later that day.......
No need to answer my question Demarest. I got bored and decided to start adding the code in to see if i had found all the differences, and now it works perfectly. Thanks for writing the script. Now I can mod my xbox main.scm without having to restart. Thanks a bunch for this. If you or anyone with like the xbox version of rebirth just say and ill post it. Thank you again... and here's a cookie.gif .

Edit: A few minutes later....
Well the code it self works fine. But when i add other mod it fails to load. I tried darkpacting the xbox scm but it still fails to load the game with a mod. going to back and look again.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users