Jump to content

The Mission Builder thread


Recommended Posts

Barton Waterduck

GTA SA PS2 MB v0.33 released.

 

http://home.tiscali.no/donkey99/SA-MB033.zip

 

New stuff in version 0.33:

- Proper support for custom global variables and arrays

(because the new memory system has finally been debugged).

- Setting up an array at address 0 didn't work. Fixed.

- New label format in decompiler.

- Decompiler now supports custom label names.

- Custom global variable names removed from the 'sascm.ini'

and put in 'variables.ini' with a new easier format.

 

New stuff in version 0.32:

- Opcode parameter definition 't%' in the 'SAscm.ini' file was changed

to use objects from the 'default.ide' file only while 'o%' is used

with any objects.

- Named references to the second segment objects added.

- Original mission titles added to hardcoded mission descriptions.

- Some cosmetical bugs fixed. :-)

 

--------------

 

GTA Vice City Mission Builder v1.41 released.

 

New:

 

DEFINE OBJECT BARREL4; object number irrelevant now...0107: $898 = create_object #BARREL4 at  284.3 -312.4  10.9

 

 

more in the readme. Links in my signature.

Edited by Barton Waterduck
Link to comment
https://gtaforums.com/topic/159751-the-mission-builder-thread/
Share on other sites

This thread is for all future version of my Mission Builders for GTA San Andreas, PS2 and PC versions.

 

I'm currently working on support for the external scripts. I started with decompiling/disassembling the scripts in the 'script.img' to separate files. I ran into several practical problems and decided to decopile everything into one huge text file. All the missions have always been in one huge file anyway and it's easier to search for codes this way.

 

Two unknowns left. One in the beginning of the memory and one in the external script 'aaa.scm'. I'm guessing it has something to do with the variable string space since the first 4 bytes in this file is the size of the "usual" memory. Or it could be related to memory in the external files. I will try to track it down tomorrow.

 

New stuff: GXT reader. The GXT keys are coded in San Andreas. I used some code dans made for that. And a fully automatic internal IMG tool.

Did you do a gxt reader for SA? wow.gif

Link to comment
https://gtaforums.com/topic/159751-the-mission-builder-thread/#findComment-2186340
Share on other sites

Barton Waterduck

Version 0.3 released.

 

New stuff: GXT reader, automatic IMG tool to extract the scripts in the "script.img" file, "credit" files from GTA VC added, opcodes searching features brought back.

 

Known issues: Use a desktop resolution of 800x600 or higher. If lower, the

"open file" and "select destination path" dialog box will be too big.

 

Bugs fixed: Most of the 2nd segment object names didn't show up in the decompiled code in versions 0.1 and 0.2.

 

The math system used to code math related stuff without specifying the opcodes does not support arrays or local variables in this version.

 

Much more info in the readme.

 

Link to comment
https://gtaforums.com/topic/159751-the-mission-builder-thread/#findComment-2191166
Share on other sites

Barton Waterduck
When you recompile, does it put the other scripts back in the separate file?

Yes, it recreates the "script.img" file. The "main.scm" and "script.img" file is recreated in the work/project/destination directory where the tables and "main.txt" file is. If you use "save as" on the "main.txt" the work/project/destination directory changes automatically and you get a messagebox asking if you want to copy the tables to the new work/project/destination directory.

 

Link to comment
https://gtaforums.com/topic/159751-the-mission-builder-thread/#findComment-2191439
Share on other sites

Barton Waterduck

Version 0.31 released.

 

This is like a bug-fix to version 0.3.

 

New stuff in Version 0.31:

- Main scripts with empty segments can now be decompiled and recompiled.

- A debug message has been removed.

- Some tiny potentional bugs removed.

- Math system complete. CyQ found the new math codes.

 

Code tested with the new math system using the compiler and decompiler. Opcode 08FA could be wrong. The code has not been tested ingame:

 

if  0 $728($727,32i) ==  0 $728($727,32f) ==  0.0 $728($727,32s) ==  'test' $728($727,32v) ==  "test"jf ££Label0146EBif  0 @728($727,32i) ==  0 @728($727,32f) ==  0.0 @728($727,32s) ==  'test' @728($727,32v) ==  "test"jf ££Label0146EB$1735 = $760($727,32i)$1735 = $760($727,32f)s$1735 = $760($727,32s)v$1735 = $760($727,32v)$760($727,32s) = 'test'$760($727,32v) = "test"s$1735 = 'test'v$1735 = "test"@1735 = $760($727,32i)@1735 = $760($727,32f)s@1735 = $760($727,32s)v@1735 = $760($727,32v)@760($727,32s) = 'test'@760($727,32v) = "test"s@1735 = 'test'v@1735 = "test"$728(1) = 123; same as $729 when DMA support enabled$728(2) = 234; same as $730 when DMA support enabled$728(3) = 345; same as $731 when DMA support enabledSame code decompiled:00D6: if  00038:   $728($727,32i) ==  0;; integer values0042:   $728($727,32f) ==  0.0;; floating-point values05AD:   $728($727,32s) == 'TEST';; 8-byte strings08F9:   $728($727,32v) == "TEST";; 16-byte strings004D: jump_if_false ££Label0118A100D6: if  00039:   @728($727,32i) ==  0;; integer values0043:   @728($727,32f) ==  0.0;; floating-point values05AE:   @728($727,32s) == 'TEST';; 8-byte strings08FA:   @728($727,32,3) == "TEST";; 16-byte strings004D: jump_if_false ££Label0118A10084: $1735 = $760($727,32i);; integer values and handles0086: $1735 = $760($727,32f);; floating-point values only05A9: s$1735 = $760($727,32s);; 8-byte strings06D1: v$1735 = $760($727,32v);; 16-byte strings05A9: $760($727,32s) = 'TEST';; 8-byte strings06D1: $760($727,32v) = "TEST";; 16-byte strings05A9: s$1735 = 'TEST';; 8-byte strings06D1: v$1735 = "TEST";; 16-byte strings008B: @1735 = $760($727,32i);; integer values and handles0089: @1735 = $760($727,32f);; floating-point values only05AA: s@1735 = $760($727,32s);; 8-byte strings06D2: v@1735 = $760($727,32v);; 16-byte strings05AA: @760($727,32s) = 'TEST';; 8-byte strings06D2: @760($727,32,3) = "TEST";; 16-byte strings05AA: s@1735 = 'TEST';; 8-byte strings06D2: v@1735 = "TEST";; 16-byte strings0004: $728(1) =  123;; integer values0004: $728(2) =  234;; integer values0004: $728(3) =  345;; integer values

 

Edited by Barton Waterduck
Link to comment
https://gtaforums.com/topic/159751-the-mission-builder-thread/#findComment-2194568
Share on other sites

  • 2 weeks later...
Barton Waterduck

Did you know that the PS2 version of GTA SA supports running it from a PS2 harddrive ? I guess it wouldn't make modding PS2 games automatically legal, but if you never mention it to anybody, who is going to know anyway ? And it's not like Rockstar is going to loose any money on it, not that much anyway. tounge.gif And you don't even need a modded PS2 to do this. Been wondering about these legal matters because of my PS2 Mission Builders. Wonder if Rockstar know about this builder. user posted image I have known about this for some time now (like several days) and I wasn't sure if I was even going to mention it like this. Oh well, I'm just a nervous geek I guess. sigh.gif What do you people think ? Should we be discussing SA mission script codes now or should we wait until the PC version is out ? Or should we just mod silently in the dark ? ph34r.gif Maby I even risk getting banned for posting this. cry.gif Also, since I'm already writing stuff, I've been posting about this MB on several other forums and most of them are deleted by moderators saying my tool is illegal. suicidal.gif That doesn't make things better. What I'm trying to say is that who on earth can keep a secret as big as this ? Not me anyway. We're talking about modding THE ps2 game of all times here and the retail version of it is actually moddable using any unmodded ps2's out there (except perhaps the new V12 version). All you need is a harddrive (40 GB to 120 GB (or higher with some unofficial patches)). I guess this post is long enough now. notify.gif

 

Link to comment
https://gtaforums.com/topic/159751-the-mission-builder-thread/#findComment-2232506
Share on other sites

It's fully legal Barton. Don't worry.

 

Besides, it's not like anyone can tell you you can't do something to a game you own, on a console you own, with modifications you've made yourself.

 

Well, there's the DMCA, but that's outside the scope of this argument.

Link to comment
https://gtaforums.com/topic/159751-the-mission-builder-thread/#findComment-2232525
Share on other sites

I had many of the same thoughts BW when i saw articles about your software on other sites but no mention of the fact that these version were PS2 builders so i made it clear to them that the builder(s) should now have a platform(PC or PS2) Notation added to the downloads. or they should just direct all traffic to your pages....

 

I have a friend who is using his HD to mod a couple of other PS2 games. Not sure which ones but i agree with opius you bought it, you own it, you changed it..... no problem..... ph34r.gif

Link to comment
https://gtaforums.com/topic/159751-the-mission-builder-thread/#findComment-2254234
Share on other sites

Heyyo,

 

I agree, it's free, so it's legal. This's how 3rd party software/mods work in general: it can use parts of the original game and can be given to others AS LONG AS IT'S NOT SOLD FOR PROFITS. So since your mission builder is free, and doesn't include a whole pirated version of the game? it's legal, you have a tool for creating images yes, BUT it requires the user to already HAVE the game, further proving this program is legal. Hey, if R* diddn't like what we're doing? I'm sure they'd have stopped us by now, even they probably know aboot what we're doing.

 

I've got a great example of a company SUPPORTING a 3rd party mod, and I believe they actually sell their product too! and that's the machinima stylings of the series known as "Red Vs Blue: the chronicles of blood gultch." They use like, all aspects of Halo, and now? even Halo2, and Marathon (w00t! Marathon's free software, so you can download it, and mod it as you see fit and it's all legal! Also, Abuse is freeware! so dl that, n' start up a 2D side-scrolling shooting fury! biggrin.gif)

 

So yeah, Bungie diddn't shut down RvB, they supported it. R* may not have been so supportive of what we do, but they seem just as nice as Bungie since they're givin' out some classic games for free (GTA1's freeware... ok, it's not free software like Marathon1 with complete source codes, but it's still cool).

 

Don't worry aboot those other sites/forums, they're just paranoid dude, and don't truly support the modding community.

 

So BW? I say dude, keep going. The further you improve your mission builder while the PS2 version's out, the better the PC version will be. rah.gif

Link to comment
https://gtaforums.com/topic/159751-the-mission-builder-thread/#findComment-2259848
Share on other sites

You could use a ROM, but I think that may be illegal.

 

And yes, there are lots of exmples of companies supporting mods (Counter strike/ gunman chronicles for one (two)).

 

Just because Rockstar don't support the moding scene (and, as I understand it, they have covertly supported it a bit at some points), but they don't hate it. they said the files were free to be modded, so mod them. I don't think this could have gone un-noticed, especially with a community this big on the biggest gta site, and with all the publicity of myriad islands and LC.

 

If they didn't want it, they'd have stopped it LONG ago.

Link to comment
https://gtaforums.com/topic/159751-the-mission-builder-thread/#findComment-2262290
Share on other sites

Barton Waterduck

 

I don't think anybody's successfully changed anything yet (or if they even tried). Not many people have the HDD to test this.

The only people I know of that have successfully modded the mission script using the MB with a PS2 harddrive is some moderators and administrators at the norwegian gta forum http://www.gtaforum.no

It's also the only forum I know of in addition to this (or these) that doesn't have a problem with the MB's existens. I guess the reason is that they already knew all about gtaforums.com and my mods before I released my MB there. I also guess they respect me more because I haven't gone bonkers there yet.

Edited by Barton Waterduck
Link to comment
https://gtaforums.com/topic/159751-the-mission-builder-thread/#findComment-2262405
Share on other sites

[offtopic]

 

 

I also guess they respect me more because I haven't gone bonkers there yet. 

 

I don't think thats something to be proud of or joke about. Alot of other people have been complaining about you recently, I don't like to take sides or say stuff, especially as I'm still quite new here, but I have to say i've noticed it as well and it aint good, especially when you start making fon of it

 

[/offtopic]

Link to comment
https://gtaforums.com/topic/159751-the-mission-builder-thread/#findComment-2262571
Share on other sites

Barton Waterduck

GTA Vice City Mission Builder v1.41 released.

 

New:

 

DEFINE OBJECT BARREL4; object number irrelevant now...0107: $898 = create_object #BARREL4 at  284.3 -312.4  10.9

 

more in the readme. Links in my signature.

And I could have tested it more but I think blush.gif it works (been playing half life 2 and counter strike (against the cheaters)).

 

Edited by Barton Waterduck
Link to comment
https://gtaforums.com/topic/159751-the-mission-builder-thread/#findComment-2272356
Share on other sites

Barton Waterduck

I have decided to take down my GTA SA PS2 Mission Builder from my homepages since Rockstar regards any PS2 modding tools as warez tools. I have done this mostly to prevent my homepages from being taken down by my ISP's and possibly loosing my ISP's accounts. If modifying the game isn't against the forum rules at this time, I'm sure it will be pretty soon. This doesn't mean I have given up on modding my own version of the game. It simply means I can't release anything to the public. If any of you are still interrested in my work, just send me a PM and I will see what I can do.

 

Link to comment
https://gtaforums.com/topic/159751-the-mission-builder-thread/#findComment-2292160
Share on other sites

  • 1 month later...
Barton Waterduck

News: Been working like the retard I am (and I'm not just saying, it's my hobby) on my GTA SA Mission Builder. It now has easier to read labels like

:Two_Player_Thread03A4: name_thread 'TPLAYER':TPLAYER_20001: wait  75 ms00D6: if  00256:   player $PLAYER_CHAR defined004D: jump_if_false ££TPLAYER_237

 

and what I posted, an ini file for custom labels (in addition to these automatically generated ones)

 

Link to comment
https://gtaforums.com/topic/159751-the-mission-builder-thread/#findComment-2452814
Share on other sites

Barton Waterduck

fidrouple posting (spelling ?)

 

OK, if anybody is interrested in helping me with the new 'customlabels.ini' and 'variables.ini' you could probably need the newest version of the SA MB.

 

GTA San Andreas, PS2 version, Mission Builder v0.33:

http://home.tiscali.no/donkey99/SA-MB033.zip

 

New stuff in version 0.33:

- Proper support for custom global variables and arrays

(because the new memory system has finally been debugged).

- Setting up an array at address 0 didn't work. Fixed.

- New label format in decompiler.

- Decompiler now supports custom label names.

- Custom global variable names removed from the 'sascm.ini'

and put in 'variables.ini' with a new easier format.

 

New stuff in version 0.32:

- Opcode parameter definition 't%' in the 'SAscm.ini' file was changed

to use objects from the 'default.ide' file only while 'o%' is used

with any objects.

- Named references to the second segment objects added.

- Original mission titles added to hardcoded mission descriptions.

- Some cosmetical bugs fixed. :-)

 

The 0.32 version was never released (I think).

 

Don't use the 0.31 version or earlier versions. They should never have been released.

They don't handle any custom global variables correctly.

Edited by Barton Waterduck
Link to comment
https://gtaforums.com/topic/159751-the-mission-builder-thread/#findComment-2453300
Share on other sites

Craig Kostelecky

I like the updates you've done here Barton. This is actually readable in its original decompiled form. I'll try to help you out with the variable and label names when LC isn't keeping me too busy. I'll give you a few variables now.

 

115, CUTSCENE_PLAYER798, OYSTERS_COLLECTED (stat 243 is Oysters collected)799, HORSESHOES_COLLECTED (stat 241)800, PHOTO_OPS_TAKEN (stat 231)801, TAGS_PAINTED815, PERCENT_COMPLETED

That's all for now. I'll check out more later.

Link to comment
https://gtaforums.com/topic/159751-the-mission-builder-thread/#findComment-2453390
Share on other sites

Barton: I tried 0.33 and it couldn't find any files, but they are definately there:

 

I eventually forced it to see the file by copying all the builder files to my data folder, it could see all those, but still couldn't see the main.scm file in the same folder, so I made 'copy of main.scm' , it found that (but still not the original) and I could open that.

 

Edit: got the pics:

 

user posted image

user posted image

Edited by Y_Less
Link to comment
https://gtaforums.com/topic/159751-the-mission-builder-thread/#findComment-2453512
Share on other sites

Barton Waterduck

 

Barton: I tried 0.33 and it couldn't find any files, but they are definately there:

 

I eventually forced it to see the file by copying all the builder files to my data folder, it could see all those, but still couldn't see the main.scm file in the same folder, so I made 'copy of main.scm' , it found that (but still not the original) and I could open that.

 

Edit: got the pics:

 

I did some tests. It seems it can't see files with certain properties, like hidden files. That's bad. Needs fixing. I guess that's what you get with borrowed codes. tounge.gif

Edited by Barton Waterduck
Link to comment
https://gtaforums.com/topic/159751-the-mission-builder-thread/#findComment-2453937
Share on other sites

Barton Waterduck

Ok, I removed the file properties code in that "open file" dialog so it should accept anything. There still could be problems. If there are, I need to replace codes in the compiler and decompiler with "lower level" code (which I already have). Use the same link to get it.

 

edit: Updated again. Nothing in the MB checks for file properties so it should be compatible with anything. When a file is deleted, all file properties are removed before the file is deleted. There probably are some restrictions to that anyway, like, you shouldn't get administrator rights on a network you usually don't have administrator rights to by simply using this version of the MB. Not sure though. You never know with Microsoft. lol.gif

 

Edited by Barton Waterduck
Link to comment
https://gtaforums.com/topic/159751-the-mission-builder-thread/#findComment-2454121
Share on other sites

Barton Waterduck

Found another bug. Memory related. All the memory the MB uses is allocated before it's used. The amount needed was estimated when the code was written and the code was initially written to be used with GTA VC. GTA SA has code that combined with the way the MB handles the new arrays gives you more data in each opcode parameter in the source code, like "$50byteslongcustomvariable50byteslongcustomvariable($50byteslongcustomvariable50byteslongcustomvariabl2,255i)". This parameter is 109 characters long. The current limit is about 51. Needs fixing.

 

Link to comment
https://gtaforums.com/topic/159751-the-mission-builder-thread/#findComment-2460927
Share on other sites

Barton Waterduck

News: SA MB converter seems to work now. Converted an older code to v0.33, recompiled and compared original scm with recompiled scm (all of it) (auto compare tool), 100% all ok. Could still be bugs in there though.

 

Memory report of the global variables when compile complete (in a messagebox). I guess it's a bit confusing at the moment. It reads like this (original code, recompile):

DMA global variable range: $2 - $10937RAM global variable range: $10938 - $10940RAM global variables used: $10940 - $10940  (allocated from top)Free: $2 (8 bytes)    Total: $10940  (43760 bytes)

 

The point of it is to show how the "Direct Memory Access" system works, how many custom global variables that can be added, where those are added, the general amount of "4-bytes" variables you can fit in there and how much memory is allocated with DEFINE MEMORY.

 

Example, if you want to create a massive mod that requires DMA support, you can control where the MB places any custom global variables (that isn't part of the "DMA system"). If you want to allocate a total of 40 kb memory to be used with global variables and 20 of those to be used for "direct memory addressing", you simply write this anywhere in the code:

$5000 = 0; because 5000 X 4 = 20000 = 20kb

This makes the MB use the part of the memory above the 20kb for custom global variables. And if you haven't read the readme yet, all global variables that starts with a number is allocated at the address equals the number multiplied by 4. It also does this with 8-byte and 16-byte strings to make things easier. It even supports direct memory access using custom global variables at any address by simply using $<number><variable name>.

 

If you haven't got it yet, read on:

 

DMA global variable range: $2 - $10937

 

This is the memory area reserved for global variables placed wherever you want them in the memory. These global variables usually looks like the ones in the code block above.

 

RAM global variable range: $10938 - $10940

 

This is the memory area used by the MB to automatically place custom global variables at any free address.

 

RAM global variables used: $10940 - $10940  (allocated from top)

 

The amount of free memory in this memory area is reported in the end of the memory report. In this example, only 2 global variables are free because the $10940 variable represents the end of the memory and you can put anything there because it ends there so the largest usable global variable in this example is $10939. The memory report shows how many "4-byte" global variables you can fit. If you add "8-byte" or "16-byte" variables, 2 or 4 of these global variable positions are used for one of those. This means that if you create a "8-byte" custom global variable like s$Test to the code and recompile, it uses both the 2 free global variable positions in the example above and it changes to this:

 

DMA global variable range: $2 - $10937RAM global variable range: $10938 - $10940RAM global variables used: $10938 - $10940  (allocated from top)Free: $0 (0 bytes)    Total: $10940  (43760 bytes)

 

Edited by Barton Waterduck
Link to comment
https://gtaforums.com/topic/159751-the-mission-builder-thread/#findComment-2466139
Share on other sites

Barton Waterduck

If any of you have looked for global variables in the SA MB source code, you may have noticed that the arrays in the external scripts looks a bit off. The reason is I forgot to add a function to actually scan both the 'main.scm' and the 'script.img' for arrays. Only the 'main.scm' is scanned. Bummer. lol.gif

 

Link to comment
https://gtaforums.com/topic/159751-the-mission-builder-thread/#findComment-2483688
Share on other sites

Barton Waterduck

uh.. there may or may not be a 3D script editor out that may or may not support the MB format. Mostly because the MB format changes more often than some people changes their underware. So I was thinking about adding a GTAMA-to-MB source code converter and I would then ofcourse need to write a MB-to-GTAMA converter for it to make any sense at all. Not sure if CyQ has any plans for updating the current format of his new assembler/disassembler for GTA SA. Not sure if I even dare to ask. Me being so scared and all. lol.gif Anyway, I'm just posting.

 

Link to comment
https://gtaforums.com/topic/159751-the-mission-builder-thread/#findComment-2488257
Share on other sites

Barton,

 

Creating a MB <-> GTAMA converter would really be great, and I'm sure CyQ will be happy to keep you informed on any changes he will make to his format (which are not as frequent as yours tounge.gif )

 

I feel such a converter could bring the scm modding community closer together, and lets newer people (mostly MB) learn and re-use stuff from the veterans (mostly GTAMA).

 

Even nicer would be if you make your syntax look more like GTAMA in general, but keep the good and distictive features:

• keep the shorthand notation for math opcodes.

• keep the automatic type ( int/float) detection, or even improve it to solve (var1 = var2)-type situations.

• keep the ARAY functionality in VC, although a more efficient implementation could be made.

• loose the need for those hex-opcodes, by using distinct opcode names (preferably use the GTAMA names)

• restore the order of the parameters to that in the scm-file.

 

 

I'm not trying to choose sides here, just trying to bring the community closer together.

 

PatrickW

Link to comment
https://gtaforums.com/topic/159751-the-mission-builder-thread/#findComment-2488318
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
  • 0 User Currently Viewing
    0 members, 0 Anonymous, 0 Guests

×
×
  • Create New...

Important Information

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