News: Welcome back to Bullworth! If you haven't already, you will need to reset your password..


Author Topic: Locked Doors and Interiors  (Read 61607 times)

0 Members and 1 Guest are viewing this topic.

Offline MadmaN

  • Bully-Board Admin Team
  • Moderator
  • Newbie
  • *****
  • Posts: 0
  • Gender: Male
  • Biblio-Techa Mods (retired)
    • View Profile
Re: Locked Doors and Interiors
« Reply #30 on: September 25, 2011, 01:11:24 PM »
How about for now any editing of the .idb with hex should be done in the same way that has been done with the ide.img...this way most problems can be hopefully avoided but in this case...editing would be a bit easier anyways since you would only be seeing just this file and not all of them combined into one. I do highly suggest keeping backups of the ide.img in a backup folder incase somthing does not work right and go from there. If I was not concentrating so hard on the interiors I would dedicate the time to figuring that file out and how it was made so new edited ones could be painlessly made. Maybe one of the other modders could possibly take a crack at figuring out just what format the .idb really is in...since even tho this may be totally off base...I strongly suspect its a type of text encoding like utf-8 for example or utf-7....etc.

Offline eellliioottt123

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
Re: Locked Doors and Interiors
« Reply #31 on: September 25, 2011, 01:45:27 PM »
When trying to make the door markers appear I think changing pointispermanent false to true might help but I'm not sure.

Offline MadmaN

  • Bully-Board Admin Team
  • Moderator
  • Newbie
  • *****
  • Posts: 0
  • Gender: Male
  • Biblio-Techa Mods (retired)
    • View Profile
Re: Locked Doors and Interiors
« Reply #32 on: September 25, 2011, 03:54:36 PM »
I think you may have somthing there  :cool:


*EDIT

Checked that out and that flag doesn't seem to work, however that just means that it could possibly work another way. Changing the coords around doesn't really seem to be the solution either since that has a random effect...either crashing the game or causing things to not work quite right....but I am also starting to figure out more about what all the flags mean so I will experiment more with those and make a writeup of what those do according to my findings
« Last Edit: September 25, 2011, 04:31:12 PM by |XF|-MadmaN[AR] »

Offline UltimateGamer1

  • BullyLeecher
  • Full Member
  • ***
  • Posts: 189
  • Gender: Male
    • View Profile
Re: Locked Doors and Interiors
« Reply #33 on: September 26, 2011, 12:23:02 AM »
Can you upload a video of some interior mods also I think there is a file called the npc that maybe spawns characters in interiors and exteriors maybe we could crack a big mod even greater than gman. I was looking at some files and they have mission scripts.

Offline MadmaN

  • Bully-Board Admin Team
  • Moderator
  • Newbie
  • *****
  • Posts: 0
  • Gender: Male
  • Biblio-Techa Mods (retired)
    • View Profile
Re: Locked Doors and Interiors
« Reply #34 on: September 26, 2011, 01:15:36 AM »
atm I wont bother with making or uploading any vids due to low hdd space atm...since both 1tb drives i have on this pc are pretty much full due to all my ongoing projects atm. I am however working on the interior part still and just decompiled the bully.exe to assembly language and am making more headway with that since I discovered the following in the decompiled bytecode:

.data:00AE9148                 dd offset aAreaisdoorlock ; "AreaIsDoorLocked"
.data:00AE914C                 dd offset sub_5B77A0
.data:00AE9150                 dd offset aAreasetdoorloc ; "AreaSetDoorLocked"
.data:00AE9154                 dd offset sub_5B78C0
.data:00AE9158                 dd offset aAreaisdoorlo_0 ; "AreaIsDoorLockedToPeds"
.data:00AE915C                 dd offset sub_5B79E0
.data:00AE9160                 dd offset aAreasetdoorl_0 ; "AreaSetDoorLockedToPeds"
.data:00AE9164                 dd offset sub_5B7B00
.data:00AE9168                 dd offset aAreaisdooropen ; "AreaIsDoorOpen"
.data:00AE916C                 dd offset sub_5B7C20
.data:00AE9170                 dd offset aAreasetdoorope ; "AreaSetDoorOpen"



this is code that seems to suggest that the door locking part is likely hardcoded into the bully.exe and if that is the case I may be able to patch it to enable opening of any/all doors and then work on a way to change where some doors spawn the player to.

Here is another portion of the same code controlling interaction with the doors:

.rdata:00923BD8 aAreasetdoorope db 'AreaSetDoorOpen',0  ; DATA XREF: .data:00AE9170o
.rdata:00923BE8 aAreaisdooropen db 'AreaIsDoorOpen',0   ; DATA XREF: .data:00AE9168o
.rdata:00923BF7                 db    0
.rdata:00923BF8 aAreasetdoorl_0 db 'AreaSetDoorLockedToPeds',0 ; DATA XREF: .data:00AE9160o
.rdata:00923C10 aAreaisdoorlo_0 db 'AreaIsDoorLockedToPeds',0 ; DATA XREF: .data:00AE9158o
.rdata:00923C27                 db    0
.rdata:00923C28 aAreasetdoorloc db 'AreaSetDoorLocked',0 ; DATA XREF: .data:00AE9150o
.rdata:00923C3A                 db    0
.rdata:00923C3B                 db    0
.rdata:00923C3C aAreaisdoorlock db 'AreaIsDoorLocked',0 ; DATA XREF: .data:00AE9148o
.rdata:00923C4D                 db    0
.rdata:00923C4E                 db    0
.rdata:00923C4F                 db    0
« Last Edit: September 26, 2011, 01:21:33 AM by |XF|-MadmaN[AR] »

Offline MadmaN

  • Bully-Board Admin Team
  • Moderator
  • Newbie
  • *****
  • Posts: 0
  • Gender: Male
  • Biblio-Techa Mods (retired)
    • View Profile
Re: Locked Doors and Interiors
« Reply #35 on: September 26, 2011, 01:19:40 AM »
I am also working on reverse engineering some gta modding tools that I have and have made two compatible with bully fully in order to make some things more easy which I will release in their own respective threads. One such tool is a img editor that works similar to imgtool but also lets u make new .img archives from the files extracted from another .img, since this is what I have been doing to make modding way easier and painless. Another is a ped editing tool that should make editing the pedstats far easier for those that dont feel like loading the file in a text editor and trying to make sense of what to change. Both tools will be released here soon with credit given to their original authors. Doing both of these minus permission since I cannot contact either author since both projects are no longer maintained.

Offline MadmaN

  • Bully-Board Admin Team
  • Moderator
  • Newbie
  • *****
  • Posts: 0
  • Gender: Male
  • Biblio-Techa Mods (retired)
    • View Profile
Re: Locked Doors and Interiors
« Reply #36 on: September 26, 2011, 01:31:46 AM »
The game decompiled to pure assembly is extremely complex and my assembly skill is very rusy as well since I havent touched assembly since my windows 98 days making viruses using assembly...(long story there that I really dont want to get into here) so going thru all this will take some time. I am also currently downloading gamebryo which is the game engine bully uses and its related dev tools to get a idea how some of the game file formats are done all up  so hopefully I will have somthing for everyone soon regarding interiors. I will also post the fully decompiled bully.exe assembly source for anyone with assembly knowledge to take a crack at as well since all I am doing is trying to get the ball rolling on figuring out the main stuff for this game.

Offline UltimateGamer1

  • BullyLeecher
  • Full Member
  • ***
  • Posts: 189
  • Gender: Male
    • View Profile
Re: Locked Doors and Interiors
« Reply #37 on: September 26, 2011, 08:34:42 AM »
So maybe you could finally crack this game completely. The only thing is that you could extract the game scripts and everything but at what extent. They could maybe crash because of wrong coding or changing the hard-coded codes in the game. I know there is a way to change every single script in the game and even bring back every beta item that was deleted. I noticed in some game files that not only are the beta's hidden they are in the files but coded differently. There is also a way to get Jimmy to spawn at different interiors when you leave the boys dorm. Someone has managed to do this spawning some hidden interiors from modding the trigger.img its pretty cool because changing the trigger.img is a big step to figuring out the game code because I noticed the trigger.img controls most triggers meaning doors and switches. Controlling even character spawning switches. There is just allot of things in this game to mod and find out.

Offline MadmaN

  • Bully-Board Admin Team
  • Moderator
  • Newbie
  • *****
  • Posts: 0
  • Gender: Male
  • Biblio-Techa Mods (retired)
    • View Profile
Re: Locked Doors and Interiors
« Reply #38 on: September 26, 2011, 01:03:47 PM »
Yea...but what I am trying to do is avoid the current way of modding the game since changing the door on the boys dorm to spawn you elsewhere will work...but it just isnt the best way to go about this if you think about it the same way I have. Atm what my goal is is to find a override for the default.idb script and change it so the game reads the .ide versions of the scripts instead...or find a handle on some other hardcoding and just create a set of different patches to change those parts without worrying about decompiling the game and recompiling it. The game has some sort of encryption on the bully.exe that prevents the entire game from being decompiled to assembly but I did manage to get almost the entire exe decompiled which I will upload here rared up for others to take a peek at the code from since even those that dont understand assembly can make sense of some parts of it....however the decompiled exe is massive...takes up 505 mb and is a single .asm file which I have not attempted to recompile yet nor will I since there is missing code...unless I can reconstruct most of it. The game is written in visual c++ which I do know that language but there are no decompilers for visual c++ that I know of that can even come close to reconstructing all of the source code. but the assembly source will give me a handle on what areas to patch using hex since assembly gives me a better idea regarding what parts are what in the .exe when loaded into hex since most of the code in the .asm does not show up when you take a peek at the .exe with a hex editor.

The bully.exe does seem to have the door locking hardcoded in which I have put in two samples of the code in my other post above which is what has my interest since I may be able to allow all peds to open or close any door and enter whatever door they want...or even chase the players into any interior including the teachers and prefects or other adults....like for example being chased into the boys dorm by the prefects and encountering them inside the dorm after trying to run from them....since you can encounter them in the girls dorm...why not the boys dorm too?

If I am not making any sense to anyone pls let me know...lol since I am tackling the whole bully modding in a totally different direction when what others have taken.

Now if I had a surefire way to decompile the lua scripting I could do this much easier but we will see. I might try my hand at decompiling the lua into assembly bytecode and see if I can work on things that way.....its always possible that might work.
« Last Edit: September 26, 2011, 01:05:41 PM by |XF|-MadmaN[AR] »

Offline Prosecute

  • Moderator
  • Full Member
  • *****
  • Posts: 244
  • Gender: Male
    • View Profile
    • NewDayStudios
Re: Locked Doors and Interiors
« Reply #39 on: September 26, 2011, 02:57:53 PM »
...I don't see what your beef is with my method when you say "it isn't the best way", it works well, it has worked well, and its worked fine for everyone, ontop of that it can teleport the player to any custom set position right on the doorstep when you load the game, its the best way we have so far unless that dude releases his scripthook, but theirs more chance of platting fog than that happening anytime soon.
on topic i'm nearly done with the flags and i'll send you a pm about the ingame car spawner soon, i'm just finishing a few things for the upload.

Offline MadmaN

  • Bully-Board Admin Team
  • Moderator
  • Newbie
  • *****
  • Posts: 0
  • Gender: Male
  • Biblio-Techa Mods (retired)
    • View Profile
Re: Locked Doors and Interiors
« Reply #40 on: September 26, 2011, 03:35:23 PM »
ah I have no beef with it at all. Just working to figure out easier methods which would allow much more to be modded, so pls dont take offense to how I worded that...lol Not intended to be taken in a bad way.

I just happen to have a totally different approach to modding when it comes to any game. I just simply look for the easiest way to do more while making it as friendly to everyone as possible wether the person is a coder or the person is not or even if the person is brand new to computers in general...thats my goal. and in all reality, your methods do work and quite well I might add, so I have absolutely no problems with any of that.

I did figure a few things out tho regarding all the files in the ide.img.

Every file in that is just a compiled or encoded version of the same named .ide files since if you look at the console versions of the game, you will not find any of those .ide files...which means the bully devs goofed up bigtime putting those in the pc version since not a single one of those files seems to be read by the game itself, they all seem to be ignored which makes sense since they are the source files for the .idb files. I been doing some serious file analyzing to see if I can crack the format those .idb files are in since if I can get that figured out...then nearly all of our collective problems will be solved aside from finding a way to decompile the lua scripts since then the fighting styles could be changed without using a hex editor, adding custom objects to the world map anywhere you want would be doable, such as spawning the mower anywhere without having to be in a mission to get it, or even the possability of spawning custom vehicles.

That is my goal currently along with figuring out the interiors. I have already taken a look inside the decompiled bully.exe in assembly and am figuring out its workings since there is quite a lot of things hardcoded but also a lot of hints as to how some the scripts are loaded so all I need on this is just some time and maybe even a little luck, so we will see.

and again, sry if you took offense to my comment about the current way of modding not being the best way, it was never meant to be taken out of context like that and for that I apologise. :)

and far as the ingame vehicle spawner goes, I will help you with that soon as you are ready so no worries. I do wish tho that ntauthority would release the modded lua decompiler since I really would love to take a look at that. But then...I think everyone is really waiting on that one but I somehow doubt that will happen anytime soon if at all.
« Last Edit: September 26, 2011, 03:46:01 PM by |XF|-MadmaN[AR] »

Offline Red Blaster

  • The BB Arab
  • More Than Halfway There
  • *****
  • Posts: 5,649
  • Gender: Male
  • Hi
    • View Profile
Re: Locked Doors and Interiors
« Reply #41 on: September 26, 2011, 03:53:20 PM »
@Steman: I think what he's trying to say is that instead of using the boy's dorm to access different interiors, it's better to have interiors accessed through their respective doors.

Still, you were the first person to at least figure out how to enter inaccessible interiors, as well as getting the superspudgun to work, amongst other mods, so you're still a great modder in the eyes of many Bully fans. :)

@MadmaN: Do you think there's a way to access interiors without having to open doors? I ask because of the junkyard interior. Perhaps there's a way to add an entrance marker just at the path, and then an exit in the same place (in the interior version of the map)?

Also, another question I have is about the triangle markers this guy was talking about: http://bully-board.com/index.php?topic=11311.0

Have you ever seen them yourself? He says he found one under the school entrance, and under the junkyard (not sure if this is in the exterior or interior).
« Last Edit: September 26, 2011, 03:57:18 PM by Red Blaster »

Offline MadmaN

  • Bully-Board Admin Team
  • Moderator
  • Newbie
  • *****
  • Posts: 0
  • Gender: Male
  • Biblio-Techa Mods (retired)
    • View Profile
Re: Locked Doors and Interiors
« Reply #42 on: September 26, 2011, 04:05:58 PM »
@ Red Blaster

Yea you grasped what I was trying to say....lol and thanks for clearing that bit up for me since somtimes I have a hard time explaining what im trying to do clear enough.

As far as accessing interiors without opening doors, to be honest, I have never looked into that part. But i will however check into it as a alternative for the time being possibly. Far as the triangle markers goes I think I know what is being talked about there since they are the ones that show up on the radar. I have seen them before but didnt know what they were for at the time. I will investigate that as well since it might be worth checking out.

Offline Prosecute

  • Moderator
  • Full Member
  • *****
  • Posts: 244
  • Gender: Male
    • View Profile
    • NewDayStudios
Re: Locked Doors and Interiors
« Reply #43 on: September 30, 2011, 04:16:09 AM »
anyway iv'e finished the flags v1 for the moment, tell me what you think of it, i'll upload the download link tonight
Bully Scholarship Edition Hidden Interiors Mod Part 2
@madman seen as iv'e now got free time i can work on that car spawner mod with you tonight, i'll send you it and fill you in, hopefully we will get sommet workin >:D

Offline InsanityGames

  • Full Member
  • ***
  • Posts: 116
    • View Profile
Re: Locked Doors and Interiors
« Reply #44 on: September 30, 2011, 07:28:18 AM »
what coding you use for spawner?