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

0 Members and 1 Guest are viewing this topic.

Offline JanB

  • Lt. Junior Grade
  • *
  • Posts: 103
Re: Hex Editing of Starfleet executables
« Reply #180 on: January 24, 2015, 07:33:02 am »
Good luck to us all. The range/damage/recharge tables of weapons are easy enough to find, but other than that weapons seem ridiculously complicated in the SFC games. I'm having a hard time finding out how the relevant functions are connected: IDA doesn't find direct links between them but there have to be indirect links.

Offline Corbomite

  • Commander
  • *
  • Posts: 2939
Re: Hex Editing of Starfleet executables
« Reply #181 on: January 24, 2015, 09:28:40 am »
I just struck a Speed-31 target with 6 Plasma Snares. It's highest speed for the next 30 seconds was 11.0. There appears to be a limit of 4 Plas-E that can affect speed simultaneously. This could be modified, Adam. Changing the "04" to a "06" for maximum snare effect is easy, but finding it in the binary might take some time.

Make sure that it isn't because some of them hit simultaneously and the game recorded one effect for two (or more) hits. Did you stagger the shots? Did it last a full turn?

Offline TarMinyatur

  • Lt.
  • *
  • Posts: 938
  • Gender: Male
Re: Hex Editing of Starfleet executables
« Reply #182 on: January 24, 2015, 11:27:03 am »
Corbomite, I tested it both ways. Six staggered Plas-E reduce the top speed of the target by 20. The snare effect persists for 30 seconds (at game speed 8) per torpedo, independently. So as each snare wears off, the target can increase its speed by 5. There's not much of a difference between staggered attacks and a massed simultaneous strike...unless you're hitting hull instead of shields, hoping to influence damage allocation.

Depending upon the arcs of the Plas-E, the ideal firing opportunity doesn't usually persist for a quarter turn against a human who would probably parallel your vector if you choose to go fast with high ECM. Your opponent could get to range 5.9, whack you with Phasers and easily outrun even a Plas-R or Plas-X. If you starcastle under EM to gain a defensive shift of at least 2, you'll still get worn down unless your opponent gets impatient. All depends on the ships' power curves, of course.

Offline Corbomite

  • Commander
  • *
  • Posts: 2939
Re: Hex Editing of Starfleet executables
« Reply #183 on: January 24, 2015, 11:57:46 am »
I always thought that PlasE was a good idea with a bad implementation. Considering the ships it's supposed to face, it is too short range and too slow to be of any real use. If you can hit an X2 ship with (effectively) a PlasG with PlasS range without a tractor lock, then you're either fighting the AI or a newb. To hit you need a tractor lock. If you have a tractor lock, the PlasE is pointless. The thing should go 40 (or more) like the PlasX.

Offline TarMinyatur

  • Lt.
  • *
  • Posts: 938
  • Gender: Male
Re: Hex Editing of Starfleet executables
« Reply #184 on: January 24, 2015, 01:05:59 pm »
True.

Plas-E make sense against ships that can barely keep the lights on at a speed of 31. Against XCA's they are marginally effective.

I'd rather modify the Plas-E to have extended range than increased speed. I'd keep the weak 20-point warhead but give it a range of 60. The target XCA will have to use PD phasers to avoid the snare effect. Its pair of Ph-G's will probably accomplish this, but the ship will likely be retreating and exposing the crucial #4 shield.

(1 turn / 36 hexes) * 60 hexes = 1.67 turns that the Plas-E is on the map

If the Plas-E gains a minimum of 5 hexes/turn, it will eventually gain at least 8.33 against a spd-31 XCA. So you could launch the Plas-E as the target approaches and the torpedo won't dissipate until 50 seconds has passed. That's a significant threat.

My numbers could be horribly unbalanced, but worth an experiment.

Edit: Plasma-S and Plasma-E share endurance and speed characteristics. This is deep mode-level sharing. This will be more challenging to address than anything I've worked on so far. The Plasma-E seems to be a Plasma-S with two extra flags: a 2/3rd damage modifier and a snare byte. I may be unable to separate the shared endurance & speed.
« Last Edit: January 24, 2015, 07:00:23 pm by TarMinyatur »

Offline TarMinyatur

  • Lt.
  • *
  • Posts: 938
  • Gender: Male
Re: Hex Editing of Starfleet executables
« Reply #185 on: January 24, 2015, 07:08:14 pm »
That way the Romulan Fast torp is 40.0 for Speed/Damage.
But the E is 40.0 speed but 30.0 damage & the snare effect.

Unfortunately, this would increase the speed of Plasma-S to 40. I don't know how to make the Plasma-E look in a different location for its speed & endurance info. Working on this now...

OK. Made some progress. I can assign the Plasma-E's speed and endurance to any other Plasma.

Code: [Select]
.text:0041E5F2                 db 0                    ; 0 Plas-R
.text:0041E5F3                 db 1                    ; 1 Plas-S
.text:0041E5F4                 db 2                    ; 2 Plas-G
.text:0041E5F5                 db 3                    ; 3 Plas-F
.text:0041E5F6                 db 3                    ; 4 Plas-I?
.text:0041E5F7                 db 4                    ; 5 Plas-D
.text:0041E5F8                 db 5                    ; 6 Plas-X
.text:0041E5F9                 db 1                    ; 7 Plas-E

So I'd change the byte at .text:0041E5F9 from 01 to 05 to give the Plas-E the speed & endurance of a Plas-X. The Plas-S remains at standard specs.

Adam, you know where to modify its warhead.

The number in the comment is the internal "code" for each object. So when a Plasma-E is used, a quick "07" is sent instead of the word "Plasma-E" or something bulky -- 1 byte vs. 8 bytes. 

This area of the code needed to be turned into plain data (press "d") to make sense. IDA was trying to convert it to opcode instructions. The font was red, indicating the problem IDA had interpreting it.

(In this manner, Heavy Photons can be assigned a speed of 1000, while normal Photons travel at 500, for example.)
« Last Edit: January 24, 2015, 09:33:53 pm by TarMinyatur »

Offline Corbomite

  • Commander
  • *
  • Posts: 2939
Re: Hex Editing of Starfleet executables
« Reply #186 on: January 25, 2015, 01:24:26 am »
I'd try giving the PlasE the endurance of a PlasR (since these things are linked and making new weapons is problematic at this point) and leaving the speed for now, then test other configs. Giving it more speed and range may be too much. The damage really isn't the point of the weapon, so I'd hesitate to raise it any.

Offline Javora

  • America for Americans first.
  • Commander
  • *
  • Posts: 2986
  • Gender: Male
Re: Hex Editing of Starfleet executables
« Reply #187 on: January 25, 2015, 02:04:55 am »
The more I see you all pulling this thing apart byte by byte, the more I think this game is salvageable.  With all of the damage and range charts that have been found, is there anyway that the OP code can be moved to the CE project?  If that stuff can be moved and with some updating to multiplayer the CE would be everything Taldren promised.

Offline TarMinyatur

  • Lt.
  • *
  • Posts: 938
  • Gender: Male
Re: Hex Editing of Starfleet executables
« Reply #188 on: January 25, 2015, 03:55:13 am »
I'd try giving the PlasE the endurance of a PlasR (since these things are linked and making new weapons is problematic at this point) and leaving the speed for now, then test other configs. Giving it more speed and range may be too much. The damage really isn't the point of the weapon, so I'd hesitate to raise it any.

Sounds wise.

Open StarfleetOP.exe with HexEdit. Change the byte at 0x0001E5F9 from 01 to 00. Save. Your Plas-E will have a range of about 30.5 instead of 25.5.

Offline EschelonOfJudgemnt

  • Lt. Junior Grade
  • *
  • Posts: 259
Re: Hex Editing of Starfleet executables
« Reply #189 on: January 25, 2015, 04:01:27 am »
I'd actually like to suggest something different for the Plasma E (only because I like the Tholian Snare)

Giving it a godawfully high speed (say 1000), but a very short range.  So if you are say within 5 hexes of the target, you fire the babies at an enmy ship and it drops significantly in speed in the next couple of seconds, after the warhead quickly travels to the target (at phtoon torpedo speeds).

Of course, along with this I'd want to see the actual damage inflicted dropped a LOT (i.e. mainly a speed drop), with perhaps an increase to the drop in movement, depending on how quickly the Plasma E will recharge.

I don't have a lot of experience with Plasma E's though, so I'd need to play with them a bit to see what they actually do ingame.

A longer range version could sorta kinda simulate a web caster...

Of course, what I really want is actual Tholian Webs, but yeah I'm sure that is a much more involved endeavor than a simple change to the .exe

Oh, and on a related note, if anyone is really really brave, can the Plasma E be 'inverted' to give a ship a HUGE boost in speed (like speed 500 for a few seconds)?
 I'm thinking Displacement Device here...
:D

Offline Corbomite

  • Commander
  • *
  • Posts: 2939
Re: Hex Editing of Starfleet executables
« Reply #190 on: January 25, 2015, 04:32:43 am »
We have the Displacement Device; it's called lag  ;)

That's a cool idea for the Snare though. If you keep it at a three turn arming rate and the expensive cost, then I'd say a max range of six (like the ESG Lance which is another always hit weapon if in range) for 10 points of damage per hit. You get a little damage and a slower target (assuming they are running at top possible speed). If you turn it into a more traditional DFHW and make it a two turn charge rate with a little less arming cost, then I'd do a variable 4-6 damage per hit.

I just thought of something:

The Envelope/Defense sections of this weapon are not used. Could we turn them into a second/third function and not have to mess with the standard torp at all? We have the UI already and we might be able to change the wording if it can handle it.
« Last Edit: January 25, 2015, 04:49:33 am by Corbomite »

Offline TarMinyatur

  • Lt.
  • *
  • Posts: 938
  • Gender: Male
Re: Hex Editing of Starfleet executables
« Reply #191 on: January 25, 2015, 01:39:14 pm »
Adam, the 1st attachment shows the data for Plasma endurance in OP.

The 2nd attachment shows the assignment of objects to their speed (and endurance if applicable). The red box shows the result of changing the data from 01 to 05, such that Plasma-E uses the default Plasma-X data.

Offline TarMinyatur

  • Lt.
  • *
  • Posts: 938
  • Gender: Male
Re: Hex Editing of Starfleet executables
« Reply #192 on: January 25, 2015, 01:54:56 pm »
Quote from: Captain Adam
And the example you gave above turning the PlaE endurance into PlaR; does it also degrade like the PlaR as well extend that far or does it still use the PlaE degradation formula.

The Plas-E will use the endurance of Plas-R. It will, however, begin with a 20 point warhead, not a 50 pointer.

Modified Plas-E which uses default Plas-R endurance of 0.8611d.
Distance traveled | Damage potential
10 hexes = 20
15 hexes = 14
20 hexes = 10
25 hexes = 8
28 hexes = 5
29 hexes = 2
30 hexes = 1

Offline TarMinyatur

  • Lt.
  • *
  • Posts: 938
  • Gender: Male
Re: Hex Editing of Starfleet executables
« Reply #193 on: January 25, 2015, 02:22:00 pm »
...can the Plasma E be 'inverted' to give a ship a HUGE boost in speed (like speed 500 for a few seconds)?
 I'm thinking Displacement Device here...
:D

All ships share a maximum speed limit of 31. I don't know how to selectively increase the limit for one ship. But somehow a ship that gets snared has a different maximum speed. So some unknown function may be overwriting the 31 with a 26, after one Plas-E strikes.

The challenge with a 500 boost in speed is that the ship needs to power that increase. I wouldn't choose to increase the warp engine values... We could, just possibly, temporarily reduce the mass of the ship, such that it could attain a speed of 31 for, let's say, 3 energy. I don't know where the mass (move ratio) is stored during runtime. I doubt the .exe is reading shiplist.txt when the battle is underway.

Good ideas.

Offline TarMinyatur

  • Lt.
  • *
  • Posts: 938
  • Gender: Male
Re: Hex Editing of Starfleet executables
« Reply #194 on: January 25, 2015, 02:33:38 pm »
The Envelope/Defense sections of this weapon are not used. Could we turn them into a second/third function and not have to mess with the standard torp at all? We have the UI already and we might be able to change the wording if it can handle it.

That would be great.

My initial concern is that plain old Plas-F torps as well as the Plas-X could be set to Envelop or Shotgun mode. There is no "E" or "X" on the Plasma UI buttons, only an "F".

Offline EschelonOfJudgemnt

  • Lt. Junior Grade
  • *
  • Posts: 259
Re: Hex Editing of Starfleet executables
« Reply #195 on: January 25, 2015, 03:04:20 pm »
...can the Plasma E be 'inverted' to give a ship a HUGE boost in speed (like speed 500 for a few seconds)?
 I'm thinking Displacement Device here...
:D

All ships share a maximum speed limit of 31. I don't know how to selectively increase the limit for one ship. But somehow a ship that gets snared has a different maximum speed. So some unknown function may be overwriting the 31 with a 26, after one Plas-E strikes.

The challenge with a 500 boost in speed is that the ship needs to power that increase. I wouldn't choose to increase the warp engine values... We could, just possibly, temporarily reduce the mass of the ship, such that it could attain a speed of 31 for, let's say, 3 energy. I don't know where the mass (move ratio) is stored during runtime. I doubt the .exe is reading shiplist.txt when the battle is underway.

Good ideas.

Yeah, bumping to speed 31 isn't going to simulate a displacement device.  The DD can move you 1-6 hexes in a random direction in one impulse... My idea was that (if it could work) that the sudden massive increase in speed (to 500 or whatever) would move a ship extremely quickly across the map for a short time, so that the player would massively overshoot their target or whatever, screwing up their attack run...

Photons have an assigned speed variable that is very fast (which is why, if you are on your toes, you can sometimes turn enough to bring an adjacent shield to bear while the photon is en route), which is why I thought that this just MIGHT work, but c'est la vie...

Offline TarMinyatur

  • Lt.
  • *
  • Posts: 938
  • Gender: Male
Re: Hex Editing of Starfleet executables
« Reply #196 on: January 25, 2015, 04:23:01 pm »
Shoot. While we at it.
Can the Hellbore's formula be changed so that its shield effect is amplified.
I don't know.

Are you looking for a Hellbore that does more damage to shields than it would otherwise do to hull? In that case, the Phaser-B could be modified such that it does 15 to shields but only 5 to hull. Turn that 1/3 modifier (when you find it) into a 3 and rewrite the Phaser-B chart with 1/3 damage values.

Phaser-B "Shield Cracker" vs Hull
Die  | Range
Roll  |   0-1   2-4  5-6  etc.
1    |     5     5     4
2    |     5     5     4
3    |     5     5     4
4    |     5     5     3
5    |     5     5     3
6    |     5     0     0

Not much better than a Phaser-2 at a range of less than 4.

The effect of Phaser-B "Shield Cracker" vs Shields (no chart exists)
Die  | Range
Roll  |   0-1   2-4   5-6  etc.
1    |    15    15    12
2    |    15    15    12
3    |    15    15    12
4    |    15    15     9
5    |    15    15     9
6    |    15     0      0

An unconventional weapon, no doubt. It gets weaker as the battle goes on.

Offline TarMinyatur

  • Lt.
  • *
  • Posts: 938
  • Gender: Male
Re: Hex Editing of Starfleet executables
« Reply #197 on: January 25, 2015, 04:34:21 pm »
Quote from: EschelonOfJudgemnt
Yeah, bumping to speed 31 isn't going to simulate a displacement device.  The DD can move you 1-6 hexes in a random direction in one impulse... My idea was that (if it could work) that the sudden massive increase in speed (to 500 or whatever) would move a ship extremely quickly across the map for a short time, so that the player would massively overshoot their target or whatever, screwing up their attack run...

Sounds like we need to add players' ships to the list of transportable objects. You beam your target to a random location (instead of your transporter room). This is pretty much a dream. I cannot accomplish this without a much greater understanding of the code.

Offline TarMinyatur

  • Lt.
  • *
  • Posts: 938
  • Gender: Male
Re: Hex Editing of Starfleet executables
« Reply #198 on: January 25, 2015, 04:57:04 pm »
I need the exact values of how the HB distributes it's damage so I can locate those values.
Hellbore damage procedure

5 or 6 shields equally weak:
0.1666 to each  // 100% (same idea as Enveloping Plasma)

4 shields equally weak:
0.2 to those four  // 80%
0.1 to the strong two // 20%

3 shields equally weak:
0.25 to those three // 75%
0.08333 to the strong three  // 25%

2 shields equally weak:
0.3333 to those two // 67%
0.08333 to the stronger four // 33%

1 weakest shield: // This is typical after the first exchange of fire.
0.5 to it  // 50%
0.1 to the stronger five  // 50%

For example, if a 20-point Hellbore strikes a ship with 3 equally weak shields this is how the damage gets dealt:
Forward hemisphere shields 6, 1, and 2 are strong --- typical of many Heavy Cruisers.
rear hemisphere shields 3, 4, and 5 are equally weak -- an essential refit for Klinks.

Shields 3, 4, and 5 take 0.25 of 20 damage each. So that's 5 damage each.
Shields 6, 1, and 2 take 0.08333 of 20 damage each. So that's 1.666 damage each. (I forget how Magnum dealt with rounding numbers up/down/alternately.)

Sub-totals:
3 shields @ 5 each = 15
3 shields @ 1.666 each = 5 (or 3 if rounded down)
Grand total = 20 (or 18 if rounded down)
« Last Edit: January 25, 2015, 05:17:22 pm by TarMinyatur »

Offline Tulwar

  • Lt. Commander
  • *
  • Posts: 1328
Re: Hex Editing of Starfleet executables
« Reply #199 on: January 25, 2015, 07:46:01 pm »
Some years ago Marstone had nearly cracked the graphics end of this nebula, and then pretty much left the community.  It would be nice to come up with an UI for the TR Beams, and rewrite the buttons.  "Normal" should read as "Standard" on all weapons.  "Normal" just doesn't sound like military lexicon.
Cannon (can' nun) n.  An istrument used to rectify national boundries.  Ambrois Bierce, The Devil's Dictionary