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

    1. Red Dead Redemption 2

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

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

      1. Recruitment
    2. Events

    1. GTA Online

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

    3. GTA Next

    4. GTA V

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

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

    7. GTA Vice City Stories

    8. GTA Liberty City Stories

    9. GTA San Andreas

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

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

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

      1. GTA Advance
      2. GTA 2
      3. GTA
    13. Wiki

      1. Merchandising
    1. GTA Modding

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

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

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

    2. Rockstar Games

    1. Off-Topic

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

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

    2. Forum Support

    3. Site Suggestions

PLPynton

Unified opcodes database

Recommended Posts

Bigun

 

Well, you care about param order the most, it seems, so I assume you probably talked in the above post about 03CF, which you already did in another previous post (which if I may add, I acknowledged) so I don't see the need to mention it again so soon..?

Considering it JUST got released incorrectly AND you said all as if you meant all, I think it was highly relevant.

 

Er...doesn't the fact that it DID in fact get released incorrectly DESPITE you re-stating it, help prove re-stating it was pointless? Hey, no offence intended or anything mate, I just wondered if that was what you really meant in that post since as said the obvious part of it seemed pointless to me...and 99.9% of your posts are just not that (pointless). Anyway, we should let this go now.

 

@Pynton: Thanks for updating (for others, mostly). Before you did I made personal corrections I to my copy of your INI; I think some are a bit better. Use those if you find them better too.

 

;;;;;038F note- before it was REQUEST_txd, now its LOAD_txd? well it does seem more correct.

Pynton: 038F=2,load_texture_slot %1d% with_texture %2h%  ;; Load dictionary with 0390 first

mine: 038F=2,%1d% = load_texture %2h%  ;; Load dictionary with 0390 first

(isnt %1d% the resulting handle. well, it's handle not slot then and commonly used like $var = create_car etc)

 

03CF needs to be param-flipped like Dem described earlier

 

Pynton: 0500=3,  is_player %1d% item_type %2d% shopping_item_texturename %3d%

mine: 0500=3,  is_player %1d% bodypart %2h% skin %3s%

Well here I just flipped the params and you changed text, normally it would be okay but I'm confused by new text, so care to elaborate? shouldnt this be the "combined" new line:

0500=3,  is_player %1d% bodypart %2h% clothing_TXD %3s%

or just "my" line

 

in 05D9 we have same lines but I renamed 'time' to 'timelimit', isn't that more accurate? I think it should be changed in rest of opcodes that have such timelimit as well. there are quite a few

 

0630 & 0631 & 087D same again but I dont have "set_" at beginning. I guess 'set' stays because its been standard for a while (even if doesnt make much sense in these opcodes)

 

06D5 mostly same again but I have no underscore between 'create_racing_checkpoint' and 'type'. I noticed you named a lot of opcodes like this, while I'm not yet knowledgable about Sanny's opcode finding functions, I think first param and actual opcode name ('create_car','create_checkpoint' etc) shouldn't be combined like that.

 

0855 same as with 06D5 + last param is named "level_to" it used to be "handle_as"/"=" I think. level_to ?_? I named in mine "store_to". you probably meant noise_level but thats already in start of opcode line

(sorry for untidiness above)

 

I know, some of those are pretty trivial. But I think this should get as perfect as possible; everyone should move to it (and Sanny too). Also this does not support SAMB and I noticed you're partipicating, Dem (doesnt mean you use it, I know) - what do you say on this Dem? When complete-newbs post here "how to open main.scm i cant with notepad" etc you point them to SA-MB. shouldn't you now tell them to use Sanny? I know theres the problem again with posting code here, unity. But I don't really see any reason not to "upgrade" to Sanny, SAMB is discontinued, old , somewhat buggy and has few features. Sanny has MB->SB code converter as well as INI-converter (this reminds me Pynton, your ini didnt fix 080B,1,nop_consume_string %1d% . may seem useless to you, normally it is, but it creates problems for programs parsing the ini such as ini code converter said above). So sure the proccess of switching wont be instant but I think it should be done. Also note I dont mean any disrespect to Barton, but he did retire and we may see him back for GTA4 or not, but for now Sanny IS the better builder.

 

(sorry to go a bit offtopic Pynton)

Edited by Bigun

Share this post


Link to post
Share on other sites
PLPynton

no that was not offtopic at all. i really appreciate pointing my failures (even if you think that these are small issues). that is just wonderful reaction. i will fix these just the way you said because opcodes like 0500 i can easy describe in their help description later (in this example what does concerns actually each parameter like shopping_item or texture_name)

the ini will be updated to the correct names in few minutes.

i expect more stuff like that in future!

 

Edit: i am also switching to SB. there is a small issue that still forces me to stay with MB (arrays) but Y_Less just gave me some hint and i have to test it. well SB is the way better than old MB (maybe except arrays). i do not really like classes used there but that is just an option so i do not care since that is just my personal opinion.

 

Edit2: done, uploaded new. most fixed plus few more. that fix does not produce incompactibility. all opcodes are about to stay in alphanumerical order for some time. i have to fix few more names now. later on when i am ready i can just easy produce really unified database.

Edited by PLPynton

Share this post


Link to post
Share on other sites
Bigun

I'm feeling like some kind of pest now, biggrin.gif but another so-called minor "fix": latest ZIPs omit the variables.ini.

Share this post


Link to post
Share on other sites
PLPynton

i have abandoned idea with variables.ini because that is actually unnecesary to change name of PLAYER_ACTOR and PLAYER_CHAR into something else. and i did that some time ago just without any perticular reason. regarding to ma codes posted here and there i will edit them ance again.

Share this post


Link to post
Share on other sites
Seemann

Could you add the line "VERSION=3.0" in your INI in order the users who used this one with Sanny have no any problems because of numerical parameters order? SAMB should ignore this line, but for Sanny it's really matter.

 

 

; b:truestring/falsestring% = replace with truestring if nonzero,  replace with falsestring if zeroVERSION=3.0[OPCODES]

 

 

 

Also, I tried to decompile the original SCM using SAMB with your latest INI and it says "opcode string too long" and every time I open the SCM it says "unknown opcode blah blah". As for me it does not matter, but may be other users have similar issue too?

Share this post


Link to post
Share on other sites
PLPynton

ready, uploaded.

 

that issue with opcode string fixed as well, you shall not see it again.

 

i am sure that "unknown opcode..." is not my issue and it is located directly in the script you have tried to decompile. it could be that that script has:

1. opcode used and that opcode ain't listed in my ini. (i just decompiled original: 2 PC versions 2 PS2 versions and 1 XB version and it works).

2. opcode used and that opcode is nop in my ini but has been compiled using false definition. (same thing i just discovered in scripts of mine where 0666 has been used with 12 params and i do not know how that could happen)

Share this post


Link to post
Share on other sites
Seemann

 

that issue with opcode string fixed as well, you shall not see it again.

 

Yeah, that's working now. Thanks.

 

As for "unknown opcode", I tried to decompile the original SCM from PC US version 1.0. I believe it was compiled by R*, so there should not be any problem like this. I think it's only a SAMB issue, now those file is decompiled just fine.

Share this post


Link to post
Share on other sites
Bigun

 

i have abandoned idea with variables.ini because that is actually unnecesary to change name of PLAYER_ACTOR and PLAYER_CHAR into something else. and i did that some time ago just without any perticular reason. regarding to ma codes posted here and there i will edit them ance again.

Ah. Yes, good decision, but a bit too late (no offence, everyone does mistakes mate) so I think you should still include it, as extra entries in that INI under original ones do no harm and even if you do take the effort to edit all previous code you posted here (which is a lot and not only in mod showroom) you can still miss (in addition, you cant edit code people already copied to their scm.txts) some so generally it's a better idea to leave it, as again, it does no harm and can prevent problems to those using previous code.

 

Some desc-change in opcodes: In most of the opcodes you use the word 'present' (except 08A7), while it IS grammatically correct (I think:D) it is easier to understand if you use the word "current" (which you already used a lot in other opcodes as well). The above of course is for the "current" form of "present", present also means "is here" and those times it was used are fine (only 08A7 if I didnt miss any). 2) very-specific opcodes change:

 

0229=3,set_vehicle %1d% colorA_to %2d% colorB_to %3d%03F3=3,get_vehicle %1d% colorA_to %2d% colorB_to %3d%

 

colorA and colorB should be changed to primary_color and secondary_color, respectively, as it's pretty much known to be that way. I know there are colorC and colorD opcodes but actually I don't recall seeing 4-colored (via carcols) vehicles anywhere in the original game (care to give an example of those used, with a screen or two?) so that should be remained colorC and colorD; also tertriarty and four-whatevery don't sound nice and dunno if they're really proper words at all. One more:

 

07FE=3,set_actor %1d% fighting_style_to %2h% %3h% 

 

'fighting_style' should be renamed to 'melee_style' since it doesn't "affect" guns-equipped actors. Minor as well, but just so it wont be a bit misleading.

Minor fix for 094b:

 

094B=2,get_active_interior_16Bname_from_actor %1d% store_to %2d%;; 16-byte strings

 

Another minor fix:

 

095E=4,set_vehicle %1d% component %2h% manipulation %3h% to %4d%;class A components

 

Lastly, 08E2 has a microscopic double-letter typo.

 

Another thing I noticed was not changed in the INI as in my post, again not a bug/problem but 'syntax'. In old INIs we had different (same "easiness" to understand as your ways IMO as long as you know what "handles" of things are I suppose, but this way is shorter and more coding-like) syntax, we just did

@0 = create_new_anything etc. You use 'handle_as' which I can understand as order is now original and result handles are now last instead of first so may be easier for newer people. I would still prefer the old short just-'=' way, as it's way shorter as well as makes it much more distinguishable from other parameters (it IS a special "parameter" after all) but yours MAY be easier for newbs so you should probably consult other opinions before changing it and for now leave it the current way (actually, it's up to you which one you prefer). Note that IIRC previously you used "similar-words-to-store_to", "value_to" etc. You should stick to only store_to and handle_as. Other "to"'s are fine, like no need to rename opcodes like these:

 

00A0=4,get_actor %1d% position_3D_coord_to %2d% %3d% %4d%03C0=2,get_actor %1d% vehicle_handle_to %2d% 

.

 

Of course everything at your consolidation.

 

EDIT:

@Seemann: The following can be indeed useless if SAMB DOES have no probelm with added info in INIs, but maybe change "VERSION=3.0" to ";VERSION=3.0" and set SB to scan for that instead. That way it will be only noticed by SB for sure. Also, sorry for not digging in SB topic but what strings are there apart from VERSION and AUTHOR? I think you should add FORMAT too; this can be set to things like: "unified" for this one, "original", "spaceeinstein" etc. This IS different from AUTHOR because maybe an INI was edited by someone other than creator. Also it can be useful when reading it from coding itself (read my suggestion hereif you havent yet)).

Edited by Bigun

Share this post


Link to post
Share on other sites
pdescobar

 

2) very-specific opcodes change:

 

0229=3,set_vehicle %1d% colorA_to %2d% colorB_to %3d%03F3=3,get_vehicle %1d% colorA_to %2d% colorB_to %3d%

 

colorA and colorB should be changed to primary_color and secondary_color, respectively, as it's pretty much known to be that way. I know there are colorC and colorD opcodes but actually I don't recall seeing 4-colored (via carcols) vehicles anywhere in the original game (care to give an example of those used, with a screen or two?) so that should be remained colorC and colorD; also tertriarty and four-whatevery don't sound nice and dunno if they're really proper words at all.

The Cement Truck, Camper, and one of the boats (Squalo?) have 4-color entries in carcols.dat and the Camper definitely uses at least 3 colors (see the below screenshot for an example.) The proper terms for the colors would be primary, secondary, tertiary, and quaternary (reference.)

 

user posted image

 

 

EDIT:

@Seemann: The following can be indeed useless if SAMB DOES have no probelm with added info in INIs, but maybe change "VERSION=3.0" to ";VERSION=3.0" and set SB to scan for that instead. That way it will be only noticed by SB for sure. Also, sorry for not digging in SB topic but what strings are there apart from VERSION and AUTHOR? I think you should add FORMAT too; this can be set to things like: "unified" for this one, "original", "spaceeinstein" etc. This IS different from AUTHOR because maybe an INI was edited by someone other than creator. Also it can be useful when reading it from coding itself (read my suggestion hereif you havent yet)).

The second number of the version string defines the format; X.0.YYYY means parameters in numerical order like PLPynton's INI and X.1.YYYY means parameters in custom order like the default Sanny 2.99 INI.

Share this post


Link to post
Share on other sites
Bigun

@pdescobar: Thanks for both clarifications! smile.gif I did remember the Camper having 3 colors but wasn't certain..supported by the fact that the relevant opcodes (0A11,0A12) aren't used in the original SCM

Share this post


Link to post
Share on other sites
Seemann

2 PLPython

 

Could you also add these opcodes to your INI (EDIT: maybe with new descriptions):

 

 

00c3=3,read_mem_address %1d% type %2d% value_to %3d%00c4=3,write_mem_address %1d% type %2d% value %3d%0181=3,virtual_protect_change_at %1d% size %2d% new_protect %3d%

 

 

I'm sure, that will not make any compatibility problem, because these ones are NOPs and do not appear in the original SCM.

 

Adding this make the installation of the SA memory patch more easier for the newbies.

Edited by Seemann

Share this post


Link to post
Share on other sites
pdescobar

Two notes on the October 3rd or 4th version of the INI:

 

1) Opcode 0723 has parameter 2 listed twice:

 

0723=2,set_object %1d% apply_instant_damage_type %2h% %2b:break/smash%

 

 

2) Opcode 08E2 is mislabeled:

 

08E2=1,get_number_of_territories_under_controll_to %1d%

 

It's not the number of territories under control but the percentage of territories under control (as integer). I've verified that on an old save.

Share this post


Link to post
Share on other sites
Seemann

These ones should be updated.

 

05AA=2,%1d% = %2g%  ; 8-byte strings

05AD=2,  %1d% == %2g%  ; 8-byte strings

 

 

Share this post


Link to post
Share on other sites
PLPynton

ok, all fixed and uploaded.

 

THANKS for all your hard work mates. superb. even due to fact is sunday and i am cooking right now. everybody gets credited and piece of my soup!

Share this post


Link to post
Share on other sites
Bigun

Thanks for updating. rah.gif

You do an awesome job too. And, er, I think the soup got over your head on that last sentence there. tounge2.gif

 

Oh yeah. I hope Seemann doesn't mind:lol.gif Change 'value_to' to 'store_to' in 00c3 (read_mem) ;>_> it doesn't really change sh*t, only when using Find in your code or in the ini, so you only need to search for handle_as and store_to when searching for "storing" opcodes. But still... alien.gif

 

Also Pynton, did I just miss some posts or something or you don't post newly found opcodes on the Opcodes thread anymore, only here? I support using this INI as the standard ini, but still new opcodes should be widely-known and posted on the respective topic.

Share this post


Link to post
Share on other sites
PLPynton

i am not looking anymore, only when someone asks for some specific then yes, it is painful (no, not for me, for my pregnant women) process to find them and i (she) do not do (allows) that often anymore. speaking about devils (not devils of pleasure like my sig): i am glad she does not speak english vwell so i like to share my knowledge (recently gained): do something only when you have nothing to loose after all.

 

i will gain them all together and post in respective topic. and that thing with store_to will be changed vsoon i just have to grab all these opcodes- speaking of which it is brilliant idea after all to get them to the same description rules.

Share this post


Link to post
Share on other sites
Seemann

0154 should be changed too

 

0154=2,  is_actor %1d% in_zone %2g% 

 

 

Also, something strange is in the original SCM. I browsing for opcode 0154 and found this line:

 

 0154: is_actor $PLAYER_ACTOR in_zone 'PILG'

 

 

But I can't find such zone name in the game data files. The only one I found was 'PILL' ('Pilgrim' in GXT).

Is it a R* mistype or I missed something?

 

Share this post


Link to post
Share on other sites
PLPynton

0776: create_objects_in_object_group "FUKDCRAK"

that also could not be found for me so i assume they deleted some stuff and not in the way it shoud be done by the means of teamwork.

Share this post


Link to post
Share on other sites
Seemann

there's a number of the mistypes I found

 

 

08EB=7,create_sparks_at_3D_coord %1d% %2d% %3d% velocity_directionX %4d% directionY %5d% directionZ %6d% density %7h%

 

// word 'croner' instead of 'corner'. Just replace them all.

00A3=6,  is_actor %1d% within_rectangle_cornerA_at_2D_coord %2d% %3d% cornerB_at_2D_coord %4d% %5d% flag %6d%

00B0=6,  is_vehicle %1d% within_rectangle_cornerA_at_2D_coord %2d% %3d% cornerB_at_2D_coord %4d% %5d% flag %6d%_vehicle ;***

04E9=6,  is_object %1d% within_rectangle_cornerA_at_2D_coord %2d% %3d% cornerB_at_2D_coord %4d% %5d% flag %6d% ;***

+01A1..01A5, 01AB, 01AD, 01AE

 

 

Share this post


Link to post
Share on other sites
PLPynton

fixed, thank you.

Share this post


Link to post
Share on other sites
Seemann

I think it would be more useful to make the new comments in the math opcodes with pointing on the operand's type.

 

I.e.

 

 

0004=2,%1d% = %2d% ; G = INT0005=2,%1d% = %2d% ; G = FLOAT0006=2,%1d% = %2d% ; L = INT0007=2,%1d% = %2d% ; L = FLOAT

 

 

The descriptions may be more detailed:

 

 

0004=2,%1d% = %2d% ; global var = integer constant0005=2,%1d% = %2d% ; global var = float constant0006=2,%1d% = %2d% ; local var = integer constant0007=2,%1d% = %2d% ; local var = float constant

 

 

 

If you like this idea, there's a full list of the expressions:

 

 

0004=2,%1d% = %2d% ; G = INT0005=2,%1d% = %2d% ; G = FLOAT0006=2,%1d% = %2d% ; L = INT0007=2,%1d% = %2d% ; L = FLOAT0008=2,%1d% += %2d% ; G += INT0009=2,%1d% += %2d% ; G += FLOAT000A=2,%1d% += %2d% ; L += INT000B=2,%1d% += %2d% ; L += FLOAT000c=2,%1d% -= %2d% ; G -= INT000d=2,%1d% -= %2d% ; G -= FLOAT000E=2,%1d% -= %2d% ; L -= INT000F=2,%1d% -= %2d% ; L -= FLOAT0010=2,%1d% *= %2d% ; G *= INT0011=2,%1d% *= %2d% ; G *= FLOAT0012=2,%1d% *= %2d% ; L *= INT0013=2,%1d% *= %2d% ; L *= FLOAT0014=2,%1d% /= %2d% ; G /= INT0015=2,%1d% /= %2d% ; G /= FLOAT0016=2,%1d% /= %2d% ; L /= INT0017=2,%1d% /= %2d% ; L /= FLOAT0018=2,  %1d% > %2d% ; G > INT0019=2,  %1d% > %2d% ; L > INT001a=2,  %1d% > %2d% ; INT > G001b=2,  %1d% > %2d% ; INT > L001c=2,  %1d% > %2d% ; G > G (int)001d=2,  %1d% > %2d% ; L > L (int)001E=2,  %1d% > %2d% ; G > L (int)001f=2,  %1d% > %2d% ; L > G (int)0020=2,  %1d% > %2d% ; G > FLOAT0021=2,  %1d% > %2d% ; L > FLOAT0022=2,  %1d% > %2d% ; FLOAT > G0023=2,  %1d% > %2d% ; FLOAT > L0024=2,  %1d% > %2d% ; G > G (float)0025=2,  %1d% > %2d% ; L > L (float)0026=2,  %1d% > %2d% ; G > L (float)0027=2,  %1d% > %2d% ; L > G (float)0028=2,  %1d% >= %2d% ; G >= INT0029=2,  %1d% >= %2d% ; L >= INT002a=2,  %1d% >= %2d% ; INT >= G002b=2,  %1d% >= %2d% ; INT >= L 002c=2,  %1d% >= %2d% ; G >= G (int) 002d=2,  %1d% >= %2d% ; L >= L (int) 002e=2,  %1d% >= %2d% ; G >= L (int) 002F=2,  %1d% >= %2d% ; L >= G (int)0030=2,  %1d% >= %2d% ; G > FLOAT0031=2,  %1d% >= %2d% ; L > FLOAT0032=2,  %1d% >= %2d% ; FLOAT > G0033=2,  %1d% >= %2d% ; FLOAT > L0034=2,  %1d% >= %2d% ; G > G (float)0035=2,  %1d% >= %2d% ; L > L (float)0036=2,  %1d% >= %2d% ; G > L (float)0037=2,  %1d% >= %2d% ; L > G (float)0038=2,  %1d% == %2d% ; G == INT0039=2,  %1d% == %2d% ; L == INT003a=2,  %1d% == %2d% ; G == G (int)003b=2,  %1d% == %2d% ; L == L (int)003c=2,  %1d% == %2d% ; G == L (int)...0042=2,  %1d% == %2d% ; G == FLOAT0043=2,  %1d% == %2d% ; L == FLOAT0044=2,  %1d% == %2d% ; G == G (float)0045=2,  %1d% == %2d% ; L == L (float)0046=2,  %1d% == %2d% ; G == L (float)...0058=2,%1d% += %2d% ; G += G (int)0059=2,%1d% += %2d% ; G += G (float)005a=2,%1d% += %2d% ; L += L (int)005b=2,%1d% += %2d% ; L += L (float)005c=2,%1d% += %2d% ; L += G (int)005d=2,%1d% += %2d% ; L += G (float)       005e=2,%1d% += %2d% ; G += L (int)         005f=2,%1d% += %2d% ; G += L (float)       0060=2,%1d% -= %2d% ; G -= G (int)         0061=2,%1d% -= %2d% ; G -= G (float)0062=2,%1d% -= %2d% ; L -= L (int)0063=2,%1d% -= %2d% ; L -= L (float)0064=2,%1d% -= %2d% ; L -= G (int)  0065=2,%1d% -= %2d% ; L -= G (float)0066=2,%1d% -= %2d% ; G -= L (int)0067=2,%1d% -= %2d% ; G -= L (float)0068=2,%1d% *= %2d% ; G *= G (int)0069=2,%1d% *= %2d% ; G *= G (float)006a=2,%1d% *= %2d% ; L *= L (int)006b=2,%1d% *= %2d% ; L *= L (float)006c=2,%1d% *= %2d% ; G *= L (int)006d=2,%1d% *= %2d% ; G *= L (float)006e=2,%1d% *= %2d% ; L *= G (int)006f=2,%1d% *= %2d% ; L *= G (float)0070=2,%1d% /= %2d% ; G /= G (int)0071=2,%1d% /= %2d% ; G /= G (float)0072=2,%1d% /= %2d% ; L /= L (int)0073=2,%1d% /= %2d% ; L /= L (float)0074=2,%1d% /= %2d% ; G /= L (int)0075=2,%1d% /= %2d% ; G /= L (float)0076=2,%1d% /= %2d% ; L /= G (int)0077=2,%1d% /= %2d% ; L /= G (float)...0084=2,%1d% = %2d% ; G = G (int)0085=2,%1d% = %2d% ; L = L (int)0086=2,%1d% = %2d% ; G = G (float)0087=2,%1d% = %2d% ; L = L (float)0088=2,%1d% = %2d% ; G = L (float)0089=2,%1d% = %2d% ; L = G (float)008A=2,%1d% = %2d% ; G = L (int)008B=2,%1d% = %2d% ; L = G (int)

 

 

not sure if I didn't missed something, so it's necessary to check it out once more.

Share this post


Link to post
Share on other sites
Y_Less

I prefer the memonic style, more descriptive in the code:

 

0004: setgi %1 %2

 

I know Dem would be disgusted I said that but that is a valid old style and is the type which has been long listed on the db, though I really don't suggest changing them, the comments are a much better way of describing while keeping syntax.

Share this post


Link to post
Share on other sites
Demarest
I prefer the memonic style, more descriptive in the code:

 

0004: setgi %1 %2

 

I know Dem would be disgusted I said that

Actually no, and for two reasons. For one, there came a point in time where Barton appended all such lines with ;; integer values only or whatever. So there's already SOME flavor there. Might as well make it more opcode specific. The second reason being that when I want to know what opcode (in this example) sets a global var to an integer, I search the opcode database for the word setgi. Took some getting used to, but now all math opcodes are easily findable even if its gteli, setlfli, etc.

 

And in case anybody was wondering, no, I never have to look up 0004 lol.gif

Share this post


Link to post
Share on other sites
PLPynton

i can use that of course.

 

there is more yes, not many but yeap. how we name strings?

 

Gv Gs Lv Ls sString and vString? i can catch them all up, it is just how to name them.

Share this post


Link to post
Share on other sites
pdescobar

Seemann's suggestion is something I've done with my own INI although with a more long-winded syntax (e.g. 0004=2,%1d% = %2d% ; INT global, const)

 

There are similar addenda which could be made to the set of 0078-0083 opcodes (all floats, but vary in terms of locals/globals/constants) as well as the float_to_integer and integer_to_float conversions (008c-0093) and the make_absolute_integer/float opcodes (0094-0097), whatever it is that they do. My own notes for those look like this:

 

 

0078=2,%1d% += tripled_random_float_in_range_0_to %2d% ; FLOAT global, const0079=2,%1d% += tripled_random_float_in_range_0_to %2d% ; FLOAT local, const007A=2,%1d% += tripled_random_float_in_range_0_to %2d% ; FLOAT global, global007B=2,%1d% += tripled_random_float_in_range_0_to %2d% ; FLOAT local, local007C=2,%1d% += tripled_random_float_in_range_0_to %2d% ; FLOAT local, global007D=2,%1d% += tripled_random_float_in_range_0_to %2d% ; FLOAT global, local007E=2,%1d% -= tripled_random_float_in_range_0_to %2d% ; FLOAT global, const007F=2,%1d% -= tripled_random_float_in_range_0_to %2d% ; FLOAT local, const0080=2,%1d% -= tripled_random_float_in_range_0_to %2d% ; FLOAT global, global0081=2,%1d% -= tripled_random_float_in_range_0_to %2d% ; FLOAT local, local0082=2,%1d% -= tripled_random_float_in_range_0_to %2d% ; FLOAT local, global0083=2,%1d% -= tripled_random_float_in_range_0_to %2d% ; FLOAT global, local...008C=2,%1d% = float_to_integer %2d% ; global, global008D=2,%1d% = integer_to_float %2d% ; global, global008E=2,%1d% = float_to_integer %2d% ; local, global008F=2,%1d% = integer_to_float %2d% ; local, global0090=2,%1d% = float_to_integer %2d% ; global, local0091=2,%1d% = integer_to_float %2d% ; global, local0092=2,%1d% = float_to_integer %2d% ; local, local0093=2,%1d% = integer_to_float %2d% ; local, local0094=1,make %1d% absolute_integer ; global0095=1,make %1d% absolute_integer ; local0096=1,make %1d% absolute_float ; global0097=1,make %1d% absolute_float ; local

 

Share this post


Link to post
Share on other sites
Demarest
Gv Gs Lv Ls sString and vString? i can catch them all up, it is just how to name them.

No need for caps. I think "s" and "v" works. Luckily, being string based, you only really have set and compare commands, and not all the maths that can be associated with numerical vars.

Share this post


Link to post
Share on other sites
Seemann

@ PLPython

 

Please, if you're going to add the descriptions like 'setgi' and similar ones, make them as comments, do not remove the math signs (>=, +=, ...)

 

 

0004=2,%1d% = %2d%  ; setgi

 

 

Although, I think my way of describing these opcodes is better than that from gtama.

Share this post


Link to post
Share on other sites
Demarest

GTAMA's way has been in use for nearly 4 years now.

 

How about 0004: setgi $var = int

 

I never liked the adding of comments onto lines. Put flavor text where it goes, you know? Just my opinion.

Share this post


Link to post
Share on other sites
Seemann

 

GTAMA's way has been in use for nearly 4 years now.

 

In use? By whom?

Nothing personal. I used gtama a little too, but, you know, it wasn't the compiler number 1 for VC/GTA3.

 

 

I never liked the adding of comments onto lines

 

 

Commenting of the opcodes is a way of describing those ones that was chosen by PLPython. And seeing comments like

 

00BB=3,print_GXT_reference %1g% timelimit %2d% flag %3d% ;low priority

023C=2,load_special_actor_slot %1d% with_model %2f% ;corresponds modelID 290-299

04DB=0,exit_rc_mode  ;on foot version

 

I thought that to comment out also the math opcodes would be useful.

 

As for your way, I say: no. It will immediately cause the issues for Sanny. Its option 'write opcodes' (a choosing between low-level syntax and high-level one) make the decompiler does not write some of the math opcodes in the source. It makes the code clearer. We get the lines without opcodes like these ones:

 

 

$410 = 0$411 += 0

 

 

The compiler then analyze such lines to select correct opcode.

 

If there are some words (e.g. setgi) except the operands and operator the compiler will throw an error. SAMB is not able to compile such line, too:

 

 

setgi $var = 0

 

 

I know two ways to avoid such issues in future. First, add the keywords 0004=setgi and similar ones. Second, leave the system as is. There is no need to change something.

 

 

Share this post


Link to post
Share on other sites
PLPynton

in my opinion seemann is right: keeping opcodes described well and cleal is the way it should be.

 

i just have found that my work was simply useless, look here:

*image removed

that is whati have been using for writing my codes. it gives me always when i am writing/browsing code some useful hints and so on. that was main idea of unified opcodes database. while i was focused on bringing opcodes ini file to some state... i have understood that it was irrelevant. talking with pdescobar recently we have discussed a bit some way to forget this problem with opcodes once and for all: an opcode picker that works like excel formula picker, with classes and all. it should work as well as app of mine, uploading new versions, picking directly from the compiler...

i say let us focus on that, discuss it, then produce such an application. when it is ready it will use not sascm.ini but another file that EVERYBODY can edit and keep in is own way but the sascm.ini stays basically unchanged and is never more discussed except new opcodes.

by the way i can write such a tool but i am electronic so it is kind of time costful because that is not the kind of task i am used to perform so maybe someone can do that?

Edited by PLPynton

Share this post


Link to post
Share on other sites

Join the conversation

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

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

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

×   Your previous content has been restored.   Clear editor

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


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

×
×
  • Create New...

Important Information

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