Jump to content

Mechanics - inside Rebellion


vakundok
 Share

Recommended Posts

  • Replies 96
  • Created
  • Last Reply

Top Posters In This Topic

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.

Link to comment
Share on other sites

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.
Link to comment
Share on other sites

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.
Link to comment
Share on other sites

  • 3 weeks later...

Troops (family 16)

 

Troopsd.dat (in DWORDS unless specified):

Header: 1,10,16,20

Structure (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 costs

10 - maintenance costs

11 - research order

12 - unknown (research difficulty)

13 - unknown (moral modifier)

14 - detection

15 - bombardment defense

16 - attack

17 - defense

Link to comment
Share on other sites

Capital ships (family 20) and Death Star (family 24)

 

Capshpsd.dat (in DWORDs unless specified)

Header: 1,30,20,28

Structure (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

Link to comment
Share on other sites

Fighters (family 28 )

 

Fightsd.dat (in DWORDs unless specified)

Header: 1,8,28,32

Structure (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 range

41 - 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.

Link to comment
Share on other sites

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 :D

http://img147.imageshack.us/img147/5183/animated9pn.gif

http://img146.imageshack.us/img146/1778/reloadedbannerdu8.gif

http://www.swrebellion.com/images/banners/rebellionbanner02or6.gif

Link to comment
Share on other sites

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,152

Structure (11):

1 - number (starting from 100)

2 - unknown (maybe the active flag), allways 1

3 - unknown, allways 0 (since it canot be produced)

4 - unknown, allways 0 (since it canot be produced)

5 - family, usually 146

6 - 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 1

10 - 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.

Link to comment
Share on other sites

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 :D

Well, at least this universe was truly 3D. :wink:

http://img147.imageshack.us/img147/5183/animated9pn.gif

http://img146.imageshack.us/img146/1778/reloadedbannerdu8.gif

http://www.swrebellion.com/images/banners/rebellionbanner02or6.gif

Link to comment
Share on other sites

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.
Link to comment
Share on other sites

  • 2 weeks later...

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 shield

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)

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 facilities

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)

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 refinery

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, 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)

Link to comment
Share on other sites

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.
Link to comment
Share on other sites

  • 4 weeks later...

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."

Link to comment
Share on other sites

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. :D

http://img147.imageshack.us/img147/5183/animated9pn.gif

http://img146.imageshack.us/img146/1778/reloadedbannerdu8.gif

http://www.swrebellion.com/images/banners/rebellionbanner02or6.gif

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 2 weeks later...

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."

Link to comment
Share on other sites

  • 1 month later...

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 base

16 - espionage variance

17 - ship research base

18 - ship research variance

19 - troop research base

20 - troop research variance

21 - facility research base

22 - facility research variance

23 - combat base

24 - combat variance

25 - leadership base

26 - leadership variance

27 - loyality base

28 - loyality variance

29 - jedi probability

30 - known jedi (flag)

31 - jedi level base

32 - jedi level variance

33 - 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.dat

Header: 1, 54, 56, 60

The structure is the same.

All of their family is 56.

Link to comment
Share on other sites

  • 8 months later...

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 :wink:

 

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 -

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share


Copyright (c) 1999-2022 by SWRebellion Community - All logos and trademarks in this site are property of their respective owner. The comments are property of their posters. Star Wars(TM) is a registered trademark of LucasFilm, Ltd. We are not affiliated with LucasFilm or Walt Disney. This is a fan site and online gaming community (non-profit). Powered by Invision Community

×
×
  • Create New...