Bully-Board

Bully Modding Section => Bully Modding => MadmaN and Steman's Corner => Topic started by: MadmaN on September 28, 2011, 02:55:12 AM

Title: Bully File Editor *beta testing thread*
Post by: MadmaN on September 28, 2011, 02:55:12 AM
I am in the process of coding a file editor for Bully that will let you edit the various dat, cfg, ide, etc files in a easy to understand layout. I will be posting details here within the next day or two depending on how things go and how much time I get to work on this. Anyone that wishes to take part in beta testing this editor should let me know in this thread and I will pm the files to the testers. I also have in the works a possible savegame editor as well but I have not yet decided if or when I will work on that project since I am also still working to crack interiors fully.

*UPDATE*

The editor is now in beta stage and those that wish to test need to apply here. I will keep a list of testers and will accept no more then 6 testers. I must ask those that are testing to not share or give out the beta version due to the fact that it will most likely have bugs and is not fully finished. Once I consider it worthy of release to the general public I will update this thread and make bullyboard the official download spot for this and any other applications for bully that I make.

@ all testers
There are some gta flags leftover in this since I originally did this app for gta san andreas and vice city during my gta modding days. Was lucky enough to recover the source to this from one of my damaged hdds I recovered from my house fire and I am currently removing all the gta file handlers and coding bully specific file handlers due to some of the formats being different.

Also please note: make backup copies of any file you plan to edit with this program since it removes any commenting from the file when saving it. I will be fixing this bug since for some reason the app it detecting # as whitespace and so it saves the file with any # symbol removed.

other then that I hope that ppl will find this tool useful and eventually my goal is to make this tool able to edit almost every file for bully, tho wether that happens or not depends on if I can reverse engineer some of the other files that we all need to be able to edit easier.

Everyone that applies here (till I get 6 testers) will get the beta copy sent via pm.

Here are screenshots of the editor so everyone knows what this looks like and can do:

splash screen: (http://i54.tinypic.com/2ihxcv9.png)

Editing the pedstats.dat file: (http://i55.tinypic.com/8x5u8p.png)

Editing the handling.cfg file: (http://i51.tinypic.com/2qcdpuv.png)

Editing the area bounding box file: (http://i55.tinypic.com/2me77g3.png)

Editing one of the dat files from trigger.img, part1: (http://i54.tinypic.com/333h8jc.png)

Editing one of the dat files from trigger.img, part2: (http://i56.tinypic.com/263artx.png)
Title: Re: Bully File Editor *comming soon*
Post by: eellliioottt123 on September 28, 2011, 02:43:29 PM
I am in the process of coding a file editor for Bully that will let you edit the various dat, cfg, ide, etc files in a easy to understand layout. I will be posting details here within the next day or two depending on how things go and how much time I get to work on this. Anyone that wishes to take part in beta testing this editor should let me know in this thread and I will pm the files to the testers. I also have in the works a possible savegame editor as well but I have not yet decided if or when I will work on that project since I am also still working to crack interiors fully.

I can beta test.
Title: Re: Bully File Editor *comming soon*
Post by: Rise on September 28, 2011, 07:27:25 PM
I am in the process of coding a file editor for Bully that will let you edit the various dat, cfg, ide, etc files in a easy to understand layout. I will be posting details here within the next day or two depending on how things go and how much time I get to work on this. Anyone that wishes to take part in beta testing this editor should let me know in this thread and I will pm the files to the testers. I also have in the works a possible savegame editor as well but I have not yet decided if or when I will work on that project since I am also still working to crack interiors fully.
I can beta test also
Title: Re: Bully File Editor *beta testing thread*
Post by: MadmaN on September 28, 2011, 09:54:47 PM
@ eellliioottt123, BullyIMod123

I sent pm's to you both with the link to download it. Accidently screwed the title up to one pm  :unsure:
Title: Re: Bully File Editor *beta testing thread*
Post by: Rise on September 29, 2011, 12:29:19 AM
@ eellliioottt123, BullyIMod123

I sent pm's to you both with the link to download it. Accidently screwed the title up to one pm  :unsure:
hey this is amazing but it gives me a error when i try to open a ide
Title: Re: Bully File Editor *beta testing thread*
Post by: MadmaN on September 29, 2011, 12:31:31 AM
k, I will check that out.
Title: Re: Bully File Editor *beta testing thread*
Post by: MadmaN on September 29, 2011, 12:23:17 PM
Ok, That problem you were having is definately a file format issue and I should have that fixed by mid to late afternoon today and I will update the download link. I am also working to spice up the interface a little bit and if all goes well that should also be done by later today or late tonite. I do however need help getting the format of the default.idb file figured out tho since the other .ide files are not even supposed to be with the game since those are pieces of the game script source, but I have yet to figure out what format the .idb files even are and i have yet to figure out if they are compiled somehow or of they are just simply encoded. Once those are figured out I will add the ability to edit and make/compile/encode new ones with my bully editor which that will allow fighting style editing with a easy to use tool. At least that is what my goal is.
@BullyIMod123 BTW, have you noticed any other bugs or issues editing files other then what you have said so far? My biggest worry is file corruption which hopefully never happens since this editor is supposed to auto-detect the format the script files are in and allow them to be edited. Even tho yes you can edit the same files with notepad...etc this tool just makes it far easier and since the spaces between columns is very important....this will help new modders edit the game in a much easier to understand way.

@everyone   
I will be making a series of .pdf files that will have the relevent information regarding the comments thats in each of the editable files that this editor is for. This will make a permanent copy of them to look at if needed since I still have not figured out how to get the editor to save the comments and not strip them out. I am also working on a few other things as well for fun that I will release in the next several days or so as time permits.
Title: Re: Bully File Editor *beta testing thread*
Post by: Red Blaster on September 29, 2011, 03:19:47 PM
I would beta test the ide, but like you said, if the source is within the encoded idb file, then that's not my thing. And I have no clue on how to edit the trigger and other stuff, so...
Title: Re: Bully File Editor *beta testing thread*
Post by: InsanityGames on September 29, 2011, 03:28:42 PM
i can beta test to because i know coding ^^ i make my own graphics mod
its your choice :)
Title: Re: Bully File Editor *beta testing thread*
Post by: MadmaN on September 29, 2011, 03:29:03 PM
Editing the trigger.img file is easy. All you do is extract all the files inside trigger.img to a directory named however you want. Then you can use my bully editor im working on to edit the files. Atm most the files show up as a unknown format for bully since I am currently decoding the file formats and constructing the proper code to detect them properly. But they can still be edited. The ide files should be edited with a text editor like notepad++ until I get that file format working correct since atm you cant save a ide file since its not detected right.
Title: Re: Bully File Editor *beta testing thread*
Post by: MadmaN on September 29, 2011, 03:30:34 PM
@insanitygames.....cool with me since the more testers the better off I am in getting this editor finished. I will send you a link soon as I update the editor since I am currently setting it so the pedstats.dat file displays correct and has the columns named properly.
Title: Re: Bully File Editor *beta testing thread*
Post by: MadmaN on September 29, 2011, 03:33:57 PM
I could however use your help decoding the default.idb file since if you look at the default.ide it happens to be the source to default.idb. If I can get that file format figured out then fighting style editing will be easy as pie to do without the need to hex edit. :)
Title: Re: Bully File Editor *beta testing thread*
Post by: InsanityGames on September 29, 2011, 03:35:04 PM
idk you got msn? or xfire? (better to talk)
Title: Re: Bully File Editor *beta testing thread*
Post by: MadmaN on September 29, 2011, 03:38:14 PM
I have xfire. You and I talked before on xfire and you should already have me added. I really dont use msn or any the other chat protocols out there since xfire is what my clan uses as a whole. incase you do somehow not have it my xfire is madmancorp
Title: Re: Bully File Editor *beta testing thread*
Post by: InsanityGames on September 29, 2011, 03:39:43 PM
OH i remember good old times :D
Title: Re: Bully File Editor *beta testing thread*
Post by: MadmaN on September 29, 2011, 06:14:48 PM
hehe yup  :laugh:
Title: Re: Bully File Editor *beta testing thread*
Post by: Rise on September 30, 2011, 12:46:01 AM
Editing the trigger.img file is easy. All you do is extract all the files inside trigger.img to a directory named however you want. Then you can use my bully editor im working on to edit the files. Atm most the files show up as a unknown format for bully since I am currently decoding the file formats and constructing the proper code to detect them properly. But they can still be edited. The ide files should be edited with a text editor like notepad++ until I get that file format working correct since atm you cant save a ide file since its not detected right.
madman add me on xfire my name is tuffjtags
Title: Re: Bully File Editor *beta testing thread*
Post by: bullseye1001 on November 26, 2011, 04:41:47 PM
did you get any progress with the idb files? Im assuming its abbreviated from the old gta files "Item definition" to "Item definition binary" ? GTASA also uses binary files for speed in loading but unsure if that's the case.

add me to your beta testers, if you need another. i have plenty of exp. doing beta reports for homebrew applications.

Title: Re: Bully File Editor *beta testing thread*
Post by: Red Blaster on November 26, 2011, 05:08:00 PM
Hey bullseye, welcome aboard B-B.
Title: Re: Bully File Editor *beta testing thread*
Post by: MadmaN on November 27, 2011, 03:27:10 AM
I will add you to the testers list as soon as I finish up with the next build...and yes you are correct that the .idb files are .ide aka item definition files encoded in a format that is not quite binary...but not quite text either...its a format that kinda eludes me on identifying it since I can say for a certainty that the .idb files are not compiled versions since you cannot compile a .ide since it is technically not a script in the strictest sense of the word...not like lua or perl...or python...etc it is more of a text file used not much different then a normal text based configuration file and I strongly suspect that the file is just given some kind of custom encoding that is for the moment unknown to me.....since if you compare the contents of the default.idb with default.ide....it has the exact same contents...aside from the fact that .idb files seem to have a good portion of the content encoded so you cannot see everything. If I can figure out how the .idb files are generated....then the .ide files can be used to make replacements...since the ide files that are included with the pc version of bully were actually not meant to be included since they are actually not used directly by the game...they are infact the source files for the .idb files that the game actually uses....and I can say that simply renaming a .ide to .idb and replacing it in the img archive does not work...just crashes the game.
Title: Re: Bully File Editor *beta testing thread*
Post by: bullseye1001 on November 27, 2011, 06:33:59 AM
Here's a few things i noticed this morning, first a warm welcome to the boards and an interesting response. Thanks :)

I'm not by any means a coder - this stuff could've been done by anyone i guess.
If you look at a comparison of default.ide and default.idb in hex things start to make sense:

1. Section names are reversed in .idb version

(http://img267.imageshack.us/img267/4531/reversed.png)

2. some numeric values, in this case the indexes are converted to  16bit short of the corresponding .ide decimal value

(http://img850.imageshack.us/img850/9967/defaultide.png)
(http://img580.imageshack.us/img580/1849/defaultidb.png)


edit....

Simply the idb / ipb formats follow these rules:

1. Strip all comments
2. Reverse the section text ie. "peds" changes to "sdep" (pc version)
3. Leave all text inside a section unchanged - including item names that use numbers. ie "special17"
4. Convert all carriage returns 0D0A to a single null byte 00
5. With the exception above convert all numbers in 4-byte sequence to 32-bit float or 16bit short (far as ive seen) The portions with a decimal place are in the IDE 2dfx section and more generally in the ipb's, these parts are 32-bit float. Just how the interpreter distinguishes these different formats of numbers is unk for now.
6. IDK about all other files in this type, the "end" declaration is not present in default.idb like in default.ide. Instead it repeats twice the last index value (10905)
7. Padded to be dividable by 512 2048 bytes ?

Thats all i can do without learning a programming language and coding something to deal with these rules.

over to you Madman..
Title: Re: Bully File Editor *beta testing thread*
Post by: MadmaN on November 27, 2011, 06:01:33 PM
heh....I came to the very same conclusions myself so good work on that. there are a few other things that are different which is some light binary code as well which leads me to still conclude that the file is simply encoded to a different format other then plain jane text that notepad can edit.....notepad++ can open the file but you will see NULL and other things where the whitespace is so I think it is just a matter of locating the proper encoding it is....unless I am just missing my guess entirely and it is in fact somehow compiled into a semi binary format the game understands. I have been looking at some clues in the default.ide near the bottom but they dont tell a huge amount.
Title: Re: Bully File Editor *beta testing thread*
Post by: DrgoonStormer on January 27, 2013, 12:15:41 PM
I could test.
Title: Re: Bully File Editor *beta testing thread*
Post by: MadmaN on January 27, 2013, 12:28:39 PM
It will be a while yet before I get around to getting a new version for testing ready since I have been concentrating on other things as of late....but still plan to do more work with the file editor soon enough.
Title: Re: Bully File Editor *beta testing thread*
Post by: Shrimp on June 20, 2015, 09:06:14 PM
Is this even alive? If so, I'd love to try this boy out. Probably old and abandoned, I like roaming the abandoned room's of B-B. Hehe.

Anyway, is this still alive? I would really love trying this out. Although it's 2 year's old.
Title: Re: Bully File Editor *beta testing thread*
Post by: MadmaN on June 27, 2015, 05:17:38 PM
I may update it and redo it sometime but for now consider it a final beta. The language it is written in is pretty old and very outdated. This was a leftover gta modding tool of mine from back in the day and I converted it for bully use.