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

0 Members and 1 Guest are viewing this topic.

Offline Bernard Guignard

  • Cad Schematics are our Speciality
  • Lt.
  • *
  • Posts: 888
  • Gender: Male
  • Trek Canon!!! I NO believe in TreK Canon!!!.
Re: Hex Editing of Starfleet executables
« Reply #540 on: January 24, 2016, 05:57:49 am »
Great work all round.  How difficult would it be to update the Taldren Mod viewer to a larger aspect ratio. ? 

Offline TarMinyatur

  • Lt.
  • *
  • Posts: 938
  • Gender: Male
Re: Hex Editing of Starfleet executables
« Reply #541 on: January 26, 2016, 01:32:02 am »
Starfleet2CE.exe

Found the missile hitpoint variables (ints) for Type-I, DroI, DroVI, Type-4...
Who would ever guess that they are stored as 256, 128, 128, 384...? So somewhere they get divided by 64. If you want to create "slug" or armored missiles, you'll be able to do that.

Thought I solved the problem of disappearing Disruptors, but giving them a 10,000-turn endurance didn't help. Photons and Hellbores (that miss) use that enormous value. Disruptors, however, have just one turn of endurance, travelling 1250k, which seems reasonable. So why did the programmers give errant Photons a graphical range of 5,000,000k? The biggest maps are, what, 500k across?

Found the t-bomb/mine lifespan variables (doubles). Is ten turns too short or too long? You'll decide. (Haven't found the damage variables yet -- 10 for standard and 35 for NSM.)

Fixed the SFBMode's effect on Proximity Photons. The CE programmers had it backwards and incomplete. I edited the function such that "magic" Proxies have +1 bonuses at R9-12 (83%) and R13-30 (67%), but I could not enable R31-55 torpedoes due to lack of space. All this will be customizable with the SFC_Editor.

Code: [Select]
          Range
 9-12  13-30   31-55
 67%    50%      0%  <----- SFBMode Off (bugged)
 67%    67%     33%  <----- SFBMode On (bugged)
------------------------------------------------------------
          Range
 9-12  13-30   31-55
 83%    67%     0%   <-----SFBMode Off (modified)
 67%    50%     0%   <-----SFBMode On (fixed)
 

Found the instruction for "single internals". SFBMode simply doubles any damage that penetrates a shield. This is why damage allocation still works as usual -- a large volley often stuns just one phaser and one torpedo. The multiplier can be modified with the SFC_Editor and an updated .exe, so you can enable 1x, 2x, 3x, 4x, etc. damage. It is hilarious to use a value such as x10 so that the first hull hit is highly destructive -- it's a radically different, lethal, game. Weapon damage vs shields is, by the way, not increased. It is possible to alter the instruction to divide internal damage. But nobody ever requested triple hitpoints. :)

Figured out the problems with shield regeneration. The CE programmers used EAW's value of 0.3 points/turn. One of a few mistakes in this function, because this value is doubled later. The formula should be 0.15 + 0.05*Labs, not 0.18 + 0.045*Labs. The formula for SFBModeOn should be 0.1 + 0.033*Labs, not 0.3 + 0.013*Labs.

F-NCL+ (Intended for SFBMode On, but was applied to SFBMode Off  :D )
Base = 0.18 // Too high -- should be 0.1
+Labs = 0.013*4 = 0.052 // Too low -- should be 0.033*4 = 0.13
Total = 0.23 // 0.23
Effective rate = Total*2 = 0.46 // 0.46 (Amazing coincidence???  ;) 0.46 is 66% of EAW's 0.7, the desired rate!)

F-NCL+ (Intended for SFBMode Off, but applied to SFBMode On)
Base = 0.305 // Too high -- should be 0.15
Labs = 0.045*4 = 0.18 // Close enough -- 0.05*4 = 0.2
Total = 0.485 // Too high -- should be 0.35
Effective rate = Total*2 = 0.97 // 0.7

Experimental data...
0:56 to 11:19 --- regenerated 30 shield points @ game speed 10
Elapsed Time = 10:23 = ~31 turns
30 points / 31 turns = 0.97 points/turn
EAW v2.036 effective rate for F-NCL+ = 0.3 + 0.1*4 = 0.7 points/turn

Anyway, I've fixed this troubled function, and the SFC_Editor can customize it.
« Last Edit: January 31, 2016, 02:43:12 am by TarMinyatur »

Offline d4v1ks

  • D.Net VIP
  • Lt.
  • *
  • Posts: 788
  • Gender: Male
Re: Hex Editing of Starfleet executables
« Reply #542 on: January 26, 2016, 07:47:41 am »
Great work all round.  How difficult would it be to update the Taldren Mod viewer to a larger aspect ratio. ?


I think i can waste 20 minutes on that...  ;D

http://www.dynaverse.net/forum/index.php/topic,163394470.0.html
"But he isn't wearing anything at all!" (The Emperor's New Clothes)

Offline [UFP]Exeter

  • SFC4 Dev
  • Lt. Commander
  • *
  • Posts: 1080
  • SFC4 Lead Developer
Re: Hex Editing of Starfleet executables
« Reply #543 on: January 26, 2016, 03:48:34 pm »

Well here's hoping Exeter after his current project is done will be willing to share some insight in the particulars of SFC2. At least guide us in the right direction so we can dabble in it.

I am willing to share what I can, but hard to change compared to exe, and may be difficult to find.

Offline Corbomite

  • Commander
  • *
  • Posts: 2939
Re: Hex Editing of Starfleet executables
« Reply #544 on: January 31, 2016, 10:41:30 am »
I remember Tar saying something about fixing the photon ranges for real, but I can't remember a couple of things, so if someone could tell me so I don't have to wade through several pages:

Did the photon range fix include OP or just EAW:CE?

and

Did you guys ever find the fighter hellbore ranges in OP as well? (I'd like to get them shortened to range 4 like all the other fighter HW.)

Thanks!

Offline TarMinyatur

  • Lt.
  • *
  • Posts: 938
  • Gender: Male
Re: Hex Editing of Starfleet executables
« Reply #545 on: January 31, 2016, 07:28:47 pm »
Corbomite,

Add this line to OP's offsets.txt:
E1087: op // Light Hellbore maximum range bracket, near to far: (90, 94, 98, 9C, A0, A4, A8) // 9C (4th)

If you want Fighter Hellbores to be limited to 4.99k, choose "98" with the SFC_Editor.

The Proximity Photon Torpedo damage chart can be modified by the SFC_Editor. If you don't want magic super Proxies, change four of those 4's to zeroes.

Adam,

Good idea. I don't know. Open a script with IDA as a "PE" file. It will show a lot of readable data. Somewhere there may be a list of backgrounds. If they are randomly assigned, perhaps renaming all of the extensions (except one) to .mox will work. The spacexx.mod file might then be the only valid background. But you could still get empty backgrounds...

Offline Corbomite

  • Commander
  • *
  • Posts: 2939
Re: Hex Editing of Starfleet executables
« Reply #546 on: January 31, 2016, 07:56:03 pm »
Thanks Tar, but you assume I understand how to do that! Oh well, thanks anyway.

Offline TarMinyatur

  • Lt.
  • *
  • Posts: 938
  • Gender: Male
Re: Hex Editing of Starfleet executables
« Reply #547 on: January 31, 2016, 08:31:44 pm »
The SFC_Editor is not terribly hard to use. There's a download for OP around here somewhere.

Hmm, I can simply send you a StarfleetOP.exe that limits Fighter Hellbores to Range 4.99 and sets Proxies to SFB standards. Interested?

Offline Corbomite

  • Commander
  • *
  • Posts: 2939
Re: Hex Editing of Starfleet executables
« Reply #548 on: January 31, 2016, 08:45:54 pm »
The SFC_Editor is not terribly hard to use. There's a download for OP around here somewhere.

Hmm, I can simply send you a StarfleetOP.exe that limits Fighter Hellbores to Range 4.99 and sets Proxies to SFB standards. Interested?


Well, that would certainly make my life easier, so yes, thank you. Before you go through he trouble though, make sure that they match the PhoF range, i.e. be sure it's really not 3.99 etc. Thanks Tar, you have made me want to play a lot again with this stuff. I was only firing things up about once a month or two before this. Now I'm working on a whole new version of my shiplist. Right now I'm trying to see if when I put the Commando ships in the Freighter section if they will show up in convoys as Troop Transports.

Offline TarMinyatur

  • Lt.
  • *
  • Posts: 938
  • Gender: Male
Re: Hex Editing of Starfleet executables
« Reply #549 on: January 31, 2016, 09:18:39 pm »
You're welcome. Here is your executable.

You might need to unblock this file. Right click the .zip file. Select "Properties". Unblock and apply changes if neccessary.

Offline Corbomite

  • Commander
  • *
  • Posts: 2939
Re: Hex Editing of Starfleet executables
« Reply #550 on: January 31, 2016, 09:29:14 pm »
Wow, that was quick! Thanks! To be clear, this will only change what you hard coded in the game right? All other outside configuration files (resolution, campaign file tweaks, etc) are all unaffected and the .exe just replaces my stock one? Also just to be sure, these are the only changes from stock in this version?

Offline TarMinyatur

  • Lt.
  • *
  • Posts: 938
  • Gender: Male
Re: Hex Editing of Starfleet executables
« Reply #551 on: January 31, 2016, 09:54:38 pm »
The executable is built on 2.561, which repairs Fusion Beams (so they obey the overload range limit of 8.99k). Everything is set to default status except for Fighter Hellbore range (4.99k) and SFB-based Proximity accuracy and range. I made no changes to resolution.

This .exe does not depend on any modified assets. And, yes, it is a simple substitute for your regular StarfleetOP.exe.

I recommend an update for sprites.q3 (Mirak hit and run pause enabled, UI fixes for Romulan Photons, Lyran Fusion Beams, Hydran Plasma Torps, etc.). But then you would need an updated aaStrings.txt and quicktips.txt for everything to be flawless. You mods might not modify these 3 files.
« Last Edit: February 01, 2016, 07:42:02 pm by TarMinyatur »

Offline Corbomite

  • Commander
  • *
  • Posts: 2939
Re: Hex Editing of Starfleet executables
« Reply #552 on: January 31, 2016, 10:14:47 pm »
The executable is built on 2.651, which repairs Fusion Beams (so they obey the overload range limit of 8.99k). Everything is set to default status except for Fighter Hellbore range (4.99k) and SFB-based Proximity accuracy and range. I made no changes to resolution.

Oh, cool. Now if we can just get them to hold their regular fire until they are closer like the fighters. That and getting fighters to not fire their PhoF at stationary targets at over range 4 (guaranteeing an auto-miss) when set to Attack.

Quote
I recommend an update for sprites.q3 (Mirak hit and run pause enabled, UI fixes for Romulan Photons, Lyran Fusion Beams, Hydran Plasma Torps, etc.). But then you would need an updated aaStrings.txt and quicktips.txt for everything to be flawless. You mods might not modify these 3 files.


Quicktips I don't care about since they are switched off and my regular strings file is unique at this point. Can't remember about aaStrings though. Those fixes are done in Sprites and not the .exe? Interesting. I thought you and Carlos were releasing a UI patch though? Those fixes will be included?

Offline Corbomite

  • Commander
  • *
  • Posts: 2939
Re: Hex Editing of Starfleet executables
« Reply #553 on: February 01, 2016, 01:38:02 pm »
I did a battery of tests and all seems to work as planned. The fighter hellbores fire at the new range and don't seem to glitch or "cheat" in any way on any setting. It actually makes them more formidable since HB get stronger at closer ranges, while giving the opposition at least a chance at a response.

The Phots also work as intended, but as you noticed before the function that doesn't allow you to fire over range doesn't apply, so I suppose the AI will waste a few shots here and there. Humans rarely, if ever, fire at 31-55, so it is a livable compromise. I hope that one day you guys can find that limiter function and apply it.

Thanks again!  :thumbsup:

Offline TarMinyatur

  • Lt.
  • *
  • Posts: 938
  • Gender: Male
Re: Hex Editing of Starfleet executables
« Reply #554 on: February 01, 2016, 07:40:15 pm »
The Phots also work as intended, but as you noticed before the function that doesn't allow you to fire over range doesn't apply, so I suppose the AI will waste a few shots here and there. Humans rarely, if ever, fire at 31-55, so it is a livable compromise. I hope that one day you guys can find that limiter function and apply it.

Thanks again!  :thumbsup:

The maximum range bracket for Proximity Photons can be set to any bracket (0-1, 2, 3-4, 5-8, 9-12, 13-30, 31-55). But I have a strong feeling that the AI will not fire if any chart's column is full of zeroes. Hmm, should be easy to test by tractoring an enemy equipped with modified Phaser-1's that have a hopeless Range-2 column...   

The minimum Proximity bracket can also be changed. A conjectural 83% accurate Proximity Photon at range 5 to 8 would be useful against a +2 shift.

Offline Corbomite

  • Commander
  • *
  • Posts: 2939
Re: Hex Editing of Starfleet executables
« Reply #555 on: February 05, 2016, 04:41:34 pm »
For you guys who have been poking around in there - Do you think changing the offsets to those in red would get the phots to be limited to 30.99?

457108: 7f // Photon brackets, range x10 // 20.0, 30.0, 50.0, 90.0, 130.0, 300.0, 310.0


EDIT: What the heck I gave it a shot and............ it works! It won't fire past 30.99 anymore and the only anomaly I saw was that when set to normal the damage estimate was off by -2 at 17% and by -1 at 33% (using 6 Phots to make the math easy).

So, if you want SFB Photons all you need to do is set the last two range brackets to 300.0 and 310.0 respectively, then on the damage charts you need to add an 8 into the first position of the seventh column (matching the one in the sixth) in the regular damage chart and then you need to zero the last 4 in both the fifth and sixth columns and then match the 4's in the sixth column into the seventh column in the proximity damage chart. That way that last tiny bracket of 0.99 has the same effect as the previous range bracket.
« Last Edit: February 05, 2016, 06:28:32 pm by Corbomite »

Offline TarMinyatur

  • Lt.
  • *
  • Posts: 938
  • Gender: Male
Re: Hex Editing of Starfleet executables
« Reply #556 on: February 05, 2016, 08:41:29 pm »
I did a test. An AI ship will not fire if a column is full of zeroes. But a player can do so.

Corbomite, you can make the 7th photon bracket even smaller by setting the 6th to 309.9.

Then only a miniscule bracket of 30.990k to 30.999k would apply to the last column, which you could fill with zeroes.

Offline Corbomite

  • Commander
  • *
  • Posts: 2939
Re: Hex Editing of Starfleet executables
« Reply #557 on: February 06, 2016, 06:19:15 am »
I did a test. An AI ship will not fire if a column is full of zeroes. But a player can do so.

Corbomite, you can make the 7th photon bracket even smaller by setting the 6th to 309.9.

Then only a miniscule bracket of 30.990k to 30.999k would apply to the last column, which you could fill with zeroes.


That's what I'm getting at here. No one can fire past range if you do the mod I did. You get the warning beeps if you try. It also makes the green/red color firing indicator in the lower left function (mostly) properly (no all red, but reading 0 damage potential in the display). I was trying to avoid accidental firing that would result in a sure miss and waste two turns.

Offline Corbomite

  • Commander
  • *
  • Posts: 2939
Re: Hex Editing of Starfleet executables
« Reply #558 on: February 06, 2016, 04:59:20 pm »
I just experimented with a modified range 5.99 PH3/G that beefed up the last three damage columns a bit to give them a better chance to hit and a little more damage in certain slots.

I flew a drone cruiser with 6 racks and a full load of small fast drones against an MKE (6 PHG) with no fighters, no shuttles and 20 screws for repair. I used no other weapons except the drones. I did manage a good many hits when I managed to coax fire at close range and then overwhelm with a SP, but out of 160 drones only about 8-10 hit, some only weakening a shield, others doing about 60+ points of internals total. I ran out of drones and SP before it was even close to being crippled even if it had had only a few screws.

Seems like a decent compromise. I felt that PD phasers should at least be able to shoot at a downed shield during a boarding action. They definitely aren't SFB spec though.

Offline Corbomite

  • Commander
  • *
  • Posts: 2939
Re: Hex Editing of Starfleet executables
« Reply #559 on: February 06, 2016, 05:41:35 pm »
Nothing really it was just an experiment. AI PD is definitely better with it and fighters do better as well. They don't fire PD at long ranges and actually seem to hold their fire most of the time to match the range 4 HW. I was using modified ISC fighters with PhG, HB and Phot.

If people are interested in trying it out I can give you the specs I used.