vakundok Posted February 19, 2003 Posted February 19, 2003 OK. I start this topic to publicate any knowledge and thought about how Rebellion works. This topic is only for those who have programing skills.
vakundok Posted February 20, 2003 Author Posted February 20, 2003 The normal gamedata files (all *sd.dat except basicsd.dat.) have a common header. It is four DWORD long:-always 1-the number of things consisted-the "lower" consisted family identifier-the "higher" (not consisted) family identifier The "higher" family identifier is usually is higher by steps of four except that of the facilities which are separated. This does not apply to the *tb.dat files which have completely different structure. Eg:The troop family is 16, so the header of the Troopsd.dat is 1,10,16,20.Next are the capital ships: 1,30,20,28 (Death Star is 24 all others are 20), the fighters: 1,8,28,32, and so on ... However when I tried to add a new sector (data to the sectorsd.dat and name to textstrat.dll) to the game I failed so the number of consisted things (or maybe the file lenghts) must be stored elsewhere too.
SWARMER Posted February 21, 2003 Posted February 21, 2003 the program is probablly either storing that file somewhere else or it has "identified" the amount of files there are. Eg Sectors - it only accounts for 10 lines of files... Mabye The Force is one and all
Lord_La_forge Posted February 22, 2003 Posted February 22, 2003 Possible, that you're alone with your skills here Vakundok? We need more programmers for this problem!Help Wanted
vakundok Posted February 24, 2003 Author Posted February 24, 2003 No my skills are not up to the task. A cracker would needed not a simple programer.
deXtoRious Posted February 24, 2003 Posted February 24, 2003 Wow, cracking!What do you want to crack? "You do not have to understand, just obey" - Grand Admiral Thrawn
vakundok Posted February 24, 2003 Author Posted February 24, 2003 Wow, cracking!What do you want to crack?Excuse me, but have you read the topic title? I would like to know how does Rebellion link things (the different data files and dlls) together and I would highly prefer the source code of Rebellion.
Hastings Posted February 25, 2003 Posted February 25, 2003 I noticed there were patterns in the .dat files about 2 years ago. My text file which had certain hex locations are long gone, unless I have them backed up on CD somewhere. I have also tried to add systems and sectors without success. The source code would be of great help. I mean, this game is going on 6 years and Lucasarts, being like they are, will probably never release the source, unless they can somehow make money off it. Vakundok is not alone with his expertise, I have C++, C, VB and hex experience so I can look around the files in hex code. But converting hex to C++....meh, I'm sure it could be done but it might take a while. I wanna know why the man has a gun and the gun not the man keeps the world at bay. I wanna hear what the man has to say, what the man has to say might just save me.
SWARMER Posted February 25, 2003 Posted February 25, 2003 good luck. My experience lies only withen VB(gr 11 Programming - i am only in Gr 11...) The Force is one and all
vakundok Posted March 18, 2003 Author Posted March 18, 2003 Troops (family 16) Troopsd.dat (in DWORDS unless specified):Header: 1,10,16,20Structure (17): 1 - number (starting from 1) 2 - unknown (maybe the active flag) allways 1 3 - family of the producing facility, allways 41 4 - unknown (family of the producing facility +1), allways 42 5 - family, allways 16 6 - identifier (actually two WORDs, the second is allways 2, the first can be used as an entry to the name in Textstrat.dll) 7 - alliance, 0 or 1 8 - imperial, 0 or 1 9 - construction costs10 - maintenance costs11 - research order12 - unknown (research difficulty)13 - unknown (moral modifier)14 - detection15 - bombardment defense16 - attack17 - defense
vakundok Posted March 18, 2003 Author Posted March 18, 2003 Capital ships (family 20) and Death Star (family 24) Capshpsd.dat (in DWORDs unless specified)Header: 1,30,20,28Structure (50):1 - number (sarting from 64 which is the mon cal) 2 - unknown (maybe the active flag), allways 1 3 - family of the producing facility, allways 40 4 - unknown (family of the producing facility +1), allways 41 5 - family, 20 for the capships and 24 for the DS 6 - identifier (actually two WORDs the second is 2 the first can be used directly to get the name from Textstrat.dll) 7 - alliance (0 or 1) 8 - imperial (0 or 1) 9 - conctruction costs 10 - miantenance 11 - research order 12 - unknown (maybe research difficulty) 13 - unknown (maybe moral modifier), basicly 0.45 * construction 14 - detection 15 - shield 16 - sublight 17 - maneuverability 18 - hyperdrive 19 - unknown (backup hyperdrive) 20-31 - turbolaser, ion and laser firepower per arcs (front, rear, sides) 32 - turbolaser range 33 - ion range 34 - laser range 35 - sum turbolaser firepower 36 - sum ion firepower 37 - sum laser firepower 38 - sum firepower 39 - hull 40 - bombardment 41 - tractor beam range 42-43 - gravity well (4 and 100 if present) 44 - tractor beam power 45 - damage control 46 - weapon recharge 47 - shield recharge 48 - fighter squadrons 49 - troop contingents 50 - unknown, allways 0
vakundok Posted March 18, 2003 Author Posted March 18, 2003 Fighters (family 28 ) Fightsd.dat (in DWORDs unless specified)Header: 1,8,28,32Structure (42):1 - number (sarting from 1) 2 - unknown (maybe the active flag), allways 1 3 - family of the producing facility, allways 40 4 - unknown (family of the producing facility +1), allways 41 5 - family, allways 28 6 - identifier (actually two WORDs the second is 2 the first can be used directly to get the name from Textstrat.dll) 7 - alliance (0 or 1) 8 - imperial (0 or 1) 9 - conctruction costs 10 - miantenance 11 - research order 12 - unknown (maybe research difficulty) 13 - unknown (maybe moral modifier), allways 0 14 - detection 15 - shield 16 - sublight 17 - maneuverability 18 - hyperdrive 19 - unknown (backup hyperdrive), allways 0 20-31 - turbolaser, ion and laser firepower per arcs (front, rear, sides) 32 - turbolaser range 33 - ion range 34 - laser range 35 - sum turbolaser firepower 36 - sum ion firepower 37 - sum laser firepower 38 - sum firepower 39 - torpedo power 40 - torpedo range41 - squadron size, allways 12 42 - bombardment *Note that the turbolasers of the fighters do not show up in in-game statistics, but trust me, they are there, so I prefer to refer them as heavy bombs.
the_mask Posted March 18, 2003 Posted March 18, 2003 Thanks for posting this. Now we just have to know how the planetssd.dat works to make another planet the imperial capitol for the TC. Btw, I'll mail you the things I meantioned earlier as soon as possible http://img147.imageshack.us/img147/5183/animated9pn.gifhttp://img146.imageshack.us/img146/1778/reloadedbannerdu8.gifhttp://www.swrebellion.com/images/banners/rebellionbanner02or6.gif
vakundok Posted March 18, 2003 Author Posted March 18, 2003 Good, I am waiting for it. Well, I have a theoretical structure for the systemsd.dat, but I don't have the time to really check it: Header: 1,200,144,152Structure (11):1 - number (starting from 100)2 - unknown (maybe the active flag), allways 13 - unknown, allways 0 (since it canot be produced)4 - unknown, allways 0 (since it canot be produced)5 - family, usually 1466 - identifier (actually two WORDs the second is 2 the first can be used directly to get the name from Textstrat.dll)7 - sector number (starting from 20, since the number of the sectors also starts from 20)8 - type (picture)9 - unknown, usually 110 - position (actually two WORDs, x and y, not relative to the sector position)11 - unknown, usually 0 The position is very interesting, it is not counted in pixels (maybe it have to be divided by two) and 0,0 does not mean the topleft corner of the screen. I think there is an area larger that we can see during the game and the coordinates are relative to the topleft corner of that area.The header suggests that there are more families, not only 146, I will check the family of Coruscant and Yavin soon.
the_mask Posted March 18, 2003 Posted March 18, 2003 Ask Hastings about these coords, too ! As far as I can remember, he posted something about changing the positions manually in the semi-old forum. It was something about a planet that seemed to have vanished, then he found it was 'below' another Well, at least this universe was truly 3D. http://img147.imageshack.us/img147/5183/animated9pn.gifhttp://img146.imageshack.us/img146/1778/reloadedbannerdu8.gifhttp://www.swrebellion.com/images/banners/rebellionbanner02or6.gif
vakundok Posted March 18, 2003 Author Posted March 18, 2003 Well, I positioned a whole sector to 0,0 and it showed up over the interface outside the starfield. I will try to find what are the maximum relative positions within a sector to display a rightbottom planet properly (not only partially), but it will take a huge amount of time.
vakundok Posted March 26, 2003 Author Posted March 26, 2003 Facilities (family 32 - 45) Allfacsd.dat contains only a basic structure or frame, without actual data.Header: 1,1,32,34 Defensive facilities:Deffacsd.dat (in DWORDs unless specified) Header: 1,6,34,40 Structure (15): 1 - number (sarting from 1) 2 - unknown (maybe the active flag), allways 1 3 - family of the producing facility, allways 42 4 - unknown (family of the producing facility +1), allways 43 5 - family, 34 of the planetary ion, 35 of the planetary lasers, 36 of the planetary shields and 37 of the DS shield6 - identifier (actually two WORDs the second is 2 the first can be used directly to get the name from Textstrat.dll) 7 - alliance (0 or 1) 8 - imperial (0 or 1) 9 - conctruction costs 10 - miantenance 11 - research order 12 - unknown (maybe research difficulty) 13 - unknown (maybe moral modifier) 14 - firepower 15 - shield generation Manufacturing facilities:Manfacsd.dat (in DWORDs unless specified) Header: 1,6,40,44 Structure (14): 1 - number (starting with 1) 2 - unknown (maybe the active flag), allways 1 3 - family of the producing facility, allways 42 4 - unknown (family of the producing facility +1), allways 43 5 - family, 40 of the shipyards, 41 of the training facilities and 42 of the construction facilities6 - identifier (actually two WORDs the second is 2 the first can be used directly to get the name from Textstrat.dll) 7 - alliance (0 or 1) 8 - imperial (0 or 1) 9 - conctruction costs 10 - miantenance 11 - research order 12 - unknown (maybe research difficulty) 13 - unknown (maybe moral modifier) 14 - manufacturing rate (required days to manufacture 1 unit) Production facilities:Profacsd.dat (in DWORDs unless specified) Header: 1,2,44,48 Structure (14): 1 - number (1 for both) 2 - unknown (maybe the active flag), allways 1 3 - family of the producing facility, allways 42 4 - unknown (family of the producing facility +1), allways 43 5 - family, 44 of the mine and 45 of the refinery6 - identifier (actually two WORDs the second is 2 the first can be used directly to get the name from Textstrat.dll) 7 - alliance (0 or 1) 8 - imperial (0 or 1) 9 - conctruction costs 10 - miantenance, 0 for both 11 - research order, 0 for both 12 - unknown (maybe research difficulty), 0 for both 13 - unknown (maybe moral modifier) 14 - production rate (required days to produce 1 unit)
Hastings Posted April 2, 2003 Posted April 2, 2003 Heh, that was interesting the_mask. I made one planet(i think ghorman) have some of the same attributes as Coruscant in hopes to make Ghorman belong to the Empire at the start of the game. What I found was...unexpected. I thought I had deleted the planet when in fact it was behind Coruscant. I noticed the text for Coruscant was messed up and barely made out Ghorman. So much for that. I've spent hours & hours in those planet .dat files and was never figure out how to get one planet to belong to a certain side at the start of the game. I don't think it can even be done just with editing the .dat files since the .dat files contain static data. Very interesting vakundok. I never went into much detail as you did with those .dat files. I believe in the systemsd.dat file, the 2nd position which you said is to be unknown is actually what determines whether the planet is populated or if the game randomly generates if it's populated or not. It is always 1 but I believe if you change it to 0 the planet will be populated. I'm not to sure since it's been ages since I've played around in those .dat files. With those values you are putting up on the forum, it wouldn't be hard to make another editor for Rebellion. Sure it'd be the same as RebEd but it'd be new! Btw - if anyone wants my SWR patch, talk to me, or perhaps the_mask(if he allows). you'll be able to run SWR without the CD which allows for some good editing. Good luck guys! I wanna know why the man has a gun and the gun not the man keeps the world at bay. I wanna hear what the man has to say, what the man has to say might just save me.
Tsunami Posted April 29, 2003 Posted April 29, 2003 I had some problems with planets, too, and decided to completely run around the wall: I switched Coruscant and Yavin sectors (they are called differently, I know), switched pics, names and descriptions. -> The Alliance starts on Coruscant and the Empire on Wayland. Of course the new Coruscant is no longer a game critical planet and has the great range of starting energy and resources, but just for appearence's sake it was good. The starting conditions have to be stored in the .dat files, but there are not many. I think there are random seeds for unknown, two different ones for known (according to priority, like low for Outer Rim and high for Core, changeable in RebEd), one for Coruscant and one for Rebel HQ. Yavin appears to be randomly chosen from the 'unknown' or 'known, low priority' chart. Just from a non-coder point of view. It's all hopeless but otherwise not very dramatic. - Helme Haffax Englishman: "What do you think of Modern Civilization?"Mahatma Gandhi: "That would be a good idea."
the_mask Posted April 29, 2003 Posted April 29, 2003 Btw - if anyone wants my SWR patch, talk to me, or perhaps the_mask(if he allows). you'll be able to run SWR without the CD which allows for some good editing. Good luck guys! I don't get, what you mean with if he allows, but I now remember something about your revised version of the patch, I'll mail ya about it. This patch also allows you to use new movies and music for Rebellion, without having to somehow make a new CD image with those new files. http://img147.imageshack.us/img147/5183/animated9pn.gifhttp://img146.imageshack.us/img146/1778/reloadedbannerdu8.gifhttp://www.swrebellion.com/images/banners/rebellionbanner02or6.gif
vakundok Posted April 29, 2003 Author Posted April 29, 2003 Tsunami:Yes, there are the Cmuncrtb, Cmunyvtb, Cmunhqtb dat files which store the defenses of the starting locations and Faclcrtb and Faclhqtb dat files which store the facilities of those. In my opinion, Coruscant and Yavin must have been special family number, but I have not checked it yet. Presently I try to understand the mission description file. (The first result of this is the cheat that (most likely) allows the assasination missions for rebell characters.) Besides I will soon try whether it is possible to turn a ship (shiptype) to a planet destroying super weapon or not.
Tsunami Posted May 9, 2003 Posted May 9, 2003 I checked out hexing shipstats. The game will tolerate a zero for sublight speed and actually show it as zero, but effectively speaking, the ship still has a sublight of one.It will also accept a zero for hyperdrive but will show it as 180:0 and 180 is the real hyperdrive rating. I think 180 is the lowest a hyperdrive rating can fall to when damaged. I tried negative values (which are simply shown and put to work like they were positives) and HUGE numbers to see if there was a cap and a turn into negative or somesuch; no banana. Seems to be that the 180:0 thingie is hard-coded elsewhere, maybe someone can find out where. The weird thing is that a ship with a zero for either value shows no indicator for that component in tactical (they appear not to have a sublight drive etc.) so that this component cannot be disabled via tractor beam or ion weapons. There could be some way to exploit this. It's all hopeless but otherwise not very dramatic. - Helme Haffax Englishman: "What do you think of Modern Civilization?"Mahatma Gandhi: "That would be a good idea."
Trejiuvanat Posted May 10, 2003 Posted May 10, 2003 So ther eis no way to get ship with no hyperdrive at all? http://www.swrebellion.com/~jahled/Trej/banner.gif
vakundok Posted June 19, 2003 Author Posted June 19, 2003 I do not know, whether Tsunami sett both the hyperdrive and the backup hyperdrive to 0 or not. (Side note: DWORD means 32 bit unsigned integer type and WORD means 16 bit unsigned integer type.) Characters (family 48 - 56) Major characters: Mjcharsd.dat (in DWORDs unless specified) Header: 1, 6, 48, 56 Structure (37): 1 - number (sarting from 576) 2 - unknown (maybe the active flag), allways 1 3 - unknown (since a person canot be produced), allways 0 4 - unknown (since a person canot be produced), allways 0 5 - family, 48 Mon Mothma, 49 Leia Organa, 50 Luke Skywalker, 51 Han Solo, 52 Emperor Palpatine and 52 Darth Vader 6 - identifier (actually two WORDs the second is 2 the first can be used directly to get the name from Textstrat.dll) 7 - alliance (0 or 1) 8 - imperial (0 or 1) 9 - unknown (maybe the conctruction costs), allways 0 10 - unknown (maybe the miantenance), allways 0 11 - unknown (maybe the research order), allways 0 12 - unknown (maybe research difficulty), allways 0 13 - diplomacy base 14 - diplomacy variance 15 - espionage base16 - espionage variance17 - ship research base18 - ship research variance19 - troop research base20 - troop research variance21 - facility research base22 - facility research variance23 - combat base24 - combat variance25 - leadership base26 - leadership variance27 - loyality base28 - loyality variance29 - jedi probability30 - known jedi (flag)31 - jedi level base32 - jedi level variance33 - can be admiral (flag)34 - can be commander (flag)35 - can be general (flag)36 - unknown (in RebEd it is the won't betray flag)37 - can train jedis (flag) Minor characters:Mncharsd.datHeader: 1, 54, 56, 60The structure is the same.All of their family is 56.
Cain Posted March 6, 2004 Posted March 6, 2004 Well I'm not a programmer I only have an analytic mind ...so I have send today some ideas to Mask about cracking the source code...I hope they are good enough to pot you guy's on the right track Also Mask has a good C3PO so you could understand it well I hope that with this theory you guy's could see all there is to see in that hated source code . - The Trivium Organization - Community Manager -- Petroglyph Fan Forums - CoAdmin & Human Resources Manager -
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now