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

    1. Red Dead Redemption 2

      1. Gameplay
      2. Missions
      3. Help & Support
    2. Red Dead Online

      1. Gameplay
      2. Find Lobbies & Outlaws
      3. Help & Support
    1. Crews & Posses

      1. Recruitment
    2. Events

    1. GTA Online

      1. Arena War
      2. After Hours
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Grand Theft Auto Series

    3. GTA Next

    4. GTA V

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

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

    7. GTA Vice City Stories

    8. GTA Liberty City Stories

    9. GTA San Andreas

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

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

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

      1. GTA Advance
      2. GTA 2
      3. GTA
    13. 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. News

    2. Forum Support

    3. Site Suggestions

LeeC2202

Displaying help text, without displaying help text.

Recommended Posts

LeeC2202

I need to duplicate the actions of the DisplayHelpTextThisFrame function but I can't find any other drawable item, other than instructional buttons that let me draw the input icons.

 

The reason I am doing this, is to be able to replicate main character activities for addon peds, but I need to block the "You don't have enough money for..." message, so I can put my own in its place. If I try to display mine as well, the game goes crazy trying to display 2 messages at the same time.

 

Is the DisplayHelpTextThisFrame reliant on a Scaleform, or is it a unique function that just happens to be able to draw sprites into text strings? That being said, are the input icons etc... drawable sprites that exist in a ytd somewhere?

Share this post


Link to post
Share on other sites
gopro_2027

I've done research into this before. I was actually just going to ask this question but I decided to look first.

Help text is actually mostly handled from inside the executable, and not scripts. So you can't really replicate it.

I still however wish I could figure our how it does the conversions from ~BLIP_...~ to the actual icon. If you try to do that in any other text, it will just show a blank space.

Share this post


Link to post
Share on other sites
LeeC2202

Yeah, that's the biggest problem, you can't draw those icons in any other text element, other than the instructional buttons... which are also scaleforms.

 

I did discover that the help text is part of the hud scaleform compoonents but I am not sure if you can create a second instance of that specific component and draw it elsewhere. But all the SET_CASH functions are in there, as well as the position stuff. I will look into it again at some point. I could add them as a custom sprite ytd and draw them as sprites myself but that's even more messing than just drawing the messages as sprites. They're probably in the gfx files, which means exporting and converting them all... and there's a shed-load of them.

 

Although the main things I need it for now are things like the cable cars and amusement rides but I don't even know if I can get them working anyway, so it's on the back-burner for now. If I find anything though, I will update this thread with any info.

Share this post


Link to post
Share on other sites
ramydarkness

hi guys..

i am translating GTAV to arabic ... i have problems:

1- text show letters separated, but i manage to reverse text to fix that.

2- blip notification box text is so small arabic lines is long and the box is wide short .. i want to make lines so long because it shows now 3 lines but the first line in the bottom and second line is above it and the third is at top , i think there is text letters limit like 38 letter... sound like crazy..

what can i do to edit blip text help box to make it wider to contain all text in one line. or increase text letters limit to bigger number?

thanks.

Share this post


Link to post
Share on other sites
LeeC2202

How about making your own thread on that topic, instead of trying to hijack another thread on a completely different topic? This is about HELP TEXT, not Blip text... make a thread!

Share this post


Link to post
Share on other sites
NoNameSet

Have you tried using the native DRAW_RECT to draw a rectangle on the middle of your screen, then drawing a text with the natives you have to call, including something like ~INPUT_CONTEXT~?

Share this post


Link to post
Share on other sites
LeeC2202
6 hours ago, NoNameSet said:

Have you tried using the native DRAW_RECT to draw a rectangle on the middle of your screen, then drawing a text with the natives you have to call, including something like ~INPUT_CONTEXT~?

From the bits of info I have pieced together, including some from reliable sources, it seems those button indicators only work in scaleforms and not in UIText elements. Which kinda makes sense as the other thing that can display them, is the instructional buttons. If you try to use those codes in text elements you get things like "b_108" appearing where those codes are used.

 

I'm probably just trying to do the impossible, unless there's a general purpose scaleform somewhere that I haven't found. I tried the native that requests hud scaleform elements but that did really bad things. I ended up with 2 scaleforms on my screen that even survived a game restart. I had to switch game versions to get rid of them.

 

The final option and one I really don't like the idea of, is to dump all the codes on screen across several help text messages, screen-grab them, extract the button-images as sprites and then build my own help text system using text and sprite drawing. That's probably the perfect definition of overkill.

 

Edit: Just discovered that if I do end up with the sprite + text option, I can extract the sprites with JPEXS and get them into PNG format with a bit of juggling. JPEXS seems to export PNG files with a green background but I can export to SWF and then export from Flash CS6 with proper transparency... so there is a long-winded solution, if that ends up as the only option.

Edited by LeeC2202

Share this post


Link to post
Share on other sites
gopro_2027
On 10/6/2018 at 6:48 AM, LeeC2202 said:

From the bits of info I have pieced together, including some from reliable sources, it seems those button indicators only work in scaleforms and not in UIText elements. Which kinda makes sense as the other thing that can display them, is the instructional buttons. If you try to use those codes in text elements you get things like "b_108" appearing where those codes are used.

 

I'm probably just trying to do the impossible, unless there's a general purpose scaleform somewhere that I haven't found. I tried the native that requests hud scaleform elements but that did really bad things. I ended up with 2 scaleforms on my screen that even survived a game restart. I had to switch game versions to get rid of them.

 

The final option and one I really don't like the idea of, is to dump all the codes on screen across several help text messages, screen-grab them, extract the button-images as sprites and then build my own help text system using text and sprite drawing. That's probably the perfect definition of overkill.

 

Edit: Just discovered that if I do end up with the sprite + text option, I can extract the sprites with JPEXS and get them into PNG format with a bit of juggling. JPEXS seems to export PNG files with a green background but I can export to SWF and then export from Flash CS6 with proper transparency... so there is a long-winded solution, if that ends up as the only option.

Sorry it has been awhile since I responded, today I've done more research into this issue and had some mixes results.

Yes, it is definitely a scaleform. That is the first thing. After some disassembly it boils down to the HUD_FLOATING_HELP_TEXT or HUD_HELP_TEXT. I can't tell the exactly which one it is however.

Here are the scaleform function I can see in plain text:

SET_HELP_TEXT_OFFSCREEN

SET_HELP_TEXT_POSITION

SET_HELP_TEXT_STYLE

SET_OVERRIDE_DURATION

SET_HELP_TEXT_RAW

HUD_FRONTEND_DEFAULT_SOUNDSET

 

I did some research online and found 2 really useful scaleform resources:

https://scaleform.devtesting.pizza/ This has a list of many scaleforms and their functions and arguments

https://forum.fivem.net/t/full-scaleform-list-decompiled/46771 This is a download with all the scaleforms/actionscripts decompiled. Some neat stuff, not as useful so far though.

So, I tried to replicate HUD_FLOATING_HELP_TEXT and HUD_HELP_TEXT by just normal scaleform stuff, however, I wasn't ever able to get anything to show on screen. I was however able to get MIDSIZED_MESSAGE and TEXTFIELD to work though, but neither would support the blips in text!

 

EDIT:

In HUD_FLOATING_HELP_TEXT.as the function SET_HELP_TEXT_RAW (which can be called via natives) there is this code:

var _loc6_ = new com.rockstargames.ui.utils.Text();
_loc6_.setTextWithIcons(_loc2_,this.blipLayer,this.CONTENT.helpText,0,14.4,2.65,false);

Seems pretty suspicious if u ask me

 

EDIT 2:

Okay so here is what it does:

It first creates an object of type MovieClip by calling createEmptyMovieClip (which is an actionscript function) then it puts all of the blips onto that object.

The way it puts all of the blips onto that object is by using the function setTextWithIcons which is part of com.rockstargames.ui.utils.Text

Here is the definition of setTextWithIcons:

function setTextWithIcons(text, movieClipToAttachBlips, txtField, fontStyle, pointSize, leading, centerAligned, translateText)
   {
      if(translateText == undefined)
      {
         translateText = false;
      }
      com.rockstargames.ui.game.GameInterface.call("SET_FORMATTED_TEXT_WITH_ICONS",com.rockstargames.ui.game.GameInterface.GENERIC_TYPE,text,movieClipToAttachBlips,txtField,fontStyle,pointSize,leading,centerAligned,translateText);
   }

So it calls SET_FORMATTED_TEXT_WITH_ICONS which I cannot figure out where that code is located. GameInterface.call is:

static function call()
   {
      flash.external.ExternalInterface.call.apply(null,arguments);
   }

All of this is from within 'Scaleform Generic\hud.gfx\scripts\__Packages' in the downloaded thing I linked above.

So really this just uses some lower level actionscript code, and is almost certainly not possible with plain natives/scaleforms without inserting some custom actionscript or doing low level reversing to call the actionscript functions directly...

I guess I'll look and see if any other scaleforms use SET_FORMATTED_TEXT_WITH_ICONS that I could mess with.

Edited by gopro_2027
conclusion

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

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