Bully-Board

Bully Modding Section => Bully Modding => MadmaN and Steman's Corner => Topic started by: MadmaN on February 24, 2012, 02:38:16 PM

Title: Status on decompiling the Bully Lua Scripts
Post by: MadmaN on February 24, 2012, 02:38:16 PM
Alrite.

Figured I would go ahead and let the cat out of the bag and give everyone a status report on my efforts to decompile the lua scripts in Bully.

I have managed to convert every script into Lua bytecode which is similar to assembly in the way it looks and while these bytecode scripts can be totally rewritten to be finally used in Bully, I will hold off on rewriting them because until they are rewritten, they are totally useless in their current form to everyone here.

However,

I managed to get hold of NTAuthority due to a helpful hint on where to find him by BullyImod123 and managed to not only explain things to him but also got a nice reply back from him.

He will be looking to see if he still has the modified sources to his decompiler and if he has them, he will be sending them to me which will allow me to fully decompile the Lua scripts Bully uses. This will mean we can finally mod the game fully and there will be no further need to do much hex editing for fighting styles or modifying the mission scripts becasue we will have a way to work around all of that the proper way, since I am fluent in Lua scripting and I do know exactly how the scripts work now and how they were coded to begin with due to the bytecode I was able to convert everything to.

If he finds the decompiler and sends it to me, while I won't release the decompiler unless he gives me permission to do otherwise with credits to him for that....I WILL however release every script in decompiled form already packaged back up as a brand new scripts.img with its scripts.dir file present. These Lua scripts do not need to be compiled in order for the game to run them because the game has a Lua interpreter built into its code like any game that uses the Lua scripting language. They only need to be renamed from script.lua to script.lur - only using that as a example....and packed back into a new .img file which the game will then load as if it was the original.

This will allow us to make custom missions, change fighting styles and peds around a little bit better, enable the debugging system fully, basicly customize every part of the game since it is all controlled via scripts.

Can even edit the weapons and ammo counters too and make infinite ammo or somthing like that. Whatever you want to do.

On the note that IF NTAuthority no longer has the modified decompiler sources, I will see if he will be willing to take a little time away from his rather busy schedule and render a little bit of assistance to us in getting things taken care of real fast since he is the only one to have actually decompiled any part of the scripts where all I have done was just get the bytecode from them which while a lot more readable, is totally useless to everyone here except to someone like myself that knows how to convert bytecode into Lua scripting (very hard task) .

I will update this topic as things unfold and cannot give any eta on anything yet as it is too early.

If anyone wants to take a look at the bytecode I have gotten,I will be making a seperate topic also a sticky with all of the scripts in its own post as a way to keep them in a safe place and also to see if anyone here would be willing to assist me in rewriting things if NTAuthority cannot locate his modified decompiler sources.

I am making this topic a sticky for the time being.

*UPDATE - 3/25/2012*

All of the bully scripts are in LUA source format atm and are in the process of being rewritten due to portions of the scripts missing or being a little bit bugged up on the syntax. Credit to this goes to Fred Tetra who gave me a very big headstart in providing some script sources to work with that I have been since working on rewriting and repairing so we can use them.
Title: Re: Status on decompiling the Bully Lua Scripts
Post by: -мα∂нαттяιยขк- on February 24, 2012, 04:40:00 PM
Amazing! good luck
Title: Re: Status on decompiling the Bully Lua Scripts
Post by: Jay on February 24, 2012, 04:54:41 PM
Nice work Madman! Would be exciting to make new missions and stuff :)
Title: Re: Status on decompiling the Bully Lua Scripts
Post by: MadmaN on February 24, 2012, 05:04:00 PM
That is basicly the plan.

Once I get the scripts released, I will publish a complete tutorial on how to edit them since I will go out on a limb and assume that I am currently the only one here that knows how to code in lua?

I am going to go ahead and update my first post with some of the scripts in Lua ByteCode format to better illustrate what ByteCode actually is.

I cannot give a eta on when any of this will be ready for the public but will state that I will continue working on this as this is my main goal atm anyways. My mega-mod is on hold until then since I cannot finish it without access to the scripts anyways.

I will however here soon release my interiors mod as promised so people can explore finally the interiors how they were meant to be. I will post all relevent info on that in a seperate topic.
Title: Re: Status on decompiling the Bully Lua Scripts
Post by: Bugs Bunny on March 09, 2012, 07:57:27 AM
I'm most likely late with this responce, but I want to say you're quite amazing at this stuff! I can't believe this will actually become possible.

Great Job Madman!
Title: Re: Status on decompiling the Bully Lua Scripts
Post by: MadmaN on March 10, 2012, 03:17:41 AM
Not a late post by far.

A small update........

I have been working with another modder who has been sharing various bits of info regarding the scripts and also shared with me mostly decompiled versions of the scripts and I have to say that what is actually in the scripts is amazing. I cannot take the credit for the scripts being mostly decompiled because this particular modder had done this a couple of years ago and only recently got hold of me to share what he had.

I am working with him to fix and rewrite what is missing from the scripts and once things are done then you all should expect a release from both of us. We also have a few special things planned and hopefully will get done but I won't say just what until a concrete idea and some work gets done.

For the sake of keeping the peace I will not name who I am working with and let him decide whether to announce himself or not...that will be his choice since neither of us wants to get swamped with a lot of begging since we are really close to finally giving people what they have been asking for since the beginning.

I will state that as of now custom missions are indeed fully possible as well as many other feats and all by using the scripts in decompiled form.

These scripts indeed do not need to be compiled in order for bully to run them as I have verified this with one script that is mostly done and for the moment I will be concentrating on the most important scripts and release one or two as they get done and bug free.

I originally was not going to post just yet but figured I would give everyone at the very least a status update on how things are shaping up so expect more news soon.
Title: Re: Status on decompiling the Bully Lua Scripts
Post by: DBOWNZZ on March 10, 2012, 04:24:08 PM
Awesome job Madman also i've got some good news aswell. OK. u know i said my laptop was slow well iv'e reset it to factory default settings so it's faster than ever so now i can mod bully again. And do anything else:D
Title: Re: Status on decompiling the Bully Lua Scripts
Post by: MadmaN on March 11, 2012, 02:50:42 PM
cool! Congrats on fixing it.

If you were interested in assisting me with testing and some other stuff you are more then welcome.
Title: Re: Status on decompiling the Bully Lua Scripts
Post by: Al Arlington on March 14, 2012, 05:10:45 PM

I have managed to convert every script into Lua bytecode which is similar to assembly in the way it looks and while these bytecode scripts can be totally rewritten to be finally used in Bully, I will hold off on rewriting them because until they are rewritten, they are totally useless in their current form to everyone here.
What are they written like?
Title: Re: Status on decompiling the Bully Lua Scripts
Post by: UltimateGamer1 on March 23, 2012, 01:42:14 AM
@Madman Well mad I will try to work with you on decompiling the scripts. I will be a third party member, if you know what I mean lol. I have modded Halo before but I don't know how to work these codes. I tried creating a character selector when I tried it, it crashed on me so I just gave up and deleted the files. I will try to help out and decompile some scripts. I will do boss missions only then other missions. I noticed that Gman123 has a script hook in his video's he can stop characters from fighting I noticed the first time I watched his Vance and Lefty episode thing. I'll download Bully SE again and decompile the bully.exe. Which files have you decompiled. The Bully.exe or the Scripts.dir and Scripts.img files. I need to know. I'll try creating some custom spawn points for interiors and ped characters. When you upload the files to mediafire or mediashare or wherever put a password on the file so you can watch out for leechers. Ask them to get the code sent first to test out the mods. I just don't want all your hard work to go to waist. Also we can finish the doors instead of just doing it by HEX. We can try to get every door scripted to it's rightful interior and the same with the exterior and interior markers it may take time but patience is needed the more help the better. Just tell me what to script or modify and i'll take a look at it and try it out. Are there allot of files with this though Halo had a 4gb or more of scripts took up some space i'll remove the same after because I am getting a new laptop anyway,
Rather than that i'll be available constantly on b-b at night so try to get on then. I wish everyone could pitch in and help but script modding is hard I really don't understand it as much as I used to I haven't done this for 3 years lol. I'll get a move on after I decompile. Have a good time modding lol :).
Title: Re: Status on decompiling the Bully Lua Scripts
Post by: Red Blaster on March 23, 2012, 04:08:10 AM
G-Man said he doesn't have a scripthook.
Title: Re: Status on decompiling the Bully Lua Scripts
Post by: e32011 on March 29, 2012, 06:06:16 PM
That is basicly the plan.

Once I get the scripts released, I will publish a complete tutorial on how to edit them since I will go out on a limb and assume that I am currently the only one here that knows how to code in lua?

I am going to go ahead and update my first post with some of the scripts in Lua ByteCode format to better illustrate what ByteCode actually is.

I cannot give a eta on when any of this will be ready for the public but will state that I will continue working on this as this is my main goal atm anyways. My mega-mod is on hold until then since I cannot finish it without access to the scripts anyways.

I will however here soon release my interiors mod as promised so people can explore finally the interiors how they were meant to be. I will post all relevent info on that in a seperate topic.
Madman i do not know what i did but i can enter into all interiors now
Title: Re: Status on decompiling the Bully Lua Scripts
Post by: MadmaN on March 30, 2012, 11:19:19 PM
What you probably did was edited the .dat files inside of the trigger.img file. Setting the doors in each .dat file from locked=true to locked=false likely did that.
Title: Re: Status on decompiling the Bully Lua Scripts
Post by: e32011 on March 31, 2012, 09:14:18 AM
Its kinda weird how i did that?   ;)
Title: Re: Status on decompiling the Bully Lua Scripts
Post by: e32011 on March 31, 2012, 05:07:52 PM
Madman If you enter any classroom you cannot get out but autoshop u can. so you would have to restart your game and which means u lost your save data. :mad:
Title: Re: Status on decompiling the Bully Lua Scripts
Post by: MadmaN on March 31, 2012, 08:10:45 PM
I have all of the interiors fully working aside from a couple classrooms that need a few script edits due to the doors for them being disabled in the lua scripts rather then the trigger file.

I Have basicly everything but the roof working...tho the roof doors work...jsut you spawn falling through the map rather then on the roof where you should be. That is becasue the roof is not spawned in free roam until the final mission.
Title: Re: Status on decompiling the Bully Lua Scripts
Post by: UltimateGamer1 on April 01, 2012, 01:23:40 AM
If you use Stemans script.img you might be able to spawn the Roof. He spawned the Roof in free roam which you should probably already know.
Title: Re: Status on decompiling the Bully Lua Scripts
Post by: MadmaN on April 03, 2012, 02:08:06 AM
Yea, that I know and have known it since Steman and I teamed up for the releases we both put out together. I know how he managed to spawn it but I am trying to do this without executing any extra scripts just to do that and simply just by editing the doors directly via trigger. While I have the areacode and coords correct....really the only way to spawn it properly is to take out the code that spawns it in the first place (located in the script for the final fight against gary) and stick that bit of code in another script...probably a library script that is access by all other scripts so that its loaded at all times during free roam.

I will probably take another look at his mod for that and see if I can find an alternate way for now since it will be some time yet before I can crank out releases with the lua scripts since my modding partner in this project is helping me with several parts of this and both of us are working to get things done so the community can use them.

It will just take a bit before I can do everything I planned out when I first started this....but it will eventually get done.
Title: Re: Status on decompiling the Bully Lua Scripts
Post by: holynaruto on February 25, 2013, 07:07:50 PM
 Its been a while madmaN and I just wanted to ask how it going with the decompiling. I hope you made some awesome progress I wish I could help you but I can barely mod ide with notepad  without crashing xD. Btw its a bit late but happy new year
Title: Re: Status on decompiling the Bully Lua Scripts
Post by: Evolution on February 25, 2013, 07:16:23 PM
^ Uhhh, he has.
Title: Re: Status on decompiling the Bully Lua Scripts
Post by: holynaruto on February 25, 2013, 07:21:43 PM
He posted that last year ._.
Title: Re: Status on decompiling the Bully Lua Scripts
Post by: Evolution on February 25, 2013, 07:34:19 PM
-_-

He's already released LUA stuff, it's all out now.
Title: Re: Status on decompiling the Bully Lua Scripts
Post by: Red Blaster on February 25, 2013, 07:41:46 PM
I think he may be referring to full decompiling, in which case, we have yet to achieve that.
Title: Re: Status on decompiling the Bully Lua Scripts
Post by: holynaruto on February 25, 2013, 07:55:04 PM
Yea what Red said can't wait for the day when Darby full boss style is mapped to buttons assuming that is 1 of the many things we can do when madmaN achieves this remarkable task
Title: Re: Status on decompiling the Bully Lua Scripts
Post by: Evolution on February 25, 2013, 08:02:51 PM
^ Lol.... Alright  :hmm:
Title: Re: Status on decompiling the Bully Lua Scripts
Post by: Red Blaster on February 26, 2013, 12:35:50 PM
Yea what Red said can't wait for the day when Darby full boss style is mapped to buttons assuming that is 1 of the many things we can do when madmaN achieves this remarkable task

Mad is AWOL...might be that way for a while.

But Rise to Honor has made progress in that field.

I haven't gotten back to lua scripting research yet. Been taking a very long break.
Title: Re: Status on decompiling the Bully Lua Scripts
Post by: MadmaN on March 10, 2013, 01:12:28 PM
I have been awol due to too many issues in my personal life that have been needing attention so modding has kinda been taking a back seat so to speak. I am back though to modding again and will be resuming work on all my projects (long list as ever) and have a few things I am about to release to everyone that might tide a few ppl over...hehehe.