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

    2. News

    1. Red Dead Redemption 2

    1. GTA Online

      1. After Hours
      2. Find Lobbies & Players
      3. Guides & Strategies
      4. Vehicles
      5. Content Creator
      6. Help & Support
    2. Crews

      1. Events
      2. Recruitment
    1. Grand Theft Auto Series

    2. GTA Next

    3. GTA V

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

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

    6. GTA Vice City Stories

    7. GTA Liberty City Stories

    8. GTA San Andreas

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

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

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

      1. GTA Advance
      2. GTA 2
      3. GTA
    12. 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. Forum Support

    2. Site Suggestions

Seemann

[REL] Sanny Builder

Recommended Posts

Demarest
just because barton is retarded and couldn't figure this out, doesn't mean seemann can't fix (=simplify) the syntax in this derivative tool. tounge.gif

Aah ha ha ha ha haaa! I'm a Barton fan for the most part, but having gone so long not TRULY understanding the difference between local and global addressing, I agree that using ENTIRELY different symobls for each can only stand to further educate the users as to how they work. I've never minded the pound symbol, but only because I usually copy/paste lines I use and they're already there. And I'll also be the 3rd to support using similar characters used by other tools already available.

Share this post


Link to post
Share on other sites
jonc

There is absolutely no reason to have different symbols for mission labels versus global labels. Based upon where the label is defined any well written tool should be able to figure out how to write the label to the SCM, no need for any guesswork.

Share this post


Link to post
Share on other sites
tux.coder

Nah, i don't get confused, just seemed weird for me but if all others want it, no reason to change it.Also, could you please make more classes ? There are just a few.You can put more things into classes and/or expand classes like Player (maybe if Player.Crouching) ?

Share this post


Link to post
Share on other sites
Demarest
There is absolutely no reason to have different symbols for mission labels versus global labels.

Sounds like we're back to the clash of schools of thoughts of education vs restriction wink.gif The simple answer would be they're different, so they should be denoted differently. Where Barton commited an evolutionary crime was making them identical symbols, suggesting they're handled differently, but in different places. I'm thankful that CyQ knew the difference and was willing to share. Some of the stuff Y_Less and I have been dabbling NEEDED to know the difference. Seeahmsayn?

Share this post


Link to post
Share on other sites
Un3462

there is no clash. a compiler shouldn't ever make things hard just because that 'educates' people. if that were the case, you shouldn't be allowed to use opcode names and f1 in the builder, but instead it should force you to memorize the opcode numbers. and it shouldn't allow you to use floats, but force you to enter the bitpatterns, to 'teach' you the ieee 754 standard. and variable names would be bad! you need to learn about memory allocation and alignment, of course.

 

i could go on.

 

the point is, any tool should make things as simple as it can. if people want to learn (instead of you forcing them to), they can find the scm file format documentation, and use a hex editor.

Share this post


Link to post
Share on other sites
Xieîn

wow.gif

Hmm, so I all the same want to find out a number of organizational questions:

 

First, I really do not understand what for to do distinctions between global and local labels. To that the user "will educate" if all time will load a head various types of the labels, data, and etc.? The user learning first of all mission coding, and the it will be easier, the better, and that the user the coder becomes faster. What for to him to know about such various specific knowledges of coding? (besides distinctions between global and local addressing are not so important to do for them visual differences). The program compiler is engaged in it. Eventually it is possible to take hex editor, as has correctly noticed CyQ, and to write all missions entirely there. xmas.gif

 

Second, for what to use in jump, else_jump and etc. instructions these ugly symbols "pound-pound"? The unique way of their set in SaMB is F1 autosubstitution of a jump-opcode, and copy/paste therefrom these symbols, which also were spontaneously replaced on JJ, and I any more do not speak what mess at times arose on the forums which are not supporting these symbols, the user which were copied with a site of a code from a forum post MANUALLY at times had to replace all symbols JJ on pound-pound. smile.gif Still there is certainly a good means - 'charmap', whether however is simple to type one symbol from the keyboard easier than to be engaged such masochism? colgate.gif

 

So, I think we shall not use JJ in any case. About global/local labels if only 80% of coders will demand to make their differences, it is necessary to realize it, otherwise hardly such will be present at the program.

 

As well as refusal of use of the expanded types of the data, for example obligatory typing of '!' or '&' before float, integer or other value. What for it is necessary? Unless we shall not distinguish the integer from float (on a point in value) or string from non-string (on 's' or 'v')? Certainly we shall distinguish, to the compiler it is even easier. But we shall care and waste time each time on that that all time to specify these damn symbols. confused.gif Sometimes, there is not conveniently their use in usual programming languages, however there the instruction of data types is wholly justified by more rational use of memory and higher speed of the program. However, mission coding AFAIR is not the programming language, therefore here in it there is no necessity. Only the standard - global, local, string variables, arrays, etc.

 

Once again I want to tell, that our purpose by development of a SB, this simplification of GTA mission coding as far as it is possible, rather the reverse. rolleyes.gif

 

 

Also, could you please make more classes? There are just a few. You can put more things into classes and/or expand classes like Player (maybe if Player.Crouching)?

Certainly will be, as we already wrote for everyone opcode in game there will be an equivalent class or a place in a class. On that it and the beta-demo version, classes only as a demo, therefore and is a little of them. There will be also a reference and help system in a CHM HTML Help format. tounge2.gif

Share this post


Link to post
Share on other sites
Seemann

firstly, i am not going to change any data type's symbols now. there is symbol @ for both locals variables and labels (global and local) i think it is stupid idea to use different symbols for local labels and global ones. you must not think how compiler differs these labels (in fact by their placing, as jonc said) but just use same symbol for these ones - @. if label is written in MAIN part it will be compiled as global, if it's written in mission/extern - as local. So, you can not jump from MAIN at label in mission/extern, or from other mission/extern here, because such jumping will be written with wrong offset (value).

secondly, as for more classes and other stuff. As Xieon said, v2.0 just was the demo version and there will be more classes and classes' commands. However, you can write your own classes by editing file "classes.db" (i do not recommend this, because its syntax may be will change). And in next version following feature will be available:

 

The Class "Properties" (i call it properties, however it is not real properties as in other languages).

 

e.g. Property "Money" of the class "Player". After it is fully defined in "classes.db" you can use following commands without any OpCodes:

 

Player.Money($PLAYER_CHAR) += 1; instead of 0109:$Money = Player.Money($PLAYER_CHAR); instead of 010A:ifPlayer.Money($PLAYER_CHAR) > 1; instead of 010B:jf @anywhere

 

or Property "Health" of "Actor"

 

Actor.Health($Actor) = 200; 0223:$health = Actor.Health($Actor); 0226:

 

 

Forget about needed OpCodes. Use only property. smile.gif

Share this post


Link to post
Share on other sites
Demarest
i think it is stupid idea to use different symbols for local labels and global ones. you must not think how compiler differs these labels (in fact by their placing, as jonc said) but just use same symbol for these ones - @. if label is written in MAIN part it will be compiled as global, if it's written in mission/extern - as local.

I think it is stupid to have the same symbol. The difference between a local and a global are night and day and some of us have been working on things that require such differentiation. For a tool to suggest to a beginning coder that there is no difference is unfortunate.

 

Also, original creates threads in MAIN all the time. I realized this is an isolated example that could make that one one command exempted, but honestly, it doesn't make sense to make some of the upgrade suggestions Y_Less mentioned that give us MORE power only to turn around and take more basic power away at the same time.

Share this post


Link to post
Share on other sites
Un3462
I think it is stupid to have the same symbol. The difference between a local and a global are night and day and some of us have been working on things that require such differentiation. For a tool to suggest to a beginning coder that there is no difference is unfortunate.

christ, dem. you still don't understand? this is getting annoying. give me one example where you need the different labeltypes.

Share this post


Link to post
Share on other sites
Y_Less
Dem, I think what they are trying to say is that the builder automatically detects where the label is, and assigns the type accordingly. So if you try run a create_thread in a mission, it will detect that the label is in MAIN, and assign the type accordingly. The only thing you cant then do is jump to a sub in a mission from MAIN as it will put the type wrong (can't you get it to scan where it is going AND from where so you can do that?).

Share this post


Link to post
Share on other sites
Demarest

8

 

 

Am I talking about local variable 8 or the player? You don't know.

 

There's nothing to get annoyed about. I understand that a tool should take all the guess-work out of the process and for the most part, we've had these from day one. Those developing new tools would want to have something to offer that the others don't. In the case of point, you have ease of programming in that you don't need to know a thing about SCM. Sanny Builder--as I believe we've all come to a concensus of--started off as a MB knock-off. With the exception of having to know things like whether or not your numerl is int or float, having to have the opcode present, etc, MB was given a ton of checks to make it idiot proof and even a couple that make it idiot prone in and of itself. As it was widely accepted, these are clearly acceptable restrictions to operate within, at least in the context of an alternative-less environment. As for me, the more I learn about the inner workings of SCM, the more effective I become and the more I feel the restrictions of MB. For me to desire something more gritty makes sense FOR ME. And since I should hope that my record speaks for itself in that knowing more about the details makes me more effective, it shouldn't annoy anybody that my OPINION is that I'd like to have as much say when writing as possible. MB for example can't handle certain things for jumps that the engine can. It was no doubt made that way because at one point he was at a theological crossroads not unlike the ones we're discussing and said to himself just as some of you are saying "why would you ever need it to be different?" Well maybe nobody thought of ways back then. They have since then, eh? And that little extra control stripped from us is quite the cramping, especially when you follow it through to the highly limited space we have in SA and such.

 

If none of the above doesn't convince you, you know why else my opinion shouldn't annoy anybody? I'm not making the tool. So even if I'm the ONLY person to feel that way, it's not like I'm in a position to force everybody else to adhere to it. I appreciate everybody's input and admit that generally speaking, a tool should be easy to use. I'm looking for control in writing SCM because I've largely been working "outside the box" as of late. That said, I thank everybody for their efforts in shedding the light and only hope that my work will help people to appreciate that I'm not just offering up opposing thoughts to argue. I have goals too.

Share this post


Link to post
Share on other sites
Un3462

dem.

 

this has nothing to do with local vs global VARIABLES.

 

it's about local vs global LABELS.

 

and to y_less:

 

consider the following pseudo-scm code:

 

; --- main section;assume player has already been created here, etcstart_mission [email protected]_thread @somemissionlabelreturn; --- mission 0gosub @[email protected] $test, 1end_thread

 

see; only one labeltype, and you can hop back and forth between main and missions just fine.

Share this post


Link to post
Share on other sites
Demarest

blush.gif I thought the part I quoted mentioned variables AND labels.

 

As for your code sample there, isn't create_thread to where the missions are not possible? If it is possible, why have we always told people to put their code before mission 0? Was that a limitation of MB?

Share this post


Link to post
Share on other sites
Un3462

ha, glad that that's over with then.

 

the mission obviously has to be loaded if you want to start a thread in it or gosub to it, and it has to remain loaded while the thread in it is running.

Share this post


Link to post
Share on other sites
Y_Less
dem.

 

this has nothing to do with local vs global VARIABLES.

 

it's about local vs global LABELS.

 

and to y_less:

 

consider the following pseudo-scm code:

 

; --- main section;assume player has already been created here, etcstart_mission [email protected]_thread @somemissionlabelreturn; --- mission 0gosub @[email protected] $test, 1end_thread

 

see; only one labeltype, and you can hop back and forth between main and missions just fine.

They said on the last page that with this you couldn't jump into a mission from MAIN as the label will be calculated from the start of the mission in reverse, and when it writes that label into the MAIN section, it won't calculate it absolutely - so you can jump from a mission to main, but not from main to mission - thats what the developers said (or thats how I read it) on the last page. From what I've seen of memory, all missions are loaded from the start of the game, so if you jump to an absolute address within the mission segment, surely it should work (just as I have started jumping to addresses within the memory segment, which works).

Share this post


Link to post
Share on other sites
jonc

 

From what I've seen of memory, all missions are loaded from the start of the game, so if you jump to an absolute address within the mission segment, surely it should work (just as I have started jumping to addresses within the memory segment, which works).

 

Only the first 200k can be jumped to using absolute addresses. If your mission happens to be within that bound the absolute jump will work; otherwise it will fail and jump to undetermined memory.

Share this post


Link to post
Share on other sites
Un3462
From what I've seen of memory, all missions are loaded from the start of the game, so

hmm, no. only one mission is loaded at any one time (the one selected with start_mission). negative addresses jump into missions, so you can jump from main to anywhere in the currently loaded mission. however, in sa externals were added, which also use negative addresses. a base address field was added in the thread descriptor to allow for this to work; it makes negative jumps jump relative in either the currently loaded mission, or the currently running external thread, based on some type flags in the thread descriptor. i'm not sure right now what the combination of type flags for threads in main would do, but i think negative addresses in main still jump into the currently loaded mission.

Share this post


Link to post
Share on other sites
Demarest
So you're saying if I had a jump -5, it would jump to mission offset 5 regardless of what mission was loaded? While I can't immediately think of any abuses, that sounds like fun smile.gif

Share this post


Link to post
Share on other sites
Seemann

New version of SB is available for download.

 

Sanny Builder v2.5

 

List of changes:

 

* added "properties" support

* added macroes support

* added construction VAR...END for variables management

* all math commands can be used without opcodes [0004..008B]

* new pseudo operators

* added a capability that the compiler itself set necessary value for IF command

* added "extended" parameters support

* added models list showing by pressing #

* minor changes and fixes

 

More info here

 

 

PS official page at freewebs is not updated yet.

Share this post


Link to post
Share on other sites
TbM2k

Sorry if this has been asked before, but could you "split" the mission-script into individual missions?

 

So there would be: "main", "mission1" ... "mission 100"...

 

Thats what I always hated about MB, its just too confusing to have ALL CODE IN ONE BIG FILE (nearly no REAL programmer would do that to his code)... gtaMA did it right, there you don't need to search 1'000'000 Lines of code for a mission, you just open the needed file and there you are. (but since there is no gtaMA for SA I have to suggest this here)

 

If you can't do that can you just add an option to "open missions in extra tabs" or something like that?

 

And naming of the parameter for "start_mission" would be nice, it's bad that I always have to look at the start of the script what mission is "78" or "101"... (like gtaMA did, there you can easily see what missions where started because they are named and no cryptic numbers)

 

Sometimes I found a comment like "first load text-table with .... command" but this command is standing right in front of the gxt-commands, so is there any problem in finding this gxt-entries?

 

How fast is the de-/compiler on your system, on my AMD3000 it needed 2.7s for decompiling and 5.4s for compiling of the original script, since I can't compare to any other tool I think this is pretty fast for such a tool...

 

PS: Does the compiler do a 1:1 recompile if I don't add commands to the scm? Or is there any "savegame-fixer" out there? I'm asking because the old gtaMA changed the varspace and so old savegames won't work with recompiled scms...

Share this post


Link to post
Share on other sites
Demarest
If that is implimented, I'd hope it to be in the preferences. I for one enjoy having it all in one file because when you're searching for this and that, all instances are available to you, as opposed to opening dozens. Plus, the more you kick around, the more you're familiar with things. Like GTA3's GENSTUF thread.

Share this post


Link to post
Share on other sites
Seemann

 

Sorry if this has been asked before, but could you "split" the mission-script into individual missions?

 

So there would be: "main", "mission1" ... "mission 100"...

 

 

Ok, I'll try. Not in current version I do, in future one may be. And it will be sure to be an option.

 

 

And naming of the parameter for "start_mission" would be nice, it's bad that I always have to look at the start of the script what mission is "78" or "101"... (like gtaMA did, there you can easily see what missions where started because they are named and no cryptic numbers)

 

 

Great idea. Ok, for example if the mission has starting label '@Initial', it will allow to run this one with command "start_mission Initial" (list of mission names will be too, like models one).

 

 

Sometimes I found a comment like "first load text-table with .... command" but this command is standing right in front of the gxt-commands, so is there any problem in finding this gxt-entries?

 

 

hmm. i never have seen that. what kind of gxt do you use: original or changed?

 

 

How fast is the de-/compiler on your system, on my AMD3000 it needed 2.7s for decompiling and 5.4s for

 

compiling of the original script, since I can't compare to any other tool I think this is pretty fast for such a tool...

 

 

I have 3,5 / 8,5 sec. on Celeron D 325. wink.gif

 

 

PS: Does the compiler do a 1:1 recompile if I don't add commands to the scm? Or is there any "savegame-fixer" out there? I'm asking because the old gtaMA changed the varspace and so old savegames won't work with recompiled scms...

 

 

 

yes, except the floating values it is fully the same. As for floats, it is little rounded after recompiling. 2488.5623 becomes 2488.562 and so on. I think it does not matter.

 

Share this post


Link to post
Share on other sites
demonj0e

The zip's Corrupt says:

 

!  C:\Documents and Settings\Joseph\Local Settings\Temporary Internet Files\Content.IE5\H08VHH8L\SannyBuilder25[1].rar: CRC failed in SannyBuilder.exe. The file is corrupt

!  C:\Documents and Settings\Joseph\Local Settings\Temporary Internet Files\Content.IE5\H08VHH8L\SannyBuilder25[1].rar: Unexpected end of archive

!  Cannot execute "C:\DOCUME~1\Joseph\LOCALS~1\Temp\Rar$EX00.000\SannyBuilder.exe"

 

Share this post


Link to post
Share on other sites
Seemann
The zip's Corrupt says:

 

!  C:\Documents and Settings\Joseph\Local Settings\Temporary Internet Files\Content.IE5\H08VHH8L\SannyBuilder25[1].rar: CRC failed in SannyBuilder.exe. The file is corrupt

!  C:\Documents and Settings\Joseph\Local Settings\Temporary Internet Files\Content.IE5\H08VHH8L\SannyBuilder25[1].rar: Unexpected end of archive

!  Cannot execute "C:\DOCUME~1\Joseph\LOCALS~1\Temp\Rar$EX00.000\SannyBuilder.exe"

 

just re-download it.

Share this post


Link to post
Share on other sites
Y_Less

PS: Does the compiler do a 1:1 recompile if I don't add commands to the scm? Or is there any "savegame-fixer" out there? I'm asking because the old gtaMA changed the varspace and so old savegames won't work with recompiled scms...

 

 

 

yes, except the floating values it is fully the same. As for floats, it is little rounded after recompiling. 2488.5623 becomes 2488.562 and so on. I think it does not matter.

Well does a (de)compiled SCM work with a save game? Thats the ultimate test.

Share this post


Link to post
Share on other sites
grovespaz

Great job on the compiler! Really!

This is the smoothest, easiest to handle builder i've ever worked with, thank you very much.

 

You inspired me to try my hands on SA scm.

(it kinda worked, look here)

 

I definatly like the "split" idea, but so that you can set it in the preferences.

Share this post


Link to post
Share on other sites
Seemann

 

Well does a (de)compiled SCM work with a save game?  Thats the ultimate test.

If you recompile original .scm then any savegame will work, but if you change MAIN part (add opcodes) it won't. The changes of missions should not influence on savegame's compatibility.

 

in fact, I don't know what kind of data is stored in savegame and what is the reason of game's crashing with new .scm wink.gif

Share this post


Link to post
Share on other sites
Y_Less

If you change the structure, the thread and var pointers are wrong so it won't work, thats why Darkpact does work, because it doesn't change any pointers as it goes on the end.

Share this post


Link to post
Share on other sites
grovespaz

SB seems to crash decompiling the original scm.

It just almost inmediatly causes the send report/do not send report screen to show up.

 

EDIT:

Also, whats wrong with this code?

I dont have an example to compare with because it wont decompile, this is the code:

 

DEFINE OBJECTS 0DEFINE MISSIONS 0DEFINE EXTERNAL_SCRIPTS 2DEFINE EXTERNAL_SCRIPT_NAME PLAYER_PARACHUTEDEFINE EXTERNAL_SCRIPT_NAME AAADEFINE UNKNOWN_EMPTY_SEGMENT 0DEFINE UNKNOWN_THREADS_MEMORY 0;-------------MAIN---------------

 

 

And this is the error:

 

user posted image

Edited by grovespaz

Share this post


Link to post
Share on other sites
Y_Less

I have another request, something I thought of a long time ago but forgot about until I was browsing old LC topics earlier and found this one

 

Anyway, basically could you do as they did in that so when you compile and run the game, it goes straight into the game, no menus etc as they are very annoying. Don't know how it was done there but the source is available, and I don't know what the addresses are either, but meh.

Share this post


Link to post
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

×

Important Information

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