Go Back   Novahq.net Forum > Computers > Web design and Programming

Web design and Programming Discuss website creation and other programming topics.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 07-19-2006, 11:46 AM
NateDoggzDotUU is offline NateDoggzDotUU
Registered User

Join Date: Jul 2006
Posts: 37

Important .bms->.mis?

Is there anyone here that is familiar with programming that could provide me with the source code for one of the older .bms->.mis programs for DF2 or LW? I am wanting to make one for Extreme. I am just curious if anyone knows anything about what I am talking about. If not... i guess that I will just take this on by myself.
Reply With Quote
  #2  
Old 07-19-2006, 12:43 PM
Steve is offline Steve
Steve's Avatar
Administrator

Join Date: Sep 2001
Location: 2077
Posts: 21,552

Send a message via ICQ to Steve
a lot of stuff previously has been done by Pappy over at NovaSheep: http://www.novasheep.com/home.asp

there is not a lot of people who have tried stuff like that for DF but Pappy must be one of the ones who knows the most
Reply With Quote
  #3  
Old 07-19-2006, 03:11 PM
NateDoggzDotUU is offline NateDoggzDotUU
Registered User

Join Date: Jul 2006
Posts: 37

I am checking out NovaSheep right now... I will post again if I find anything interesting... I am at work(help desk job at school) so I may not be able to do much yet. Thanks for the link!
Reply With Quote
  #4  
Old 07-24-2006, 08:58 PM
NateDoggzDotUU is offline NateDoggzDotUU
Registered User

Join Date: Jul 2006
Posts: 37

Progress...

I have been busy this past week, but today I have made some serious progress on my bms->mis converter for Extreme. It appears that the order in which items appear in the .mis file are the same for the .bms. I am now working on converting the hex information from the .bms into the plain text information in the .mis. So far it looks easy, but time consuming....

If anyone would be interested in assisting me on this project, feel free to join in. All you need is a hex editor, which I can provide. I could use some help converting the hex code for all the items. I think that this can be done I will keep you guys updated... progress may be slow depending on my free time.
Reply With Quote
  #5  
Old 07-25-2006, 09:41 PM
NateDoggzDotUU is offline NateDoggzDotUU
Registered User

Join Date: Jul 2006
Posts: 37

Each item chunk is 172 bytes.
In order to write a program to convert this information, I must know the amount of bytes between the start and end of a chunk.
I also need a table of values for the position of an item setting from the start.

This is the start of a table with a zero index for a chunk: (Start->breakpoint1)
/\/\/\/\/\/\/\/\/\/\/\/\/\/\
type_id = 0-1 byte
unknown_1 = 2 - 7 byte
unknown_2 = 8 - 12 byte
ai_guard_bit = 13 byte
ai_berserk_bit = 14 byte
ai_noshadow bit = 15 byte
ai_coward bit = 16 byte
unknown_3 = 17 - 42 byte
To be continued....
\/\/\/\/\/\/\/\/\/\/\/\/\/\/

//********** Start of item chunk

6E 03 = 837 = type_id 878
00 00 00 00 00 00 - unknown_1
56 00 00 00 - unknown_2
00 = ai_guard bit (00 = no, 01 = Blind, 02 = Guarding, 03 = Both)
08 = ai_berserk bit (00 = no, 08 = Berserk, 40 = Flying Organic, 48 = Both)
00 = ai_noshadow bit (01 = Shadow)
00 = ai_coward bit (01 = Coward, 04 = Advanced Ammo, 05 = Coward & Advaned Ammo)
FE3744010450DBFC630240000A0000006400000064000000 = 25 bytes of unknown_3

!!!!********// breakpoint 1

1000 = 16 = Minimum Engagement Distance
0000 = ??
4001 = Maximum Engagement Distance
000000000000
6400 = 100 = Weapon 1 Accuracy
6400 = 100 = Weapon 2 Accuracy
00000000000000000
3000500FFFF1E000002000000000000
F00000000000000000000000
A0000000000000000000
0007
46875673031 = iai_name ???
00 00 00 00 00 00 00 = ai_text file ????
00 00 00 = additional space for iai_name
6E756C6C = null = gen_string "null"
20 bytes of zeros
1000 = Maximum Attack Distance
0000000000000000000000000000

*********// end of item chunk

I would greatly appreciate it if someone has enough time to finish the rest of the table of indexes for the item settings. It is really simple, '00' is one byte. I just need to know how many bytes an item setting is from the start of a chunk. After that, I can write an algorithm. Any help is greatly appreciated.

Last edited by NateDoggzDotUU; 07-25-2006 at 11:54 PM.
Reply With Quote
  #6  
Old 07-26-2006, 12:02 AM
NateDoggzDotUU is offline NateDoggzDotUU
Registered User

Join Date: Jul 2006
Posts: 37

This is an item chunk

This is a chunk for an enemy soldier: 172 bytes

66030000000000005600000000000
100FE3744010450DBFC630240000A
00000064000000640000001000000
04001000000000000640064000000
00000000000000000500FFFF00000
00200000000000000FF0000000000
00000000001400000000000000000
000004C6962303100000000000000
000000006E756C6C0000000000000
00000000000000000000000000000
00000000000000000000001000000
0000000000000000000000000
Reply With Quote
  #7  
Old 07-26-2006, 12:30 PM
NateDoggzDotUU is offline NateDoggzDotUU
Registered User

Join Date: Jul 2006
Posts: 37

Finished with the item index for soldier

Each item chunk is 172 bytes.

This is the start of a table with a zero index for a chunk: (Start->breakpoint1)

/\/\/\/\/\/\/\/\/\/\/\/\/\/\

type_id = 0-1 byte
unknown_1 = 2 - 7 byte
unknown_2 = 8 - 12 byte
ai_guard_bit = 13 byte
ai_berserk_bit = 14 byte
ai_noshadow bit = 15 byte
ai_coward bit = 16 byte
unknown_changes = 17 - 28 bytes
unknown_3 = 29 - 32 byte
unknown_4 = 33 - 40 bytes
ai_min_engagement = 41 - 42 byte
unknown_setting = 43 - 44 byte
ai_max_engagement = 45 - 46 byte
unknown_settings = 47 - 52 byte
ai_weapon1_acc = 53 - 54 byte
ai_weapon2_acc = 55 - 56 byte
unknown_settings2 = 57 - 68 byte
unknown_setting2 = 69 - 76 byte
unknown_settings3 = 77 - 86
unknown_settings4 = 87 - 104
iai_name = 105 - 110
ai_text = 111 - 120
blank_space = 121 - 156
ai_max_distance = 157 - 158
unknown_settings5 = 159 - 172

\/\/\/\/\/\/\/\/\/\/\/\/\/\/

//********** Start of item chunk

6E 03 = 837 = type_id 878
00 00 00 00 00 00 - unknown_1
56 00 00 00 - unknown_2
00 = ai_guard bit (00 = no, 01 = Blind, 02 = Guarding, 03 = Both)
08 = ai_berserk bit (00 = no, 08 = Berserk, 40 = Flying Organic, 48 = Both)
00 = ai_noshadow bit (01 = Shadow)
00 = ai_coward bit (01 = Coward, 04 = Advanced Ammo, 05 = Coward & Advaned Ammo)
FE37 4401 0450 DBFC 6302 4000 = unknown_changes
0A 00 00 00 = unknown_3
64 00 00 00 64 00 00 00 = unknown_4
10 00 = ai_min_engagement
00 00 = unknown_setting
40 01 = ai_max_engagement
00 00 00 00 00 00 = unknown_settings
64 00 = ai_weapon1_acc
64 00 = ai_weapon2_acc
00 00 00 00 00 00 00 00 03 00 05 00 = unknown_settings2
FF FF 00 00 00 02 00 00 00 00 00 00 00 FF 00 00 00 00 = unknown_settings3
00 00 00 00 00 00 14 00 00 00 00 00 00 00 00 00 00 00 = unknown_settings4
46 87 56 73 03 10 = iai_name
00 00 00 00 00 00 00 00 00 00 = ai_textfile
6E 75 6C 6C = null = gen_string "null"
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - 16 bytes of zeros
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - 16 bytes of zeros
10 00 = Maximum Attack Distance
00 00 00 00 00 00 00 00 00 00 00 00 00 00 - unknown_settings5

*********// end of item chunk

I am fixing to go eat lunch and then start writing a program in C to convert this information into plain text.
Reply With Quote
  #8  
Old 07-26-2006, 01:30 PM
Steve is offline Steve
Steve's Avatar
Administrator

Join Date: Sep 2001
Location: 2077
Posts: 21,552

Send a message via ICQ to Steve
hehe looks good
Reply With Quote
  #9  
Old 07-26-2006, 08:40 PM
NateDoggzDotUU is offline NateDoggzDotUU
Registered User

Join Date: Jul 2006
Posts: 37

eek more progress....

Here is the C source code(403 lines) for my bms hex change finder. What it does is search a .bms file for a specified type_id and then returns all the information about that item. Then you make a change with the MED and export. Then the program compares the changes and allows me to organize changes.

As of right now, the .bms file must be in the same directory as the compiled executable. It is very simple, but very useful at this point. This is progress! I have a data structure made for enemy soldiers and will start on data structures for other items.
I have these many changes to make on my data structure for enemy_soldier
[
ai_first_byte = 2 iff. guarding
ai_first_byte = 64 iff. remove if multiplayer
ai_first_byte = 32 iff. remove if more than # players
ai_first_byte = 16 iff. remove is less than # players

Difference in unknown_settings2[3] 0 != 2 == Spawn option
Difference in unknown_settings4[3] 50 != 100 == fire timer

unknown_settings3[2] == ai_team = (1024 = violet;768 = yellow;512-red;256-blue;0-green)
unknown_settings3[2] == ai_alert = (0 = green; 1 = yellow; 2 = red)
unknown_settings3[3] == remove if more than # of players = real integer value
unknown_settings3[3] == remove if less than # of players = multiples of 256(1 = 256)
unknown_settings3[5] == ai_group = (0 = none, 1 = blue; 2 = red)
unknown_settings3[5] == ai_waypoint = (256 = 1 - 1;512 = 2 - 1)
unknown_settings4[5] == ai_waypoint_name = (0 = none;1 = alpha; 2 = bravo)
unknown_settings5[1] == ai_mapcolor = (393216 = red,0 = default)
unknown_settings3[0] == ai_advancement = (0 = event 0, 65535 = none)
unknown_3[0] == ai_waypoint_distance = any real integer

unknown_changes[0] && unknown_changes[1] == item_x long int
unknown_changes[2] && unknown_changes[3] == item_y long int

reverse ai_weapon1 && ai_weapon2

blankspace[15] == mission_critical (1 = yes; 0 = no)
]

Anyways, check it out if ya can figure out how lol If not, just know that the project is moving along

I would estimate overall progress at 10-12 percent. Btw, I have decided to just take this thing on by myself. It would take longer to explain my programming methods than it would to just do it on my own. Emotional support is needed though lol this project is gonna take many hours, and I am rushing to get it done
Attached Files
File Type: zip bms_hex_change_finder .zip (3.6 KB, 97 views)

Last edited by NateDoggzDotUU; 07-27-2006 at 02:55 AM.
Reply With Quote
  #10  
Old 07-27-2006, 04:54 AM
katana*GFR* is offline katana*GFR*

Join Date: May 2002
Location: North Sea
Posts: 2,421

Send a message via ICQ to katana*GFR* Send a message via MSN to katana*GFR*
Re: more progress....

Quote:
Originally posted by NateDoggzDotUU
HEmotional support is needed though lol this project is gonna take many hours, and I am rushing to get it done
Hehehehe atleast he has humor Good luck on the converter tho, let us know when its finished..
__________________
<- Sponsored by Chris



Found on Youtube:
Quote:
And if Newton Faulkner's voice can be described as "R&B" then Kurt Cobain must be a member of Boyz II Men.
Link here
Reply With Quote
  #11  
Old 07-27-2006, 06:02 PM
NateDoggzDotUU is offline NateDoggzDotUU
Registered User

Join Date: Jul 2006
Posts: 37

Plain

I don't plan on filling a thread with a buncha stuff that noone can read. At first, I thought that I would need some assistance because I didn't know anything about bms files. However, I am pretty good at reverse engineering/programming. I am confident that I shouldn't need any help, so there is no need to post code yet.

Instead.... I plan to leave plenty of room for "none-code" comments in this thread. I will post "alot of code" when I feel like the project is at atleast 40 percent complete.

I need a professional opinion on something:

I have a "concern" with such a tool getting into the hands of "unhonest" people. I think it is a wonderful thing to be able to download a map, from this site, and then be able to make changes to it. Granted... I guess most maps are distrubuted as .bms? I am not real familar with all of that...

Unlike the other 2 .bms->.mis programs on this site, mine is not going to be packed with ASPack and it isn't gonna be written in VB(btw I did unpack and reverse compile the BHD version). I decided that the BHD version offered me no assistance(since I am coding in C) and came the the realization that I didn't "need" any help with this. So this translates into me not even having to distribute my work; However, I am an zealous open source person myself... and I could never do such a thing.

Since I am programming in C, it is easier to not have a "fancy" GUI. I feel like a command line program would eliminate the problem of easy map stealing.

However, I have another idea as well.... I am thinking about trusting this site with full rights for the program(distribution,source code), this way I don't have to worry about who gets it. I have confidence in this site's moderators; this site has a great design, great information, fast downloads, great support, and an active forum. I joined DFbarracks, but I have not checked them in a few days. I didn't feel like their forums was active enough. (maybe I should check)

So... the point that I am working up to . I have considered this, password protecting the program,entrusting someone at novahq with the source code, and making the program available to only selected novahq site members.

Yea... maybe that's a little wrong... but it would help this site out and would control the usage of my program by script kiddies. I am just a little concerned about releasing this thing to anyone who wants it, but I can't just keep it to myself.

Maybe with time, my concerns will be alot less.... but this is why I asked for a professional opinion... I got to get back to other things for now....

Reply With Quote
  #12  
Old 07-28-2006, 03:50 AM
katana*GFR* is offline katana*GFR*

Join Date: May 2002
Location: North Sea
Posts: 2,421

Send a message via ICQ to katana*GFR* Send a message via MSN to katana*GFR*
I dont think that guarding and passwording the compiled file wil do any good, a converter will always be used to convert some maps, even if they just look to see how its done..
But there are always people that copy and paste items from other people maps..
__________________
<- Sponsored by Chris



Found on Youtube:
Quote:
And if Newton Faulkner's voice can be described as "R&B" then Kurt Cobain must be a member of Boyz II Men.
Link here
Reply With Quote
  #13  
Old 07-28-2006, 11:13 AM
NateDoggzDotUU is offline NateDoggzDotUU
Registered User

Join Date: Jul 2006
Posts: 37

yea... i guess that I won't worry about who uses it. I will just make it in console mode, and I think that will take care of a large percentage of people who take credit for other people's work. If no one wants to use a console version, someone can make a GUI in VB that passes command line instructions to the application. Thanks for the quick response... it was a concern of mine, but now it doesn't matter. I will get back to work
Reply With Quote
  #14  
Old 07-30-2006, 10:40 PM
--BulletMagnet-- is offline --BulletMagnet--
--BulletMagnet--'s Avatar
DF2 Forever

Join Date: Jun 2005
Location: USA
Posts: 718

Send a message via MSN to --BulletMagnet--
What are you using for this? VB, C, C++, Delphi.....
Reply With Quote
  #15  
Old 07-31-2006, 12:14 PM
NateDoggzDotUU is offline NateDoggzDotUU
Registered User

Join Date: Jul 2006
Posts: 37

I am programming in C... when I am at work I program with Dev C++ and at home I program in .Net 2003 VC++.... I think that C is the easiest language for file i/o... that was basically what it was made to do. I have been a little busy this weekend but I have made progress. I am having a problem reading the .bms file into an array of data structures. My problem is passing an array of structures to a function... but I will have that done soon and progres will go much faster.
Reply With Quote
  #16  
Old 08-01-2006, 03:42 PM
--BulletMagnet-- is offline --BulletMagnet--
--BulletMagnet--'s Avatar
DF2 Forever

Join Date: Jun 2005
Location: USA
Posts: 718

Send a message via MSN to --BulletMagnet--
I've done some work in Dev C++, had trouble getting past the hello world program so i went back to VB. Ive gotten a lot done there.
Reply With Quote
  #17  
Old 08-01-2006, 06:43 PM
NateDoggzDotUU is offline NateDoggzDotUU
Registered User

Join Date: Jul 2006
Posts: 37

I used to program in VB when I was about 15 and WinXP hadn't been released yet. Before I got to college, all I had done was hello world programs in C lol I made an A in my C programming class and a B in Java. We don't even use VB for much of anything... I don't much like VB anymore. It was nice when I didn't know any other language... maybe you should check out AutoIt(AutoIt Homepage). I think its easier and more powerful than VB but you need a good IDE to be able to have a coding environment. Let me know what ya think about it:

AutoIt v3 is a freeware BASIC-like scripting language designed for automating the Windows GUI and general scripting. It uses a combination of simulated keystrokes, mouse movement and window/control manipulation in order to automate tasks in a way not possible or reliable with other languages (e.g. VBScript and SendKeys). AutoIt is also very small, self-contained and will run on 95, 98, ME, NT4, 2000, XP, 2003 out of the box with no annoying "runtimes" required! You can even make compiled executable scripts that can run without AutoIt being installed!

AutoIt was initially designed for PC "roll out" situations to reliably configure thousands of PCs, but with the arrival of v3 it has become a powerful language able to cope with most scripting needs.

AutoIt can:

* Provide a general-purpose scripting language for all Windows versions
* Simulate keystrokes (supports most keyboard layouts)
* Simulate mouse movements and clicks
* Move, resize and manipulate windows
* Interact directly with "controls" on a window (set/get text from edit controls, check boxes and radio buttons, select items in drop-down lists, etc.)
* Create complex user interfaces (GUIs)
* Work with the clipboard to cut/paste text items
* Provide a scriptable RunAs function for Windows 2000/XP/2003

Unlike AutoIt2, the new AutoIt v3 language has a much more standard syntax -similar to VBScript and BASIC - and now supports complex expressions, user functions, looping and everything else that veteran scripters would expect.

As with previous versions, AutoIt has been designed to be as small as possible (~115KB) and stand-alone with no external .dll files or registry entries required. Scripts can also be compiled into stand-alone executables with Aut2Exe.

There will also be updates to the ActiveX and DLL versions of AutoIt called AutoItX - unlike v2 this will be a combined control (COM and standard DLL functions in the same DLL). AutoItX will allow you to add the unique features of AutoIt to your own favourite scripting or programming languages!

Best of all, AutoIt continues to be FREE - but if you want to support the time, money and effort spent on the project and web hosting then you may donate using the link to your left in the menu.

Take me to the downloads page!
Reply With Quote
  #18  
Old 08-01-2006, 08:58 PM
NateDoggzDotUU is offline NateDoggzDotUU
Registered User

Join Date: Jul 2006
Posts: 37

btw... AutoIt is mainly used for virus removal,registry manipulation, file manipulation, background processes, hiding windows, killing threads, and even more.... and its easier to learn than basic :

It is not the best programming language for coding data structures or large software applications, but for the unexperienced programmer its a dream come true. It is called a natural language. A step above HLL. It is a compromising language so to speak.
Reply With Quote
  #19  
Old 08-02-2006, 02:10 AM
--BulletMagnet-- is offline --BulletMagnet--
--BulletMagnet--'s Avatar
DF2 Forever

Join Date: Jun 2005
Location: USA
Posts: 718

Send a message via MSN to --BulletMagnet--
I use Visual Basic 2005 Express Edition lol. Im only starting in it though and plan to move into C++ as i learn more. I made a simple imageviewer in Visual Basic so far and thats about it. Managed to create a calculator in C++ from copying and pasting code lol. Do you have msn or yahoo? We could probably discuss it better there.
Reply With Quote
  #20  
Old 08-02-2006, 12:25 PM
NateDoggzDotUU is offline NateDoggzDotUU
Registered User

Join Date: Jul 2006
Posts: 37

I do have Yahoo, but it is very rare that I ever sign on. Visual Basic is wonderful for API programming and I don't really hate it. I just know that Java has the capability of producing the same kinda GUIs that VB creates. I found VB to be extremely convinent and useful at one point, but I haven't used it since the .Net crap lol I recommend programming in C before learning C++ or C#... i was like you when I tried to learn C++ and gave up. I still do not know C++ yet, but I really like C. I will send u a PM.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
BMS to MIS? UncleSticky Joint Operations 0 08-23-2006 02:07 AM
BMS to MIS silent-cot Delta Force 0 04-09-2006 01:30 PM
Bms To Mis Gen.SmithSO2 Delta Force 5 09-28-2005 09:20 PM
BMS To MIS SGT Rock Delta Force 4 08-03-2005 07:57 PM
bms to mis fusilierkal Delta Force 2 08-27-2002 11:23 PM


All times are GMT -5. The time now is 06:40 AM.




Powered by vBulletin®