OrionSR Posted January 6, 2022 Share Posted January 6, 2022 Wow! I really like the new text size. And that screenshot with the 8-track overlay is exactly the type of testing we need to do next. It looks like the box was raised a little; I'm worried it will conflict with the "Spook-O-Meter" from Snail Trail and... the mission when CJ tails Millie. Please continue to identify and document other screen elements from missions that might conflict with the lists. There's not much to be done about the popup boxes that display in the upper right other than... I think I can detect when a text box is displayed and disable the left panel until it's gone. Complicated menus like transfender might be a major issue. Try to get the player stats list updated and displayed on the left. Both scripts should work at the same time if the is_right_panel settings are different. Both panels will probably need to be disabled when CJ is playing video games, betting on horses, playing video poker, or other casino games. FYI: The Draw commands we are using are closely related to the draw strategies used in the video games. The video games display more sprites and textures but the strategies are the same. Basically, we are redrawing the list text every frame so it updates in real time. ZAZ's menu scripts, text boxes and most displayed text are easier to use because there's more programming behind the scenes. The boxes automatically resize for the text, text fades after display, and the commands include options to adjust the style, font, time of display, etc. With draw commands we need to control everything within the script. Specific notes on your latest report: Pistol skill is still displayed as 1000/1000 instead of 1000.0/1000.0. The calculations are correct, the GXT text needs fixing. Rifle skill serves no purpose. You can move the text left by adjusting the x_pos for the right panel. The right side of the screen is at 640.0, the current setting is 630.0, so with right alignment the margin is 10.0. Increase the margin by reducing 630.0 to... 625.0? Maybe? The x_pos of the left panel is the same as a margin. So a value of 15.0 would balance with the 625.0. Eventually I want the script to calculate the right margin and box position. The optimal text size would depend on the type of data displayed and number of lines required. Let's present good options instead. Keep track of the settings you've tested with notes on the results as we develop the script. Later we can throw out the trash and keep several good examples that a user can adopt. Something like; //033F: set_text_draw_letter_size 0.48 1.12 // default //033F: set_text_draw_letter_size 0.18 0.60 // very small //033F: set_text_draw_letter_size 0.36 0.72 // too wide 033F: set_text_draw_letter_size 0.22 1.1 // medium large I don't think I can make much progress today, but I'm still available to help with any questions you might have. If you can't get the player stats working on the left to help with testing I'll try to come up with something that will work based on the current examples. There's a lot I want to rework before another update. It'll probably take a few days. I've been pushing out updates quickly so you'd have what you needed, but I should take a bit more time to consider my options. Again, nice work. I look forward to your observations of conflicts with other game elements. Link to comment Share on other sites More sharing options...
ArmanCan Posted January 6, 2022 Author Share Posted January 6, 2022 (edited) Well.. Rockstar developers especially used RIGHT SIDE for some missions.. especially time against missions or scores.. if you would like me a getting a full list of these missions i can post it but you can get rid most of the work if you place all the lists to LEFT SIDE 033F: set_text_draw_letter_size 0.22 1.1 // medium large If you noticed there is a 1/5 Ratio on these both sizes.. (0.22=x 1.1=5x) and we can stick to this ratio but we didn't determine our longest list yet.. I will also move the text right now.. Update... "x_pos = 617.0" seems great for this drawbox.. 000B: y_pos += linespace 0652: int_val = integer_stat 230 // Cycling 0050: gosub @Format_Text if is_right_panel == false then 045A: draw_text_1number x_pos y_pos GXT 'LINE_RB' int_val else 045A: draw_text_1number x_pos y_pos GXT 'LINE_LB' int_val end As i said before i can create all the "Statistics ID" from SB but i need a LATEST CODE for both integers and floats.. I can also create some of the scripts in order to complete a new list if you can give me a template.. If you want more lists please let me know so i can create maybe 6 more lists Edited January 6, 2022 by ArmanCan Link to comment Share on other sites More sharing options...
OrionSR Posted January 7, 2022 Share Posted January 7, 2022 1 hour ago, ArmanCan said: If you want more lists please let me know so i can create maybe 6 more lists I would suggest gathering the information needed for more lists but hold off on coding anything until a new template is available. At this point I'm fairly confident that you'll be able to use this information in the near future - hopefully within a couple/few days. If I write a dual-panel screen test script will you use it to check for conflicts with mission elements? You can probably speed up the research process by flicking through mission videos. It's actually pretty easy to detect and disable display when specific missions are active. More difficult would be disabling the list during certain parts of a mission, but that could be managed too, so keep an eye out for the difference. New objective for the RTSM Control script: Monitor the status of screen conflicts and disable/re-enable panel scripts appropriately. The control script's job is to do the heavy lifting; it should manage this part so anyone coding a list-script doesn't need to worry about it. Link to comment Share on other sites More sharing options...
OrionSR Posted January 10, 2022 Share Posted January 10, 2022 Current progress: After testing vigilante I figured the right panel will need to be disabled during missions until a mission conflict list is generated. I want to take another look in the morning before I upload the new test scripts so you can play with them. For later: Any suggestions for additional stats or other player data? I was planning to drop vehicle skills from the stats list since they seem more appropriately listed under skills. Armor/max armor, health/max health? Busted, wasted, cheats? Link to comment Share on other sites More sharing options...
ArmanCan Posted January 10, 2022 Author Share Posted January 10, 2022 (edited) @OrionSR AWESOME MAN!! DEFINITELY AWESOME!! Right side of "/1000.0" (Max Health, Armor) changes when the player completes Paramedic and Vigilante.. if you can arrange this we can add.. - Max Health, Armor and "Luck" to Stats List.. - Busted, Wasted, Cheats,"170 Times drowned" "134 Days passed in game", "136 Safehouse visits", "198 Times visited the gym" and "138 Vehicle Resprays " must be under the "Misc" menu... We an also add Collectibles, Missions and Girlfriends/Achievements for example.. COLLECTIBLES 322 Tags sprayed 231 Snapshots Taken 232 Total Snapshots 241 Horseshoes collected 242 Total Horseshoes 243 Oysters Collected 244 Total Oysters MISSIONS 146 Mission attempts 147 Missions passed 150 Passengers dropped off 158 Highest Paramedic Mission level 151 People saved in an Ambulance 157 Highest Vigilante Mission level 152 Criminals killed on Vigilante Mission 159 Highest Firefighter Mission level 153 Total fires extinguished 161 Number of Truck missions passed 202 Time taken to Complete Quarry (I couldn't find the data of Quarry Level) 171 Number of girls pimped 210 Pimping level 174 Shooting range levels passed 175 Most cars parked on 'Valet Parking' 154 Packages Delivered GIRLFRIENDS/ACHIEVEMENTS 252 Progress with Denise 253 Progress with Michelle 254 Progress with Helena 255 Progress with Barbara 256 Progress with Katie 257 Progress with Millie 184 Current number of girlfriends 185 Number of disastrous dates 186 Number of girls dated 187 Number of times scored with a girl 188 Number of successful dates 189 Number of girls dumped 190 Number of prostitutes visited 156 Last dance score 215 Highest basketball score 144 Unique Jumps found 145 Unique Jumps done Actually there are tons of RACES and CHALLENGES in this game which can be easily listed like "Los Santos Races" or "Air Races" but i have no idea if it's possible to write in minutes/hours whatever additional to that there are also GANGS and CRIMES which will be useful for Gang Wars.. I'm also waiting for your template in order to fill up these lists if we decide our list orders Edited January 10, 2022 by ArmanCan Link to comment Share on other sites More sharing options...
OrionSR Posted January 10, 2022 Share Posted January 10, 2022 13 minutes ago, ArmanCan said: I'm also waiting for your template in order to fill up these lists if we decide our list orders I know, I know. I didn't want you to think I had abandoned you so I posted the screenshot. Tomorrow, and probably later than you'd like. I'm up way too late. I want to read though it with a fresh eye until I stop finding bugs. Like rife skill, Luck serves no purpose. Link to comment Share on other sites More sharing options...
OrionSR Posted January 10, 2022 Share Posted January 10, 2022 (edited) 10 hours ago, OrionSR said: I want to read though it with a fresh eye until I stop finding bugs. And first thing this morning I found a minor bug. But something else was gnawing at me, the script wasn't as easy to edit as I had initially imagined, and this morning a solution has presented itself. I think I can change the basic line element segment from my "b1" test example from: 000B: y_pos += linespace // Line 3 0653: int_val = float_stat 70 // Silenced Pistol 0050: gosub @Split_Float if is_right_panel == true then 0050: gosub @Format_Align_Left 0ADF: add_dynamic_GXT_entry "LINE3_R" text "Silenced Pistol:" 033E: set_draw_text_position left_x_pos y_pos GXT 'LINE3_R' 0050: gosub @Format_Align_Right 045B: draw_text_2numbers right_x_pos y_pos GXT 'FLOAT_R' int_val dec_part else 0050: gosub @Format_Align_Left 0ADF: add_dynamic_GXT_entry "LINE3_L" text "Silenced Pistol:" 033E: set_draw_text_position left_x_pos y_pos GXT 'LINE3_L' 0050: gosub @Format_Align_Right 045B: draw_text_2numbers right_x_pos y_pos GXT 'FLOAT_L' int_val dec_part end To a much simpler design: 000B: y_pos += linespace // Line 3 0653: int_val = float_stat 70 // Silenced Pistol 0050: gosub @Split_Float 0050: gosub @Format_Align_Left //0ADF: add_dynamic_GXT_entry "rtFS070" text "Silenced Pistol:" 033E: set_draw_text_position left_x_pos y_pos GXT 'rtFS070' 0050: gosub @Format_Align_Right 045B: draw_text_2numbers right_x_pos y_pos GXT 'flt1000' int_val dec_part The new design should allow the dynamic GXT to be moved before the loop without adding any confusion regarding panel side. Spamming the add GXT command every frame didn't cause any obvious problems in limited testing, but it seemed like a terrible coding practice. The main disadvantage of free form GXT is that there is no easy way to clean out the dynamic GTX when the script is remotely terminated, but... Few scripters ever bother removing dynamic GXT and I've never heard of it being a problem outside of GXT collisions from too obvious of a key - all cap dictionary words, for example. I'm excited about this new idea but need to try it out before I post a new template. I can tell you are anxious to begin coding new lists, but I don't want you to put a lot of work into long lists in one format just to have it all change a few days later. Teaser: Updated configuration segment controlling all relevant data - you don't need to dig around in the subroutines to edit your preferences. The box will reposition itself around the text based on the parameters set in the configuration segment. Spoiler const {Configuration} text_font = Font_Aharoni linewidth = 135.0 linespace = 10.0 num_lines = 19.0 topline = 140.0 margin = 10.0 centered_offset = 10.0 box_frame_size = 7.0 letter_width = 0.22 letter_height = 1.10 //033F: set_text_draw_letter_size 0.22 1.10 // medium large //033F: set_text_draw_letter_size 0.18 0.60 // very small //033F: set_text_draw_letter_size 0.48 1.12 // default // 218 165 32 255 // Goldenrod title_red = 218 title_green = 165 title_blue = 32 title_alpha = 255 // 250 250 250 255 // White text_red = 250 text_green = 250 text_blue = 250 text_alpha = 255 // 0 0 0 255 // Black outline_red = 0 outline_green = 0 outline_blue = 0 outline_alpha = 255 // 0 0 0 60 // Black Tint box_red = 0 box_green = 0 box_blue = 0 box_alpha = 60 end New subroutines: These subroutines are examples of how to create other custom text formats - variations on the old :Format_Text. :Format_Title_Centered :Format_Align_Left :Format_Align_Right :Format_Align_Centered Sorry about not having something better to post today, but if this works out as hoped it'll be a much better template. Edited January 11, 2022 by OrionSR Link to comment Share on other sites More sharing options...
ArmanCan Posted January 11, 2022 Author Share Posted January 11, 2022 11 hours ago, OrionSR said: Tomorrow, and probably later than you'd like. I'm up way too late. I want to read though it with a fresh eye until I stop finding bugs. Being excited doesn't mean that "I want that immediately" so off course take your time and relax.. Talking about bugs.. i think the last "1000.0" from "Lung Capacity" seems wrong.. We should also remove the driving skills from the left (like you said) and put "Collectibles" instead.. 1 hour ago, OrionSR said: The box will reposition itself around the text based on the parameters set in the configuration segment. How about "Size"??? Is the box going to resize itself? (Maybe only heights) And let me get this straight.. This script includes three elements (Panel switches, the sizes of boxes/texts and the list templates themself).. right? And i'm waiting from you an updated template?? Link to comment Share on other sites More sharing options...
OrionSR Posted January 11, 2022 Share Posted January 11, 2022 50 minutes ago, ArmanCan said: How about "Size"??? Is the box going to resize itself? (Maybe only heights) You supply these values and the panel switcher figures out where to put left, right and centered text, and a slightly larger box around it all. box_height = num_lines * linespace + box_frame_size linewidth = 135.0 linespace = 10.0 num_lines = 19.0 topline = 140.0 margin = 10.0 centered_offset = 10.0 box_frame_size = 7.0 1 hour ago, ArmanCan said: This script includes three elements Basically yes, well... 4 - Config. The script is arranged to keep the stuff that gets edited most near the top. Configuration in the header. (Constants are SB compiler directives, not opcodes.) (then dynamic gxt in next version, still part of configuration though) Panel Switching/Calculations (hidden with gosub to bottom, requires advanced editing) Draw Loop - draw a box and refresh the list Subroutines for formatting text and numbers (and finally the panel switching subroutine) Link to comment Share on other sites More sharing options...
OrionSR Posted January 11, 2022 Share Posted January 11, 2022 (edited) Latest Update: RTSM_Templates_b3.zip No major changes to appearance. Panel sides were swapped in {debug} just to make sure that still works. Colons are gone. Standard GXT (that doesn't include colons) is now being used for stats. Usually 'STAT025' for stat 25. But for long skill names I substituted the weapon names so the panel wouldn't be too wide. The long debug wait was removed. I'm not as worried about the scripts crashing, and I want them to react quickly when launch remotely - the next stage of development. No content changes. I just wanted to fill the panels for testing. Please refine the scripts as you see fit. I'll see if I can get list segments for health and armor working soon. Something like, "Health 150.0 176 max"? The revisions have shortened the scripts significantly, so I'll post the player skills script below since it's the most complete. Spoiler {$CLEO .cs} // RTSM_Player_Skills_b1.txt { Real Time Status Monitor - Player Skills by OrionSR & ArmanCan Jan 11, 2022 } {Header - Configuring Sanny Builder} const {Internal} is_right_panel = [email protected] // passed when launched int_val = [email protected] dec_part = [email protected] left_x_pos = [email protected] right_x_pos = [email protected] centered_x_pos = [email protected] title_x_pos = [email protected] y_pos = [email protected] box_x_pos = [email protected] box_y_pos = [email protected] box_width = [email protected] box_height = [email protected] Font_Pricedown = 0 Font_Aharoni = 1 Font_Gothic = 2 Font_Beckett = 3 end const {Configuration} text_font = Font_Aharoni linewidth = 130.0 linespace = 10.0 num_lines = 19.0 topline = 140.0 margin = 10.0 centered_offset = 10.0 box_frame_size = 7.0 letter_width = 0.22 letter_height = 1.10 //033F: set_text_draw_letter_size 0.22 1.10 // medium large //033F: set_text_draw_letter_size 0.18 0.60 // very small //033F: set_text_draw_letter_size 0.48 1.12 // default // 218 165 32 255 // Goldenrod title_red = 218 title_green = 165 title_blue = 32 title_alpha = 255 // 250 250 250 255 // White text_red = 250 text_green = 250 text_blue = 250 text_alpha = 255 // 0 0 0 255 // Black outline_red = 0 outline_green = 0 outline_blue = 0 outline_alpha = 255 // 0 0 0 60 // Black Tint box_red = 0 box_green = 0 box_blue = 0 box_alpha = 60 end /* =============================================================== */ {debug} //wait 3000 //is_right_panel = true //is_right_panel = false {Initialize - Run-once codes to get ready for the While..End loop.} wait 0 {GXT key, 7 chars max | Case doesn't matter in game} {Dynamic GXT - Mixed Case | Standard GXT - ALL CAPS} 0ADF: add_dynamic_GXT_entry "int1000" text "~1~/1000" 0ADF: add_dynamic_GXT_entry "flt1000" text "~1~.~1~/1000.0" 0ADF: add_dynamic_GXT_entry "rtWSttl" text "--== WEAPON SKILLS ==--" 0ADF: add_dynamic_GXT_entry "rtVSttl" text "--== VEHICLE SKILLS ==--" 0ADF: add_dynamic_GXT_entry "LINEnum" text "Line Number:" 0050: gosub @Panel_Position_Calc {Draw Loop} while true 0001: wait 0 ms // only wait in loop or it'll blink with high fps 03F0: enable_text_draw 1 038E: draw_box_position box_x_pos box_y_pos size box_width box_height RGBA box_red box_green box_blue box_alpha 0007: y_pos = topline // Line 1 0050: gosub @Format_Title_Centered 033E: set_draw_text_position title_x_pos y_pos GXT 'rtWSttl' 000B: y_pos += linespace // Line 2 0653: int_val = float_stat 69 // Pistol Skill 0050: gosub @Split_Float 0050: gosub @Format_Align_Left 033E: set_draw_text_position left_x_pos y_pos GXT 'STAT069' // Pistol Skill 0050: gosub @Format_Align_Right 045B: draw_text_2numbers right_x_pos y_pos GXT 'flt1000' int_val dec_part 000B: y_pos += linespace // Line 3 0653: int_val = float_stat 70 // Silenced Pistol Skill 0050: gosub @Split_Float 0050: gosub @Format_Align_Left // 033E: set_draw_text_position left_x_pos y_pos GXT 'STAT070' // Silenced Pistol Skill 033E: set_draw_text_position left_x_pos y_pos GXT 'STWE002' // Silenced Pistol 0050: gosub @Format_Align_Right 045B: draw_text_2numbers right_x_pos y_pos GXT 'flt1000' int_val dec_part 000B: y_pos += linespace // Line 4 0653: int_val = float_stat 71 // Desert Eagle Skill 0050: gosub @Split_Float 0050: gosub @Format_Align_Left 033E: set_draw_text_position left_x_pos y_pos GXT 'STAT071' // Desert Eagle Skill 0050: gosub @Format_Align_Right 045B: draw_text_2numbers right_x_pos y_pos GXT 'flt1000' int_val dec_part 000B: y_pos += linespace // Line 5 0653: int_val = float_stat 72 // Shotgun Skill 0050: gosub @Split_Float 0050: gosub @Format_Align_Left 033E: set_draw_text_position left_x_pos y_pos GXT 'STAT072' // Shotgun Skill 0050: gosub @Format_Align_Right 045B: draw_text_2numbers right_x_pos y_pos GXT 'flt1000' int_val dec_part 000B: y_pos += linespace // Line 6 0653: int_val = float_stat 73 // Sawn-Off Shotgun Skill 0050: gosub @Split_Float 0050: gosub @Format_Align_Left // 033E: set_draw_text_position left_x_pos y_pos GXT 'STAT073' // Sawn-Off Shotgun Skill 033E: set_draw_text_position left_x_pos y_pos GXT 'STWE005' // Sawn-Off Shotgun 0050: gosub @Format_Align_Right 045B: draw_text_2numbers right_x_pos y_pos GXT 'flt1000' int_val dec_part 000B: y_pos += linespace // Line 7 0653: int_val = float_stat 74 // Combat Shotgun Skill 0050: gosub @Split_Float 0050: gosub @Format_Align_Left // 033E: set_draw_text_position left_x_pos y_pos GXT 'STAT074' // Combat Shotgun Skill 033E: set_draw_text_position left_x_pos y_pos GXT 'STWE006' // Combat Shotgun 0050: gosub @Format_Align_Right 045B: draw_text_2numbers right_x_pos y_pos GXT 'flt1000' int_val dec_part 000B: y_pos += linespace // Line 8 0653: int_val = float_stat 75 // Machine Pistol Skill 0050: gosub @Split_Float 0050: gosub @Format_Align_Left // 033E: set_draw_text_position left_x_pos y_pos GXT 'STAT075' // Machine Pistol Skill 033E: set_draw_text_position left_x_pos y_pos GXT 'STWE007' // Machine Pistol 0050: gosub @Format_Align_Right 045B: draw_text_2numbers right_x_pos y_pos GXT 'flt1000' int_val dec_part 000B: y_pos += linespace // Line 9 0653: int_val = float_stat 76 // SMG Skill 0050: gosub @Split_Float 0050: gosub @Format_Align_Left 033E: set_draw_text_position left_x_pos y_pos GXT 'STAT076' // SMG Skill 0050: gosub @Format_Align_Right 045B: draw_text_2numbers right_x_pos y_pos GXT 'flt1000' int_val dec_part 000B: y_pos += linespace // Line 10 0653: int_val = float_stat 77 // AK-47 Skill 0050: gosub @Split_Float 0050: gosub @Format_Align_Left 033E: set_draw_text_position left_x_pos y_pos GXT 'STAT077' // AK-47 Skill 0050: gosub @Format_Align_Right 045B: draw_text_2numbers right_x_pos y_pos GXT 'flt1000' int_val dec_part 000B: y_pos += linespace // Line 11 0653: int_val = float_stat 78 // M4 Skill 0050: gosub @Split_Float 0050: gosub @Format_Align_Left 033E: set_draw_text_position left_x_pos y_pos GXT 'STAT078' // M4 Skill 0050: gosub @Format_Align_Right 045B: draw_text_2numbers right_x_pos y_pos GXT 'flt1000' int_val dec_part 000B: y_pos += linespace // Line 12 000B: y_pos += linespace // Line 13 0050: gosub @Format_Title_Centered 033E: set_draw_text_position title_x_pos y_pos GXT 'rtVSttl' 000B: y_pos += linespace // Line 14 0652: int_val = integer_stat 160 // Driving skill 0050: gosub @Format_Align_Left 033E: set_draw_text_position left_x_pos y_pos GXT 'STAT160' // Driving skill 0050: gosub @Format_Align_Right 045A: draw_text_1number right_x_pos y_pos GXT 'int1000' int_val 000B: y_pos += linespace // Line 15 0652: int_val = integer_stat 223 // Flying skill 0050: gosub @Format_Align_Left 033E: set_draw_text_position left_x_pos y_pos GXT 'STAT223' // Flying skill 0050: gosub @Format_Align_Right 045A: draw_text_1number right_x_pos y_pos GXT 'int1000' int_val 000B: y_pos += linespace // Line 16 0652: int_val = integer_stat 229 // Bike skill 0050: gosub @Format_Align_Left 033E: set_draw_text_position left_x_pos y_pos GXT 'STAT229' // Bike skill 0050: gosub @Format_Align_Right 045A: draw_text_1number right_x_pos y_pos GXT 'int1000' int_val 000B: y_pos += linespace // Line 17 0652: int_val = integer_stat 230 // Cycling skill 0050: gosub @Format_Align_Left 033E: set_draw_text_position left_x_pos y_pos GXT 'STAT230' // Cycling skill 0050: gosub @Format_Align_Right 045A: draw_text_1number right_x_pos y_pos GXT 'int1000' int_val 000B: y_pos += linespace // Line 18 int_val = 18 0050: gosub @Format_Align_Left 033E: set_draw_text_position left_x_pos y_pos GXT 'LINEnum' 0050: gosub @Format_Align_Right 045A: draw_text_1number right_x_pos y_pos GXT 'NUMBER' int_val // ~1~ 000B: y_pos += linespace // Line 19 int_val = 19 0050: gosub @Format_Align_Left 033E: set_draw_text_position left_x_pos y_pos GXT 'LINEnum' 0050: gosub @Format_Align_Right 045A: draw_text_1number right_x_pos y_pos GXT 'NUMBER' int_val // ~1~ end {Subroutines - avoids repetition of common code segments} :Format_Title_Centered 0349: set_text_draw_font text_font 0340: set_text_draw_RGBA title_red title_green title_blue title_alpha 081C: draw_text_outline 1 RGBA outline_red outline_green outline_blue outline_alpha 03E4: set_text_draw_align_right false 0342: set_text_draw_centered true 033F: set_text_draw_letter_size letter_width letter_height 0343: set_text_draw_linewidth 640.0 0051: return :Format_Align_Left 0349: set_text_draw_font text_font 0340: set_text_draw_RGBA text_red text_green text_blue text_alpha 081C: draw_text_outline 1 RGBA outline_red outline_green outline_blue outline_alpha 03E4: set_text_draw_align_right false 0342: set_text_draw_centered false 033F: set_text_draw_letter_size letter_width letter_height 0343: set_text_draw_linewidth 640.0 0051: return :Format_Align_Right 0349: set_text_draw_font text_font 0340: set_text_draw_RGBA text_red text_green text_blue text_alpha 081C: draw_text_outline 1 RGBA outline_red outline_green outline_blue outline_alpha 03E4: set_text_draw_align_right true 0342: set_text_draw_centered false 033F: set_text_draw_letter_size letter_width letter_height 0343: set_text_draw_linewidth 640.0 0051: return :Format_Align_Centered 0349: set_text_draw_font text_font 0340: set_text_draw_RGBA text_red text_green text_blue text_alpha 081C: draw_text_outline 1 RGBA outline_red outline_green outline_blue outline_alpha 03E4: set_text_draw_align_right false 0342: set_text_draw_centered true 033F: set_text_draw_letter_size letter_width letter_height 0343: set_text_draw_linewidth 640.0 0051: return :Split_Float 0087: dec_part = int_val // (float) 0092: int_val = float int_val to_integer 008F: int_val = integer int_val to_float 0063: dec_part -= int_val // (float) 0013: dec_part *= 10.0 0092: int_val = float int_val to_integer 0092: dec_part = float dec_part to_integer 0051: return :Panel_Position_Calc if is_right_panel == true then 03A4: name_thread 'RTSM_R' title_x_pos = linewidth title_x_pos /= -2.0 title_x_pos += 640.0 title_x_pos -= margin left_x_pos = 640.0 left_x_pos -= margin left_x_pos -= linewidth right_x_pos = 640.0 right_x_pos -= margin centered_x_pos = linewidth centered_x_pos /= -2.0 centered_x_pos += 640.0 centered_x_pos -= margin centered_x_pos += centered_offset box_x_pos = linewidth box_x_pos /= -2.0 box_x_pos += 640.0 box_x_pos -= margin box_y_pos = num_lines box_y_pos *= linespace box_y_pos /= 2.0 box_y_pos += topline box_width = linewidth box_width += box_frame_size box_height = linespace box_height *= num_lines box_height += box_frame_size else 03A4: name_thread 'RTSM_L' title_x_pos = linewidth title_x_pos /= 2.0 title_x_pos += margin left_x_pos = margin right_x_pos = margin right_x_pos += linewidth centered_x_pos = linewidth centered_x_pos /= 2.0 centered_x_pos += margin centered_x_pos += centered_offset box_x_pos = linewidth box_x_pos /= 2.0 box_x_pos += margin box_y_pos = num_lines box_y_pos *= linespace box_y_pos /= 2.0 box_y_pos += topline box_width = linewidth box_width += box_frame_size box_height = linespace box_height *= num_lines box_height += box_frame_size end return Testing snippet: (wrap a cheat string script around it) Spoiler 062A: change_float_stat 69 to 100.0 // Pistol Skill 062A: change_float_stat 70 to 200.0 // Silenced Pistol Skill 062A: change_float_stat 71 to 300.0 // Desert Eagle Skill 062A: change_float_stat 72 to 400.0 // Shotgun Skill 062A: change_float_stat 73 to 500.0 // Sawn-Off Shotgun Skill 062A: change_float_stat 74 to 600.0 // Combat Shotgun Skill 062A: change_float_stat 75 to 700.0 // Machine Pistol Skill 062A: change_float_stat 76 to 800.0 // SMG Skill 062A: change_float_stat 77 to 900.0 // AK-47 Skill 062A: change_float_stat 78 to 1000.0 // M4 Skill 0629: change_integer_stat 160 to 250 // Driving skill 0629: change_integer_stat 223 to 500 // Flying skill 0629: change_integer_stat 229 to 750 // Bike skill 0629: change_integer_stat 230 to 1000 // Cycling skill 0629: change_integer_stat 225 to 111 // Lung Capacity 062A: change_float_stat 21 to 222.0 // Fat 062A: change_float_stat 22 to 333.0 // Stamina 062A: change_float_stat 23 to 444.0 // Muscle 062A: change_float_stat 68 to 555.0 // Respec //062A: change_float_stat 25 to 666.0 // Sex Appeal 062A: change_float_stat 81 to 777.0 // Gambling Edit: GXT Reference: I can't seem to access the somewhat incomplete but user friendly GXT reference hosted on the Sanny site anymore. GXT keys are tricky. Only a hash of the string is stored in the GXT table, so figuring out the plain text string requires a bit of expertise. Serge's GXT reference seems to be the most complete, but you might need to search through different pages to find what you're after. Beware of complex strings like [A_COMP2:AMBULAE]. You won't be able to use the 'A_COMP2' GXT key without first loading the AMBULAE mission table. Edited January 11, 2022 by OrionSR Link to comment Share on other sites More sharing options...
ArmanCan Posted January 11, 2022 Author Share Posted January 11, 2022 I'm gonna ask one more question but please do not be mad at me These two scripts are "Two Lists On One Panel" scripts.. what should i do if i would like to create one list on one panel? I'm asking this because i don't want to break anything on this beatifully structured script by doing something stupid It seems i can start to add new lists or edit the existing ones.. you didn't post your desired lists but i think i can create all integer and floats with using SB ID's and send it to you so you can use it as an archive I have actually one more question.. when you create a new text or new box what is the standart "Pick Point/s"? (Top left, top middle, top right, down left, down middle, down right) Link to comment Share on other sites More sharing options...
OrionSR Posted January 12, 2022 Share Posted January 12, 2022 9 hours ago, ArmanCan said: i don't want to break anything on this beatifully structured script by doing something stupid Take a chance, break it, try again. I'll help if you have a specific problem, but... A primary test is whether or not an intelligent person can figure out how to adapt the script to their own purpose. Any problems you have will help inform the structure of the script and needed documentation. So please, make mistakes and tell me which parts are tricky. At this point I want to concentrate on the control script. I suspect some of your concerns will clear up once all the pieces are working together. I'll be learning new stuff to get the job done; progress might be slow. 9 hours ago, ArmanCan said: These two scripts are "Two Lists On One Panel" scripts.. what should i do if i would like to create one list on one panel? Uh.... What? Each script will display one list. It will display the list in the right or left panel. The current scripts have lists with two elements. A left aligned column/element currently displays text, and a right aligned element with a formatted number. I set up the script so a third element (like %) can be added between the left and right, but a third element isn't needed for stats, so that feature is currently unused. Still, they are all elements of one list. Another advantage of splitting the list is that only two numbers can be displayed at a time. Three elements allows for 3 floats to be displayed on a single line, or 6 integers, if required. (Health and armor (float) with a variable max value (integer) will start taking advantage of the added elements.) You could create a list with a single element. That was how the lists were implemented in the early tests. However, I wanted to display the text with right alignment so the numbers line up neatly, but right alignment on the left panel would wrap and corrupt the display whenever a zone name was displayed. Splitting the list into two elements, left and right side of the same box/panel, solved this problem. 11 hours ago, ArmanCan said: you didn't post your desired lists The lists I was planning to create are a bit more complex than just stats, but I expect I'll want to have a mix of stats and other variables on... a girlfriend list, for example. If any of your lists include the girlfriend stats then I should be able to save a bit of time by simply coping the relevant segments from your script. So, I don't need any particular lists, but anything you create might be useful again, and more importantly, it'll demonstrate how easy the script is to modify. 12 hours ago, ArmanCan said: what is the standart "Pick Point/s"? left_x_pos = [email protected] // left side of panel used with left aligned text right_x_pos = [email protected] // right side of panel used with right aligned text centered_x_pos = [email protected] // center of line with a modifier to nudge it left or right, align as needed title_x_pos = [email protected] // center of the line usally used with center alignment, like titles y_pos = [email protected] // each new line starts with a command to move the y_pos down, resets to topline for the next loop All values are calculated based on defined constants in the header. Link to comment Share on other sites More sharing options...
OrionSR Posted January 12, 2022 Share Posted January 12, 2022 On 1/11/2022 at 4:00 AM, ArmanCan said: These two scripts are "Two Lists On One Panel" scripts.. what should i do if i would like to create one list on one panel? Two Lists: Are you talking about Weapon Skills and Vehicle Skills as two on one? The extra titles are just another line with a slightly different format. Just delete that bit, and the associated dynamic GXT. Standard title at top: 0007: y_pos = topline // Line 1 0050: gosub @Format_Title_Centered 033E: set_draw_text_position title_x_pos y_pos GXT 'rtWSttl' Extra titles: 000B: y_pos += linespace // optional line space for separation 000B: y_pos += linespace 0050: gosub @Format_Title_Centered 033E: set_draw_text_position title_x_pos y_pos GXT 'rtVSttl' Just delete the unwanted extra titles. Testing of the control script is progressing nicely. Soon I'll need a few more lists to help with testing. Due to the limitations of the length of long strings (15 characters + a null terminator) the names of list-scripts are limited to 12 characters. Cleo can launch scripts in a sub-folder, but the folder name cuts into the length of the filename, and requires a bit of funky string manipulation. So instead of putting the list-scripts in a folder to keep them all from executing at the same time when the game starts, the scripts will need a unique file extension, like ".sm" for Status Monitor. This can easily be accomplished by using a {CLEO .sm} directive at the top of the script. Another advantage of this strategy is that Sanny's compile and copy command will install the list-scripts in the proper location; they don't need to be moved to a unique folder to work with the control script. Any thoughts on re-branding the name of the mod? I've been working with Real-Time Status Monitor since you suggested it early on, but now that I'm inventing unique filename extensions, a proper working title should be chosen. The "Status Monitor" part is reasonably descriptive, but isn't very catchy and is a fairly useless search term. Link to comment Share on other sites More sharing options...
ArmanCan Posted January 12, 2022 Author Share Posted January 12, 2022 (edited) 1 hour ago, OrionSR said: Any thoughts on re-branding the name of the mod? I came up with the "Monitoring" idea that you've mostly built it and i'm grateful for this but you wanted to create something advanced.. than..YOU will choose the name of this mod By the way as i said before i will try to create these 82 Float and 220 Integer ID's with your float/integer codes (Maybe without GXT definitions), copy all of them to a new txt file and upload to here.. Edited January 12, 2022 by ArmanCan Link to comment Share on other sites More sharing options...
OrionSR Posted January 12, 2022 Share Posted January 12, 2022 1 hour ago, ArmanCan said: YOU will choose the name of this mod Then I'll call it... Sidekick for ArmanCan And change the side-panel script extension to *.sk I was fixating on something like, Panel Commander because the panel display reminded me of a favorite old tool, Norton Commander (similar to Midnight Commander (MC) on Linux systems), but there isn't a lot of commanding going on. Then I remembered Sidekick, another old favorite; the name seems to fit the purpose of the project. GXT for stats should be really easy using standard GXT. Just assume that 'STATnnn' will work for stat number nnn, with leading 0s if necessary. One advantage of using standard GXT is that the text will automatically translate when the in-game language setting is changed. (The linewidth might need to be adjusted so the text will fix the box.) I was going to post an example in Spanish but for some reason the text doesn't display, or the box, or the HUD and Radar, and the image is too dark - very strange glitch. Note: If you compile/decompile a dummy script with standard GXT text then Sanny will add a comment that includes the standard text. 033E: set_draw_text_position [email protected] [email protected] GXT 'STAT069' Becomes: 033E: set_draw_text_position [email protected] [email protected] GXT 'STAT069' // Pistol Skill Or something similar depending on SB version and settings. I'm hoping to convert the scripts to a modern SB format with keywords and classes once I get the control script working. Feel free to start that transition as you develop new scripts. Link to comment Share on other sites More sharing options...
ArmanCan Posted January 13, 2022 Author Share Posted January 13, 2022 (edited) OrionSR i've created all these ids.. https://www.mediafire.com/file/lmyhe31ilqkuq1h/GTA_San_Andreas_Statistics_ID.txt/file @OrionSR as you can guess i did something wrong Panel positions seem wrong and i couldn't type the new list (Collectibles) like this "50/50".. I sprayed few Tags but i couldn't find anything on Sanny in order to increase this value.. by the way you can ignore the long text title.. i will make it short Spoiler 0ADF: add_dynamic_GXT_entry "int0050" text "~1~/050" 0ADF: add_dynamic_GXT_entry "int0050" text "~1~/050" 0ADF: add_dynamic_GXT_entry "int0050" text "~1~/050" 0ADF: add_dynamic_GXT_entry "int0070" text "~1~/070" 0ADF: add_dynamic_GXT_entry "int0070" text "~1~/070" 0ADF: add_dynamic_GXT_entry "int0100" text "~1~/100" 0ADF: add_dynamic_GXT_entry "int1000" text "~1~/1000.0" 0ADF: add_dynamic_GXT_entry "flt1000" text "~1~.~1~/1000.0" 0ADF: add_dynamic_GXT_entry "rtPSttl" text "--== PLAYER STATS ==--" 0ADF: add_dynamic_GXT_entry "rtCoJtl" text "--== COLLECTIBLES/USJ ==--" ------------------------- 000B: y_pos += linespace // Line 14 0652: int_val = integer_stat 322 // Tags sprayed 0050: gosub @Format_Align_Left 033E: set_draw_text_position left_x_pos y_pos GXT 'STAT322' // Tags sprayed 0050: gosub @Format_Align_Right 045A: draw_text_1number right_x_pos y_pos GXT 'int0100' int_val Edit: I found a GXT in "Serge GXT Reference" but how can i use this? Second Edit: - I've made shorter the title. - Numbers are now showing correctly.. - Using this code changes the GAME TEXT so i reverted this and go back to default one.. I've opened a %100 Save but this time the number of "Tags Sprayed" was only "1" not "100"? - Is it possible to track the memory and find the ID from there? [TAG_ONE] Tags sprayed~n~~1~ out of ~1~ Edited January 13, 2022 by ArmanCan OrionSR 1 Link to comment Share on other sites More sharing options...
OrionSR Posted January 13, 2022 Share Posted January 13, 2022 (edited) 5 hours ago, ArmanCan said: i've created all these ids.. Awesome! Thanks. And good questions. Some answers I'll need to look up later so check back for edits. You could try these new GXT number formats (only define them once). Or, keep reading... 0ADF: add_dynamic_GXT_entry "int50" text "~1~/50" 0ADF: add_dynamic_GXT_entry "int70" text "~1~/70" 0ADF: add_dynamic_GXT_entry "int100" text "~1~/100" Jumps first, maybe, to get the /100 at the end? From SB:\data\sa\CustomVariables.ini 798=Collected_Oysters 799=Collected_Horshoes 800=STAT_Taken_Photos 801=STAT_Tags_Sprayed These are global variables, so you could use $800 or $STAT_Taken_Photos. The custom variable names are easier to use. Not sure where to find total jumps or total tags just yet. I'll look it up later. Global variable can be passed directly; you don't need to read them into a local var. Use the global in place of dec_part in a 2 number draw. 5 hours ago, ArmanCan said: Edit: I found a GXT in "Serge GXT Reference" but how can i use this? [TAG_ONE] Tags sprayed~n~~1~ out of ~1~ 'TAG_ONE' would be the GXT key. Draw 2 numbers with arguments $STAT_Tags_Sprayed and 70. We can change 70 to a local var once I figure out where to read it. ~n~ is a new line, and ~1~ is a placeholder for a number. This GXT should be used with draw 2nums or print 2nums commands. But this format wouldn't look as nice as having the text left and numbers right like everything else, so... Add new dynamic text like this and use it for all the int/int values. 0ADF: add_dynamic_GXT_entry "int_int" text "~1~/~1~" 0652: int_val = integer_stat 243 // Oysters collected 0652: dec_part = integer_stat 244 // Total oysters //045B: draw_text_2numbers right_x_pos y_pos GXT 'int_int' int_val dec_part 045B: draw_text_2numbers right_x_pos y_pos GXT 'int_int' $Collected_Oysters dec_part BTW, think of the constants int_var and dec_part as draw_int and draw_int2, which suits their intended purpose better. I might rename them later, or just add more constant definitions to keep the descriptive names in context with the code. Basically, I want to save as many of the 32 available local variables as possible for complex calculations. We can only draw 2 numbers at a time, so these variables are dedicated to that purpose and reused for each draw. I'm not sure if I answered your questions properly. I'm in a bit of a rush today. Please ask again if clarification is needed. Edited January 14, 2022 by OrionSR Link to comment Share on other sites More sharing options...
OrionSR Posted January 14, 2022 Share Posted January 14, 2022 (edited) This looks right for reading total jumps, NumJumps. Updated for tags. For now, add another constants section in the header. const _ZN17CStuntJumpManager11m_iNumJumpsE = 0xA9A89C _ZN11CTagManager10ms_numTagsE = 0xA9AD70 end Include this read after reading the int stats for jumps found and done. 0A8D: dec_part = read_memory _ZN17CStuntJumpManager11m_iNumJumpsE size 4 virtual_protect 0 FYI: That long _ZNwhatever string is the label used to find this offset on mobile. And for tags: 0A8D: dec_part = read_memory _ZN11CTagManager10ms_numTagsE size 4 virtual_protect 0 @ArmanCan (just encouraging a refresh) Edited January 14, 2022 by OrionSR Link to comment Share on other sites More sharing options...
ArmanCan Posted January 14, 2022 Author Share Posted January 14, 2022 (edited) I don't have any problems with Unique Stunt Jumps.. both values (Found/Done) and the other collectibles (Snapshots, Oysters, Horsehoes) are working perfectly.. - My actual problem is goddamn tags.. Whenever i spray a tag the value of "Tags Sprayed" doesn't increase.. even with the "/100" format..It seems this script reads ONLY Sanny Builder's ID's - Other small problem is panels.. panel positions needs be switched If you need my whole script i can post it to you Edit: I've tried to add this but it gave me an error (Forbidden character in the identifier 0A8D:.) 0A8D: dec_part = read_memory _ZN11CTagManager10ms_numTagsE size 4 virtual_protect 0 It's 2 AM right now so i will continue tomorrow.. Edited January 14, 2022 by ArmanCan Link to comment Share on other sites More sharing options...
OrionSR Posted January 14, 2022 Share Posted January 14, 2022 (edited) 19 hours ago, ArmanCan said: It's 2 AM right now so i will continue tomorrow.. Sorry for the late reply. Busy day. 0652: int_val = integer_stat 322 // Tags sprayed I took a quick look at some stats in a random save in my folder using the Stats tool in SASE v1.00. It doesn't look like this stat is working as expected. Try using $STAT_Tags_Sprayed instead. In fact, everything after stat 301 looks suspicious. It's not unusual for unused stats to be a bit flaky. Another factor to consider, sometimes the stats aren't updated right away, or aren't read. Like girlfriend progress; only the global variables are used by the scripts, and only at the end of the date is the stat finally updated. Changing the stat won't have any effect in-game; it'll just get overwritten eventually. I'll test the label addresses for jumps and tags when I can. Sorry, I just cranked something out but couldn't test it. You've probably figured this out already but... Total collectibles varies by how many are created in main.scm, and cleo scripts can always add more. Unique jump count depends on main.scm, cleo and custom IPL files. I'm not really sure how the tags are implemented. I think that's more of a modeling thing; never messed with that. This bit makes it a right panel. {debug} //wait 3000 is_right_panel = true //is_right_panel = false Comment out the true statement to make it a left panel. (This bit will be automatic once I get the control script working.) Updates: The offsets for numTags and numJumps are working as expect. I'm not sure what your error could be. A typo? Missing space? Since there are a couple of new things going on in this segment I decided to test and post an example. If you think the long label is causing your error then use the hex address instead. (The new const segment was updated late with the tag label; make sure the label is defined for numTags. But I couldn't get the same error by removing it so... dunno what happened.) Note that the required GXT has already been defined. And I decided to include a comment example of the dynamic GXT with the line. That way, if the dynamic text ever gets separated from the segment it would be easy to recreate. 000B: y_pos += linespace // Line 19 0A8D: dec_part = read_memory _ZN11CTagManager10ms_numTagsE size 4 virtual_protect 0 0050: gosub @Format_Align_Left 033E: set_draw_text_position left_x_pos y_pos GXT 'STAT322' // Tags sprayed 0050: gosub @Format_Align_Right 045B: draw_text_2numbers right_x_pos y_pos GXT 'int_int' $STAT_Tags_Sprayed dec_part // ~1~/~1~ And I found this in main.scm: :BCESAR_66700 03A4: name_thread 'BCESAR' :BCESAR_66711 0001: wait 0 ms 00D6: if 0038: $Cesar_Total_Passed_Missions == 10 004D: jump_if_false @BCESAR_66742 0629: change_integer_stat 322 to 1 004E: end_thread So it looks like stat 322 is being used to flag that all of Cesar's have been completed - one of the requirements for starting the Are You Going... mission. I suspect there might be a radio message associated with this stat. More updates: Found a useful opcode. This strategy would work better on non-standard main.scm files. (fixed) //08E1: $STAT_Tags_Sprayed = total_tags_sprayed //08E01: int_val = total_tags_sprayed // whoops, WRONG! 08E1: int_val = total_tags_sprayed Edited January 14, 2022 by OrionSR Link to comment Share on other sites More sharing options...
ArmanCan Posted January 14, 2022 Author Share Posted January 14, 2022 hello OrionSR.. i'm focusing on your last post because i think your mind was full with your business and you couldn't write something propiate.. I've fixed those panels and i've also realised that on Savegame Editor.. i need to ask this question.. Can you check my latest script? I think i've messed something up and always giving me an error Spoiler {$CLEO .cs} // RTSM_Player_Stats_b1.txt { Real Time Status Monitor - Player Stats by OrionSR & ArmanCan Jan 11, 2022 } {Header - Configuring Sanny Builder} const {Internal} is_right_panel = [email protected] // passed when launched int_val = [email protected] dec_part = [email protected] left_x_pos = [email protected] right_x_pos = [email protected] centered_x_pos = [email protected] title_x_pos = [email protected] y_pos = [email protected] box_x_pos = [email protected] box_y_pos = [email protected] box_width = [email protected] box_height = [email protected] Font_Pricedown = 0 Font_Aharoni = 1 Font_Gothic = 2 Font_Beckett = 3 end const 08E1: $STAT_Tags_Sprayed = total_tags_sprayed 08E01: int_val = total_tags_sprayed end const {Configuration} text_font = Font_Aharoni linewidth = 110.0 linespace = 10.0 num_lines = 19.0 topline = 140.0 margin = 23.0 centered_offset = 10.0 box_frame_size = 7.0 letter_width = 0.22 letter_height = 1.10 //033F: set_text_draw_letter_size 0.22 1.10 // medium large //033F: set_text_draw_letter_size 0.18 0.60 // very small //033F: set_text_draw_letter_size 0.48 1.12 // default // 218 165 32 255 // Goldenrod title_red = 218 title_green = 165 title_blue = 32 title_alpha = 255 // 250 250 250 255 // White text_red = 250 text_green = 250 text_blue = 250 text_alpha = 255 // 0 0 0 255 // Black outline_red = 0 outline_green = 0 outline_blue = 0 outline_alpha = 255 // 0 0 0 60 // Black Tint box_red = 0 box_green = 0 box_blue = 0 box_alpha = 60 end /* =============================================================== */ {debug} //wait 3000 is_right_panel = false //is_right_panel = false {Initialize - Run-once codes to get ready for the While..End loop.} wait 0 {GXT key, 7 chars max | Case doesn't matter in game} {Dynamic GXT - Mixed Case | Standard GXT - ALL CAPS} 0ADF: add_dynamic_GXT_entry "int_int" text "~1~/~1~" 0ADF: add_dynamic_GXT_entry "int50" text "~1~/50" 0ADF: add_dynamic_GXT_entry "int70" text "~1~/70" 0ADF: add_dynamic_GXT_entry "int70" text "~1~/70" 0ADF: add_dynamic_GXT_entry "int100" text "~1~/100" 0ADF: add_dynamic_GXT_entry "int1000" text "~1~/1000.0" 0ADF: add_dynamic_GXT_entry "flt1000" text "~1~.~1~/1000.0" 0ADF: add_dynamic_GXT_entry "rtPSttl" text "--== PLAYER STATS ==--" 0ADF: add_dynamic_GXT_entry "rtCoJtl" text "--== COLLECTIBLES/USJ ==--" 0050: gosub @Panel_Position_Calc {Draw Loop} while true 0001: wait 0 ms 03F0: enable_text_draw 1 038E: draw_box_position box_x_pos box_y_pos size box_width box_height RGBA box_red box_green box_blue box_alpha 0007: y_pos = topline // Line 1 0050: gosub @Format_Title_Centered 033E: set_draw_text_position title_x_pos y_pos GXT 'rtPSttl' 000B: y_pos += linespace // Line 2 0652: int_val = integer_stat 225 // Lung Capacity 0050: gosub @Format_Align_Left 033E: set_draw_text_position left_x_pos y_pos GXT 'STAT225' // Lung Capacity 0050: gosub @Format_Align_Right 045B: draw_text_2numbers right_x_pos y_pos GXT 'int1000' int_val dec_part 000B: y_pos += linespace // Line 3 0653: int_val = float_stat 21 // Fat 0050: gosub @Split_Float 0050: gosub @Format_Align_Left 033E: set_draw_text_position left_x_pos y_pos GXT 'STAT021' // Fat 0050: gosub @Format_Align_Right 045B: draw_text_2numbers right_x_pos y_pos GXT 'flt1000' int_val dec_part 000B: y_pos += linespace // Line 4 0653: int_val = float_stat 22 // Stamina 0050: gosub @Split_Float 0050: gosub @Format_Align_Left 033E: set_draw_text_position left_x_pos y_pos GXT 'STAT022' // Stamina 0050: gosub @Format_Align_Right 045B: draw_text_2numbers right_x_pos y_pos GXT 'flt1000' int_val dec_part 000B: y_pos += linespace // Line 5 0653: int_val = float_stat 23 // Muscle 0050: gosub @Split_Float 0050: gosub @Format_Align_Left 033E: set_draw_text_position left_x_pos y_pos GXT 'STAT023' // Muscle 0050: gosub @Format_Align_Right 045B: draw_text_2numbers right_x_pos y_pos GXT 'flt1000' int_val dec_part 000B: y_pos += linespace // Line 6 0653: int_val = float_stat 68 // Respect 0050: gosub @Split_Float 0050: gosub @Format_Align_Left 033E: set_draw_text_position left_x_pos y_pos GXT 'STAT068' // Respect 0050: gosub @Format_Align_Right 045B: draw_text_2numbers right_x_pos y_pos GXT 'flt1000' int_val dec_part 000B: y_pos += linespace // Line 7 0653: int_val = float_stat 25 // Sex Appeal 0050: gosub @Split_Float 0050: gosub @Format_Align_Left 033E: set_draw_text_position left_x_pos y_pos GXT 'STAT025' // Sex Appeal 0050: gosub @Format_Align_Right 045B: draw_text_2numbers right_x_pos y_pos GXT 'flt1000' int_val dec_part 000B: y_pos += linespace // Line 8 0653: int_val = float_stat 81 // Gambling 0050: gosub @Split_Float 0050: gosub @Format_Align_Left 033E: set_draw_text_position left_x_pos y_pos GXT 'STAT081' // Gambling 0050: gosub @Format_Align_Right 045B: draw_text_2numbers right_x_pos y_pos GXT 'flt1000' int_val dec_part 000B: y_pos += linespace // Line 9 000B: y_pos += linespace // Line 10 0050: gosub @Format_Title_Centered 0ADF: add_dynamic_GXT_entry "rtCoJtl" text "--== Collectibles/Usj ==--" 033E: set_draw_text_position title_x_pos y_pos GXT 'rtCojtl' 000B: y_pos += linespace // Line 11 0652: int_val = integer_stat 231 // Snapshots Taken 0050: gosub @Format_Align_Left 033E: set_draw_text_position left_x_pos y_pos GXT 'STAT231' // Snapshots Taken 0050: gosub @Format_Align_Right 045A: draw_text_1number right_x_pos y_pos GXT 'int50' int_val 000B: y_pos += linespace // Line 12 0652: int_val = integer_stat 241 // Horseshoes Collected 0050: gosub @Format_Align_Left 033E: set_draw_text_position left_x_pos y_pos GXT 'STAT241' // Horseshoes Collected 0050: gosub @Format_Align_Right 045A: draw_text_1number right_x_pos y_pos GXT 'int50' int_val 000B: y_pos += linespace // Line 13 0652: int_val = integer_stat 243 // Oysters Collected 0050: gosub @Format_Align_Left 033E: set_draw_text_position left_x_pos y_pos GXT 'STAT243' // Oysters Collected 0050: gosub @Format_Align_Right 045A: draw_text_1number right_x_pos y_pos GXT 'int50' int_val 000B: y_pos += linespace // Line 14 0652: int_val = integer_stat 144 // Unique Jumps Found 0050: gosub @Format_Align_Left 033E: set_draw_text_position left_x_pos y_pos GXT 'STAT144' // Unique Jumps Found 0050: gosub @Format_Align_Right 045A: draw_text_1number right_x_pos y_pos GXT 'int70' int_val 000B: y_pos += linespace // Line 15 0652: int_val = integer_stat 145 // Unique Jumps Done 0050: gosub @Format_Align_Left 033E: set_draw_text_position left_x_pos y_pos GXT 'STAT145' // Unique Jumps Done 0050: gosub @Format_Align_Right 045A: draw_text_1number right_x_pos y_pos GXT 'int70' int_val 000B: y_pos += linespace // Line 16 0A8D: int_val = total_tags_sprayed 801 // Tags Sprayed 0050: gosub @Format_Align_Left 033E: set_draw_text_position left_x_pos y_pos GXT 'STAT_Tags_Sprayed' // Tags sprayed 0050: gosub @Format_Align_Right 045B: draw_text_2numbers right_x_pos y_pos GXT 'int_int' $STAT_Tags_Sprayed dec_part // ~1~/~1~ 000B: y_pos += linespace // Line 17 000B: y_pos += linespace // Line 18 end {Subroutines - avoids repetition of common code segments} :Format_Title_Centered 0349: set_text_draw_font text_font 0340: set_text_draw_RGBA title_red title_green title_blue title_alpha 081C: draw_text_outline 1 RGBA outline_red outline_green outline_blue outline_alpha 03E4: set_text_draw_align_right false 0342: set_text_draw_centered true 033F: set_text_draw_letter_size letter_width letter_height 0343: set_text_draw_linewidth 640.0 0051: return :Format_Align_Left 0349: set_text_draw_font text_font 0340: set_text_draw_RGBA text_red text_green text_blue text_alpha 081C: draw_text_outline 1 RGBA outline_red outline_green outline_blue outline_alpha 03E4: set_text_draw_align_right false 0342: set_text_draw_centered false 033F: set_text_draw_letter_size letter_width letter_height 0343: set_text_draw_linewidth 640.0 0051: return :Format_Align_Right 0349: set_text_draw_font text_font 0340: set_text_draw_RGBA text_red text_green text_blue text_alpha 081C: draw_text_outline 1 RGBA outline_red outline_green outline_blue outline_alpha 03E4: set_text_draw_align_right true 0342: set_text_draw_centered false 033F: set_text_draw_letter_size letter_width letter_height 0343: set_text_draw_linewidth 640.0 0051: return :Format_Align_Centered 0349: set_text_draw_font text_font 0340: set_text_draw_RGBA text_red text_green text_blue text_alpha 081C: draw_text_outline 1 RGBA outline_red outline_green outline_blue outline_alpha 03E4: set_text_draw_align_right false 0342: set_text_draw_centered true 033F: set_text_draw_letter_size letter_width letter_height 0343: set_text_draw_linewidth 640.0 0051: return :Split_Float 0087: dec_part = int_val // (float) 0092: int_val = float int_val to_integer 008F: int_val = integer int_val to_float 0063: dec_part -= int_val // (float) 0013: dec_part *= 10.0 0092: int_val = float int_val to_integer 0092: dec_part = float dec_part to_integer 0051: return :Panel_Position_Calc if is_right_panel == true then 03A4: name_thread 'RTSM_R' title_x_pos = linewidth title_x_pos /= -2.0 title_x_pos += 640.0 title_x_pos -= margin left_x_pos = 640.0 left_x_pos -= margin left_x_pos -= linewidth right_x_pos = 640.0 right_x_pos -= margin centered_x_pos = linewidth centered_x_pos /= -2.0 centered_x_pos += 640.0 centered_x_pos -= margin centered_x_pos += centered_offset box_x_pos = linewidth box_x_pos /= -2.0 box_x_pos += 640.0 box_x_pos -= margin box_y_pos = num_lines box_y_pos *= linespace box_y_pos /= 2.0 box_y_pos += topline box_width = linewidth box_width += box_frame_size box_height = linespace box_height *= num_lines box_height += box_frame_size else 03A4: name_thread 'RTSM_L' title_x_pos = linewidth title_x_pos /= 2.0 title_x_pos += margin left_x_pos = margin right_x_pos = margin right_x_pos += linewidth centered_x_pos = linewidth centered_x_pos /= 2.0 centered_x_pos += margin centered_x_pos += centered_offset box_x_pos = linewidth box_x_pos /= 2.0 box_x_pos += margin box_y_pos = num_lines box_y_pos *= linespace box_y_pos /= 2.0 box_y_pos += topline box_width = linewidth box_width += box_frame_size box_height = linespace box_height *= num_lines box_height += box_frame_size end return Link to comment Share on other sites More sharing options...
OrionSR Posted January 14, 2022 Share Posted January 14, 2022 7 hours ago, ArmanCan said: Can you check my latest script? Corrected segments: (Close, but no cigar.) const //08E1: $STAT_Tags_Sprayed = total_tags_sprayed //08E01: int_val = total_tags_sprayed _ZN17CStuntJumpManager11m_iNumJumpsE = 0xA9A89C _ZN11CTagManager10ms_numTagsE = 0xA9AD70 end 000B: y_pos += linespace // Line 16 // 0A8D: int_val = total_tags_sprayed 801 // Tags Sprayed 08E1: int_val = total_tags_sprayed 0A8D: dec_part = read_memory _ZN11CTagManager10ms_numTagsE size 4 virtual_protect 0 0050: gosub @Format_Align_Left // 033E: set_draw_text_position left_x_pos y_pos GXT 'STAT_Tags_Sprayed' // Tags sprayed 033E: set_draw_text_position left_x_pos y_pos GXT 'STAT322' // Tags sprayed 0050: gosub @Format_Align_Right // 045B: draw_text_2numbers right_x_pos y_pos GXT 'int_int' $STAT_Tags_Sprayed dec_part // ~1~/~1~ 045B: draw_text_2numbers right_x_pos y_pos GXT 'int_int' int_val dec_part // ~1~/~1~ Note that my "Line 19" example above does pretty much the same thing. With these few corrections the script compiles and seems to be working as expected. Link to comment Share on other sites More sharing options...
ArmanCan Posted January 14, 2022 Author Share Posted January 14, 2022 (edited) @OrionSR WORKING PERFECTLY!! Spoiler The left side seems still empty so I think we can add "Max Health" and "Armor" to under the Stats List.. We already have ID's but i don't know how to show default/upgraded.. How can i do this? EDIT: Is it possible to fix the "/1000" of this Lung Capacity? I tried to do but it didn't work. Edited January 15, 2022 by ArmanCan OrionSR 1 Link to comment Share on other sites More sharing options...
OrionSR Posted January 14, 2022 Share Posted January 14, 2022 (edited) 1 hour ago, ArmanCan said: I think we can add "Max Health" and "Armor" Good idea, but a little tricky. I'll try to work up an example for you to work with in the morning. The problem with health and armor is we need to write 3 numbers on one line. 2 numbers are used for the floats used for current health and armor. And another integer for the max value. We can't draw, "100.0/100" (GXT "~1~.~1~/~1~") right aligned with a single draw command. So how do you want the display to look? "Health (max 100) 100.0" "Health (max 100) 100.0" "Health 100.0 max:100" "Health 100.0 max:100" What might be better? Note: It would be best to avoid spaces in right aligned text to avoid that annoying word wrap glitch with zone names. The 2nd and 4th options are examples of a third draw element with a center + positive offset to nudge it over a little to the right. Consider how to minimize custom GXT, and take advantage of generic GXT for custom numbers. For example. 0ADF: add_dynamic_GXT_entry "flt_1" text "(~1~.~1~)" // 1.1 0ADF: add_dynamic_GXT_entry "flt_0" text "(~1~.0~1~)" // 1.01 0ADF: add_dynamic_GXT_entry "flt_00" text "(~1~.00~1~)" // 1.001 Standard GXT: 'TIME' "~1~:~1~" 'TIME_0' "~1~:0~1~" 'NUMBER' "~1~" Back to your perfect script... What happens if you add more collectibles with a cleo script? 095A: [email protected] = create_oyster_at 979.0 -2210.0 -3.0 0958: [email protected] = create_photo_at -2511.28 -672.99 195.75 0959: [email protected] = create_horseshoe_at 1224.0 2617.0 11.0 0814: define_unique_jump_start 1939.136 -1968.052 17.6649 radius 2.5 2.728 3.17 in_air_goal 1989.958 -1971.951 28.7249 radius 11.134 5.398 7.23 camera 1960.545 -1963.571 25.3229 reward 500 Might want to move the pickups to a favorite location for testing. Creating new jumps on the other hand, would be better in it's own topic. Edited January 14, 2022 by OrionSR Link to comment Share on other sites More sharing options...
ArmanCan Posted January 14, 2022 Author Share Posted January 14, 2022 (edited) 19 hours ago, OrionSR said: So how do you want the display to look? I don't know.. actually all i know these values.. "569/1000" "100/100" and 150/150.. if i understand it correctly we will need three lines for this (Current Health, Max Health, Armor) and we already have it 19 hours ago, OrionSR said: What happens if you add more collectibles with a cleo script? Look man.. i know that you've already built the base of this project and now you are looking for to expand it or test some values with me but i'm unfortunately cool with that Edit: Talking about expansion i think you can add to your Control Script this "Real Time Coordinates".. check the bottomside.. Second Edit: I'm mostly available in this forum but i have some sh*ts to take care of.. I would refuse your tests but you have so much effort on me so answer this question only 0814: define_unique_jump_start 1939.136 -1968.052 17.6649 radius 2.5 2.728 3.17 in_air_goal 1989.958 -1971.951 28.7249 radius 11.134 5.398 7.23 camera 1960.545 -1963.571 25.3229 reward 500 Where is this stunt location? I can destroy/relocate all these collectibles (just like our armory work) and put on a large flat area like airports and add more collectibles by destroying some useless pickups.. i am staring to prepare this right now.. Third Edit: It works.. I tried to add 10 more collectible for each types.. And your Unique Stunt Jump is also worked as you expected Edited January 15, 2022 by ArmanCan OrionSR 1 Link to comment Share on other sites More sharing options...
OrionSR Posted January 15, 2022 Share Posted January 15, 2022 (edited) 21 hours ago, ArmanCan said: Where is this stunt location? I just grabbed those examples from SB's opcode search tool; these would be the first example of that opcode found in main.scm. Adding that particular jump would duplicate the USJ near Unity Station. Below are the new jumps added to the Chain Game custom save. You can find reference for the locations on the CG map in the first post of each round. SnP should also show the jump locations. Creating new jumps that work properly and look cool is tricky business. //OSR/CG37: Chain Game Jumps reworked 0814: define_unique_jump_start 2419.4 1213.1 13.66 radius 2.7 5.2 4.2 land 2476.5 1208.4 24.8 radius 3.6 15.2 15.1 camera 2462.17 1183.71 21.17 reward 1000 // LV Pyramid Disco PnS (reworked) 0814: define_unique_jump_start 1433.3 -189.5 33.5 radius 2.4 2.6 2.9 land 1403.2 -285.1 25.1 radius 40.1 5.4 26.2 camera 1446.567 -209.14 41.4 reward 1000 // Isolated Mound (reworked) 0814: define_unique_jump_start 1880.0 -2543.0 18.5 radius 3.0 3.0 3.0 land 1950.0 -2543.5 23.5 radius 4.0 11.5 10.0 camera 1940.5 -2523.0 16.5 reward 1000 // Andromada Jump (reworked) 0814: define_unique_jump_start -1259.0 -732.0 65.0 radius 9.0 7.0 3.0 land -1334.5 -660.0 27.5 radius 22.5 25.0 4.5 camera -1304.8 -722.5 59.5 reward 1000 // Tunnel to SF Airport (reworked) 0814: define_unique_jump_start 1440.0 -274.0 -1.4 radius 10.0 3.0 2.2 land 1400.0 -296.0 11.0 radius 28.0 14.0 12.0 camera 1423.0 -297.3 7.0 reward 1000 // Underwater Mound (reworked) 0814: define_unique_jump_start 976.0 -112.0 25.5 radius 16.0 7.0 3.0 land 957.5 -152.0 15.0 radius 34.0 19.0 5.0 camera 995.5 -119.3 25.0 reward 1000 // Fern Narrows (reworked) 0814: define_unique_jump_start 392.5 -296.8 11.5 radius 10.0 5.3 2.5 land 352.0 -275.0 4.5 radius 10.0 35.0 5.0 camera 362.0 -301.8 7.8 reward 1000 // Isolated Tree //0814: define_unique_jump_start 1078.0 582.5 25.5 radius 3.2 3.2 3.2 land 1148.0 670.5 28.5 radius 44.0 6.0 20.0 camera 1103.5 666.7 12.3 reward 1250 // Early LV Ramp (reworked) (object reqired) 0814: define_unique_jump_start 407.5 -1802.0 9.5 radius 2.5 3.5 3.0 land 354.0 -1804.0 19.1 radius 5.0 13.0 15.0 camera 369.8 -1806.8 19.8 reward 1000 // Yacht Harbor Sign (reworked) 0814: define_unique_jump_start 1562.2 -2361.1 16.8 radius 3.1 3.8 3.0 land 1595.0 -2350.65 32.5 radius 5.0 17.65 10.0 camera 1580.0 -2350.0 28.0 reward 1500 //_LS_Airport_Roof_reworked_South //RBR/CG39: 0814: define_unique_jump_start 2428.0 2808.0 15.0 radius 2.5 2.5 3.0 land 2505.0 2818.0 25.0 radius 5.0 28.0 15.5 camera 2486.0 2820.0 35.0 reward 1500 // LV Fuel Depot (reworked) 0814: define_unique_jump_start -508.0 -298.0 56.0 radius 18.0 2.5 5.0 land -497.0 -364.5 14.0 radius 47.0 21.0 8.0 camera -517.0 -308.0 35.0 reward 1500 // Fallen Tree (reworked) 0814: define_unique_jump_start 5.0 -612.0 12.0 radius 4.0 10.0 3.5 land -52.5 -557.5 3.0 radius 27.5 22.5 3.0 camera -5.0 -595.0 15.0 reward 1500 // Speed or Splash (reworked) 0814: define_unique_jump_start -1945.0 -704.5 34.0 radius 10.0 4.0 3.0 land -1954.8 -757.8 39.0 radius 9.3 27.8 4.0 camera -1948.0 -724.0 38.3 reward 1250 // Foster Mall (reworked) 0814: define_unique_jump_start -1903.5 -1403.5 40.5 radius 9.0 8.0 3.0 land -1916.0 -1485.5 21.0 radius 21.0 18.0 9.0 camera -1906.8 -1395.4 40.5 reward 1250 // Foster River (reworked) 0814: define_unique_jump_start -1156.0 -2245.0 39.0 radius 8.0 21.0 3.0 land -1225.5 -2203.5 38.0 radius 12.0 27.0 15.0 camera -1178.5 -2198.0 37.5 reward 1250 // Shady Creek North (reworked) 0814: define_unique_jump_start -1142.0 -2539.5 75.0 radius 14.0 23.0 3.0 land -1242.0 -2612.5 25.0 radius 40.0 35.5 16.0 camera -1206.0 -2630.0 10.0 reward 1250 // Shady Creek Delta (reworked) //RBR/CG37: New Sprunk Sign Jump //0814: define_unique_jump_start 2170.5 -1519.31 26.0 radius 3.0 1.0 4.5 land 2166.23 -1588.08 23.5 radius 19.0 5.0 11.0 camera 2168.4 -1543.4 30.2 reward 1000 // Sprunk Sign (object reqired) //OSR/CG61: New Panopticon Barriers jump - recovered from round 48 save 0814: define_unique_jump_start -914.8 -285.8 61.8 radius 1.0 11.0 3.0 land -960.0 -299.1 38.0 radius 9.0 18.8 1.0 camera -929.2 -287.9 56.2 reward 1250 // Panopticon Barriers //OSR/CG61 0814: define_unique_jump_start -2127.0 1103.5 83.25 radius 2.5 2.5 2.5 land -2113.0 1244.0 45.0 radius 10.0 10.0 25.0 camera -2117.5 1191.25 80.0 reward 2000 // Ryan's_Eye //OSR/CG61 (too hard) 0814: define_unique_jump_start 1621.5 2212.0 17.25 radius 2.5 2.5 2.5 land 1626.0 2292.5 25.0 radius 5.5 8.0 15.0 camera 1597.00 2283.00 15.50 reward 1500 // Small_Casino //OSR/CG61 //OSR/CG101: New jumps from 0909090 0814: define_unique_jump_start 1493.2 1924.7 18.0 radius 6.0 4.5 6.2 land 1414.2 1923.2 21.7 radius 7.4 14.3 8.1 camera 1427.6 1954.8 29.8 reward 909 //Redsands Roof jump 0814: define_unique_jump_start 1485.1 1155.3 23.7 radius 10.1 11.5 6.9 land 1495.0 1065.7 27.5 radius 63.8 23.9 10.7 camera 1510.8 1142.2 41.3 reward 909 //Runway 69 jump Note: Older jump tools limited the number of jumps to 70, which is why we cut dumb jumps to make room for more in the CG save, but the actual (standard) limit is 256, iirc. I'm working on a test list. I've made adjustments to read the total collectibles. Now I'll focus on the health and armor. FYI: The Savegame Editor v2+ has an option to set current armor to an infinite floating point value - a cool exploit that has the habit of crashing trainers or other tools that aren't expecting this out of range value. I believe health is also at risk of an infinite value, although I'm unaware of any specific tools that implement the value. Edited January 15, 2022 by OrionSR Link to comment Share on other sites More sharing options...
ArmanCan Posted January 15, 2022 Author Share Posted January 15, 2022 2 hours ago, OrionSR said: Creating new jumps that work properly and look cool is tricky business. To be honest OrionSR some of these new USJ s needs a ramp (LS Roof,Underwater Mound) or landing zone must be increased.. Especially these ones.. 0814: define_unique_jump_start 1562.2 -2361.1 16.8 radius 3.1 3.8 3.0 land 1595.0 -2350.65 32.5 radius 5.0 17.65 10.0 camera 1580.0 -2350.0 28.0 reward 1500 //_LS_Airport_Roof_reworked_South //RBR/CG39: 0814: define_unique_jump_start 1440.0 -274.0 -1.4 radius 10.0 3.0 2.2 land 1400.0 -296.0 11.0 radius 28.0 14.0 12.0 camera 1423.0 -297.3 7.0 reward 1000 // Underwater Mound (reworked) 0814: define_unique_jump_start 392.5 -296.8 11.5 radius 10.0 5.3 2.5 land 352.0 -275.0 4.5 radius 10.0 35.0 5.0 camera 362.0 -301.8 7.8 reward 1000 // Isolated Tree 0814: define_unique_jump_start 5.0 -612.0 12.0 radius 4.0 10.0 3.5 land -52.5 -557.5 3.0 radius 27.5 22.5 3.0 camera -5.0 -595.0 15.0 reward 1500 // Speed or Splash (reworked) 0814: define_unique_jump_start -914.8 -285.8 61.8 radius 1.0 11.0 3.0 land -960.0 -299.1 38.0 radius 9.0 18.8 1.0 camera -929.2 -287.9 56.2 reward 1250 // Panopticon Barriers //OSR/CG61 0814: define_unique_jump_start -1903.5 -1403.5 40.5 radius 9.0 8.0 3.0 land -1916.0 -1485.5 21.0 radius 21.0 18.0 9.0 camera -1906.8 -1395.4 40.5 reward 1250 // Foster River (reworked) 0814: define_unique_jump_start -2127.0 1103.5 83.25 radius 2.5 2.5 2.5 land -2113.0 1244.0 45.0 radius 10.0 10.0 25.0 camera -2117.5 1191.25 80.0 reward 2000 // Ryan's_Eye //OSR/CG61 2 hours ago, OrionSR said: I'm working on a test list. I've made adjustments to read the total collectibles. Now I'll focus on the health and armor. Cool Link to comment Share on other sites More sharing options...
OrionSR Posted January 16, 2022 Share Posted January 16, 2022 An update for PlayerStats.cs Notes: The Max Health stat shows the player's max health / max possible health * 10.0. It is shown in percentage in this script. There are floats in memory for health, max health, and armor, but the opcodes that work with health and armor always use integers. So rather than fuss with reading and drawing floats I used the integer values from opcodes so only 2 numbers need to be drawn at a time. Lung capacity tweaked to use integer value, again. I know it looks odd with all the float stats but variable type should be displayed properly. Respect no longer has a max value since this value can be way over 1000.0 and there doesn't appear to be any set limit. Collectibles now read and draw the correct max value. PlayerStats.txt - 1/15/2021 Spoiler {$CLEO .cs} // PlayerStats.txt { Real Time Status Monitor - Player Stats by OrionSR & ArmanCan Jan 15, 2022 } {Header - Configuring Sanny Builder} const {Internal} is_right_panel = [email protected] // passed when launched int_val = [email protected] dec_part = [email protected] left_x_pos = [email protected] right_x_pos = [email protected] centered_x_pos = [email protected] title_x_pos = [email protected] y_pos = [email protected] box_x_pos = [email protected] box_y_pos = [email protected] box_width = [email protected] box_height = [email protected] Font_Pricedown = 0 Font_Aharoni = 1 Font_Gothic = 2 Font_Beckett = 3 end const {Configuration} text_font = Font_Aharoni linewidth = 110.0 linespace = 10.0 num_lines = 19.0 topline = 140.0 margin = 23.0 centered_offset = 10.0 box_frame_size = 7.0 letter_width = 0.22 letter_height = 1.10 //033F: set_text_draw_letter_size 0.22 1.10 // medium large //033F: set_text_draw_letter_size 0.18 0.60 // very small //033F: set_text_draw_letter_size 0.48 1.12 // default // 218 165 32 255 // Goldenrod title_red = 218 title_green = 165 title_blue = 32 title_alpha = 255 // 250 250 250 255 // White text_red = 250 text_green = 250 text_blue = 250 text_alpha = 255 // 0 0 0 255 // Black outline_red = 0 outline_green = 0 outline_blue = 0 outline_alpha = 255 // 0 0 0 60 // Black Tint box_red = 0 box_green = 0 box_blue = 0 box_alpha = 60 end const {List Specific} _ZN17CStuntJumpManager11m_iNumJumpsE = 0xA9A89C _ZN11CTagManager10ms_numTagsE = 0xA9AD70 _ZN6CWorld7Players = 0xB7CD98 // pointer Max_health_offset = +0x14F // [byte] health_max = 176 end /* ========================= Initialize ====================================== */ {debug} //wait 3000 //is_right_panel = true is_right_panel = false {Initialize - Run-once codes to get ready for the While..End loop.} wait 0 {GXT key, 7 chars max | Case doesn't matter in game} {Dynamic GXT - Mixed Case | Standard GXT - ALL CAPS} 0ADF: add_dynamic_GXT_entry "int_int" text "~1~/~1~" 0ADF: add_dynamic_GXT_entry "int1000" text "~1~/1000" 0ADF: add_dynamic_GXT_entry "flt1000" text "~1~.~1~/1000.0" 0ADF: add_dynamic_GXT_entry "flt_1" text "~1~.~1~" // 1.1 0ADF: add_dynamic_GXT_entry "flt_0" text "~1~.0~1~" // 1.01 0ADF: add_dynamic_GXT_entry "flt_00" text "~1~.00~1~" // 1.001 0ADF: add_dynamic_GXT_entry "flt_pct" text "~1~.~1~%" // (1.1%) 0ADF: add_dynamic_GXT_entry "rtPSttl" text "--== PLAYER STATS ==--" 0ADF: add_dynamic_GXT_entry "rtCoJtl" text "--== COLLECTIBLES/USJ ==--" 0ADF: add_dynamic_GXT_entry "health_" text "Health" 0050: gosub @Panel_Position_Calc /* =========================== Draw Loop ==================================== */ while true 0001: wait 0 ms 03F0: enable_text_draw 1 038E: draw_box_position box_x_pos box_y_pos size box_width box_height RGBA box_red box_green box_blue box_alpha 0007: y_pos = topline // Line 1 0050: gosub @Format_Title_Centered 033E: set_draw_text_position title_x_pos y_pos GXT 'rtPSttl' 000B: y_pos += linespace // Line 2 0050: gosub @Format_Align_Left 033E: set_draw_text_position left_x_pos y_pos GXT 'STAT024' // Max Health 0653: int_val = float_stat 24 // Max Health int_val /= 10.0 0050: gosub @Split_Float 0050: gosub @Format_Align_Right 045B: draw_text_2numbers right_x_pos y_pos GXT 'flt_pct' int_val dec_part // 1.1% 000B: y_pos += linespace // Line 3 0226: int_val = actor $PLAYER_ACTOR health dec_part = _ZN6CWorld7Players dec_part += Max_health_offset 0A8D: dec_part = read_memory dec_part size 1 virtual_protect 0 0050: gosub @Format_Align_Left 033E: set_draw_text_position left_x_pos y_pos GXT 'health_' // Health 0050: gosub @Format_Align_Right 045B: draw_text_2numbers right_x_pos y_pos GXT 'int_int' int_val dec_part // 1.1 000B: y_pos += linespace // Line 4 04DD: int_val = actor $PLAYER_ACTOR armour 0945: get_player $PLAYER_CHAR max_armour_to dec_part 0050: gosub @Format_Align_Left 033E: set_draw_text_position left_x_pos y_pos GXT 'STAT164' // Armor 0050: gosub @Format_Align_Right 045B: draw_text_2numbers right_x_pos y_pos GXT 'int_int' int_val dec_part // 1.1 000B: y_pos += linespace // Line 5 0652: int_val = integer_stat 225 // Lung Capacity 0050: gosub @Format_Align_Left 033E: set_draw_text_position left_x_pos y_pos GXT 'STAT225' // Lung Capacity 0050: gosub @Format_Align_Right 045A: draw_text_1number right_x_pos y_pos GXT 'int1000' int_val // ~1~/1000 000B: y_pos += linespace // Line 6 0653: int_val = float_stat 21 // Fat 0050: gosub @Split_Float 0050: gosub @Format_Align_Left 033E: set_draw_text_position left_x_pos y_pos GXT 'STAT021' // Fat 0050: gosub @Format_Align_Right 045B: draw_text_2numbers right_x_pos y_pos GXT 'flt1000' int_val dec_part 000B: y_pos += linespace // Line 7 0653: int_val = float_stat 22 // Stamina 0050: gosub @Split_Float 0050: gosub @Format_Align_Left 033E: set_draw_text_position left_x_pos y_pos GXT 'STAT022' // Stamina 0050: gosub @Format_Align_Right 045B: draw_text_2numbers right_x_pos y_pos GXT 'flt1000' int_val dec_part 000B: y_pos += linespace // Line 8 0653: int_val = float_stat 23 // Muscle 0050: gosub @Split_Float 0050: gosub @Format_Align_Left 033E: set_draw_text_position left_x_pos y_pos GXT 'STAT023' // Muscle 0050: gosub @Format_Align_Right 045B: draw_text_2numbers right_x_pos y_pos GXT 'flt1000' int_val dec_part 000B: y_pos += linespace // Line 9 0653: int_val = float_stat 25 // Sex Appeal 0050: gosub @Split_Float 0050: gosub @Format_Align_Left 033E: set_draw_text_position left_x_pos y_pos GXT 'STAT025' // Sex Appeal 0050: gosub @Format_Align_Right 045B: draw_text_2numbers right_x_pos y_pos GXT 'flt1000' int_val dec_part 000B: y_pos += linespace // Line 10 0653: int_val = float_stat 81 // Gambling 0050: gosub @Split_Float 0050: gosub @Format_Align_Left 033E: set_draw_text_position left_x_pos y_pos GXT 'STAT081' // Gambling 0050: gosub @Format_Align_Right 045B: draw_text_2numbers right_x_pos y_pos GXT 'flt1000' int_val dec_part 000B: y_pos += linespace // Line 11 0653: int_val = float_stat 68 // Respect 0050: gosub @Split_Float 0050: gosub @Format_Align_Left 033E: set_draw_text_position left_x_pos y_pos GXT 'STAT068' // Respect 0050: gosub @Format_Align_Right 045B: draw_text_2numbers right_x_pos y_pos GXT 'flt_1' int_val dec_part 000B: y_pos += linespace // Line 12 000B: y_pos += linespace // Line 13 0050: gosub @Format_Title_Centered 0ADF: add_dynamic_GXT_entry "rtCoJtl" text "--== Collectibles/Usj ==--" 033E: set_draw_text_position title_x_pos y_pos GXT 'rtCojtl' 000B: y_pos += linespace // Line 14 0652: int_val = integer_stat 231 // Snapshots taken 0652: dec_part = integer_stat 232 // Total snapshots 0050: gosub @Format_Align_Left 033E: set_draw_text_position left_x_pos y_pos GXT 'STAT231' // Snapshots taken 0050: gosub @Format_Align_Right 045B: draw_text_2numbers right_x_pos y_pos GXT 'int_int' int_val dec_part // ~1~/~1~ 000B: y_pos += linespace // Line 15 0652: int_val = integer_stat 241 // Horseshoes collected 0652: dec_part = integer_stat 242 // Total horseshoes 0050: gosub @Format_Align_Left 033E: set_draw_text_position left_x_pos y_pos GXT 'STAT241' // Horseshoes collected 0050: gosub @Format_Align_Right 045B: draw_text_2numbers right_x_pos y_pos GXT 'int_int' int_val dec_part // ~1~/~1~ 000B: y_pos += linespace // Line 16 0652: int_val = integer_stat 243 // Oysters collected 0652: dec_part = integer_stat 244 // Total oysters 0050: gosub @Format_Align_Left 033E: set_draw_text_position left_x_pos y_pos GXT 'STAT243' // Oysters collected 0050: gosub @Format_Align_Right 045B: draw_text_2numbers right_x_pos y_pos GXT 'int_int' int_val dec_part // ~1~/~1~ 000B: y_pos += linespace // Line 17 0652: int_val = integer_stat 144 // Unique Jumps Found 0A8D: dec_part = read_memory _ZN17CStuntJumpManager11m_iNumJumpsE size 4 virtual_protect 0 0050: gosub @Format_Align_Left 033E: set_draw_text_position left_x_pos y_pos GXT 'STAT144' // Unique Jumps found 0050: gosub @Format_Align_Right 045B: draw_text_2numbers right_x_pos y_pos GXT 'int_int' int_val dec_part // ~1~/~1~ 000B: y_pos += linespace // Line 18 0652: int_val = integer_stat 145 // Unique Jumps Done 0A8D: dec_part = read_memory _ZN17CStuntJumpManager11m_iNumJumpsE size 4 virtual_protect 0 0050: gosub @Format_Align_Left 033E: set_draw_text_position left_x_pos y_pos GXT 'STAT145' // Unique Jumps done 0050: gosub @Format_Align_Right 045B: draw_text_2numbers right_x_pos y_pos GXT 'int_int' int_val dec_part // ~1~/~1~ 000B: y_pos += linespace // Line 19 08E1: int_val = total_tags_sprayed 0A8D: dec_part = read_memory _ZN11CTagManager10ms_numTagsE size 4 virtual_protect 0 0050: gosub @Format_Align_Left 033E: set_draw_text_position left_x_pos y_pos GXT 'STAT322' // Tags sprayed 0050: gosub @Format_Align_Right 045B: draw_text_2numbers right_x_pos y_pos GXT 'int_int' int_val dec_part // ~1~/~1~ end /* ============================= Subroutines ================================== */ :Format_Title_Centered 0349: set_text_draw_font text_font 0340: set_text_draw_RGBA title_red title_green title_blue title_alpha 081C: draw_text_outline 1 RGBA outline_red outline_green outline_blue outline_alpha 03E4: set_text_draw_align_right false 0342: set_text_draw_centered true 033F: set_text_draw_letter_size letter_width letter_height 0343: set_text_draw_linewidth 640.0 0051: return :Format_Align_Left 0349: set_text_draw_font text_font 0340: set_text_draw_RGBA text_red text_green text_blue text_alpha 081C: draw_text_outline 1 RGBA outline_red outline_green outline_blue outline_alpha 03E4: set_text_draw_align_right false 0342: set_text_draw_centered false 033F: set_text_draw_letter_size letter_width letter_height 0343: set_text_draw_linewidth 640.0 0051: return :Format_Align_Right 0349: set_text_draw_font text_font 0340: set_text_draw_RGBA text_red text_green text_blue text_alpha 081C: draw_text_outline 1 RGBA outline_red outline_green outline_blue outline_alpha 03E4: set_text_draw_align_right true 0342: set_text_draw_centered false 033F: set_text_draw_letter_size letter_width letter_height 0343: set_text_draw_linewidth 640.0 0051: return :Format_Align_Centered 0349: set_text_draw_font text_font 0340: set_text_draw_RGBA text_red text_green text_blue text_alpha 081C: draw_text_outline 1 RGBA outline_red outline_green outline_blue outline_alpha 03E4: set_text_draw_align_right false 0342: set_text_draw_centered true 033F: set_text_draw_letter_size letter_width letter_height 0343: set_text_draw_linewidth 640.0 0051: return :Split_Float 0087: dec_part = int_val // (float) 0092: int_val = float int_val to_integer 008F: int_val = integer int_val to_float 0063: dec_part -= int_val // (float) 0013: dec_part *= 10.0 0092: int_val = float int_val to_integer 0092: dec_part = float dec_part to_integer 0051: return :Panel_Position_Calc if is_right_panel == true then 03A4: name_thread 'RTSM_R' title_x_pos = linewidth title_x_pos /= -2.0 title_x_pos += 640.0 title_x_pos -= margin left_x_pos = 640.0 left_x_pos -= margin left_x_pos -= linewidth right_x_pos = 640.0 right_x_pos -= margin centered_x_pos = linewidth centered_x_pos /= -2.0 centered_x_pos += 640.0 centered_x_pos -= margin centered_x_pos += centered_offset box_x_pos = linewidth box_x_pos /= -2.0 box_x_pos += 640.0 box_x_pos -= margin box_y_pos = num_lines box_y_pos *= linespace box_y_pos /= 2.0 box_y_pos += topline box_width = linewidth box_width += box_frame_size box_height = linespace box_height *= num_lines box_height += box_frame_size else 03A4: name_thread 'RTSM_L' title_x_pos = linewidth title_x_pos /= 2.0 title_x_pos += margin left_x_pos = margin right_x_pos = margin right_x_pos += linewidth centered_x_pos = linewidth centered_x_pos /= 2.0 centered_x_pos += margin centered_x_pos += centered_offset box_x_pos = linewidth box_x_pos /= 2.0 box_x_pos += margin box_y_pos = num_lines box_y_pos *= linespace box_y_pos /= 2.0 box_y_pos += topline box_width = linewidth box_width += box_frame_size box_height = linespace box_height *= num_lines box_height += box_frame_size end return I got up early so I could work uninterrupted, but couldn't quite finish before people woke up and started demanding my attention. Link to comment Share on other sites More sharing options...
OrionSR Posted January 16, 2022 Share Posted January 16, 2022 On 1/14/2022 at 3:18 PM, ArmanCan said: "Real Time Coordinates".. check the bottomside.. Actually, the current scripts were adapted from a topline Coords Hud script. I'd like to have a Locations list with lots of coordinate information, including, X,Y,Z heading, interior ID, interior name, zone ID, altitude above ground, town number, weather region, current weather, next weather... Not sure what else. A smaller coords display (XYZH) around the mini-map might be nice too. Not sure how to integrate that into the control script just yet though. 5 hours ago, ArmanCan said: some of these new USJ s needs a ramp I commented out the ones I know need a ramp object. I think the others should trigger without a ramp. As far as the landing zones go... You are probably right. We were at the top of our games when we made these jumps. I find some difficult to complete these days. I believe rubregg and ZooMoonChild have videos for Chain Game jumps. Notes: LS_Airport_Roof - Look for a tiny ramp/parking barrier to slam into (rubregg loved slamming his bike into things) Underwater Mound - There's a small lip to the river bed; you need to be underwater. CG has an underwater NRG near the Panopticon Bridge. Isolated Tree - I think this one is an awkward jump across the river. Gotta find the right spot by the tree. Speed or Splash - An easy jump from the river bank road to a small beach across the river. Panopticon Barriers - A large mound that allows jumping between the invisible barriers onto the Panopticon Bridge. Foster River - This one was always tricky. Can't seem to get the same speed on a modern system. High FPS might help, or a car. Ryan's_Eye - There's a trapezoid concrete ramp to jump off. Good luck reaching the goal. Might have better luck in a really fast car. Jump Tips: Take advantage of the speed boost from leaning forward a little on a bike. Leaning forward when hitting a ramp can provide more height from the jump. Leaning back can provide more distance. Which strategy to use depends on the jump. And yeah, the landing zones could probably use some adjustments. I'm not up to changing the Chain Game save but revisions to the jumps would be welcome information. Like I said, making a good jump is tricky business. Link to comment Share on other sites More sharing options...
ArmanCan Posted January 16, 2022 Author Share Posted January 16, 2022 That's what i called PERFECTION OrionSR Link to comment Share on other sites More sharing options...