Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    2. News

    1. Red Dead Redemption 2

      1. News
      2. Red Dead Online
    1. GTA Online

      1. After Hours
      2. Find Lobbies & Players
      3. Guides & Strategies
      4. Vehicles
      5. Content Creator
      6. Help & Support
    2. Crews

      1. Events
      2. Recruitment
    1. Grand Theft Auto Series

    2. GTA Next

    3. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    4. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA Mods
    5. GTA Chinatown Wars

    6. GTA Vice City Stories

    7. GTA Liberty City Stories

    8. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    9. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    10. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    11. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    12. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    3. Featured Mods

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption

    2. Rockstar Games

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Programming
      5. Movies & TV
      6. Music
      7. Sports
      8. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. Forum Support

    2. Site Suggestions

Demarest

Coordinator v2 VC with Level III Darkpactor

Recommended Posts

Demarest

Recently learned the powerful tool of text_draw. So I decided to upgrade Coordinator. Unfortunately, in VC, 038E is a resolution specific command. If the mem-hacking community would like to turn me on to the address where screen resolution is held, I'll be able to automate the code. Otherwise, you'll need to set the first two lines to equal the X and Y of the resolution as a float. Those downloading the Level III Darkpactor off my site, that is set up for 1024 x 768. All of this can be modded of course.

 

To those not in the know, a Level III Darkpactor means you can drop it into your game and still use saves from original code (no need to restart). For those who wish to use the code, you may have to add the following line to Misison Builder's vicescm.ini. Backup before you do. Keep in mind this update will not take place until the next time you open MB.

038E=8,draw_box position %1d% %2d% scale %3d% %4d% color %5h% %6h% %7h% alpha %8d% 

Download page can be found here. Promotional script and code below.

 

user posted image

 

 

; you may have to add the next line without semicolor to vicescm.ini; 038E=8,draw_box position %1d% %2d% scale %3d% %4d% color %5h% %6h% %7h% alpha %8d% :COORDINATOR2VC0005:  [email protected] =  1024! ;<-- set to X value of screen resolution as a float0005:  [email protected] =  768!  ;<-- set to y value of screen resolution as a float03A4: name_thread "COORDS2"0087:  [email protected] =  [email protected]:  [email protected] =  [email protected]:  [email protected] =  [email protected]:  [email protected] =  [email protected]:  [email protected] =  [email protected]:  [email protected] /=  32!0017:  [email protected] /=  1.074!0017:  [email protected] /=  1.155!0017:  [email protected] /=  1.080!0017:  [email protected] /=  1.103!0017:  [email protected] /=  8.827!0017:  [email protected] /=  7.314!:COORDINATOR2VCLOOP0001: wait  0? ms00D6: if  0?0256:   defined $PLAYER_CHAR004D: jump_if_false ££COORDINATOR2VCLOOP03F0: (unknown)  1? 0054:  [email protected] = player $PLAYER_CHAR x_pos,  [email protected] = player $PLAYER_CHAR y_pos,  [email protected] = player $PLAYER_CHAR z_pos0054:  [email protected] = player $PLAYER_CHAR x_pos,  [email protected] = player $PLAYER_CHAR y_pos,  [email protected] = player $PLAYER_CHAR z_pos0170:  [email protected] = player $PLAYER_CHAR z_angle0170:  [email protected] = player $PLAYER_CHAR z_angle008E:  [email protected] = float_to_integer  [email protected]:  [email protected] = integer_to_float  [email protected]:  [email protected] -=  [email protected]:  [email protected] *=  1000!0097: make  [email protected] absolute_float008E:  [email protected] = float_to_integer  [email protected]:  [email protected] = float_to_integer  [email protected]:  [email protected] = integer_to_float  [email protected]:  [email protected] -=  [email protected]:  [email protected] *=  1000!0097: make  [email protected] absolute_float008E:  [email protected] = float_to_integer  [email protected]:  [email protected] = float_to_integer  [email protected]:  [email protected] = integer_to_float  [email protected]:  [email protected] -=  [email protected]:  [email protected] *=  1000!0097: make  [email protected] absolute_float008E:  [email protected] = float_to_integer  [email protected]:  [email protected] = float_to_integer  [email protected]:  [email protected] = integer_to_float  [email protected]:  [email protected] -=  [email protected]:  [email protected] *=  100!0097: make  [email protected] absolute_float008E:  [email protected] = float_to_integer  [email protected]: draw_box position  [email protected]  [email protected] scale  [email protected]  [email protected] color  0?  0?  0? alpha  140&0087:  [email protected] =  [email protected]: gosub ££COORDINATOR2VCPARAMSRIGHT045A: text_draw_1number  592!  379! "NUMBER"  [email protected]: gosub ££COORDINATOR2VCPARAMSDRAWPOINT0050: gosub ££COORDINATOR2VCPARAMSDRAW045A: text_draw_1number  599!  379! "NUMBER"  [email protected]: gosub ££COORDINATOR2VCPARAMSRIGHT045A: text_draw_1number  592!  393! "NUMBER"  [email protected]: gosub ££COORDINATOR2VCPARAMSDRAWPOINT0050: gosub ££COORDINATOR2VCPARAMSDRAW045A: text_draw_1number  599!  393! "NUMBER"  [email protected]: gosub ££COORDINATOR2VCPARAMSRIGHT045A: text_draw_1number  592!  407! "NUMBER"  [email protected]: gosub ££COORDINATOR2VCPARAMSDRAWPOINT0050: gosub ££COORDINATOR2VCPARAMSDRAW045A: text_draw_1number  599!  407! "NUMBER"  [email protected]: gosub ££COORDINATOR2VCPARAMSRIGHT045A: text_draw_1number  592!  421! "NUMBER"  [email protected]: gosub ££COORDINATOR2VCPARAMSDRAWPOINT0050: gosub ££COORDINATOR2VCPARAMSDRAW045A: text_draw_1number  599!  421! "NUMBER"  [email protected]: jump ££COORDINATOR2VCLOOP:COORDINATOR2VCPARAMSRIGHT03E4: text_draw_align_right  1?:COORDINATOR2VCPARAMSDRAW0343: set_text_linewidth  500!0348: text_draw_proportional  1? 033F: set_text_draw_letter_width_height  .4!  1.3!0340: set_text_draw_color  255&  255&  255&  180&0051: return:COORDINATOR2VCPARAMSDRAWPOINT038E: draw_box position  [email protected]  [email protected] scale  4.5!  4.5! color  0?  0?  0? alpha  220&038E: draw_box position  [email protected]  [email protected] scale  2.5!  2.5! color  255&  255&  255& alpha  180&000B:  [email protected] +=  [email protected]: return

 

Share this post


Link to post
Share on other sites
jarjar

Wow Dem, you've been on a roll this week, what is it now? 5 new mods, nice work. I'm loving this "text_draw" function, i might have to do some research on it, i want to learn some more about it, will surely come in handy.

 

Once again Dem, nice work, and thank you for continually contributing to the GTA Modding Community. Your one hell of a great modder icon14.gif.

 

Cheers'

Share this post


Link to post
Share on other sites
ms.cooldude

Exelent stuff!user posted image

 

Now I can code without guessing the z angle!

Share this post


Link to post
Share on other sites
pdescobar

I don't have a PC copy of VC and only have SA coding experience, so I might be asking a stupid question here, but...

 

How does that script handle leading zeroes without either using custom GXT entries or explicitly drawing them in? For example, if your x coord is 68.003, it looks to me like [email protected] ends up with the value 3. So does the box actually display "68.003" or does it display "68.3"?

Share this post


Link to post
Share on other sites
Demarest

Indeed sad.gif Worse part is that I can't think of a solution without actually using GXT's. Something I was trying to avoid. I could right justify the floating point, but that would have blank placeholders then and wouldn't look good at all confused.gif

 

I DO appreciate you catching that, even if it is bad news.

Share this post


Link to post
Share on other sites
pdescobar

What about drawing in the leading zeroes? Something like this completely untested, very pseudo pseudocode:

 

 

[email protected] =  599!if ([email protected] < 100) {  0050: gosub ££COORDINATOR2VCPARAMSDRAW  045A: text_draw_1number  [email protected]  379! "NUMBER"  0  [email protected] += 10!;; just a guess; would basically be the width of a zero  if ([email protected] < 10) {     0050: gosub ££COORDINATOR2VCPARAMSDRAW     045A: text_draw_1number  [email protected]  379! "NUMBER"  0     [email protected] += 10!;; just a guess; would basically be the width of a zero  }}0050: gosub ££COORDINATOR2VCPARAMSDRAW045A: text_draw_1number  [email protected]  379! "NUMBER"  [email protected]

 

It seems like that could work, drawing each leading zero and shifting the next draw command to the right as necessary. If you have enough free locals, you might even be able to do the whole thing as a subroutine since it'd be used 3 times; the z angle would need a slightly different approach as it's only 2 decimal places.

 

If that works, I may adopt a similar approach for my stat displayer in SA. tounge2.gif

Share this post


Link to post
Share on other sites
Demarest

Well I know that won't work. Reason being is that I originally had this in the upper left corner. Then I realized "duh, textboxes". So I moved it to the lower left. It was already fully functional (and therefore fully drawn out) in the upper left corner. So rather than trying to move it, I left it where it was and drew one more string to try and guess the lower right position and I was going to build from there. As soon as I asked it to write a 9th string, it began misbehaving. Only 8 of the 9 strings were actually displayed; one of which at an opacity more than double what was called for. It was then that I realized that VC has a limit of 8 strings being drawn at once. Poor GTA3 has a limit of TWO, which is why I wasn't able to convert this work to that game, which was a disappointment. Once I realized the power and flexibility of text_draw, I wanted to go nuts.

 

GXT entries it will have to be. It will be 2 instead of coordinators need for 8 and still has a sleeker design and the inclusion of z_angle. Not a total waste of my time. It's just ironic because the original Coordinator compenstated for this, so there's no reason for me to have forgotten in in v2 save of course for my own overzealousness.

Share this post


Link to post
Share on other sites
pdescobar

Ah well, it was worth a shot. For what it's worth, the SA limit seems to be 96 strings; I even managed to hit it while trying to adopt my above suggested method for my stat displayer. tounge2.gif

 

Enough with the bad news though. The text box in the corner is a really nice way to handle coordinate display, and that was pretty clever how you actually drew in the decimal points. icon14.gif

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.