Quantcast

Jump to content

» «
Photo

MISSION CODING IV

520 replies to this topic
Frank.s
  • Frank.s

  • The Yardies
  • Joined: 15 Apr 2008

#511

Posted 12 April 2013 - 12:10 AM

I get that problem on all 3d GTA's, it's something to do with mouse drivers i guess.

I workaround the issue by repeatedly pressing esc to pause and unpause loads of times while moving the mouse around. As soon as the camera starts moving with the mouse again (providing you're using "standard" controls and not "classic") then you know it's fixed.
Until you pause again, then it f*cks up and you need to do the whole process again. angry.gif

SteaVor
  • SteaVor

    Professional investor

  • Members
  • Joined: 17 Dec 2005

#512

Posted 13 April 2013 - 12:58 PM

See here - in short: "Disable Visual Themes" for gta-vc.exe (NOT gta-lc.exe) to make it work.

Craig, thanks for the original script files. Pretty interesting stuff.

DigBuild
  • DigBuild

    big booty bitches

  • Members
  • Joined: 03 Apr 2013
  • United-Kingdom

#513

Posted 13 April 2013 - 01:43 PM

QUOTE (Frank.s @ Friday, Apr 12 2013, 00:10)
I get that problem on all 3d GTA's, it's something to do with mouse drivers i guess.

I workaround the issue by repeatedly pressing esc to pause and unpause loads of times while moving the mouse around. As soon as the camera starts moving with the mouse again (providing you're using "standard" controls and not "classic") then you know it's fixed.
Until you pause again, then it f*cks up and you need to do the whole process again.  angry.gif

I fixed mine by downloading this DLL, works with III, VC and SA.

Craig Kostelecky
  • Craig Kostelecky

    GTA:LC Team Leader

  • The Connection
  • Joined: 28 Jan 2004

#514

Posted 13 April 2013 - 02:28 PM Edited by Craig Kostelecky, 13 April 2013 - 05:55 PM.

Is anyone able to complete Payday For Ray? I'm running into issues with it now where it won't get past the first phone. And each old scm I try to restore gives me the same issues. It's something I should be able to fix given enough time, just haven't gotten it yet.

Edit: this may be similar to the issue that ITBTD was having with the opening mission. I haven't tested it with debug off in a while. And I'm almost positive other audio files have played fine though. Weird

Dylan2112
  • Dylan2112

    I'm quite aware; my screen name SUCKS...

  • Members
  • Joined: 28 Dec 2005

#515

Posted 14 April 2013 - 12:33 AM

A lot of the time when I'm using the debug SCM, I get the feeling there is a distinct lack of traffic. It's still there but it seems like cars appear way less frequently.

Craig Kostelecky
  • Craig Kostelecky

    GTA:LC Team Leader

  • The Connection
  • Joined: 28 Jan 2004

#516

Posted 14 April 2013 - 01:04 AM

I've noticed that too. No idea where in the code the holdup might be. It's very possible one of the main threads was mixed up. I can test them later by replacing them with the old code one-by-one

Dylan2112
  • Dylan2112

    I'm quite aware; my screen name SUCKS...

  • Members
  • Joined: 28 Dec 2005

#517

Posted 14 April 2013 - 02:26 AM

'Give Me Liberty' seems a little broken. I managed to get past the part I got stuck on bit it skipped straight to "but my hands are all messed up so you better driver brother" line instead and when I drove to the safe house, I stopped in the marker but nothing triggers what so ever. So once again the game gets stuck.

Craig Kostelecky
  • Craig Kostelecky

    GTA:LC Team Leader

  • The Connection
  • Joined: 28 Jan 2004

#518

Posted 14 April 2013 - 03:26 AM

It seems there are bugs whenever the load/play wav 1 opcodes are used. I changed the parameters to 2 in Payday for Ray and it plays fine now. I am looking through the threads in the main section to see if there's something messed up with one of the theads that's always running.

If you ignore this bug (which is pretty damn hard to overlook) the Asuka1 missions are converted. I even found and fixed a bug in Sayonara Salvatore which I believe now FINALLY plays as it's supposed to in all occasions.

Craig Kostelecky
  • Craig Kostelecky

    GTA:LC Team Leader

  • The Connection
  • Joined: 28 Jan 2004

#519

Posted 15 April 2013 - 04:42 AM Edited by Craig Kostelecky, 15 April 2013 - 03:04 PM.

I found two threads that I had borked up pretty well. One of them was the lfit bridge's code. That had a few errors which kept it up indefinitely. The other was with me trying to change space's audio workaround code into the same syntax I'm using elsewhere. That's the one that caused the big issues with GML and PD4R (among many others). Below is the new code for those sections. Not sure when I'll get around to updating the package formally. This week will be pretty busy for me at work. When I do upload it next, it'll have all of the 1st set of Asuka missions completed. Down to just Kenji, Love, Ray, Auska2, and Catalina to do.

Lift Bridge:
CODE
:LIFT_BRIDGE
03A4: name_thread 'SSVBRIG'
0005: $SSV_BRIDGE_SPEED = 0.05
// Disable IPL models
0363: toggle_model_render_at -618.159 -629.847 80.7116 radius 50.0 object #BRIDGE_LIFTSEC 0
0363: toggle_model_render_at -614.438 -631.564 49.0088 radius 50.0 object #SUBBRIDGE_LIFT 0
0363: toggle_model_render_at -618.637 -630.543 134.071 radius 70.0 object #BRIDGE_LIFTWEIGHT 0
0363: toggle_model_render_at -618.159 -629.847 80.7116 radius 50.0 object #LODDGE_LIFTSEC 0
0363: toggle_model_render_at -618.637 -630.543 134.071 radius 70.0 object #LODDGE_LIFTWEIGHT 0
03B6: replace_model_at -618.159 -629.847 80.7116 radius 50.0 from #BRIDGE_LIFTSEC to #LOD_LAND014
03B6: replace_model_at -614.438 -631.564 49.0088 radius 50.0 from #SUBBRIDGE_LIFT to #LOD_LAND014
03B6: replace_model_at -618.637 -630.543 134.071 radius 70.0 from #BRIDGE_LIFTWEIGHT to #LOD_LAND014
03B6: replace_model_at -618.159 -629.847 80.7116 radius 50.0 from #LODDGE_LIFTSEC to #LOD_LAND014
03B6: replace_model_at -618.637 -630.543 134.071 radius 70.0 from #LODDGE_LIFTWEIGHT to #LOD_LAND014
// Create scripted objects instead
029B: $BRIDGE_LIFTSEC = init_object #BRIDGE_LIFTSEC at  -618.159 -629.847 105.7116
029B: $SUBBRIDGE_LIFT = init_object #SUBBRIDGE_LIFT at  -614.438 -631.564 74.0088
029B: $BRIDGE_LIFTWEIGHT = init_object #BRIDGE_LIFTWEIGHT at  -618.637 -630.543 109.071
029B: $LODDGE_LIFTSEC = init_object #LODDGE_LIFTSEC at  -618.159 -629.847 105.7116
029B: $LODDGE_LIFTWEIGHT = init_object #LODDGE_LIFTWEIGHT at  -618.637 -630.543 109.071
01C7: remove_object_from_mission_cleanup_list $BRIDGE_LIFTSEC
01C7: remove_object_from_mission_cleanup_list $SUBBRIDGE_LIFT
01C7: remove_object_from_mission_cleanup_list $BRIDGE_LIFTWEIGHT
01C7: remove_object_from_mission_cleanup_list $LODDGE_LIFTSEC
01C7: remove_object_from_mission_cleanup_list $LODDGE_LIFTWEIGHT
0392: object $BRIDGE_LIFTSEC toggle_in_moving_list  0
0392: object $SUBBRIDGE_LIFT toggle_in_moving_list  0
0392: object $BRIDGE_LIFTWEIGHT toggle_in_moving_list  0
0392: object $LODDGE_LIFTSEC toggle_in_moving_list  0
0392: object $LODDGE_LIFTWEIGHT toggle_in_moving_list  0
022B: clear_area_of_chars -665.0 -700.0 46.0 -565.0 -558.0 51.0
01E8: create_forbidden_for_cars_cube -665.0 -700.0 46.0 -565.0 -558.0 51.0

// Wait until 'Drop in the Ocean' is completed (only if not MASTERLCDEBUG)
while true
   if and
       0038:   $A_DROP_IN_THE_OCEAN_COMPLETED == 0  // integer values
       0038:   $MASTERLCDEBUG == 0  // integer values
   jf break
   wait 1000 ms
end

//Loops for controlling bridge going up and down
while true
   wait 0 ms
   //Bridge going down
   while true
       if or
           834E:  NOT  slide_object $BRIDGE_LIFTSEC to -618.159 -629.847 80.7116 angle  0.0  0.0  $SSV_BRIDGE_SPEED  0
           834E:  NOT  slide_object $SUBBRIDGE_LIFT to -614.438 -631.564 49.0088 angle  0.0  0.0  $SSV_BRIDGE_SPEED  0
           834E:  NOT  slide_object $BRIDGE_LIFTWEIGHT to -618.637 -630.543 134.071 angle  0.0  0.0  $SSV_BRIDGE_SPEED  0
           834E:  NOT  slide_object $LODDGE_LIFTSEC to -618.159 -629.847 80.7116 angle  0.0  0.0  $SSV_BRIDGE_SPEED  0
           834E:  NOT  slide_object $LODDGE_LIFTWEIGHT to -618.637 -630.543 134.071 angle  0.0  0.0  $SSV_BRIDGE_SPEED  0
       jf break
       wait 0 ms
   end
   
   022A: switch_ped_roads_on -665.0 -700.0 46.0 -565.0 -558.0 51.0
   01E7: switch_roads_on -665.0 -700.0 46.0 -565.0 -558.0 51.0
   018E: stop_sound $BRIDGEDOWNAUDIO
   end_thread_named 'SSVAUD'
   018E: stop_sound $BRIDGEALARM
   wait 40000 ms
   create_thread @LIFT_BRIDGE_BELL
   
   022B: clear_area_of_chars -665.0 -700.0 46.0 -565.0 -558.0 51.0
   01E8: switch_roads_off -665.0 -700.0 46.0 -565.0 -558.0 51.0
   wait 10000 ms
   03BA: clear_cars_from_cube  -665.0 -700.0 46.0 -565.0 -558.0 51.0
   018D: $BRIDGEUPAUDIO = create_sound  38 at -542.0 -627.0 48.0
   
   //Bridge moving up
   while true
       if or
           834E:  NOT  slide_object $BRIDGE_LIFTSEC to -618.159 -629.847 105.7116 angle  0.0  0.0  $SSV_BRIDGE_SPEED  0
           834E:  NOT  slide_object $SUBBRIDGE_LIFT to -614.438 -631.564 74.0088 angle  0.0  0.0  $SSV_BRIDGE_SPEED  0
           834E:  NOT  slide_object $BRIDGE_LIFTWEIGHT to -618.637 -630.543 109.071 angle  0.0  0.0  $SSV_BRIDGE_SPEED  0
           834E:  NOT  slide_object $LODDGE_LIFTSEC to -618.159 -629.847 105.7116 angle  0.0  0.0  $SSV_BRIDGE_SPEED  0
           834E:  NOT  slide_object $LODDGE_LIFTWEIGHT to -618.637 -630.543 109.071 angle  0.0  0.0  $SSV_BRIDGE_SPEED  0
       jf break
       wait 0 ms
   end
   018E: stop_sound $BRIDGEUPAUDIO
   wait 10000 ms
   018D: $BRIDGEDOWNAUDIO = create_sound  43 at -542.0 -627.0 48.0
end

:LIFT_BRIDGE_BELL
03A4: name_thread 'SSVAUD'
var
0@ : float
1@ : float
2@ : float
3@ : float
4@ : float
5@ : float
6@ : float
end
0@ = -604.0  // sound x pos
1@ = -631.0 // y pos
2@ = 53.0  // z pos
6@ = 1.3 // radius - the smaller the number, the farther you can hear, up to minimum of 1.0
while true
  wait 50
  if
      0256:   player $PLAYER_CHAR defined
  then
      if
          00F5:   player $PLAYER_CHAR in_sphere 0 near_point 0@ 1@ 2@ radius 400.0 400.0 400.0
      then
          0054: store_player $PLAYER_CHAR position_to 3@ 4@ 5@
          3@ -= 0@
          4@ -= 1@
          5@ -= 2@
          3@ /= 6@
          4@ /= 6@
          5@ /= 6@
          3@ += 0@
          4@ += 1@
          5@ += 2@
          018D: $BRIDGEALARM = create_sound 40 at 3@ 4@ 5@
      end
      wait 1558 // twice the duration of sound
      018E: stop_sound $BRIDGEALARM
  end
end

Space's 041C workaround
CODE
:RANDOM_AUDIO
03A4: name_thread 'RAUD'
//00A0: store_actor $SCRIPT_CONTROLLED_PLAYER position_to 1@ 2@ 3@

:RANDOM_AUDIO_LOOP
wait 250
{
if    
   $AUDIO_ENABLE == 95 // chunky
then
   00A0: store_actor $CHUNKY position_to 1@ 2@ 3@
   03CF: load wav 'XXX' as 1        //find wave file
   jump @RANDOM_AUDIO_PLAY
end
}
if
   $AUDIO_ENABLE == 96 // van heist passenger
then
   00A0: store_actor $VAN_MAN2_JM3 position_to 1@ 2@ 3@ // WILL CRASH if actor not available, did this on purpose
   0209: 0@ = random_int 1 9 // doesn't include 9
   if
       0@ == 1
   then
       03CF: load wav 'VH1' as 1
       jump @RANDOM_AUDIO_PLAY
   end
   if
       0@ == 2
   then
       03CF: load wav 'VH2' as 1
       jump @RANDOM_AUDIO_PLAY
   end
   if
       0@ == 3
   then
       03CF: load wav 'VH3' as 1
       jump @RANDOM_AUDIO_PLAY
   end
   if
       0@ == 4
   then
       03CF: load wav 'VH4' as 1
       jump @RANDOM_AUDIO_PLAY
   end
   if
       0@ == 5
   then
       03CF: load wav 'VH5' as 1
       jump @RANDOM_AUDIO_PLAY
   end
   if
       0@ == 6
   then
       03CF: load wav 'VH6' as 1
       jump @RANDOM_AUDIO_PLAY
   end
   if
       0@ == 7
   then
       03CF: load wav 'VH7' as 1
       jump @RANDOM_AUDIO_PLAY
   end
   03CF: load wav 'VH8' as 1
   jump @RANDOM_AUDIO_PLAY
end
   {
   :LabelSwat1Audio
   if
       $AUDIO_ENABLE == 101 // unforunately needs different numbers for each swat
   jf @LabelSwat2Audio
   
   :LabelSwat2Audio
   if
   $AUDIO_ENABLE == 101
   jf @LabelSwat3Audio
   
   :LabelSwat3Audio
   if
   $AUDIO_ENABLE == 101
   jf @LabelSwat4Audio
   
   :LabelSwat4Audio
   if
   $AUDIO_ENABLE == 101
   jf @LabelAmmuAudio1
   }

if
   $AUDIO_ENABLE == 103 // sam 1
then
   00A0: store_actor $AMMU_SHOP_BLOKE1 position_to 1@ 2@ 3@ // WILL CRASH if actor not available, did this on purpose
   03CF: load_wav 'AMU1' as 1
   jump @RANDOM_AUDIO_PLAY
end
if
   $AUDIO_ENABLE == 104 // sam 2
then
   00A0: store_actor $AMMU_SHOP_BLOKE1 position_to 1@ 2@ 3@ // WILL CRASH if actor not available, did this on purpose
   03CF: load_wav 'AMU2' as 1
   jump @RANDOM_AUDIO_PLAY
end
if
   $AUDIO_ENABLE == 105 // sam 3
then
   00A0: store_actor $AMMU_SHOP_BLOKE1 position_to 1@ 2@ 3@ // WILL CRASH if actor not available, did this on purpose
   03CF: load_wav 'AMU3' as 1
else
   jump @RANDOM_AUDIO_LOOP
end

:RANDOM_AUDIO_PLAY
while 83D0:  NOT  wav 1 loaded
   wait 0
end
03D7: set_wav 1 location 1@ 2@ 3@
03D1: play_wav 1
while 83D2: NOT  wav 1 ended
   wait 0
end
040D: unload_wav 1
$AUDIO_ENABLE = 0
jump @RANDOM_AUDIO_LOOP
end_thread


Edit: I have uploaded the package with everything I have as of now. Please test these files out and let me know if any bugs remain. Also let me know if traffic seems better. I couldn't tell if it's different yet (and nothing I did was directly done to fix that)

Craig Kostelecky
  • Craig Kostelecky

    GTA:LC Team Leader

  • The Connection
  • Joined: 28 Jan 2004

#520

Posted 18 April 2013 - 06:37 PM

Code uploaded again. I have all but 2 of the main threads converted (Y_Less is looking at the car crusher, and Silent's looking at the Securicar garage code). I'll start to the missions again pretty soon. I'll let you know if I find any more goodies hidden in Rockstar's code.

Download

Craig Kostelecky
  • Craig Kostelecky

    GTA:LC Team Leader

  • The Connection
  • Joined: 28 Jan 2004

#521

Posted 25 April 2013 - 02:49 PM Edited by Craig Kostelecky, 26 April 2013 - 04:18 PM.

I have finished converting all of the missions into high-level code. There's still two small threads in the main section that I need to update. I have tested each mission, though only briefly. So I'd like some help testing this out. It's very possible that a mission that played 100% correctly before may now have some new bugs. So please try to play each mission in many different ways. Please report any bugs either here or in the bugs thread.

Download

Edit, the entire code is now converted. There may be minor bugs in the car crusher yet.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users