MW_29 Posted August 19, 2010 Share Posted August 19, 2010 (edited) So, any modder knows that VC's , GTA3's , and SA's sniper rifle scope uses a reticle combined from four the same appropriatelly flipped/rotated textures named "sitesniper.bmp" from HUD.txd. As long as we want modify this texture into a simple duplex or mil-dot reticle there's no problem with that, ...but! If we want to have a reticle just like a famous PSO-1 from SVD or Rangefinding cross like in COD4:MW we face the problem that can not be resolved just by editing sitesniper.bmp texture form HUD.txd because even however redone in any painting software, it will still be used as a one of four parts flipped to make whole symetric reticle just as R* did it. I'd like to face it because someone already did this kind of modification but for SA, i want to do it to Vice City. Dalva made this Custom Sniper Scope Mod. This add non-symmetrical reticle to sniper rifle scope, so its possible to use PSO like ones!! I asked him for permission for editing his code, succesfully granted, and i managed to simplify it bcz of two opcodes Dalva used aren't compatible with VC so they have been removed, but whole rest of script is written just like in his script. I got this: // This file was decompiled using vicescm.ini published by http://gtag.gtagaming.com/opcode-database on 19.8.2010{$VERSION 2.1.1000}{$CLEO .cs}//-------------MAIN---------------0000: :NONAME_2wait 10 if Player.Defined($PLAYER_CHAR)jf @NONAME_2 if 02D7: player $PLAYER_CHAR currentweapon == 28 jf @NONAME_2 if 00E1: key_pressed 0 6 jf @NONAME_2 0390: load_txd_dictionary 'SCOPE' // never used in VC or GTA 3 038F: load_texture "SCOPEB" as 1 // Load dictionary with 0390 first 038D: draw_texture 1 position 0.0 0.0 size 1024 1024 RGBA 255 255 255 255 // never used in VC or GTA 304C7: toggle_camera_green_scanlines 1:NONAME_111wait 10 if 00E1: key_pressed 0 6 jf @NONAME_139 jump @NONAME_111 :NONAME_139wait 10 03F0: enable_text_draw 004C7: toggle_camera_green_scanlines 0 wait 25 0391: release_textures wait 30 jump @NONAME_2 This should work in simple way, when aim key pressed it should draw custom texture, i added green scanlines just ot look if this script is looped well and scanlines appears but custom texture is not ;/ . I placed "SCOPE.txd" dictionary wherever i could, in dirs: models, txd, generic, cleo, in main game directory next to .exe and even inside sniper.txd and additionally added SCOPE.txd into the gta3.img archive. It still doesn't work, ocf i removed default sitesniper texture (game default one) by setting it's alpha channel texture to black, just as in dalva's mod, so "stock" sniper cross isnt visible. It looks like this: Uploaded with ImageShack.us All i need is some help with this one to make this texture being drawn ingame, then we all could have possibility to use NON-symmetric sniper scope reticle, this has been done to Sa and i believe it can be achieved in VC too. So many of you has more coding experience than me, ...so would you help? PS.: Talking all time about CLEO mod for VC, not applied into main.scm! Edited August 19, 2010 by MW_29 Link to comment https://gtaforums.com/topic/457270-pso-1-like-reticle-for-sniper-rifle-cleo-mod/ Share on other sites More sharing options...
coin-god Posted August 20, 2010 Share Posted August 20, 2010 038D: draw_texture 1 position 0.0 0.0 size 1024 1024 RGBA 255 255 255 255 // never used in VC or GTA 3 Never coded for VC, but that line says something that may point you the problem. Link to comment https://gtaforums.com/topic/457270-pso-1-like-reticle-for-sniper-rifle-cleo-mod/#findComment-1060090058 Share on other sites More sharing options...
MW_29 Posted August 20, 2010 Author Share Posted August 20, 2010 038D: draw_texture 1 position 0.0 0.0 size 1024 1024 RGBA 255 255 255 255 // never used in VC or GTA 3 Never coded for VC, but that line says something that may point you the problem. Eh, right now i managed to make one step forward, now texture is displayed but it is all white, code looks like that: // This file was decompiled using vicescm.ini published by http://gtag.gtagaming.com/opcode-database on 19.8.2010{$VERSION 2.1.1000}{$CLEO .cs}//-------------MAIN---------------0000: :NONAME_2wait 10 if Player.Defined($PLAYER_CHAR)else_jump @NONAME_2 if 02D7: player $PLAYER_CHAR currentweapon == 28 else_jump @NONAME_2 if 00E1: key_pressed 0 6 else_jump @NONAME_2 0390: load_txd_dictionary 'SCOPE' // never used in VC or GTA 3 038F: load_texture "SCOPEB" as $scope // Load dictionary with 0390 first 038D: draw_texture $scope position 640.0 512.0 size 1024.0 1024.0 RGBA 255 255 255 255 // never used in VC or GTA 3 :NONAME_115wait 10 if 00E1: key_pressed 0 6 else_jump @NONAME_143 jump @NONAME_115 :NONAME_143wait 10 03F0: enable_text_draw 0 wait 25 0391: release_textures wait 30 jump @NONAME_2 It looks like that: Uploaded with ImageShack.us Im sure that my txd file have to be placed in models directory when no present there, game freezes, and it seems that the opcode which draws the texture draws just plain white one on 1024x1024 dismensions i set position to 640x512 bcz i use 1280x1024 resolution and those are coords of point in the middle of the screen. However this still don't draw custom texture which i want. Yeah i know this hasn't been used in game before but on gtagangstas in opcode database and on gtamodding i read that opcode IS compatible with VC too, ...btw in which way would be HUD crosshair drawn then? Link to comment https://gtaforums.com/topic/457270-pso-1-like-reticle-for-sniper-rifle-cleo-mod/#findComment-1060090441 Share on other sites More sharing options...
MW_29 Posted August 20, 2010 Author Share Posted August 20, 2010 (edited) UPDATE!!! - Aug 20 2010 I couldn't sleep bcz of this so today i sat and worked to find out what the hell is wrong in this code, and then... first i get this: ...then i get this: ...and finally this one ;D : Uploaded with ImageShack.us Thanks goin-god for pointing me on the right way One more thing left is to make HUD display switched off when aim key pressed OR try to combine with size and position of the texture, so still W.I.P ;D UPDATE No.2 !!! - Aug 21 2010 My modification is finished, right now i got PSO-1 instead 'sitesnipera', for my Dragunov (sniper replacement), and Custom reticle for M107 Barrett (laser replacement). Code has been cutted and edited to work as i want it in VC. Similar to the Dalva's mod i made ability to use illuminated reticle for PSO-1 after keypress, and as for Barrett reticle i added NV and Thermal Vision versions of reticle also activated by other keypresses. It took me some time to debug scripts, there are now two separate .CS files for each sniper rifle in VC. And i could release it but i dont like that if i upload it on gtagarage.com you would have to wait a month for them to give you download link to it ;/ so i must think if there's sense at all to upload it on such website maybe ill upload it on a more reliable one... but it's not public as for today. So here are some screenies for you! SVD PSO-1: Normal and Illuminated M107 Custom: Normal, NV and Thermal Uploaded with ImageShack.us Edited August 21, 2010 by MW_29 Link to comment https://gtaforums.com/topic/457270-pso-1-like-reticle-for-sniper-rifle-cleo-mod/#findComment-1060090676 Share on other sites More sharing options...
MW_29 Posted August 24, 2010 Author Share Posted August 24, 2010 Mod released!!! Download link in this topic. Hope you all like it Link to comment https://gtaforums.com/topic/457270-pso-1-like-reticle-for-sniper-rifle-cleo-mod/#findComment-1060096740 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