MW_29 Posted June 6, 2013 Share Posted June 6, 2013 So as far as i know mod GTA: Martial Arts /GTA:MA link HERE has side feature of implementing additiona opcode related to animations. According to author: Version 0.9.0.1 now makes a new opcode (0673) available that can be used to play any animation (including non-fighting ones) on an actor anytime from script. This can be considered a side-bonus of GTA:MA. ...and from description of GTA:MA's 'Demo package': GTA:MA v0.9.0.1 adds an opcode to the existing opcodes of theVC engine, therefore we'll be able to trigger it through scripting, via the main.scm. The opcode 0673 gets used like this: 0673: play_animation on actor $PLAYER_ACTOR animgroup 64 anim 512 blendfactor 30.0 This requires a little explaining. The use of the first variable should be obvious. The second variable (animgroup) refers to the group from which to use it. The standard animations are all in group 0. The first custom Form in the GTA:MA Form has id 61, the next has 62 and so on. So to trigger the dance move, you need to use the appropriate id (ATTENTION! That does mean that the '64' used above is not necessarily the right id for your .cfg. Do your own calculation.) Next you will have to pass the ID of the animation itself. In our MA_FORM section we have set 0x200 as the anim id of dance_right. That is 512 in decimal, so that's what we'll use. The meaning of the last variable is not entirely clear. it seems to handle the blending of the animation you want to play with the idle animation of the actor in question. 0.0 seems to mean that 100%ly the idle animation gets used, 30.0 seems to cause the animation you want to play to get used 100%ly. Values inbetween caused mixed (as in "blended") results. As a final step, add this line to the end of the opcode section of the vicescm.ini of Barton Waterduck's GTA VC Mission Builder (so that the Mission Builder will be able to compile the new opcode): 0673=4,play_animation on actor %1d% animgroup %2d% anim %3d% blendfactor %4f% ...in the second quoted description there is some stuff related to adding external .ifp file with SA dance movements, but i am not interested in that now. List of in-game animations numbers that were supposed to be used with this opcode is HERE My question is, HOW TO PROPERLY RUN this opcode on already existent in game aniations? How to run any of those "stock" anims included in game? I 've added below lines: ...to my SB's VICE_SCM.INI 0673: play_animation on actor $PLAYER_ACTOR animgroup 64 anim 512 blendfactor 30.0 ...and to opcodes.txt: 0673: play_animation on actor $PLAYER_ACTOR animgroup 64 anim 512 blendfactor 30.0 So i assume having installed GTA:MA (which i have) should allow me to use this opcode in scripts. Well, simple VC CLEO script is compilable, BUT i have every time crash when code reaches mentioned new opcode line. Whether i use this... // This file was decompiled using vicescm.ini published by http://gtag.gtagaming.com/opcode-database on 18.5.2011{$VERSION 2.1.1000}{$CLEO .cs}//-------------MAIN---------------0000: :NONAME_2wait 0 if and Player.Defined($PLAYER_CHAR) not Actor.Dead($PLAYER_ACTOR)jf @NONAME_2 if 00E1: key_pressed 0 13 // "V" key pressed jf @NONAME_2 //Player.CanMove($PLAYER_CHAR) = False // <- tried with and without this still doesn't workwait 1000673: play_animation on actor $PLAYER_ACTOR animgroup 0 anim 0 blendfactor 30.005DC: end_custom_thread ...or this // This file was decompiled using vicescm.ini published by http://gtag.gtagaming.com/opcode-database on 18.5.2011{$VERSION 2.1.1000}{$CLEO .cs}//-------------MAIN---------------0000: :NONAME_2wait 0 if and Player.Defined($PLAYER_CHAR) not Actor.Dead($PLAYER_ACTOR)jf @NONAME_2 if 00E1: key_pressed 0 13 // "V" key pressed jf @NONAME_2 //Player.CanMove($PLAYER_CHAR) = False // <- tried with and without this still doesn't workjump @NONAME_3:NONAME_3wait 0 0673: play_animation on actor $PLAYER_ACTOR animgroup 0 anim 0 blendfactor 30.0jump @NONAME_3 So does anybody know how to deal with that opcode and if using it via GTA:MA is in fact possible and working in practical? Did anyone used it somewhere already? I'd be glad for any constructive responses. Link to comment Share on other sites More sharing options...
DK22Pac Posted June 6, 2013 Share Posted June 6, 2013 VC 1.0 // [email protected] - ped handle05E6: [email protected] = actor [email protected] [email protected] += 0x4C05E0: [email protected] = read_memory [email protected] size 4 virtual_protect 0// CAnimManager::BlendAnimation(RpClump *, AssocGroupId, AnimationId, float)05E1: call 0x405640 num_params 4 pop 4 _blendFactor 8.0 _animationId 165 _assocGroupId 0 _rwObject [email protected] MW_29 1 Link to comment Share on other sites More sharing options...
MW_29 Posted June 6, 2013 Author Share Posted June 6, 2013 VC 1.0 // [email protected] - ped handle05E6: [email protected] = actor [email protected] [email protected] += 0x4C05E0: [email protected] = read_memory [email protected] size 4 virtual_protect 0// CAnimManager::BlendAnimation(RpClump *, AssocGroupId, AnimationId, float)05E1: call 0x405640 num_params 4 pop 4 _blendFactor 8.0 _animationId 165 _assocGroupId 0 _rwObject [email protected] Thanks @DK22Pac ...firstly it crashed, then i realised that parkour mod uses similar things so according to it's source code, i changed order of arguments for 05E6 , and then it works perfectly // This file was decompiled using vicescm.ini published by http://gtag.gtagaming.com/opcode-database on 18.5.2011{$VERSION 2.1.1000}{$CLEO .cs}//-------------MAIN---------------0000: :NONAME_2wait 0 if and Player.Defined($PLAYER_CHAR) not Actor.Dead($PLAYER_ACTOR)jf @NONAME_2 if 00E1: key_pressed 0 13 jf @NONAME_2 05E6: $PLAYER_ACTOR = actor [email protected] struct // <- just changing order of arguments [email protected] += 0x4C05E0: [email protected] = read_memory [email protected] size 4 virtual_protect 0//05DC: end_custom_thread:NONAME_3wait 0 05E1: call 0x405640 num_params 4 pop 4 _blendFactor 30.0 _animationId 0 _assocGroupId 0 _rwObject [email protected] @NONAME_3 Thanks for help Link to comment Share on other sites More sharing options...
DK22Pac Posted June 6, 2013 Share Posted June 6, 2013 MW_29, open VCSCM.ini and change 05E6=2, 1% = actor 2% struct to 05E6=2, 2% = actor 1% struct Link to comment Share on other sites More sharing options...
MW_29 Posted June 6, 2013 Author Share Posted June 6, 2013 MW_29, open VCSCM.ini and change 05E6=2, 1% = actor 2% struct to 05E6=2, 2% = actor 1% struct Yeah, i can also use this way By the way , do You know if is it possible to make or call some function which would create a "shot of a bullet" from one point towards another, just like SA opcode does: 06BC: create_M4_shoot_from 2193.268 -1165.441 1031.124 target $TEMPVAR_X_COORD $TEMPVAR_Y_COORD $TEMPVAR_Z_COORD energy 1 ...but in Vice? Sorry for offtopic. Link to comment Share on other sites More sharing options...
DK22Pac Posted June 6, 2013 Share Posted June 6, 2013 (edited) // [email protected], [email protected], [email protected] - start point04C4: create_coordinate [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR offset 0.0 1.0 0.805F8: [email protected] = var [email protected] offset// [email protected], [email protected], [email protected] - end point04C4: create_coordinate [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR offset 0.0 20.0 0.805F8: [email protected] = var [email protected] offset05E1: call 0x5C9BB0 num_params 3 pop 3 _intensuty 15 _endPoint [email protected] _startPoint [email protected] Edited June 8, 2013 by DK22Pac Link to comment Share on other sites More sharing options...
MW_29 Posted June 8, 2013 Author Share Posted June 8, 2013 // [email protected], [email protected], [email protected] - start point04C4: create_coordinate [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR offset 0.0 1.0 0.805F8: [email protected] = var [email protected] offset// [email protected], [email protected], [email protected] - end point04C4: create_coordinate [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR offset 0.0 20.0 0.805F8: [email protected] = var [email protected] offset05E1: call 0x5C9BB0 num_params 3 pop 3 _intensuty 15 _endPoint [email protected] _startPoint [email protected] Awesome! Man where do You get all this knowledge from? I ve searched not once not twice the internet for things like that and i couldn't find anything.. The code You posted not only creates shot but the shot is a tracer round So tell me if it is possible to change something to reach this shot effect on already present in-game guns, i mean is it possible to set default game shot to this kind of shot with tracer effect? Link to comment Share on other sites More sharing options...
DK22Pac Posted June 9, 2013 Share Posted June 9, 2013 This needs some researching, detecting all places where default bullet traces are created and replace them with that new function. Link to comment Share on other sites More sharing options...
ThirteenAG Posted June 9, 2013 Share Posted June 9, 2013 (edited) So tell me if it is possible to change something to reach this shot effect on already present in-game guns, i mean is it possible to set default game shot to this kind of shot with tracer effect? Well, kinda proof of concept: 2mb gif {$CLEO}0000:05F8: [email protected] = var [email protected] offset05F8: [email protected] = var [email protected] offset05DF: write_memory 0x5734DD size 5 value 0x90 virtual_protect 1 //smoke trail05DF: write_memory 0x5736EE size 5 value 0x90 virtual_protect 1 //smoke trail05DF: write_memory 0x57389B size 5 value 0x90 virtual_protect 1 //smoke trail05DF: write_memory 0x5C9C06 size 5 value 0x90 virtual_protect 1 //muzzleflashwhile true wait 00054: store_player $player_char position_to [email protected] [email protected] [email protected] 05EF: [email protected] = random_actor_near_point [email protected] [email protected] [email protected] in_radius 550.0 find_next 0 pass_deads 0 //IF and SETthen repeat // [email protected], [email protected], [email protected] - start point 05E0: [email protected] = read_memory 0x7E46B8 size 4 virtual_protect 1 05E0: [email protected] = read_memory 0x7E46BC size 4 virtual_protect 1 05E0: [email protected] = read_memory 0x7E46C0 size 4 virtual_protect 1 // [email protected], [email protected], [email protected] - end point 05E0: [email protected] = read_memory 0x77EC78 size 4 virtual_protect 1 05E0: [email protected] = read_memory 0x77EC7C size 4 virtual_protect 1 05E0: [email protected] = read_memory 0x77EC80 size 4 virtual_protect 1 if 02E0: actor $PLAYER_ACTOR firing_weapon then 04C4: create_coordinate [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR offset 0.0 0.0 0.0 05E1: call 0x5C9BB0 num_params 3 pop 3 _intensuty 0 _endPoint [email protected] _startPoint [email protected] else if 02E0: actor [email protected] firing_weapon then 04C4: create_coordinate [email protected] [email protected] [email protected] from_actor [email protected] offset 0.0 0.0 0.0 05E1: call 0x5C9BB0 num_params 3 pop 3 _intensuty 0 _endPoint [email protected] _startPoint [email protected] end end until 85EF: not [email protected] = random_actor_near_point [email protected] [email protected] [email protected] in_radius 550.0 find_next 1 pass_deads 0 //IF and SETendend Looks cool, but still some work needs to be done. Edited June 9, 2013 by ThirteenAG Widescreen Fixes Pack || Project2DFX || SaveLoader || WindowedMode || CLEO Scripts Link to comment Share on other sites More sharing options...
MW_29 Posted June 10, 2013 Author Share Posted June 10, 2013 (edited) Good Also now arming vehicles possible even without MVL The question is how to 'run' desired SFX (yeah any of weapon shot effects on example) on demand? Because opcodes 018C and 018D are let's say ... a "little" limited By the way, i see a lot of creativity here as for an offtopic question but i hope anything what is creative will be tolerated by staff Edited June 10, 2013 by MW_29 Link to comment Share on other sites More sharing options...
ThirteenAG Posted June 16, 2013 Share Posted June 16, 2013 (edited) My latest attempt to create bullet traces instead of smoke trails: https://dl.dropboxusercontent.com/u/1399262...ullet_trace.zip It contains two scripts, for player and for peds, and the effect itself doesn't look perfect. But it's still better than smoke trail, in my opinion. bullet_trace_pt1 src bullet_trace_pt2 src Edited June 16, 2013 by ThirteenAG Widescreen Fixes Pack || Project2DFX || SaveLoader || WindowedMode || CLEO Scripts Link to comment Share on other sites More sharing options...
ThirteenAG Posted July 18, 2013 Share Posted July 18, 2013 https://dl.dropboxusercontent.com/u/1399262...ullet_trace.zip Widescreen Fixes Pack || Project2DFX || SaveLoader || WindowedMode || CLEO Scripts Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now