Quantcast

Jump to content

» «
Photo

GTA3script Toolchain

RW Released
36 replies to this topic
LINK/2012
  • LINK/2012

    LIVIN' IN CODE

  • Feroci
  • Joined: 30 Jan 2011
  • Brazil
  • Best Tool 2014 [Mod Loader]
    Contribution Award [Mods]

#31

Posted 17 March 2017 - 03:18 AM Edited by LINK/2012, 17 March 2017 - 03:19 AM.

Deji just added an API to his GTAG Opcode Database and made a few changes in the VSCode extension to use it  :turn:. This means docs got from GTAG are faster and have no crawling errors anymore. Your VSCode should ask for an extension update, just accept it. I recommend to perform a ctrl+shift+p -> GTA3Script: Clear Documentation Cache as well.

  • Blackbird88 and Silent like this

Seemann
  • Seemann

    Ruhe

  • GTA Mods Staff
  • Joined: 03 Sep 2004
  • Russia
  • Best Tool 2016 [OpenIV]
    Best Tool 2013 [Sanny Builder]
    Contribution Award [Mods]
    Helpfulness Awards [Mods]

#32

Posted 18 March 2017 - 06:32 PM

Bravo, you managed where I failed in making the essential GTA modding tool which will be heavily underappreciated and mostly unused.

 

Next step is to realise SCR and "CLEO VM" or whatever it should be called ;)

 

sooo..you're alive.

  • Silent, Apu889, LINK/2012 and 1 other like this

kosticn101
  • kosticn101

    Player Hater

  • Members
  • Joined: 4 weeks ago
  • Serbia

#33

Posted 2 weeks ago Edited by kosticn101, 2 weeks ago.

Is this project still active?

What happened to Seemann's decompiler (last commit was last year)? I can't figure it out how to use it, can somebody provide me some more info on what should I do with files that I've downloaded from GitHub?

With gta3sc I can decompile GTA3 i GTAVC main.scm (with -emit-ir2 flag) but when i try to decompile GTA SA main.scm using gta3sc main.scm --config=gtasa --guesser -emit-ir2 I get fatal error: file 'main.scm/script.img' does not exist. I get same error when I try to decompile some ".cs" file.

So I removed

-fswitch
-farrays
-fconst
-fstreamed-scripts
-fskip-cutscene

from gtasa config and also removed --guesser flag and only then I could decompile GTASA main.scm.
But with CLEO file I get corrupted scm header. Can this thing be used to decompile CLEO scripts?
  • Crspy likes this

kosticn101
  • kosticn101

    Player Hater

  • Members
  • Joined: 4 weeks ago
  • Serbia

#34

Posted 2 weeks ago Edited by kosticn101, 15 hours ago.

I don't have very much programming experience but I'm trying to fix some minor things that are bugging me.

Most important is that GTAG OpcodeDB URL is outdated (new address). And changing `http:// gtag.gtagaming .com/api/opcodedb/v1/opcodes?id=${opcode}` to `http:// gtagmodding .com/api/opcodedb/v1/opcodes?id=${opcode}` doesn't seem to help.
Spoiler

There is no "compilation succeeded" message.
Spoiler

I can't see the point of showing not supported commands in autocomplete list..
(I don't understand why those commands exists at all.)
Spoiler

There is no SCRIPT_START and SCRIPT_AND in autosuggestions list.
Spoiler

We are generally supposed to use string literals only with CLEO commands but without documentation how are we gonna now if specific command is CLEO command?
Spoiler

Syntax highlighting with nested multiline comments is wrong. I think that RegEx can come in handy here but I don't know RegEx. This looks interesting.

@LINK/2012
Can you please make SB -> GTA3sc and high-level decompiler (or show me how to use existing one) :D

LINK/2012
  • LINK/2012

    LIVIN' IN CODE

  • Feroci
  • Joined: 30 Jan 2011
  • Brazil
  • Best Tool 2014 [Mod Loader]
    Contribution Award [Mods]

#35

Posted 2 weeks ago

Is this project still active?

Yes, just moving slowly because of time constraints.
 

With gta3sc I can decompile GTA3 i GTAVC main.scm (with -emit-ir2 flag) but when i try to decompile GTA SA main.scm using gta3sc main.scm --config=gtasa --guesser -emit-ir2 I get fatal error: file 'main.scm/script.img' does not exist. I get same error when I try to decompile some ".cs" file.

Weird. Are you sure you have script.img together main.scm?
 

But with CLEO file I get corrupted scm header. Can this thing be used to decompile CLEO scripts?

Yes, use -mno-header or better yet, --cs, which enables this and other flags for custom scripts.
 

snip

Wow, that's a lot of valuable contributions. Would be happy to include them on future releases.
 

Can you please make SB -> GTA3sc and high-level decompiler (or show me how to use existing one)

There is none yet :/
  • kosticn101 likes this

kosticn101
  • kosticn101

    Player Hater

  • Members
  • Joined: 4 weeks ago
  • Serbia

#36

Posted 2 weeks ago Edited by kosticn101, 15 hours ago.

Yes, use -mno-header or better yet, --cs, which enables this and other flags for custom scripts.

Oh, great then :)
 

Weird. Are you sure you have script.img together main.scm?

Yes, they are in the same folder. If I use guesser flag I get same error even with CLEO files: regen.cs/script.img doesn't exist. Without guesser (and without related flags) it decompiles fine.
 

Wow, that's a lot of valuable contributions. Would be happy to include them on future releases.

Cool :D

Is there a flag to 'add extra info' like in Sanny Builder in order to see all commands in HEX editor?

Hmm.. Constants from DEFAULTMODEL are not showing in my autocomplete even after reinstalling.
Spoiler

Can you make that on writing goto or similar statement, document is search for labels and they're listed? 

I wrote a simple batch script for those that are migrating from Sanny Builder. It takes an opcode and returns command name. It has to be inside gta3sc\config\gtasa(gtavc/gta3) folder (you can always make shortcut to Desktop) and extension has to be .bat. You can also check post below.
Spoiler

Another enum:
<Enum Name="AUDIO_STATE">
  <Constant Name="PLAYING" Value="1"/>
  <Constant Name="PAUSED" Value="2"/>
  <Constant Name="STOPPED" Value="-1"/>
</Enum>

<Command ID="0xab9" Name="GET_AUDIO_STREAM_STATE">
  <Args>
    <Arg Type="INT" Entity="AUDIO_STREAM"/>
    <Arg Type="INT" Enum="AUDIO_STATE"/>
  </Args>
</Command>
  • LINK/2012 likes this

kosticn101
  • kosticn101

    Player Hater

  • Members
  • Joined: 4 weeks ago
  • Serbia

#37

Posted 2 days ago Edited by kosticn101, 53 minutes ago.

FINAL EDIT

Don't know will this feature be useful to others, but I would like it.
aHReTnB.png
 
I created simple C++ WinFormApp to edit these custom descriptions:
jOX9V27OSueHve1M9Btiiw.png

Data is stored as JSON.

@LINK/2012
I think that you're gonna need just a few minutes to add this feature :D. Tried to figure it out but it's hard for me. Can you edit source files for extension and send them to me if you don't plan to add it in public version?


I've noticed now that GTA3 and GTAVC only commands are showing when GTASA is selected.
  • LINK/2012 likes this




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users