Quantcast
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. Los Santos Summer Special
      2. The Diamond Casino Heist
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Red Dead Online

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

    1. Red Dead Redemption 2

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

    1. Grand Theft Auto Series

    2. GTA VI

      1. St. Andrews Cathedral
    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. Guides & Strategies
      2. Help & Support
    6. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
    7. GTA III

      1. Guides & Strategies
      2. 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. 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
    3. Gangs

    1. Announcements

    2. Support

    3. Suggestions

Seemann

[REL] Sanny Builder

Recommended Posts

Seemann

 

Do you also think you could add support for #define style constants

 

 

Yeah, sure. The constants support will be one of the SB3 features.

 

 

I want to be able to place it anywhere in the file, using the HEX construct, while still maintaining relative jumps.

 

 

 

Do you offer something like this?

 

 

hex02 00 @label // 0002: jump @label// compiler sets the offset itself// Offset (global, mission relative) depends on the label's positionend:label

 

 

 

 

ps. Code example for Sanny Builder 3:

 

 

var$var, $var2 : Integer = 10$MyArray: array 100 of carif ($var  $var2 + 10) then $MyArray[$var+$var2].Create($var2*20, 0.0, 0.0, 0.0) // create car $var =$var2+1; Inc($var2)end

 

 

As you can see, the compiler supports complex expressions anywhere in a code. It will be similar to the

 

Point's features. Btw, why there are no new versions of this so long?

 

 

Share this post


Link to post
Share on other sites
Y_Less

 

Do you also think you could add support for #define style constants

 

 

Yeah, sure. The constants support will be one of the SB3 features.

 

Cool

 

 

I want to be able to place it anywhere in the file, using the HEX construct, while still maintaining relative jumps.

 

 

 

Do you offer something like this?

 

 

hex02 00 @label // 0002: jump @label// compiler sets the offset itself// Offset (global, mission relative) depends on the label's positionend:label

 

 

Yeah, so you can do wierd things with HEX but still not have to do addition yourself. Would it be possible to do something like this with that:

 

 

hex02 00 (@label  + 3) // or 03 if it has to be in HEXend

 

 

 

 

ps. Code example for Sanny Builder 3:

 

 

var$var, $var2 : Integer = 10$MyArray: array 100 of carif ($var < 50) and ($var > $var2 + 10) then $MyArray[$var+$var2].Create($var2*20, 0.0, 0.0, 0.0) // create car $var =$var2+1; Inc($var2)end

 

 

As you can see, the compiler supports complex expressions anywhere in a code. It will be similar to the

 

Point's features. Btw, why there are no new versions of this so long?

Nice.

 

Also another thing I noticed (don't know if I said it), jumps to integers don't work, e.g:

 

0002: jump 369

 

It's not a label but is needed for darkpact as it writes code itself (self modifying code) into the memory segment then jumps (well, gosubs) to it, but as it is not there at compile there is no label.

 

And is there a way to write variables OUTSIDE the memory segment? E.g. use the old 12?? syntax to write variables/data to exact addresses (that would write to BYTE 12, not variable 12) without affecting the memory size so self modifying code within the first 65539 bytes (just over 64k) of the file is possible?

Share this post


Link to post
Share on other sites
Seemann

 

Yeah, so you can do wierd things with HEX but still not have to do addition yourself. Would it be possible to do something like this with that:

 

 

hex02 00 (@label + 3) // or 03 if it has to be in HEXend

 

 

 

 

I think it's possible. Btw, it should be

 

 

hex02 00 01 (@label + 3) // or 03 if it has to be in HEXend

 

 

with the param's data type (label - 01). because I have no ideas now about how to make the data type depending on the label offset's value. Sanny compiles all labels with 4 bytes of length and dt 01, although I know that it is possible to use another types: shortInt (1 byte of len; dt 04) smallInt (2 bytes of len; dt 05) for these ones.

 

 

Also another thing I noticed (don't know if I said it), jumps to integers don't work, e.g:

 

0002: jump 369

 

It's not a label but is needed for darkpact as it writes code itself (self modifying code) into the memory segment then jumps (well, gosubs) to it, but as it is not there at compile there is no label.

 

 

I haven't understood. Sanny compiles this opcode as 0200 01 71010000.

01 it's a label as I have written above.

After the decompilling there will be jump @NONAME_213. But because the decompiler don't find the opcode with this offset there is no label :NONAME_213 in the code. Another way if you write jump with the offset's value within the scm's header, like "jump 3", after the decompilling there will be just "jump 3".

What’s the problem?

 

 

And is there a way to write variables OUTSIDE the memory segment? E.g. use the old 12?? syntax to write variables/data to exact addresses (that would write to BYTE 12, not variable 12) without affecting the memory

size so self modifying code within the first 65539 bytes (just over 64k) of the file is possible?

 

 

hmm. 12?? is same as $12, isn't it? What about special compiler directive, something like this: {$memory 100}. it will set the second segment size to 100 byte apart the variables. so, if you uses $101, the mem's size won't change.

 

 

 

 

 

Share this post


Link to post
Share on other sites
Y_Less

I used:

 

hex

02 00 @label

end

 

cos you did and I assumed you knew better, lol.

 

I tried doing

 

0050: gosub 369

 

and it didn't compile properly.

 

Also, 12?? is equivalent to $3, it's a byte offset rather than a variable number, so you could do 9?? which would be $2.25, which AFAIK doesn't work.

 

The special compiler directive could be a solution, although would you include automatic generation in a decompile and still issue a warning if someone did use $101 (warning, not error). Also that still wouldn't help with doing 9?? or something, in or out the data segment.

Share this post


Link to post
Share on other sites
Seemann

 

I tried doing

 

0050: gosub 369

 

and it didn't compile properly.

 

 

it's compiled as 5000 01 71010000. what else do you want?

 

 

Also, 12?? is equivalent to $3, it's a byte offset rather than a variable number, so you could do 9?? which would be $2.25, which AFAIK doesn't work.

 

 

The directive doesn't solve this. Maybe it's necessary to add new data type: &. It will denote the direct byte address. so, &100 is equal to 100?? (?? is too ugly for me).

Edited by Seemann

Share this post


Link to post
Share on other sites
Y_Less

I tried doing

 

0050: gosub 369

 

and it didn't compile properly.

 

 

it's compiled as 5000 01 71010000. what else do you want?

 

 

Also, 12?? is equivalent to $3, it's a byte offset rather than a variable number, so you could do 9?? which would be $2.25, which AFAIK doesn't work.

 

 

The directive doesn't solve this. Maybe it's necessary to add new data type: &. It will denote the direct byte address. so, &100 is equal to 100?? (?? is too ugly for me).

user posted image

 

Using a number in the gosub.

 

user posted image

 

Using a local set to a number in the gosub.

 

And yeah, I'm not really bothered what the symbol is, I just suggested that as it's what MB used to use.

Share this post


Link to post
Share on other sites
Seemann

OK, thanks for screens. I've solve this problem, stupid bug...

Share this post


Link to post
Share on other sites
Y_Less

NP, sorry for being such a pest.

Share this post


Link to post
Share on other sites
Seemann

îê, there is new version of Sanny Builder is available on http://freewebs.com/sannybuilder/

 

- bug with jumps to integer fixed.

- new data type is added (&).

 

&100 means direct byte address. it is compiled as the global variable, without affecting the memory segment.

 

Share this post


Link to post
Share on other sites
random_download

 

wow.gif Nice progress! This is like Point with delphi syntax now. Good job.

Share this post


Link to post
Share on other sites
_ASM_

 

hex02 00 (@label + 3) // or 03 if it has to be in HEXend

 

 

to Seemann

Very interesting...

Help (Readme.txt) don't has information of this possibility...

sly.gif

Share this post


Link to post
Share on other sites
Seemann

 

hex02 00 (@label + 3) // or 03 if it has to be in HEXend

 

 

to Seemann

Very interesting...

Help (Readme.txt) don't has information of this possibility...

sly.gif

yeah, because it will be only in the future versions wink.gif

 

ps. BG_ASM?

Share this post


Link to post
Share on other sites
_ASM_
hex02 00 (@label + 3) // or 03 if it has to be in HEXend

 

 

to Seemann

Very interesting...

Help (Readme.txt) don't has information of this possibility...

sly.gif

yeah, because it will be only in the future versions wink.gif

 

ps. BG_ASM?

mm...

 

Future...

 

OK

I not read all posts, because my english is sad.gif bad - don't have take time...

 

p.s.

yeah, i have many names...

And BG_ASM also... rolleyes.gif

 

p.p.s.

I succeeded, now register at this forum has my account... cool.gif

Share this post


Link to post
Share on other sites
V41N

Wow, I'm still in shock. This is quite an amazing program, and I must say I am greatly

impressed by the dedication to the project and the understanding and realization of the

requests of others. This is an excellent example of what can come of a great community,

and brilliant minds working together.

 

I have always been better at object-oriented programming and opcodes really killed me

when I was learning to code for SA. I think the property list will be the biggest help of all

for me. I have one request in regards to properties I hope you could implement. I think

someone had discovered a way to set and get vehicle mods.

 

Example: component = vehicle.mod.wheel

(the component in the 'wheel' slot of a pre-defined vehicle)

 

Not sure if it's possible, but that would allow us to finish the many different car spawning

mods that people had given up on for lack of vehicle mod saving/loading.

I havn't looked into this in a while so I may have missed out on any info on the subject, but

the last I had seen anything was in this old thread.

 

There were examples using these opcodes: 096D (get component) and 06E7 (add component)

though there was more to it, and I was never able to get it to work.

 

It may be far fetched (not sure, because it would seem it's a little different format than the other

supported properties) but I thought I'd ask since someone here can at least tell me to give up if

nothing else smile.gif IMO to simplify complex codes like these would make this tool extremely

powerful for all levels of users. Also it was stated that most OpCodes would be supported so I

wasn't sure if these will be as well. Anyways thanks for the amazing tool and keep up the good

work! I look forward to any future updates.

 

icon14.gificon14.gif

Share this post


Link to post
Share on other sites
Seemann

 

It may be far fetched (not sure, because it would seem it's a little different format than the other supported properties)

 

 

yeah, it differs from the current format. it looks like you want the complex properties, smth like this:

 

[email protected]  = actor.car($myactor).model.loadorvar $myactor : Actor [email protected]  = $myactor.car.model.load

 

if so, i think it's possible. It will be compiled as:

 

 

[email protected] = [email protected] = [email protected]@.load

 

it’s really easy. But what about the car's components (your request), I'm not sure. There are 2 opcodes:

 

 

096D: get_car [email protected] car_component 7 on_slot [email protected]: [email protected] = add_car_component #WHEEL_OR1 to_car [email protected]

 

How do you want to present them as the properties?

 

 

Example: component = vehicle.mod.wheel

(the component in the 'wheel' slot of a pre-defined vehicle)

 

 

please, give me a code example (with line-by-line commands, as my example above) for this, because I can't imagine how to implement the properties here.

 

Share this post


Link to post
Share on other sites
Madd Doggy

Please, can anybody copy and paste the ReadMe file here?

 

Mine is like this:

 

Ñîäåðæàíèå:

 

1. Î ïðîãðàììå

1.1 ×òî ýòî òàêîå?

1.2 Óñòàíîâêà è îáíîâëåíèå

 

2. îäèíã

2.1. Ñèíòàêñèñ

2.2. Òèïû äàííûõ

2.3. ëàññû

 

2.3.1 Îñíîâíûå ïîíÿòèÿ

2.3.2 Óñëîâíûå êîìàíäû

2.3.3 Ïðîöåäóðû

2.3.4 Ñâîéñòâà

2.3.5 ×ëåíû êëàññà

2.3.6 ëàññ Model

2.3.7 Ðàñøèðåííûå íàçâàíèÿ ïàðàìåòðîâ

 

2.4. Öèêëû

2.4.1 Îïåðàòîð FOR

2.4.2 Îïåðàòîð WHILE

2.4.3 Îïåðàòîð REPEAT

2.4.4 Continue è Break

 

2.5 Äîïîëíèòåëüíûå êîìàíäû

2.6 Óñëîâèÿ

 

3. Ðåäàêòîð

 

4. Èñòîðèÿ èçìåíåíèé

 

5. Äîïîëíèòåëüíàÿ èíôîðìàöèÿ

 

Please, do me this favor!

Share this post


Link to post
Share on other sites
spaceeinstein

The stats ID should be updated. And can you make this so that if the program couldn't find script.img while decompiling, make a window popping up to find the IMG file.

Edited by spaceeinstein

Share this post


Link to post
Share on other sites
Seemann

 

Please, can anybody copy and paste the ReadMe file here?

Do you want english version of readme file? If so, the updated version contains this one.

 

 

 

And can you make this so that if the program couldn't find script.img while decompiling, make a window popping up to find the IMG file.

 

 

Now in this case the decompiler takes the IMG that is in the GTASA dir. But ok, I'll make such option. You can choose between using the IMG in GTASA dir or finding another one.

Share this post


Link to post
Share on other sites
Madd Doggy

THX

Share this post


Link to post
Share on other sites
Y_Less

Do you think it would be possible to add a switch construct using the jump tables as I'm fairly sure from seeing parts of R*s original code that that's where they come from (and basic knowledge).

Share this post


Link to post
Share on other sites
Xieîn

 

Do you think it would be possible to add a switch construct using the jump tables as I'm fairly sure from seeing parts of R*s original code that that's where they come from (and basic knowledge).

Yeah, it is planning now, it would be much better than these unpleasant jtables i think, but we now cannot tell will be exact it in nearest version.

Edited by Xieîn

Share this post


Link to post
Share on other sites
Seemann

Sanny Buider 2.98 is released

 

Version changes:

    * Sanny Builder becomes fully multilingual (3.14)

    * added menu of external applications

    * the special version of Opcode Search Tool is built in SB

    Details in a file 'OST Readme.txt'

    * check of the math expressions while decompiling when the option "Write opcodes"

    is disabled (to sure that all the opcodes were used correctly)

    * an opportunity to choose an IMG-file manually if the last one

    is not found in a folder with the SCM-file (an option "Manual IMG opening")

    * an opportunity to add new macroes directly from the editor;

    added macroes descriptions (3.12)

    * the list of models can be sorted alphabetically/by value

    (Alt+S when the list is active)

    * minor corrections and changes

 

New official site is open.

http://sannybuilder.com/en

 

Here you can download new version of SB. Welcome wink.gif

Share this post


Link to post
Share on other sites
spaceeinstein

Is it just me that every links and images on that site is broken?

Share this post


Link to post
Share on other sites
jarjar
Is it just me that every links and images on that site is broken?

Well the page won't even load for me. Says theres nothing there confused.gif .

Share this post


Link to post
Share on other sites
Y_Less

Question, how do you integers as array indexes? Every time I try to do it it complains it's not a variable.

Share this post


Link to post
Share on other sites
Seemann

 

Yeah, they've got some '\' instead of '/' in the URLs.

Ok, I've changed this. Hope, it is working now.

 

 

 

Question, how do you integers as array indexes? Every time I try to do it it complains it's not a variable.

 

Do you use smth like this?

 

$array[1] = 0

 

If so, this is the unsupported feature. The compiler can only work with variables as indexes

 

$i = 1$array[$i] = 0

 

this code will be converted to

 

$array($i, i) = 0

 

and compiled

 

In Sanny Builder 3 such things will work, but not now.

Edited by Seemann

Share this post


Link to post
Share on other sites
Y_Less

Yeah, I just looked at a compiled SCM from MB, they're not actually arrays, sorry. Also, another request (sorry). Could you modify the hex structure so you can do:

 

04 00 02 $somevar 04 55

 

For example and it replaces the occurence of the variable with its location (just the location, not the type or anything extra)? Could you also extend DMA ($4 and &16 types) to support arrays so you can do:

 

&44($index, 1i)

 

To write anywhere in the code mor or less (I've not tested the limits of arrays yet).

Share this post


Link to post
Share on other sites
Seemann

 

Could you modify the hex structure so you can do:

 

04 00 02 $somevar 04 55

 

For example and it replaces the occurence of the variable with its location (just the location, not the type or anything extra)?  Could you also extend DMA ($4 and &16 types) to support arrays so you can do:

 

&44($index, 1i)

 

To write anywhere in the code mor or less (I've not tested the limits of arrays yet).

Yep, there's no problem wink.gif I will make this, and also add a possibility to use labels (and globals) within the hex structure (without param's types certainly).

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.