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

    1. GTANet.com

    1. GTA Online

      1. The Contract
      2. Updates
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Red Dead Online

      1. Blood Money
      2. Frontier Pursuits
      3. Find Lobbies & Outlaws
      4. Help & Support
    3. Crews

    1. Grand Theft Auto Series

      1. Bugs*
      2. St. Andrews Cathedral
    2. GTA VI

    3. GTA V

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

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
    5. GTA San Andreas

      1. Classic GTA SA
      2. Guides & Strategies
      3. Help & Support
    6. GTA Vice City

      1. Classic GTA VC
      2. Guides & Strategies
      3. Help & Support
    7. GTA III

      1. Classic GTA III
      2. Guides & Strategies
      3. Help & Support
    8. Portable Games

      1. GTA Chinatown Wars
      2. GTA Vice City Stories
      3. GTA Liberty City Stories
    9. Top-Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. Red Dead Redemption 2

      1. PC
      2. Help & Support
    2. Red Dead Redemption

    1. GTA Mods

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Red Dead Mods

      1. Documentation
    3. Mod Showroom

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

      1. Design Your Own Mission
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Rockstar Games

    2. Rockstar Collectors

    1. Off-Topic

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

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

    2. Support

    3. Suggestions

Is It Possible to Create Something Like This? [GTA SA Classic]


ArmanCan
 Share

Recommended Posts

ArmanCan

 

 

As you can see, there is a "Real Time Status Monitor" on the screen and i really would like to create something like this 🙂 in the comment section there is a cheat engine exe plugin and custom noncleo script to get this work but when you look at the values of this script i think it is possible to convert some of them into a sanny builder command 😉  In below you can see a cut/designated version of this script... 

 

Spoiler


<?xml version="1.0" encoding="utf-8"?>

          <CheatEntries>
            <CheatEntry>
              <ID>26</ID>
              <Description>"Distance on foot"</Description>
              <LastState Value="??" Activated="0" RealAddress="00000000"/>
              <Color>80000008</Color>
              <VariableType>Float</VariableType>
              <Address>gta_sa.exe+77938C</Address>
            </CheatEntry>
            <CheatEntry>
              <ID>27</ID>
              <Description>"Distance in a car"</Description>
              <LastState Value="??" Activated="0" RealAddress="00000000"/>
              <Color>80000008</Color>
              <VariableType>Float</VariableType>
              <Address>gta_sa.exe+779390</Address>
            </CheatEntry>
            <CheatEntry>
              <ID>29</ID>
              <Description>"Distance (Bicycle)"</Description>
              <LastState Value="??" Activated="0" RealAddress="00000000"/>
              <Color>80000008</Color>
              <VariableType>Float</VariableType>
              <Address>gta_sa.exe+7793EC</Address>
            </CheatEntry>
          </CheatEntries>
        </CheatEntry>
        <CheatEntry>
          <ID>353</ID>
          <Description>"Health"</Description>
          <LastState Value="??" Activated="0" RealAddress="00000000"/>
          <Color>80000008</Color>
          <VariableType>Float</VariableType>
          <Address>gta_sa.exe+77CD98</Address>
          <Offsets>
            <Offset>540</Offset>
          </Offsets>
        </CheatEntry>
    </CheatEntry>
    <CheatEntry>
      <ID>13</ID>
      <Description>"Skill/Stats"</Description>
      <Options moManualExpandCollapse="1"/>
      <LastState Value="" Activated="0" RealAddress="00000000"/>
      <Color>80000008</Color>
      <GroupHeader>1</GroupHeader>
      <CheatEntries>
        <CheatEntry>
          <ID>14</ID>
          <Description>"Progress"</Description>
          <Options moManualExpandCollapse="1"/>
          <LastState Value="" Activated="0" RealAddress="00000000"/>
          <Color>80000008</Color>
          <GroupHeader>1</GroupHeader>
          <CheatEntries>
            <CheatEntry>
              <ID>16</ID>
              <Description>"Max Health Progress (600k)"</Description>
              <LastState Value="??" Activated="0" RealAddress="00000000"/>
              <Color>80000008</Color>
              <VariableType>4 Bytes</VariableType>
              <Address>gta_sa.exe+77950C</Address>
            </CheatEntry>
            <CheatEntry>
              <ID>2</ID>
              <Description>"Stamina/Run (300k)"</Description>
              <LastState Value="??" Activated="0" RealAddress="00000000"/>
              <Color>80000008</Color>
              <VariableType>4 Bytes</VariableType>
              <Address>gta_sa.exe+779500</Address>
            </CheatEntry>
            <CheatEntry>
              <ID>15</ID>
              <Description>"Muscle [Run,Sprint,Swim,Dive] (150k)"</Description>
              <LastState Value="??" Activated="0" RealAddress="00000000"/>
              <Color>80000008</Color>
              <VariableType>4 Bytes</VariableType>
              <Address>gta_sa.exe+7794FC</Address>
            </CheatEntry>
            <CheatEntry>
              <ID>6</ID>
              <Description>"Bike (180k)"</Description>
              <LastState Value="??" Activated="0" RealAddress="00000000"/>
              <Color>80000008</Color>
              <VariableType>4 Bytes</VariableType>
              <Address>gta_sa.exe+7794F8</Address>
            </CheatEntry>
            <CheatEntry>
              <ID>11</ID>
              <Description>"Flying (300k)"</Description>
              <LastState Value="??" Activated="0" RealAddress="00000000"/>
              <Color>80000008</Color>
              <VariableType>4 Bytes</VariableType>
              <Address>gta_sa.exe+7794F0</Address>
            </CheatEntry>
            <CheatEntry>
              <ID>1</ID>
              <Description>"Driving (300k)"</Description>
              <LastState Value="??" Activated="0" RealAddress="00000000"/>
              <Color>80000008</Color>
              <VariableType>4 Bytes</VariableType>
              <Address>gta_sa.exe+7794EC</Address>
            </CheatEntry>
            <CheatEntry>
              <ID>7</ID>
              <Description>"Lung Capacity (60k)"</Description>
              <LastState Value="??" Activated="0" RealAddress="00000000"/>
              <Color>80000008</Color>
              <VariableType>4 Bytes</VariableType>
              <Address>gta_sa.exe+7794E8</Address>
            </CheatEntry>
            <CheatEntry>
              <ID>17</ID>
              <Description>"Stamina/Swim (180k)"</Description>
              <LastState Value="??" Activated="0" RealAddress="00000000"/>
              <Color>80000008</Color>
              <VariableType>4 Bytes</VariableType>
              <Address>gta_sa.exe+7794E4</Address>
            </CheatEntry>
            <CheatEntry>
              <ID>0</ID>
              <Description>"Cycling (120k)"</Description>
              <LastState Value="??" Activated="0" RealAddress="00000000"/>
              <Color>80000008</Color>
              <VariableType>4 Bytes</VariableType>
              <Address>gta_sa.exe+7794E0</Address>
            </CheatEntry>
            <CheatEntry>
              <ID>24</ID>
              <Description>"Stamina/Cycle (300k)"</Description>
              <LastState Value="??" Activated="0" RealAddress="00000000"/>
              <Color>80000008</Color>
              <VariableType>4 Bytes</VariableType>
              <Address>gta_sa.exe+7794DC</Address>
            </CheatEntry>
            <CheatEntry>
              <ID>5</ID>
              <Description>"Stamina/Sprint (300k)"</Description>
              <LastState Value="??" Activated="0" RealAddress="00000000"/>
              <Color>80000008</Color>
              <VariableType>4 Bytes</VariableType>
              <Address>gta_sa.exe+7794D8</Address>
            </CheatEntry>
          </CheatEntries>
        </CheatEntry>
        <CheatEntry>
          <ID>54</ID>
          <Description>"Skills"</Description>
          <Options moManualExpandCollapse="1"/>
          <LastState Value="" Activated="0" RealAddress="00000000"/>
          <Color>80000008</Color>
          <GroupHeader>1</GroupHeader>
          <CheatEntries>
            <CheatEntry>
              <ID>10</ID>
              <Description>"Bicycle Skill"</Description>
              <LastState Value="??" Activated="0" RealAddress="00000000"/>
              <Color>80000008</Color>
              <VariableType>4 Bytes</VariableType>
              <Address>gta_sa.exe+7791B8</Address>
            </CheatEntry>
            <CheatEntry>
              <ID>8</ID>
              <Description>"Bike Skill"</Description>
              <LastState Value="??" Activated="0" RealAddress="00000000"/>
              <Color>80000008</Color>
              <VariableType>4 Bytes</VariableType>
              <Address>gta_sa.exe+7791B4</Address>
            </CheatEntry>
            <CheatEntry>
              <ID>9</ID>
              <Description>"Flying Skill"</Description>
              <LastState Value="??" Activated="0" RealAddress="00000000"/>
              <Color>80000008</Color>
              <VariableType>4 Bytes</VariableType>
              <Address>gta_sa.exe+77919C</Address>
            </CheatEntry>
            <CheatEntry>
              <ID>25</ID>
              <Description>"Driving"</Description>
              <LastState Value="??" Activated="0" RealAddress="00000000"/>
              <Color>80000008</Color>
              <VariableType>4 Bytes</VariableType>
              <Address>gta_sa.exe+7790A0</Address>
            </CheatEntry>
            <CheatEntry>
              <ID>30</ID>
              <Description>"Uzi/Tec9"</Description>
              <LastState Value="??" Activated="0" RealAddress="00000000"/>
              <Color>80000008</Color>
              <VariableType>Float</VariableType>
              <Address>gta_sa.exe+7794AC</Address>
            </CheatEntry>
          </CheatEntries>
        </CheatEntry>
        <CheatEntry>
          <ID>55</ID>
          <Description>"Stats"</Description>
          <Options moManualExpandCollapse="1"/>
          <LastState Value="" Activated="0" RealAddress="00000000"/>
          <Color>80000008</Color>
          <GroupHeader>1</GroupHeader>
          <CheatEntries>
            <CheatEntry>
              <ID>12</ID>
              <Description>"Lung Capacity"</Description>
              <LastState Value="??" Activated="0" RealAddress="00000000"/>
              <Color>80000008</Color>
              <VariableType>4 Bytes</VariableType>
              <Address>gta_sa.exe+7791A4</Address>
            </CheatEntry>
            <CheatEntry>
              <ID>22</ID>
              <Description>"Max Health"</Description>
              <LastState Value="??" Activated="0" RealAddress="00000000"/>
              <Color>80000008</Color>
              <VariableType>Float</VariableType>
              <Address>gta_sa.exe+7793E0</Address>
            </CheatEntry>
            <CheatEntry>
              <ID>20</ID>
              <Description>"Muscle"</Description>
              <LastState Value="??" Activated="0" RealAddress="00000000"/>
              <Color>80000008</Color>
              <VariableType>Float</VariableType>
              <Address>gta_sa.exe+7793DC</Address>
            </CheatEntry>
            <CheatEntry>
              <ID>21</ID>
              <Description>"Fat"</Description>
              <LastState Value="??" Activated="0" RealAddress="00000000"/>
              <Color>80000008</Color>
              <VariableType>Float</VariableType>
              <Address>gta_sa.exe+7793D4</Address>
            </CheatEntry>
            <CheatEntry>
              <ID>19</ID>
              <Description>"Stamina"</Description>
              <LastState Value="??" Activated="0" RealAddress="00000000"/>
              <Color>80000008</Color>
              <VariableType>Float</VariableType>
              <Address>gta_sa.exe+7793D8</Address>
            </CheatEntry>
            <CheatEntry>
              <ID>23</ID>
              <Description>"Sex Appeal"</Description>
              <LastState Value="??" Activated="0" RealAddress="00000000"/>
              <Color>80000008</Color>
              <VariableType>Float</VariableType>
              <Address>gta_sa.exe+7793E4</Address>
            </CheatEntry>
          </CheatEntries>
        </CheatEntry>
      </CheatEntries>
        </CheatEntry>
        <CheatEntry>
          <ID>231</ID>
          <Description>"Collectibles"</Description>
          <LastState Value="" Activated="0" RealAddress="00000000"/>
          <Color>80000008</Color>
          <GroupHeader>1</GroupHeader>
          <CheatEntries>
            <CheatEntry>
              <ID>229</ID>
              <Description>"Oysters"</Description>
              <LastState Value="??" Activated="0" RealAddress="00000000"/>
              <Color>80000008</Color>
              <VariableType>4 Bytes</VariableType>
              <Address>gta_sa.exe+7791EC</Address>
            </CheatEntry>
            <CheatEntry>
              <ID>228</ID>
              <Description>"Oysters ($798) (delayed)"</Description>
              <LastState Value="??" Activated="0" RealAddress="00000000"/>
              <Color>80000008</Color>
              <VariableType>4 Bytes</VariableType>
              <Address>"gta_sa.exe"+64A5D8</Address>
            </CheatEntry>
            <CheatEntry>
              <ID>232</ID>
              <Description>"Something to do with collectibles"</Description>
              <LastState Value="??" Activated="0" RealAddress="00000000"/>
              <Color>80000008</Color>
              <VariableType>4 Bytes</VariableType>
              <Address>gta_sa.exe+578624</Address>
            </CheatEntry>
            <CheatEntry>
              <ID>235</ID>
              <Description>"Horseshoes (delayed)"</Description>
              <LastState Value="??" Activated="0" RealAddress="00000000"/>
              <Color>80000008</Color>
              <VariableType>4 Bytes</VariableType>
              <Address>gta_sa.exe+64A5DC</Address>
            </CheatEntry>
            <CheatEntry>
              <ID>236</ID>
              <Description>"Horseshoes"</Description>
              <LastState Value="??" Activated="0" RealAddress="00000000"/>
              <Color>80000008</Color>
              <VariableType>4 Bytes</VariableType>
              <Address>gta_sa.exe+7791E4</Address>
            </CheatEntry>
            <CheatEntry>
              <ID>225</ID>
              <Description>"Photos ($800) (delayed)"</Description>
              <LastState Value="??" Activated="0" RealAddress="00000000"/>
              <Color>80000008</Color>
              <VariableType>4 Bytes</VariableType>
              <Address>"gta_sa.exe"+64A5E0</Address>
            </CheatEntry>
            <CheatEntry>
              <ID>233</ID>
              <Description>"Photos (wrong somehow)"</Description>
              <LastState Value="??" Activated="0" RealAddress="00B790B8"/>
              <Color>80000008</Color>
              <VariableType>4 Bytes</VariableType>
              <Address>B790B8</Address>
            </CheatEntry>
            <CheatEntry>
              <ID>234</ID>
              <Description>"Photos"</Description>
              <LastState Value="??" Activated="0" RealAddress="00000000"/>
              <Color>80000008</Color>
              <VariableType>4 Bytes</VariableType>
              <Address>gta_sa.exe+7791BC</Address>
            </CheatEntry>
            <CheatEntry>
              <ID>237</ID>
              <Description>"Tags (delayed)"</Description>
              <LastState Value="??" Activated="0" RealAddress="00000000"/>
              <Color>80000008</Color>
              <VariableType>4 Bytes</VariableType>
              <Address>gta_sa.exe+64A5E4</Address>
            </CheatEntry>
            <CheatEntry>
              <ID>238</ID>
              <Description>"Tags"</Description>
              <LastState Value="??" Activated="0" RealAddress="00000000"/>
              <Color>80000008</Color>
              <VariableType>4 Bytes</VariableType>
              <Address>gta_sa.exe+69AD74</Address>
            </CheatEntry>
          </CheatEntries>
        </CheatEntry>
      </CheatEntries>

 

 

Edited by ArmanCan
Link to comment
Share on other sites

Probably. Several of the scripts in my SA Chaos Toolkit show examples of reading memory and writing real-time status on screen. Perhaps you can adapt these scripts to your purpose.

 

Can I talk you into posting a screenshot? Videos crash this PC so I usually don't view them. Please describe your objectives.

 

Consider wrapping large code segments in spoiler tags (that eyeball icon on the right) so it doesn't clutter the page.

 

Link to comment
Share on other sites

ArmanCan
Posted (edited)

@OrionSR hmm.. i actually asked that from you but this time i will definitely try something 😉

 

Channel owner explained it and posted these two cheat engine files..

 

https://github.com/tduva/CheatEngine-Tables/blob/master/GTASA.CT

https://github.com/tduva/CheatEngine-Tables

 

This plugin is really advanced but i will just stick to the CJ's body only and make it really simple.. check this..

Spoiler

wc7pZlu.jpg

Just carefully watch the values from "Uzi/Tec9" and "Lung Capacity" when CJ starts to shoot and swim.. The plugin increases the values real time but what i want is more simple menu like first picture and typing the values like this "0/100" 😉

 

By the way.. if its forbidden to take the values from this noncleo script, than i will quit this work immediately... 

Edited by ArmanCan
Link to comment
Share on other sites

ArmanCan
Posted (edited)

I digged the Sanny Builder but off course there are some huge blanks in order to complete the script.. Let's take one of them as an example..

 

<ID>20</ID> - This "ID" doesn't match with Sanny Builder's "Stats ID" so i'm gonna use SB's ids instead..
<Description>"Muscle"</Description> I think this "Muscle" will be defined, coded and showed on my desired menu..

<LastState Value="??" Activated="0" RealAddress="00000000"/> I have no idea what that is and  i didn't find anything on SB so i'll ignore that..
<Color>80000008</Color> This must be font color so i'll ignore that too..
<VariableType>Float</VariableType> Look below
<Address>gta_sa.exe+7793DC</Address> Look below for this also 🙂

 

 

"0A8D: $result = read_memory [email protected] size 4 virtual_protect 0

0A8D reads the game memory and stores the result to a variable.

Parameters:
1 – variable to store read result (any variable or array item)
2 – memory addressа to read (any integer value)
3 – number of bytes to read: 1, 2 or 4 bytes
4 – Virtual Protect: use 1 if the address is unreadable, 0 – if address is readable."

 

"thread 'Food'
var
[email protected] : 
$Var : 
end
$var = 1
[email protected] = $Var
end_thread"

i: integer 4 bytes
f: float, 4 bytes
s: shortstring, 8 bytes
v: longstring, 16 bytes

 

 

 

I didn't understand completely but i think i'm gonna gather these memory address, float/4 bytes to a new variable define this variable as "Muscle" or SB's Stats ID "23" and add this to my menu.. My question is.. how can i do this script "Real Time"?  

Edited by ArmanCan
Link to comment
Share on other sites

4 hours ago, ArmanCan said:

By the way.. if its forbidden to take the values from this noncleo script, than i will quit this work immediately... 

Borrowing specific addresses is not forbidden. And..., the GitHub posts and script design suggest the author is trying to share the data and strategies as freely as possible. Respect and encourage this type of work by including references with your project and maybe, someday, you'll see someone referencing your work.

 

However, the specific offset values used by CheatEngine will need to be adapted to function in the context of a cleo script. This process is fairly simple given a common point of reference. For example, Lung Capacity.

 

From CE reference in first post:

            <CheatEntry>
              <ID>7</ID>
              <Description>"Lung Capacity (60k)"</Description>
              <LastState Value="??" Activated="0" RealAddress="00000000"/>
              <Color>80000008</Color>
              <VariableType>4 Bytes</VariableType>
              <Address>gta_sa.exe+7794E8</Address>
            </CheatEntry>

 

From GTAMods reference on SA Game Memory

0xB791A4 – [dword] Lung capacity

 

0xB791A4 – 0x7794E8 = 0x400000. So, you'll need to add 0x400000 to each gta_sa.exe+offset to get them to work with cleo.

 

"0x" denotes a hexadecimal value. Simple hex calculations can be performed using the standard Window's Calculator in programmer's mode. I use spreadsheets for more complex calculations. Or, you can probably use the GTAMods reference, which could be where the CE author found the required offsets in the first place.

 

Another good source of SA memory offsets is DK22pac's PlugIn-SDK

 

 

 

 

Link to comment
Share on other sites

ArmanCan
Posted (edited)
45 minutes ago, OrionSR said:

maybe, someday, you'll see someone referencing your work.

 

Yeah yeah.. whatever you say 😃

 

45 minutes ago, OrionSR said:

This process is fairly simple given a common point of reference

 

Talking about reference.. i think this cheat engine was using another language and i can't use their codes so i will only use them as a reference

 

45 minutes ago, OrionSR said:

From GTAMods reference on SA Game Memory

 

This website was brilliant and "Stats/Skills" will be enough for me 😉 i have still two questions for you..

 

- How can i combine this into an one value? (Lung Capacity for example)

- How can i do this script "Real Time"? 

Edited by ArmanCan
Link to comment
Share on other sites

23 minutes ago, ArmanCan said:

<ID>20</ID> - This "ID" doesn't match with Sanny Builder's "Stats ID" so i'm gonna use SB's ids instead..

I haven't looked closely enough at the CE script to figure out what the IDs are for. SA stores it's stats in memory in a strange way; float stats and integer stats don't align quite as expected. Or, "ID" might mean something internal to CheatEngine. You are probably better off using Sanny's reference in your script.

 

Besides, there is an easier strategy. CheatEngine needs addresses and offsets to read game memory, but cleo scripts can use standard opcodes to read stats, and global variables can be used directly. 

 

16 minutes ago, ArmanCan said:

- How can i combine this into an one value? (Lung Capacity for example)

I don't understand this question. Does the suggestion to use the standard opcodes to read stats into local variable offer a solution?

 

17 minutes ago, ArmanCan said:

- How can i do this script "Real Time"? 

Yeah, yeah. Give me a bit of time for this. I can't currently test my scripts so I'm looking for a simple example that I can adapt for this purpose. We need to start with something simple. I want to introduce you to the use of constants and high-level constructs before the script becomes too complex.

 

Meanwhile, you might want to do a little research on the standard "draw" opcodes.

We will be using Cleo4 commands to manage dynamic "gxt_entry".

 

Food for thought: An example from main.scm showing the extra steps required to display a float with two decimal precision.

Spoiler



:CPRACE_1048798
0087: [email protected] = [email protected]($Race_Index,30f) // (float) 
0017: [email protected] /= 1609.0 
0092: [email protected] = float [email protected] to_integer 
0093: [email protected] = integer [email protected] to_float 
0087: [email protected] = [email protected] // (float) 
0063: [email protected] -= [email protected] // (float) 
0013: [email protected] *= 100.0 
0092: [email protected] = float [email protected] to_integer 
00D6: if 
001B:   10 > [email protected] 
004D: jump_if_false @CPRACE_1048918 
045B: draw_text_2numbers $6903 $6919 GXT 'RACES47' numbers [email protected] [email protected]  // ~1~.0~1~ miles
0002: jump @CPRACE_1048941 

:CPRACE_1048918
045B: draw_text_2numbers $6903 $6919 GXT 'RACES46' numbers [email protected] [email protected]  // ~1~.~1~ miles

 

Please suggest an integer stat to track and display; something without a decimal value. Extra steps are required to display floating point values, so please suggest a float stat to track so I can work ahead.

Link to comment
Share on other sites

ArmanCan
Posted (edited)
3 hours ago, OrionSR said:

please suggest a float stat to track so I can work ahead

 

Well.. i didn't mean to involve you into this script and maybe a little help was enough for me..but.. anyway.. 

 

FLOATS  
21  Fat  
22  Stamina  
23  Muscle    
25  Sex appeal  
68  Respect  
69  Pistol Skill  
70  Silenced Pistol Skill  
71  Desert Eagle Skill  
72  Shotgun Skill  
73  Sawn-Off Shotgun Skill  
74  Combat Shotgun Skill  
75  Machine Pistol Skill  
76  SMG Skill  
77  AK-47 Skill  
78  M4 Skill  
79  Rifle Skill    
81  Gambling 

 

These are my desired float ids.. Talking about "draw" opcodes there are less information on Sanny and GTAMods 😔 If its going to be real difficult we can end this right here..or if this idea was great for you.. you can help me more because rabbit hole is going deeper for me 😃

 

  

3 hours ago, OrionSR said:

I don't understand this question. Does the suggestion to use the standard opcodes to read stats into local variable offer a solution?

 

I don't know.. i am progressing by searching Sanny Builder and initiating these terms in order to enter a command/opcode or whatever that is..🙂

Edited by ArmanCan
Link to comment
Share on other sites

58 minutes ago, ArmanCan said:

i am progressing by searching Sanny Builder

I've noticed that you are good about doing research so I'm trying to feed you good search terms. 

 

Don't worry, this won't be all that difficult, just new. I need some time to get organized, but I've got a plan. I should be able to test my scripts on mobile with little adaptation needed for PC. However, it is the holidays, and I have company, need to cook, and have plans for Forza Horizon 5 racing, so it might take a while.

Link to comment
Share on other sites

ArmanCan
Posted (edited)
2 hours ago, OrionSR said:

it might take a while

 

Ok.. i apologize for that 🙏 i was just excited when you said "We need to start something" and i thought you were currently doing something on my script 🙂  

 

Edit: I need to add these integer ids also...😀

 

INTEGERS
160  Driving skill

223  Flying skill 
225  Lung capacity  
229  Bike skill  
230  Cycling skill 

Edited by ArmanCan
Link to comment
Share on other sites

No problem, I'm starting to get excited about the script too. Keep talking, your ideas are helping the plan to take shape.

 

Let's set a couple of important limits; we can try to bend the limits later if necessary. Judging by the screenshots, it will be tough to get more than 11 items on a single list and keep the text readable. Also, there are only 32 local variables available for use in cleo scripts, 2 variables will be needed to display each floating point value, and the script will probably need a few variables for internal use. So, let's limit each list to 11 entries.

 

Many of the screenshots show two lists, one on the left and another on the right. If you wanted to have two long list then you might want to investigate Cleo-Redux, which has a javascript component that isn't suppose to have the same variable limits as scm based cleo scripts. (I haven't been able to keep up with many of Sanny's new features. Some of my information and formats might be out of date.)

 

An alternative, would be to create another script for the second list. Actually, I want lots of lists. I'm always writing various memory-viewer scripts to help me with investigations and projects; it'd be nice to have a template that I could adapt more easily. (Gang wars, zone info, garage contents, handling configurations, glitch detection, coordinates and other environmental data.) What I'm imagining is something like Midnight Commander, a common Linux shell. I'm actually more familiar with the classic DOS Shell I grew up with, Norton Commander. Anyway, the overall idea is to be able to toggle the left and right panels on and off, and to be able to page through different lists. 

 

Don't worry. I'm sure it sounds too complex but I can manage that part. I'm just describing why I'm particularly interesting in this project. What we need first though, is proof of concept. Your ideas are perfect for that. Can we get everything to fit on screen and still be readable? I'll give some extra thought into a strategy for the same script to display on the left or right, depending on how it's launched.

Link to comment
Share on other sites

ArmanCan
Posted (edited)
14 hours ago, OrionSR said:

Keep talking, your ideas are helping the plan to take shape.

 

To be honest.. i played this game a lot.. especially during pandemic and curfews in my country.. After that i started to realise that something is either wrong or missing and this template is one of them. There is no other "Real Time Status Monitor" except Cheat Engine Plugin so i think it will be first.. 🙂 talking about "Plan".. according to your long reply it seems this plan is already being shaped 😃

 

14 hours ago, OrionSR said:

An alternative, would be to create another script for the second list. Actually, I want lots of lists. I'm always writing various memory-viewer scripts to help me with investigations and projects; it'd be nice to have a template that I could adapt more easily.

 

 

That must be your "Cleo Redux".. 🙂

 

Either as a second script or left/right display we can divide the list like this.. If you want lots of lists YOU have to write the other codes because these 22 stats will be enough for me 😉 Actually my plan was "11 Stats + Chosen Weapon Skill".. for example.. 

If CJ switches to silenced pistol this monitor will switch to silenced from previous weapon and stats will be increased when cj registers some shots.. offcourse Sanny Builder created individual weapon skills and i had to give up this idea..   

 

225  Lung Capacity  

21  Fat  
22  Stamina  
23  Muscle    
25  Sex appeal   
68  Respect  

81  Gambling

160  Driving skill
223  Flying Skill  
229  Bike skill  
230  Cycling skill 

 

69  Pistol Skill  
70  Silenced Pistol Skill  
71  Desert Eagle Skill  
72  Shotgun Skill  
73  Sawn-Off Shotgun Skill  
74  Combat Shotgun Skill  
75  Machine Pistol Skill  
76  SMG Skill  
77  AK-47 Skill  
78  M4 Skill  
79  Rifle Skill    

Edited by ArmanCan
Link to comment
Share on other sites

4 hours ago, ArmanCan said:

according to your long reply it seems this plan is already being shaped 😃

 

 

Yeah, sort of. Besides giving the various coding puzzles a lot of thought, the major progress from last night is; I got a PC cobbled together well enough that I run SA again, and can test my scripts more directly. I'll try to code something basic for you to work with once I've finished my daily chores. 

Link to comment
Share on other sites

The RTSM script is starting to take shape.

I'll post the text and then update this post on another PC.

 

{$CLEO .cs}
// RTSM_a1.txt
// Real Time Status Monitor - Player Stats

wait 3000

03A4: name_thread 'RTSM_R'

0ADF: add_dynamic_GXT_entry "TITLE_R" text "--=== PLAYER STATS ===--"
0ADF: add_dynamic_GXT_entry "LINE_R1" text "Lung Capacity: ~1~/1000"
0ADF: add_dynamic_GXT_entry "LINE_R2" text "Body Fat: ~1~.~1~/1000.0"

while true
  0001: wait 0 ms
  0007: [email protected] = 140.0
  03F0: enable_text_draw 1
  0343: set_text_draw_linewidth 640.0
  033E: set_draw_text_position 410.0 [email protected] GXT 'TITLE_R'

  000B: [email protected] += 10.0
  0652: [email protected] = integer_stat 225 // Lung Capacity
  0343: set_text_draw_linewidth 640.0
  045A: draw_text_1number  410.0 [email protected] GXT 'LINE_R1' [email protected]

  000B: [email protected] += 10.0
  0653: [email protected] = float_stat 21  // Body Fat
  0087: [email protected] = [email protected] // (float)
  0092: [email protected] = float [email protected] to_integer
  008F: [email protected] = integer [email protected] to_float
  0063: [email protected] -= [email protected]  // (float)
  0013: [email protected] *= 10.0
  0092: [email protected] = float [email protected] to_integer
  0092: [email protected] = float [email protected] to_integer  
  0343: set_text_draw_linewidth 640.0
  045B: draw_text_2numbers 410.0 [email protected] GXT 'LINE_R2' [email protected] [email protected]
end

 

Edited by OrionSR
Link to comment
Share on other sites

ArmanCan
Posted (edited)

@OrionSR according to my extremely amateur observations you've just posted "Lung Capacity" and "Fat" and you didn't add to new menu.. right? I've looked ZAZ's "Interactive Menu" and he was talking about some "Background".. i would like to pleased if you DON'T ADD BACKGROUND to this menu.. 🙏 and off course it was already complicated for meee... jezzz.. look at these codes 😃 i thought it was just only "OA8D" and menu commands 😀 

 

Edit: By the way if you are using the list as a reference please switch "Respect"s position with "Sex Appeal" because SA and Gambling are less relevant than "Respect" 😉

 

Secon Edit: If you need my help i will gladly do but it seems you are already hauling/conducting all of this sh*t so good luck 😉 i'm out for today.. 😃    

Edited by ArmanCan
Link to comment
Share on other sites

9 hours ago, ArmanCan said:

ADD BACKGROUND

Good idea. I'll be sure to add a background in a later iteration of the script. A semi-transparent background will provide reference while we refine the positioning and formatting of the text. When you are happy with the layout of the list you can adjust the alpha level of the background to nothing and it won't show at all. However, the RTSM template will include the background option for anyone that wants to use it.

 

I'm expecting that you will create and customize your own lists. I'm trying to write a template that is easy to customize. The current script output is ugly; it's using default settings so the script is short. A top priority is to work with all the draw text opcodes in an effort to make the display less obtrusive - different font, letter size, justification, outline, color, etc. I'm not sure how clearly small text will display with these commands. I'm counting on you to find the optimal settings. I'll do what I can to make the template easy to modify.

 

Update: I was hoping to work up a better version of the RTSM script but real life demanded my attention, sorry about that. Instead I'll post the various draw opcodes I wanted to include. These codes should be placed after each linewidth command (0343:) and before the various draw text commands.

033F: set_text_draw_letter_size 1.3 3.36
0340: set_text_draw_RGBA 180 180 180 255
0341: set_text_draw_align_justify 0
0342: set_text_draw_centered 1
0348: enable_text_draw_proportional 1
0349: set_text_draw_font 3
03E4: set_text_draw_align_right 0
060D: draw_text_shadow 0 rgba 0 0 0 255
081C: draw_text_outline 1 RGBA 0 0 0 255

In previous projects I have found several of the commands to be very useful.

  • 033F: for smaller letter size
  • 0340: to color the title - there are other tricks to coloring GXT text (like ~y~, ~r~).
  • 0349: fonts are tricky, what looks like it should be smaller ends up being wider. Maybe 033F: will help.
  • 03E4: might help align the numbers better, but you'd probably need to add 200.0 or so to the X position (currently 410.0).
  • 081C: Outline was much better for small text than shadows.

 

The screen dimensions, btw, are 640.0 by 480.0 - think back to the old-school 4:3 monitors used with PS2s. These dimensions scale to your current screen resolution.

Edited by OrionSR
Link to comment
Share on other sites

ArmanCan
Posted (edited)
On 1/4/2022 at 5:20 AM, OrionSR said:

Good idea. I'll be sure to add a background in a later iteration of the script. A semi-transparent background will provide reference while we refine the positioning and formatting of the text.

 

No OrionSR!! please DON'T!! well.. as you know i'm not the expert of it but i'm pretty sure this background will occupy extra space and it will be disturbing when i compared the sample cleo menu images from the internet.. 🙂

 

On 1/4/2022 at 5:20 AM, OrionSR said:

I'm expecting that you will create and customize your own lists. I'm trying to write a template that is easy to customize. The current script output is ugly; it's using default settings so the script is short. A top priority is to work with all the draw text opcodes in an effort to make the display less obtrusive - different font, letter size, justification, outline, color, etc. I'm not sure how clearly small text will display with these commands. I'm counting on you to find the optimal settings. I'll do what I can to make the template easy to modify.

 

I've already sent my list and i've just asked you to switch Respect with Sex Appeal.. other list orders are completely ok for me 😉 Talking about "Optimal Settings" i think best optimal dimension will be like "Speedrunner Splits" (Small window that stands on middleleft) 🙂.. Thank you for counting on my tastes but you are already BOSS so i can count on you too 😎

 

Edit: I've also found some converted resolutions from the aspect ratio "4.3" and prepared a sample image from Adobe Illustrator in order to imaginate the dimensions easily 😉

 

Spoiler

fOF6PGY.jpg

fvJLKAo.jpg

 

Edited by ArmanCan
Link to comment
Share on other sites

6 hours ago, ArmanCan said:

I've also found some converted resolutions from the aspect ratio "4.3"

Um... I don't think I explained this properly. Think of it this way: An x position (x_pos) of 640.0 will always be the far right side of the screen, no matter which screen resolution you are playing; y_pos 480.0 is the bottom of the screen.

 

Don't worry about the background box, it'll be an optional component you don't need to use. What I have in mind is not a solid black box; the alpha level will be very low, like a slight window tint, and used mostly to make sure the list text stays within our workspace. When the list looks good the alpha level can be reduced to 0 and the box will be invisible.

 

I have my doubts about getting the list text to be as small as your examples and still be easy to read. I'll stop rambling about it and try to get something coded before the house wakes up and starts demanding my attention.

Link to comment
Share on other sites

3 hours ago, OrionSR said:

I have my doubts about getting the list text to be as small as your examples and still be easy to read.

Never mind, this is working better than I had hoped. The script is continuing to take shape.

 

New to this version:

  • Constants: Instead of hard coding values and guessing at the purpose of variables, I've started defining constants to make the script easier to read. You can customize things like the spacing between lines by adjusting the assigned constant at the top of the script instead of making lots of adjustments to hard coded values. Basically SB will simply swap the text constants with the value or variable that follows. (Try compiling and decompiling scripts without using the added SCM info to see how SB converts things like constants or high-level constructs into compiled SCM codes.)
  • Background boxes for right at left panels. The purpose of these boxes is to show the expected screen space needed by the lists. The objective is to assure that the lists to not interfere with other game elements like the mini-map, entered vehicle names, mission timers and status bars, and text boxes. Text boxes display on the left and can be quite large. I'll look into disabling the left list when a text box is displayed - not sure how yet.
  • Subroutines: The gosub command will redirect the instruction pointer to the specified label. The end of the subroutine will "return" the instruction pointer to the command following the gosub command. You only need to change the draw settings in one place to change how the text is displayed for all lines.
  • A few more stats were added as examples of how to duplicate and adjust float stats. Now that the script is a bit more organized, I suspect that you can added new lines on your own.

 

RTSM_a2.txt

Spoiler

 

{$CLEO .cs}
// RTSM_a2.txt
// Real Time Status Monitor - Player Stats

// Header - Configuring Sanny Builder

const
  x_pos = [email protected]
  y_pos = [email protected]

  linewidth = 200.0
  linespace = 10.0
  topline = 140.0

  int_val = [email protected]
  dec_part = [email protected]
end

// Initialize - Run-once codes to get ready for the While..End loop.

wait 3000

03A4: name_thread 'RTSM_R'

0ADF: add_dynamic_GXT_entry "TITLE_R" text "--=== PLAYER STATS ===--"
0ADF: add_dynamic_GXT_entry "LINE_R1" text "Lung Capacity: ~1~/1000"
0ADF: add_dynamic_GXT_entry "LINE_R2" text "Body Fat: ~1~.~1~/1000.0"
0ADF: add_dynamic_GXT_entry "LINE_R3" text "Stamina: ~1~.~1~/1000.0"
0ADF: add_dynamic_GXT_entry "LINE_R4" text "Muscle: ~1~.~1~/1000.0"
0ADF: add_dynamic_GXT_entry "LINE_R5" text "Respect: ~1~.~1~/1000.0"

x_pos = 630.0

// Draw Loop

while true
  0001: wait 0 ms
  03F0: enable_text_draw 1
  0050: gosub @Draw_Box

  0007: y_pos = topline
  0050: gosub @Format_Text
  033E: set_draw_text_position x_pos y_pos GXT 'TITLE_R'

  000B: y_pos += linespace
  0652: int_val = integer_stat 225 // Lung Capacity
  0050: gosub @Format_Text
  045A: draw_text_1number  x_pos y_pos GXT 'LINE_R1' int_val

  000B: y_pos += linespace
  0653: int_val = float_stat 21  // Body Fat
  0050: gosub @Split_Float
  0050: gosub @Format_Text
  045B: draw_text_2numbers x_pos y_pos GXT 'LINE_R2' int_val dec_part

  000B: y_pos += linespace
  0653: int_val = float_stat 22  // Stamina
  0050: gosub @Split_Float
  0050: gosub @Format_Text
  045B: draw_text_2numbers x_pos y_pos GXT 'LINE_R3' int_val dec_part

  000B: y_pos += linespace
  0653: int_val = float_stat 23  // Muscle
  0050: gosub @Split_Float
  0050: gosub @Format_Text
  045B: draw_text_2numbers x_pos y_pos GXT 'LINE_R4' int_val dec_part

  000B: y_pos += linespace
  0653: int_val = float_stat 68  // Respect
  0050: gosub @Split_Float
  0050: gosub @Format_Text
  045B: draw_text_2numbers x_pos y_pos GXT 'LINE_R5' int_val dec_part
end

// Subroutines - avoids repetition of common code segments

:Format_Text
0343: set_text_draw_linewidth linewidth
//033F: set_text_draw_letter_size 0.48 1.12  // default
033F: set_text_draw_letter_size 0.18 0.60
//0340: set_text_draw_RGBA 180 180 180 255
//0341: set_text_draw_align_justify 1
//0342: set_text_draw_centered 1
//0348: enable_text_draw_proportional 1
0349: set_text_draw_font 2  // 1 or 2, 0 and 3 are too fancy
03E4: set_text_draw_align_right 1
//060D: draw_text_shadow 0 rgba 0 0 0 255
081C: draw_text_outline 1 RGBA 0 0 0 255
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

:Draw_Box
038E: draw_box_position 578.0 236.0 size 110.0 200.0 RGBA 0 0 0 60
038E: draw_box_position 60.0 236.0 size 110.0 200.0 RGBA 0 0 0 60
0051: return

 

 

 

Edited by OrionSR
Link to comment
Share on other sites

ArmanCan

@OrionSR REALLY REALLY GOOD WORK 😉 but i have still questions for you..

 

As i noticed i need to fill the list more and it seems not problem to fiil the left side but

 

- How can i fill the right side?

- Can i also copy "PLAYER STATS" to right side and change it ?

- I couldn't see the background option.. Where is it?

Link to comment
Share on other sites

46 minutes ago, ArmanCan said:

- How can i fill the right side?

The current script is designed to display on the right side. The idea is to optionally use a 2nd script on the left side. And, once I work out a few bugs in the design, by changing one variable, the same script should display on the right or left, but that's going to take a bit more work. My goal is to implement lots of list-scripts in a way that you can page through the left or right side panels to chose which lists best suit the current task.

 

53 minutes ago, ArmanCan said:

- Can i also copy "PLAYER STATS" to right side and change it ?

The idea is to rename the script before adapting it to a new purpose. Hold off on this until I make a version that can easily switch sides by changing one variable.

 

58 minutes ago, ArmanCan said:

- I couldn't see the background option.. Where is it?

The boxes are very crude at this point. The codes are at the very bottom (038E:); changing 60 to 0 will make them invisible, 255 is completely solid. You should see a lightly shaded black box behind the current list, and a similar box on the left as a place holder for initial testing.

 

Before I forget again; if you expand the list then continue with "LINE_Ra" after "LINE_R9". The GXT keys are limited to 7 characters.

 

Suggested testing:

  • Fill in more of the player stats list to see how many entries will fit in the current box.
  • Experiment with different text sizes. I picked something very small; a little larger might be better.
  • Current line spacing is 10.0. You may want to adjust the spacing depending on letter height and font.
Link to comment
Share on other sites

Weird glitch: When I moved the panel to the left side of the screen the text would wrap and garble the display whenever a zone name was displayed. I couldn't find any way to stop the glitch other than to avoid right alignment in the left panel. It was like the zone display was altering the "right align linewidth", but I couldn't find an opcode to control this setting.

 

I'm done coding for the day so I'll post my current progress. The script is getting longer; it is my hope that thinking through the early versions will keep the changes from being overwhelming. I'll post first and then edit with notes on adapting the script for another list using a better PC.

 

RTSM_Player_Stats_a3

Spoiler

 

{$CLEO .cs}
// RTSM_Player_Stats_a3.txt
// Real Time Status Monitor - Player Stats

// Header - Configuring Sanny Builder

const
  is_right_panel = [email protected]
  
  int_val = [email protected]
  dec_part = [email protected]

  x_pos = [email protected]
  y_pos = [email protected]

  linewidth = 640.0
  linespace = 10.0
  topline = 140.0
end

// Initialize - Run-once codes to get ready for the While..End loop.

wait 3000
is_right_panel = true
//is_right_panel = false

if
  is_right_panel == true
then
  03A4: name_thread 'RTSM_R'

  0ADF: add_dynamic_GXT_entry "TITLE_R" text "--=== PLAYER STATS ===--"
  0ADF: add_dynamic_GXT_entry "LINE_R1" text "Lung Capacity: ~1~/1000"
  0ADF: add_dynamic_GXT_entry "LINE_R2" text "Body Fat: ~1~.~1~/1000.0"
  0ADF: add_dynamic_GXT_entry "LINE_R3" text "Stamina: ~1~.~1~/1000.0"
  0ADF: add_dynamic_GXT_entry "LINE_R4" text "Muscle: ~1~.~1~/1000.0"
  0ADF: add_dynamic_GXT_entry "LINE_R5" text "Respect: ~1~.~1~/1000.0"

  x_pos = 630.0
else
  03A4: name_thread 'RTSM_L'

  0ADF: add_dynamic_GXT_entry "TITLE_L" text "--=== PLAYER STATS ===--"
  0ADF: add_dynamic_GXT_entry "LINE_L1" text "Lung Capacity: ~1~/1000"
  0ADF: add_dynamic_GXT_entry "LINE_L2" text "Body Fat: ~1~.~1~/1000.0"
  0ADF: add_dynamic_GXT_entry "LINE_L3" text "Stamina: ~1~.~1~/1000.0"
  0ADF: add_dynamic_GXT_entry "LINE_L4" text "Muscle: ~1~.~1~/1000.0"
  0ADF: add_dynamic_GXT_entry "LINE_L5" text "Respect: ~1~.~1~/1000.0"

  x_pos = 6.0
end

// Draw Loop

while true
  0001: wait 0 ms
  03F0: enable_text_draw 1
  0050: gosub @Draw_Box

  0007: y_pos = topline
  0050: gosub @Format_Text
  if
    is_right_panel == true
  then
    033E: set_draw_text_position x_pos y_pos GXT 'TITLE_R'
  else
    033E: set_draw_text_position x_pos y_pos GXT 'TITLE_L'
  end
   
  000B: y_pos += linespace
  0652: int_val = integer_stat 225 // Lung Capacity
  0050: gosub @Format_Text
  if
    is_right_panel == true
  then
    045A: draw_text_1number  x_pos y_pos GXT 'LINE_R1' int_val
  else
    045A: draw_text_1number  x_pos y_pos GXT 'LINE_L1' int_val
  end

  000B: y_pos += linespace
  0653: int_val = float_stat 21  // Body Fat
  0050: gosub @Split_Float
  0050: gosub @Format_Text
  if
    is_right_panel == true
  then
    045B: draw_text_2numbers x_pos y_pos GXT 'LINE_R2' int_val dec_part
  else
    045B: draw_text_2numbers x_pos y_pos GXT 'LINE_L2' int_val dec_part
  end

  000B: y_pos += linespace
  0653: int_val = float_stat 22  // Stamina
  0050: gosub @Split_Float
  0050: gosub @Format_Text
  if
    is_right_panel == true
  then
    045B: draw_text_2numbers x_pos y_pos GXT 'LINE_R3' int_val dec_part
  else
    045B: draw_text_2numbers x_pos y_pos GXT 'LINE_L3' int_val dec_part
  end

  000B: y_pos += linespace
  0653: int_val = float_stat 23  // Muscle
  0050: gosub @Split_Float
  0050: gosub @Format_Text
  if
    is_right_panel == true
  then
    045B: draw_text_2numbers x_pos y_pos GXT 'LINE_R4' int_val dec_part
  else
    045B: draw_text_2numbers x_pos y_pos GXT 'LINE_L4' int_val dec_part
  end

  000B: y_pos += linespace
  0653: int_val = float_stat 68  // Respect
  0050: gosub @Split_Float
  0050: gosub @Format_Text
  if
    is_right_panel == true
  then
    045B: draw_text_2numbers x_pos y_pos GXT 'LINE_R5' int_val dec_part
  else
    045B: draw_text_2numbers x_pos y_pos GXT 'LINE_L5' int_val dec_part
  end
end

// Subroutines - avoids repetition of common code segments

:Format_Text
0343: set_text_draw_linewidth linewidth
//033F: set_text_draw_letter_size 0.48 1.12  // default
033F: set_text_draw_letter_size 0.18 0.60
//0340: set_text_draw_RGBA 180 180 180 255
//0341: set_text_draw_align_justify 0
//0342: set_text_draw_centered 0
//0348: enable_text_draw_proportional 0
0349: set_text_draw_font 1  // 1(default) or 2(fixed width?, all caps), 0 and 3 are too fancy
03E4: set_text_draw_align_right is_right_panel
//060D: draw_text_shadow 0 rgba 0 0 0 255
081C: draw_text_outline 1 RGBA 0 0 0 255
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

:Draw_Box
if
  is_right_panel == true
then
  038E: draw_box_position 578.0 236.0 size 110.0 200.0 RGBA 0 0 0 60
else
  038E: draw_box_position 60.0 236.0 size 110.0 200.0 RGBA 0 0 0 60
end
0051: return

 

 

 

The filename is now more descriptive of the list. Change the filename for your new 2nd list but do not change the thread/script name defined within the script. The common script names (RTSM_R and RTSM_L) should allow either panel to be terminated by the RTSM control script.

 

Change is_right_panel = true to false on one of the scripts (or just change which line is commented out). In a later version this setting should be passed by the control script when the list script is launched.

 

Keep the general naming convention used for GXT keys. We don't want to clutter the game environment with unique keys for scripts that will be terminated without a chance to release the keys. The control script will need to free up keys that are no longer needed, so a consistent naming convention is needed. You can add new keys as required. For example, "TITL2_R" and _L can be used if you want another list on the same panel. Just don't let it get out of hand - think in terms of a template.

 

If..then..else..end - A high-level construct that is much easier to code than working with jump/goto_if_false. The format includes a lot of repetition with slightly different codes, but the strategy doesn't use as many variables. Some of those limits I spoke of earlier are no longer a concern. You can have much longer lists than previously thought - whatever looks good.

 

 

Edited by OrionSR
Link to comment
Share on other sites

ArmanCan
Posted (edited)

@OrionSR let's forget about every reply in this topic and start to focus on your last script.. shall we 😉

 

Most of these stuff are now template and i can only change "60" for  half/complete transparency for this box and be careful to not typing more than 7 digits for this "GXT"... As long as i read all the list, i can use left or right side of this screen but..

 

7 hours ago, OrionSR said:

Change is_right_panel = true to false

 

If i understood it correctly i have to change the value from "True" to "False" in order to complete the LEFT side of the list.. right?? And off course i will pay attention if it's integer or float 🙂 

 

By the way..

 

- Can i complete both lists on ONE SCRIPT (filling up all 22 stats und skills) by switching these TRUE or FALSE? 

 

- The script will be finished when i enter this "0A93: terminate_this_custom_script ".. right? 

 

 

Edited by ArmanCan
Link to comment
Share on other sites

ArmanCan
Posted (edited)

@OrionSR please man!!!.. script itself works great and as you can see i practiced on SMG but i need your help for the last time 🙂

 

Spoiler

5MG3wFM.jpg

 

- I entered the LEFT PANEL (Lung Capacity, Body Fat....) but i can't see on the left .. How can i activate it?

- I tried to align "Text Height" and looks great but it looks widened. How can i fix these?

- According to this text height i think i can add the second list to the above or below and increase the box dimensions just a little bit.. How can i do this?

Edited by ArmanCan
Link to comment
Share on other sites

4 hours ago, ArmanCan said:

- Can i complete both lists on ONE SCRIPT (filling up all 22 stats und skills) by switching these TRUE or FALSE? 

No, but I encourage you to try just to see what happens. The previous version of the script would be more suited to this task though. At the end of the first list you could reset the y_pos to the topline and change x_pos to a new column position and start the 2nd list. You are welcome to take what you've learned and develop your own version of the script; I'll still help with that version too. 

 

However, at this point I really need you to finish your two list-scripts based on the template example. At least three list-scripts are needed to develop the idea of a control script. I'll write one, but.. Too be clear, I'm convinced that you are having a lot of fun learning new things about the game and that you are not trying to trick me into writing the script for you. But far too often players ask for help with a script and what they really want is for someone to make their idea a reality to they can play without learning anything. So I stubbornly refuse to finish the script. Which means I'm stuck; I need your feedback to move on. It doesn't have to be good, or even work properly. (Just saw your update: Please post the script.)

 

6 hours ago, ArmanCan said:

- The script will be finished when i enter this "0A93: terminate_this_custom_script ".. right? 

Nope. As written, this script will continue to loop through the while..end draw loop forever. The plan is to terminate the script with the control script using opcode 0ABA:. I really need to update Sanny. I'm using an older version so the codes shown don't match the current documentation.

//0ABA: end_custom_thread_named 'BENZIN'
//terminate_all_custom_scripts_with_this_name [scriptFileName: string]
0ABA: terminate_all_custom_scripts_with_this_name 'RTSM_R'

Hence the reason for a thread/script naming convention in the template.

 

I feel the need to describe the RTSM Control script a little better. Partially because it should help explain why I've made certain design choices in the list-script template, but mostly because thinking it through and writing it out will help streamline the process of actually coding the script. I need to learn a few new skills to accomplish my goals. Look for an update on this topic.

Link to comment
Share on other sites

ArmanCan
Posted (edited)
56 minutes ago, OrionSR said:

However, at this point I really need you to finish your two list-scripts based on the template example. At least three list-scripts are needed to develop the idea of a control script. I'll write one, but.. Too be clear, I'm convinced that you are having a lot of fun learning new things about the game and that you are not trying to trick me into writing the script for you. But far too often players ask for help with a script and what they really want is for someone to make their idea a reality to they can play without learning anything. So I stubbornly refuse to finish the script. Which means I'm stuck; I need your feedback to move on. It doesn't have to be good, or even work properly. (Just saw your update: Please post the script.)

 

Well.. I can easily realise some stuff for example pickups, coordinates, models but i don't have an imagination to enter some action commands and get this thing moving.. Off course i don't have a "Software Engineer Knowledge" to know some scientific bullsh*ts 😃 

 

"Players" am i one of them? Kind of.. but i can install some of the bricks in order to build a house but i don't have ingredients to complete the roof.. You have all the ingredients to build a house and it is interesting to "Observe" some of them but i'm still avoiding myself to not involve with this scientific bullsh*ts so do not pull me into this "Rabbit Hole"..ok?? i'm not capable for this sh*t 😉  

 

Talking about the lists.. i didn't understand.. you need ONE MORE LIST? What is going to be like? Switching the next page by for example using arrow buttons to see the next status?  I'm pretty sure you are demanding me to fill up your contents (Gang wars, zone info, garage contents, handling configurations, glitch detection, coordinates and other environmental data.) 😃

 

Edit: I forgot to upload the script 😃

 

Spoiler
{$CLEO .cs}
// RTSM_Player_Stats_a3.txt
// Real Time Status Monitor - Player Stats

// Header - Configuring Sanny Builder

const
  is_right_panel = [email protected]
  
  int_val = [email protected]
  dec_part = [email protected]

  x_pos = [email protected]
  y_pos = [email protected]

  linewidth = 640.0
  linespace = 10.0
  topline = 140.0
end

// Initialize - Run-once codes to get ready for the While..End loop.

wait 3000
is_right_panel = true
//is_right_panel = false

if
  is_right_panel == true
then
  03A4: name_thread 'RTSM_R'

  0ADF: add_dynamic_GXT_entry "TITLE_R" text "--=== WEAPON SKILLS ===--"
  0ADF: add_dynamic_GXT_entry "LINE_R1" text "Pistol: ~1~/1000"
  0ADF: add_dynamic_GXT_entry "LINE_R2" text "Silenced P.: ~1~.~1~/1000.0"
  0ADF: add_dynamic_GXT_entry "LINE_R3" text "Desert Eagle: ~1~.~1~/1000.0"
  0ADF: add_dynamic_GXT_entry "LINE_R4" text "Shotgun: ~1~.~1~/1000.0"
  0ADF: add_dynamic_GXT_entry "LINE_R5" text "Sawn-Off: ~1~.~1~/1000.0"
  0ADF: add_dynamic_GXT_entry "LINE_R6" text "Combat: ~1~.~1~/1000.0"
  0ADF: add_dynamic_GXT_entry "LINE_R7" text "Uzi/Tec9: ~1~.~1~/1000.0"
  0ADF: add_dynamic_GXT_entry "LINE_R8" text "SMG: ~1~.~1~/1000.0"
  0ADF: add_dynamic_GXT_entry "LINE_R9" text "AK-47: ~1~.~1~/1000.0"
  0ADF: add_dynamic_GXT_entry "LINE_RA" text "M4: ~1~.~1~/1000.0"
  0ADF: add_dynamic_GXT_entry "LINE_RB" text "Rifle: ~1~.~1~/1000.0"
              
  x_pos = 630.0
else
  03A4: name_thread 'RTSM_L'

  0ADF: add_dynamic_GXT_entry "TITLE_L" text "--=== PLAYER STATS-SKILLS ===--"
  0ADF: add_dynamic_GXT_entry "LINE_L1" text "Lung Capacity: ~1~/1000"
  0ADF: add_dynamic_GXT_entry "LINE_L2" text "Body Fat: ~1~.~1~/1000.0"
  0ADF: add_dynamic_GXT_entry "LINE_L3" text "Stamina: ~1~.~1~/1000.0"
  0ADF: add_dynamic_GXT_entry "LINE_L4" text "Muscle: ~1~.~1~/1000.0"
  0ADF: add_dynamic_GXT_entry "LINE_L5" text "Respect: ~1~.~1~/1000.0"
  0ADF: add_dynamic_GXT_entry "LINE_L6" text "Sex Appeal: ~1~.~1~/1000.0"
  0ADF: add_dynamic_GXT_entry "LINE_L7" text "Gambling: ~1~.~1~/1000.0"
  0ADF: add_dynamic_GXT_entry "LINE_L8" text "Driving: ~1~.~1~/1000.0"
  0ADF: add_dynamic_GXT_entry "LINE_L9" text "Flying: ~1~.~1~/1000.0"
  0ADF: add_dynamic_GXT_entry "LINE_LA" text "Bike: ~1~.~1~/1000.0"
  0ADF: add_dynamic_GXT_entry "LINE_LB" text "Cycling: ~1~.~1~/1000.0"
              
  x_pos = 6.0
end

// Draw Loop

while true
  0001: wait 0 ms
  03F0: enable_text_draw 1
  0050: gosub @Draw_Box

  0007: y_pos = topline
  0050: gosub @Format_Text
  if
    is_right_panel == true
  then
    033E: set_draw_text_position x_pos y_pos GXT 'TITLE_R'
  else
    033E: set_draw_text_position x_pos y_pos GXT 'TITLE_L'
  end

  000B: y_pos += linespace 
  0653: int_val = float_stat 69  // Pistol
  0050: gosub @Split_Float
  0050: gosub @Format_Text
  if
    is_right_panel == true
  then
    045B: draw_text_2numbers x_pos y_pos GXT 'LINE_R1' int_val dec_part
  else
    045B: draw_text_2numbers x_pos y_pos GXT 'LINE_L1' int_val dec_part
  end

  000B: y_pos += linespace
  0653: int_val = float_stat 70  // Silenced Pistol
  0050: gosub @Split_Float
  0050: gosub @Format_Text
  if
    is_right_panel == true
  then
    045B: draw_text_2numbers x_pos y_pos GXT 'LINE_R2' int_val dec_part
  else
    045B: draw_text_2numbers x_pos y_pos GXT 'LINE_L2' int_val dec_part
  end

  000B: y_pos += linespace
  0653: int_val = float_stat 71  // Desert Eagle
  0050: gosub @Split_Float
  0050: gosub @Format_Text
  if
    is_right_panel == true
  then
    045B: draw_text_2numbers x_pos y_pos GXT 'LINE_R3' int_val dec_part
  else
    045B: draw_text_2numbers x_pos y_pos GXT 'LINE_L3' int_val dec_part
  end

  000B: y_pos += linespace
  0653: int_val = float_stat 72  // Chrome Shotgun
  0050: gosub @Split_Float
  0050: gosub @Format_Text
  if
    is_right_panel == true
  then
    045B: draw_text_2numbers x_pos y_pos GXT 'LINE_R4' int_val dec_part
  else
    045B: draw_text_2numbers x_pos y_pos GXT 'LINE_L4' int_val dec_part
  end

  000B: y_pos += linespace
  0653: int_val = float_stat 73  // Sawn-Off Shotgun
  0050: gosub @Split_Float
  0050: gosub @Format_Text
  if
    is_right_panel == true
  then
    045B: draw_text_2numbers x_pos y_pos GXT 'LINE_R5' int_val dec_part
  else
    045B: draw_text_2numbers x_pos y_pos GXT 'LINE_L5' int_val dec_part
  end

  000B: y_pos += linespace
  0653: int_val = float_stat 74  // Combat Shotgun
  0050: gosub @Split_Float
  0050: gosub @Format_Text
  if
    is_right_panel == true
  then
    045B: draw_text_2numbers x_pos y_pos GXT 'LINE_R6' int_val dec_part
  else
    045B: draw_text_2numbers x_pos y_pos GXT 'LINE_L6' int_val dec_part
  end

  000B: y_pos += linespace
  0653: int_val = float_stat 75  // Micro Uzi/Tec9
  0050: gosub @Split_Float
  0050: gosub @Format_Text
  if
    is_right_panel == true
  then
    045B: draw_text_2numbers x_pos y_pos GXT 'LINE_R7' int_val dec_part
  else
    045B: draw_text_2numbers x_pos y_pos GXT 'LINE_L7' int_val dec_part
  end

  000B: y_pos += linespace
  0653: int_val = float_stat 76  // SMG
  0050: gosub @Split_Float
  0050: gosub @Format_Text
  if
    is_right_panel == true
  then
    045B: draw_text_2numbers x_pos y_pos GXT 'LINE_R8' int_val dec_part
  else
    045B: draw_text_2numbers x_pos y_pos GXT 'LINE_L8' int_val dec_part
  end

  000B: y_pos += linespace
  0653: int_val = float_stat 77  // AK-47
  0050: gosub @Split_Float
  0050: gosub @Format_Text
  if
    is_right_panel == true
  then
    045B: draw_text_2numbers x_pos y_pos GXT 'LINE_R9' int_val dec_part
  else
    045B: draw_text_2numbers x_pos y_pos GXT 'LINE_L9' int_val dec_part
  end

  000B: y_pos += linespace
  0653: int_val = float_stat 78  // M4
  0050: gosub @Split_Float
  0050: gosub @Format_Text
  if
    is_right_panel == true
  then
    045B: draw_text_2numbers x_pos y_pos GXT 'LINE_RA' int_val dec_part
  else
    045B: draw_text_2numbers x_pos y_pos GXT 'LINE_LA' int_val dec_part
  end

  000B: y_pos += linespace
  0653: int_val = float_stat 79  // Rifle
  0050: gosub @Split_Float
  0050: gosub @Format_Text
  if
    is_right_panel == true
  then
    045B: draw_text_2numbers x_pos y_pos GXT 'LINE_RB' int_val dec_part
  else
    045B: draw_text_2numbers x_pos y_pos GXT 'LINE_LB' int_val dec_part
  end

  000B: y_pos += linespace
  0652: int_val = integer_stat 225 // Lung Capacity
  0050: gosub @Format_Text
  if
    is_right_panel == false
  then
    045A: draw_text_1number  x_pos y_pos GXT 'LINE_R1' int_val
  else
    045A: draw_text_1number  x_pos y_pos GXT 'LINE_L1' int_val
  end

  000B: y_pos += linespace
  0653: int_val = float_stat 21  // Body Fat
  0050: gosub @Split_Float
  0050: gosub @Format_Text
  if
    is_right_panel == false
  then
    045B: draw_text_2numbers x_pos y_pos GXT 'LINE_R2' int_val dec_part
  else
    045B: draw_text_2numbers x_pos y_pos GXT 'LINE_L2' int_val dec_part
  end

  000B: y_pos += linespace
  0653: int_val = float_stat 22  // Stamina
  0050: gosub @Split_Float
  0050: gosub @Format_Text
  if
    is_right_panel == false
  then
    045B: draw_text_2numbers x_pos y_pos GXT 'LINE_R3' int_val dec_part
  else
    045B: draw_text_2numbers x_pos y_pos GXT 'LINE_L3' int_val dec_part
  end

  000B: y_pos += linespace
  0653: int_val = float_stat 23  // Muscle
  0050: gosub @Split_Float
  0050: gosub @Format_Text
  if
    is_right_panel == false
  then
    045B: draw_text_2numbers x_pos y_pos GXT 'LINE_R4' int_val dec_part
  else
    045B: draw_text_2numbers x_pos y_pos GXT 'LINE_L4' int_val dec_part
  end

  000B: y_pos += linespace
  0653: int_val = float_stat 68  // Respect
  0050: gosub @Split_Float
  0050: gosub @Format_Text
  if
    is_right_panel == false
  then
    045B: draw_text_2numbers x_pos y_pos GXT 'LINE_R5' int_val dec_part
  else
    045B: draw_text_2numbers x_pos y_pos GXT 'LINE_L5' int_val dec_part                                                                            
  end
  
  000B: y_pos += linespace
  0653: int_val = float_stat 25  // Sex Appeal
  0050: gosub @Split_Float
  0050: gosub @Format_Text
  if
    is_right_panel == false
  then
    045B: draw_text_2numbers x_pos y_pos GXT 'LINE_R6' int_val dec_part
  else
    045B: draw_text_2numbers x_pos y_pos GXT 'LINE_L6' int_val dec_part                                                                            
  end
  
  000B: y_pos += linespace
  0653: int_val = float_stat 81  // Gambling
  0050: gosub @Split_Float
  0050: gosub @Format_Text
  if
    is_right_panel == false
  then
    045B: draw_text_2numbers x_pos y_pos GXT 'LINE_R7' int_val dec_part
  else
    045B: draw_text_2numbers x_pos y_pos GXT 'LINE_L7' int_val dec_part                                                                            
  end
  
  000B: y_pos += linespace
  0652: int_val = integer_stat 160 // Driving 
  0050: gosub @Format_Text
  if
    is_right_panel == false
  then
    045A: draw_text_1number  x_pos y_pos GXT 'LINE_R8' int_val
  else
    045A: draw_text_1number  x_pos y_pos GXT 'LINE_L8' int_val
  end

  000B: y_pos += linespace
  0652: int_val = integer_stat 223 // Flying
  0050: gosub @Format_Text
  if
    is_right_panel == false
  then
    045A: draw_text_1number  x_pos y_pos GXT 'LINE_R9' int_val
  else
    045A: draw_text_1number  x_pos y_pos GXT 'LINE_L9' int_val
  end
  
  000B: y_pos += linespace
  0652: int_val = integer_stat 229 // Bike
  0050: gosub @Format_Text
  if
    is_right_panel == false
  then
    045A: draw_text_1number  x_pos y_pos GXT 'LINE_RA' int_val
  else
    045A: draw_text_1number  x_pos y_pos GXT 'LINE_LA' int_val
  end

  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        
      
end

// Subroutines - avoids repetition of common code segments

:Format_Text
0343: set_text_draw_linewidth linewidth
//033F: set_text_draw_letter_size 0.48 1.12  // default
033F: set_text_draw_letter_size 0.36 0.72
//0340: set_text_draw_RGBA 180 180 180 255
//0341: set_text_draw_align_justify 0
//0342: set_text_draw_centered 0
//0348: enable_text_draw_proportional 0
0349: set_text_draw_font 1  // 1(default) or 2(fixed width?, all caps), 0 and 3 are too fancy
03E4: set_text_draw_align_right is_right_panel
//060D: draw_text_shadow 0 rgba 0 0 0 255
081C: draw_text_outline 1 RGBA 0 0 0 255
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

:Draw_Box
if
  is_right_panel == true
then
  038E: draw_box_position 578.0 236.0 size 110.0 200.0 RGBA 0 0 0 60
else
  038E: draw_box_position 30.0 236.0 size 110.0 200.0 RGBA 0 0 0 60
end
0051: return

 

 

Second Edit: I've also didn't understand this "Control Script".. Are you going to turn this into a "Programm"? Two lists on the same screen (It doesn't matter if its splitted, only left or only right) was enough for me  🙂 

Edited by ArmanCan
Link to comment
Share on other sites

21 minutes ago, ArmanCan said:

script itself works great

Awesome! Nice work. Please post your script so I can take a closer look. I'd also like to adapt your script so I can use it for testing the RTSM Control script, if you don't mind.

 

23 minutes ago, ArmanCan said:

- I entered the LEFT PANEL (Lung Capacity, Body Fat....) but i can't see on the left .. How can i activate it?

It should be as easy as changing is_right_panel = false, or 0 if you prefer (true and false are built-in SB constants for 1 and 0 respectively). Note that "=" is an assignment - it sets the value. "==" is an evaluation - if [email protected] == 100 is a true statement then do the next thing, if the statement is false then jump ahead. You don't want to be changing the logic flow just yet.

 

35 minutes ago, ArmanCan said:

- I tried to align "Text Height" and looks great but it looks widened. How can i fix these?

I'm not sure, but it looks like this is the default text size. text_width and text_height are something I wanted to add to the constants so they are easier to edit in the header. I think something went wrong. I'll look at your script when available; you might want to try again in the meantime.

 

40 minutes ago, ArmanCan said:

- According to this text height i think i can add the second list to the above or below and increase the box dimensions just a little bit.. How can i do this?

I'll post an example of a split list for that third script I was going to write. This one will be more about showing different ways to read memory instead of just stats. You don't need the examples for your script but the template should demonstrate multiple strategies.

 

As far as the box goes... I was struggling with the boxes. The x_pos and y_pos arguments specify the center of the box, and I think the width and height arguments are radii from the center, but I was having a hard time mapping it out, so I just fiddled with the hard coded values until it fit the list and missed the mini-map and moved on. I intend to revisit the boxes and have them calculate their position based on constants in the header. Linewidth doesn't work the way I thought so I'm kind of back to square one.

 

24 minutes ago, ArmanCan said:

do not pull me into this "Rabbit Hole"..ok??

You will not be the only reader of this topic. Take away what you can, come back to it later if you want, and don't sell yourself short. Or maybe you'd better walk away now because I'm liable to keep feeding you as many codes as you can tolerate until you're hooked. Soon you'll be demanding better and more power codes just to feed your addiction. 

 

 

Link to comment
Share on other sites

13 hours ago, ArmanCan said:

Edit: I forgot to upload the script 😃

Found your edit. Thanks, this helps a lot.

 

First though, would you mind removing that giant image showing screen resolutions? The image is lagging the page and doesn't really apply to the current problems.

 

Nice work on the script. There is a major problem with the left panel, obviously, but there is a lot of good stuff to work with here. The left panel issue is an understandable misconception. The design of the script suggest that two panels should work. I need to arrange things in an intuitive manner, so this mistake is very helpful. I have some new ideas for redesigning the template to make it easier to edit that I'm anxious to try.

 

is_right_panel = true
//is_right_panel = false

if
  is_right_panel == true
then
  03A4: name_thread 'RTSM_R'

  0ADF: add_dynamic_GXT_entry "TITLE_R" text "--=== PLAYER STATS ===--"
  0ADF: add_dynamic_GXT_entry "LINE_R1" text "Lung Capacity: ~1~/1000"
  0ADF: add_dynamic_GXT_entry "LINE_R2" text "Body Fat: ~1~.~1~/1000.0"
  0ADF: add_dynamic_GXT_entry "LINE_R3" text "Stamina: ~1~.~1~/1000.0"
  0ADF: add_dynamic_GXT_entry "LINE_R4" text "Muscle: ~1~.~1~/1000.0"
  0ADF: add_dynamic_GXT_entry "LINE_R5" text "Respect: ~1~.~1~/1000.0"

  x_pos = 630.0
else
  03A4: name_thread 'RTSM_L'

  0ADF: add_dynamic_GXT_entry "TITLE_L" text "--=== PLAYER STATS ===--"
  0ADF: add_dynamic_GXT_entry "LINE_L1" text "Lung Capacity: ~1~/1000"
  0ADF: add_dynamic_GXT_entry "LINE_L2" text "Body Fat: ~1~.~1~/1000.0"
  0ADF: add_dynamic_GXT_entry "LINE_L3" text "Stamina: ~1~.~1~/1000.0"
  0ADF: add_dynamic_GXT_entry "LINE_L4" text "Muscle: ~1~.~1~/1000.0"
  0ADF: add_dynamic_GXT_entry "LINE_L5" text "Respect: ~1~.~1~/1000.0"

  x_pos = 6.0
end

This part of the Player Stats "a3" script I posted makes it look like the script can display two lists. We can do that, but then you are stuck with only two lists, unless... The next step would be to add some controls so the lists can be turned off and on. Then add another list or two, and controls to switch between them. By now the script is fairly large and complex. If someone wanted to add yet another list they'd need to understand the whole script well enough to implement a new list without breaking anything else. 

 

My thought is to break the large script into pieces; a control script that does all the heavy lifting and doesn't need to be modified (more on that shortly), and lots of smaller, easy to edit list-scripts that can work together as a whole, and still function as completely independent scripts. The working as a whole part complicates things a little. The scripts need to follow certain naming conventions, and needs to display on either side of the screen without conflicts. 

 

With that in mind, the player stats script is completely dedicated to the player stats. Left and right settings are both player stats. All of the calculations are player stats, and everything displayed is player stats. The only thing different from top/true/right and bottom/false/left is the _R and _L in the GXT keys, and the value of x_pos. Everything else is identical - copy and paste, fix the Ls and Rs. When is_right_panel is changed to false, everything moves to the left, but still looks the same (except it's left justified to avoid a formatting glitch).

 

The weapon skill scripts should be the same. Change all text related to player stats to weapons skills, top and bottom. Cut out any codes and calculations related to player stats; keep all the weapon stuff. Change the filename and suggested filename at the top of the script. I don't see any other major problems, but the text part of Pistol needs adjustment. The calculations are proper for a float, but the text format is still an integer left over from lung capacity.

 

It looks like all the pieces are in place and just need a bit of shuffling before everything works. You are really close. But don't worry if it doesn't work out. I have what I need to adapt your scripts to a slightly different template. No sense in putting you through yet another set of edits though, so I'll put everything together in the new format. You can wait, but you're so close. Version 5a just might be it.

 

New plan for extra scripts for testing; I'll make lots of versions of these stats and skills scripts, all with different text sizes so we can compare how they look. You got the text re-sizing right after all; and yeah, too wide. Try changing 0.36 to something a little less, 0.3? Maybe? I'm new to this part. Still not sure what to do about the boxes.

 

I'll save before I crash again and then update with some notes on the control script.

Edited by OrionSR
Link to comment
Share on other sites

That last post was already too long so I'll risk a double post.

 

RTSM Control Script Notes: Some of this is a bit speculative and subject to change.

 

The RTSM control script will start like any other cleo script when the game starts or a save is loaded. The list-scripts will be stored in an RTSM folder so they can't execute unless launched by the control script. The control script will discover all list-scripts in it's folder and launch preferred scripts based on settings in an .ini file. (I haven't done this part before - should be interesting).

 

The control script will loop and watch for keystrokes. When the right bracket key is held for a short time the control script will launch terminate any existing right panel scripts, and if none is found then the preferred/previous right panel script will be launched. When the right bracket is tapped the control script will close the current right panel script and launch another, cycling through it's discovery list. When Ctrl-] is held, the current panel will be saved as a preference in an .ini file. The left bracket will serve the same purpose for the left panel. 

 

Originally, the control script was going to be responsible for releasing the dynamic GXT when panels are hidden, but I plan to reorganize the list-script template so this is no longer an issue.

 

When the control script launches a list script to the right panel it will pass an argument (true) to the script, which will be stored in local variable @0. The is_right_panel constant is defined as [email protected] So, once the list-script has been tested, the is_right_panel = true/false commands need to be removed/commented out so the control script can swap panel sides as required.

 

And... I think that's it. Looks simple enough, but there's a lot of new stuff to learn so it seems more complex in my head.

Edited by OrionSR
Link to comment
Share on other sites

ArmanCan
Posted (edited)
22 hours ago, OrionSR said:

Or maybe you'd better walk away now because I'm liable to keep feeding you as many codes as you can tolerate until you're hooked. Soon you'll be demanding better and more power codes just to feed your addiction. 

 

You love to give a homie a hard time ...😃  We've progressed so much so "Walk Away".. HELL NO!! 😉

 

You made the script more advanced than just "Monitoring" so i have to adapt you and tell you something about this script..

 

- I'm okay the position of the lists but if you are struggling to create a left panel we can stick to the right side... it will be problematic during some missions like trucking, dance but it's allright....And i gave up the "Split Both Sides" idea..

- "Widened/Pressed Text Problem" needs to be solved and we need to define an OPTIMAL TEXT SIZE by judging from the longest list. I will also take a look at ZAZ's "Interactive Menue" and find a solution..

- Draw Box position stands at middle right but this box dimension needs to be resize with optimal text size.. 

- Actually there are tons of lists and there is a saying in my country.. "I'm the liar of Sanny Builder" and i couldn't find some of the stuff that you mentioned earlier.. Actually i can create all the contents by copying all the IDs of Integers and Floats to these two templates.. (82 Floats and 220 Integers) 😉

 

Edit: I think i've found the biggest draw box/text size and relocated.. Text just needs to relocated to one click left and than we are good 😉

 

Second Edit: You either did something wrong or "Rifle Skill" doesn't work anymore 😧

 

Spoiler

uDEKKPa.jpg

 

  linewidth = 640.0
  linespace = 10.0
  topline = 130.0


:Format_Text
0343: set_text_draw_linewidth linewidth
//033F: set_text_draw_letter_size 0.48 1.12  // default
033F: set_text_draw_letter_size 0.22 1.1
//0340: set_text_draw_RGBA 180 180 180 255
//0341: set_text_draw_align_justify 0
//0342: set_text_draw_centered 0
//0348: enable_text_draw_proportional 0
0349: set_text_draw_font 1  // 1(default) or 2(fixed width?, all caps), 0 and 3 are too fancy
03E4: set_text_draw_align_right is_right_panel
//060D: draw_text_shadow 0 rgba 0 0 0 255
081C: draw_text_outline 1 RGBA 0 0 0 255
0051: return

:Draw_Box
if
  is_right_panel == true
then
  038E: draw_box_position 560.0 220.0 size 130.0 200.0 RGBA 0 0 0 60
else
  038E: draw_box_position 60.0 220.0 size 130.0 200.0 RGBA 0 0 0 60
end
0051: return

 

 

Edited by ArmanCan
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • 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.