Topic: Hex Editing of Starfleet executables (Read 70818 times)

I haven't yet found the variable that defines the Overload Range as 8.99. Maybe it is stored as 90.0f. I've looked at those, but they are related to game speed. I'll keep looking...

I can enter damage values in the charts for a theoretical Range-15 Overloaded Disruptor, but it cannot be fired. The HUD info shows that the weapon is ready to fire (i.e. red font), and it correctly shows the max, min, and estimated damage.

Some values such as max overload range may have been programmed as constants in one location. I don't know how this would translate to the binary but I'm sure it has some type of effect (not a programmer but know some theory).

Logged

Do unto others as Frey has done unto you.Seti TeamFree SoftwareI believe truth and principle do matter. If you have to sacrifice them to get the results you want, then the results aren't worth it. FoaS_XC : "Take great pains to distinguish a criticism vs. an attack. A person reading a post should never be able to confuse the two."

Tried changing the fusion range but it didn't work. Still couldn't fire passed its usual range.

Let's say we want to extend its maximum range from 24 to 32. We need to locate its terminal range bracket, the one that is 16-24 by default.

That bracket has the 4-byte float value of "00 00 7A 43", which is 250.0 in ordinary numbers. Are you with me, Adam? You should find that sequence shortly before the word "AVtFusionCannon@@". (Please check out the attached .jpg image.)

If you change those 4 bytes to "00 00 A5 43", then the bracket has grown to 330.

00 00 A5 43 is rearranged to 43 A5 00 00. Then it is condensed to 43A50000. And that's how the number 330.0 is represented as a 4-byte "floating point number".

Since the on-screen range is one-tenth of the internal number, the Standard Fusion will be able to fire up to, but not including, 33. In other words, your maximum range is 32.99. (Overloaded Fusions will not be able to fire beyond 8.99.)

Edit#1: Something unknown is enforcing a maximum range of 24.99 on the Fusion Beam! So the previous modifications are insufficient at the moment.

Edit#2: I found a secondary maximum range limiter. It is peculiar because it is 249.9f, not 250.0f. Also found the OL range limiter, which is set to 89.9f, not 90.0f.

Confirmed. The maximum range for Fusion Beams, Hellbores, and ADD's is limited by a constant that hasn't been located yet. [Fusion and ADD limiters have been found.]

The maximum range for ESGs and Disruptors can be increased.

I was able to hit a target with a Standard Photon from range 38. (I increased the 13-30 bracket.)I can't, however, fire Standard Photons in an incompatible bracket. So if I want to modify the maximum bracket for a Standard Photon, I change the next-to-last bracket, not the final one (which was intended for Range-55 Proximities). This concept should apply to Disruptors of Type 1, 2, and 3, as well.

I'll check out other weapons...

I reduced the range of the Phaser-3/G so that it is a defensive weapon, not a anemic sniping weapon. Holy smokes! One Hydran Hornet was essentially missile-proof. This is truly how Gatlings are supposed to work.

I changed the Ph-3/G's inefficient outer brackets (3, 4-8, 9-15) to be functionally identical to the Range-2 bracket. So now it hurts to get close to a Gatling-equipped vessel, everytime. There is a strange feature that allows players to fire in futility at range 15, even though the fire button never gets highlighted lower-left HUD shows the Ph-G data in purple font, not red, at 0-0 (0). The AI, so far, cannot waste its Phaser-G shots.

It's not an ideal solution, but the endurance of the missiles can be reduced. A speed-16 missile has a range of 48. A speed-8 missile has a range of 24. Endurance, however, is stored as an integer, not a float, so the range can't be set to half. Type-I's and Type-IV's each have a value of 3. Dogfight missiles have a value of 1. The so-called large missiles carried by fighters have an endurance of 2 turns.

Speed 16 for two turns (instead of three) yields a range of 32, still a bit high if you're shooting for 24.

Unfortunately, this would affect medium and fast missiles too, taking a big chunk off of their range. A fast missile would travel only 64, instead of 96. Not an ideal means to an end. Nope.

On a good note, I managed to have the disruptor beam take its texture from a different bmp other then the one it shares with the mauler. Currently the mauler and Disruptor beam share a texture. Pain in the butt if you want to change one color it changes the other. I just maintained the mauler at its usual white and made another texture of it red and had it read it. The result. Woohoo red Disruptors and white maulers. Just for fun to see if it would work.

So you're saying that it does interact with the sprites file then? When you say Mauler and Disruptor Beam I assume you mean the Heavy Disruptors since the normals have the pulse action? Hmm, since there is no texture file for the TR Beams (that I know of) I wonder what they reference to get that plain blue beam. Both of you are making impressive progress. Why has no one realized this before? Were the simple tools not available then?

9-12 is Photon range. Dizzys have worked as advertised. They're all the same weapon with better targeting scanners. There is no difference between a Dis1 and a Dis4 except one has better eyesight than the other. For game code purposes they may be different objects, but as far as game play goes there is no difference as they go (usually) by ship size. You can put Dis4's on anything though. Some ranges/limits may be hard coded elsewhere and can not be affected since there is no code to read in those instances, but that wouldn't stop the HUD from giving the "correct" information about range and damage should the weapon actually go that far.

The number of fields for each weapons chart may have been amalgamated into one type for coding. You would then get overlapping damage and range information as each weapon would take up the required fields to make their charts. This is just a guess though.

I did find out that you can change the Phaser B's overall damage to the hull. The damage that only interacts with the shields seems to be coded in such as its 1/3 of the bare hull damage. So we can't as of yet make any changes to the shield damage apart from the overall damage. They are linked.

True. But I think we can eventually make the Phaser-B use any of the existing conversion constants. This data can be found through a Hex Editor: 0.25, 0.33, 0.67, 1.33, 1.5, 1.67, 1.875, etc. If the Phaser-B strikes a shield, it uses a conversion constant of 0.33 (represented as a 4-byte float) and applies that to the chart's damage value. But if we simply change 0.33 to 0.17, for example, that will affect every system that happens to reference this constant! Not good.

The call to the constant needs to be adjusted, not the constant itself. The Phaser-B can be directed to look in the memory location containing the value 0.17. So let's say 0.17 is stored at 0x00123450 and 0.33 is stored at 0x00123454. I can hypothetically subtract 4 bytes from the call so that the Phaser-B will read the value of 0.17 instead of 0.33.

I'm editing SFC 2.670 Community Edition. I don't think Plasma-X is in this game, unless Bonk and Strat and company were highly optimistic. I guess it may be a reference to the earliest days of SFC1 in which Plasma was extra fast, 40? Maybe there is a variable that is subtracted from 400.0f to get 360.0f, and thus we never see that particular 360.0f in the hex code...

I'm editing SFC 2.670 Community Edition. I don't think Plasma-X is in this game, unless Bonk and Strat and company were highly optimistic. I guess it may be a reference to the earliest days of SFC1 in which Plasma was extra fast, 40? Maybe there is a variable that is subtracted from 400.0f to get 360.0f, and thus we never see that particular 360.0f in the hex code...

None of the X weapons were in SFC II. I remember Eric Bethke crowing about the new weapons features and X ships. This would have been coded into OP after SFC II release. I also remember that how a plasma round persuited a ship was fixed as well in OP. I would think that code may have been ported over to missile as well. IIRC one of the original coders on the SFC II put a comment line stating that it wasn't finished.

I burst out laughing like a nut at 3 a.m. when a Kzinti Medium Cruiser fired wonderful slashes of Disruptor fire across my bow. Try 3200.0f instead of 12500.0f for their speed sometime. Press F9 and you're in a movie. (They still sometimes disappear.)

The chart we currently have says 5-15 then 16-22 but the game has it as 5-9,10-15... But I cant say I care :angel:bc Im excited about the news of the speed being found

That's just a bunch of nonsense to me. Are you saying that the values change between these two fields? As long as the two fields that encompass 5-15 are consistant there is no change in gameplay effect. I have seen no evidence of change in to hit/damage over these ranges. It might need further testing though, and there is the matter of leaking damage which may account for that chart as it may be done on a different chart for that weapon.

then it continues with overloaded values. what do you think corb? any significant difference

That looks a lot like the PHB chart structure, which is a Range of Effect type chart, where Dizzys are a To Hit/Damage weapon. I got my X-Weapon info from Dave Farrell. I suppose it could have been erroneous, but gameplay has not produced any reason to doubt it. I guess testing might be in order.

But that chart has six entries to simulate a D6 being rolled, then you calculate damage (which can be none) based on range. To Hit/Damage weapons roll a d6/2d6 to determine if the weapon hit or not, then damage is assigned based on several factors (like Phots not degrading over distance and Dizzys/Hellbores doing so).

Another thing I'd like verified is the OP cloak seeking weapon damage reduction chart. Dave said it was "SFB specs", but I had to assume that. We would need the % damage reductions for tractored and non-tractored ships.

It'll look something like this and when found SFC-CE/EAW can be brought up to specs: