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

0 Members and 3 Guests are viewing this topic.

Offline Corbomite

  • Commander
  • *
  • Posts: 2939
Re: Hex Editing of Starfleet executables
« Reply #240 on: February 01, 2015, 02:23:45 pm »
There is no controversy, just opinion. I would question that mode of play for anyone and any purpose. I'm not specifically approving or discouraging any patch or change. I just think the answer lies elsewhere.

Offline Corbomite

  • Commander
  • *
  • Posts: 2939
Re: Hex Editing of Starfleet executables
« Reply #241 on: February 01, 2015, 02:39:03 pm »
No, all I am on about ATM is turning off PD for plasma in an AI environment based on an example given for PvP combat. Making PD phasers smarter would be an improvement as long as its not at the expense of manual fire options.

Changing the transporter range to 10 would be a mistake because of T-Bombs and  Boarding Parties, but if you could isolate the the standard orbital distance down to 5.99 the problem would be solved.

Offline TarMinyatur

  • Lt.
  • *
  • Posts: 938
  • Gender: Male
Re: Hex Editing of Starfleet executables
« Reply #242 on: February 01, 2015, 03:43:29 pm »
There is no controversy, just opinion. I would question that mode of play for anyone and any purpose. I'm not specifically approving or discouraging any patch or change. I just think the answer lies elsewhere.
A hotkey might be able to toggle PD vs Plasma torpedoes. Default would be "on". I don't have the ability to do this yet, but it's something I want to do. In the meantime 2.671 is normal -- if 6 missiles are approaching, but a dying Plasma gets to your ship first, your PD phasers will attack the torpedo.

Offline Corbomite

  • Commander
  • *
  • Posts: 2939
Re: Hex Editing of Starfleet executables
« Reply #243 on: February 01, 2015, 09:39:06 pm »
There is no controversy, just opinion. I would question that mode of play for anyone and any purpose. I'm not specifically approving or discouraging any patch or change. I just think the answer lies elsewhere.
A hotkey might be able to toggle PD vs Plasma torpedoes. Default would be "on". I don't have the ability to do this yet, but it's something I want to do. In the meantime 2.671 is normal -- if 6 missiles are approaching, but a dying Plasma gets to your ship first, your PD phasers will attack the torpedo.

If you could set up a Shift function like the Mine/NSM function where hitting the hotkey will turn off/on all PD like it does now and hitting Shift + (key) will only turn off/on Plasma PD, that would solve your issue and give finer control of that system. Of course the AI will still not use it correctly...

Speaking of which, can you guys teach the Rom AI to use NSM?

Offline TarMinyatur

  • Lt.
  • *
  • Posts: 938
  • Gender: Male
Re: Hex Editing of Starfleet executables
« Reply #244 on: February 01, 2015, 09:43:27 pm »
Well, I don't want to turn this into a tactics discussion, but based on what Tar offered up as an example of why it needed changing, I can think of at least three things that could be done to fix that problem that are severely less radical than changing the game code:

1) Have a WW ready.
2) Move faster.
3) Both of these things.


As a corollary if the situation involved a tractor beam:

1) Don't get tractored.

Chekhov to Kirk: One of the enemy wessels has launched nuclear missiles!

Kirk: Do we have phasers ready?

Chekhov: Yes, of course, sir. I'm reserving them for defense.

Kirk: Good. Fire at optimum range. Scotty, increase power to negative tractor beam.

Scotty: Aye. It's already strong, but I can add a wee more.

Spock: The Sparrowhawk has launched a plasma torpedo.

Sulu: It must be fake, Captain. We nearly outran their last torpedo, only sustaining minor damage.

Kirk: Agreed... Ignore that plasma, Chekhov. Take out those missiles!

Commander Corbomite: Captain, I suggest we need better tactics.

Uhura:  ::)

Offline Corbomite

  • Commander
  • *
  • Posts: 2939
Re: Hex Editing of Starfleet executables
« Reply #245 on: February 01, 2015, 09:49:23 pm »
Well, I don't want to turn this into a tactics discussion, but based on what Tar offered up as an example of why it needed changing, I can think of at least three things that could be done to fix that problem that are severely less radical than changing the game code:

1) Have a WW ready.
2) Move faster.
3) Both of these things.


As a corollary if the situation involved a tractor beam:

1) Don't get tractored.

Chekhov to Kirk: One of the enemy wessels has launched nuclear missiles!

Kirk: Do we have phasers ready?

Chekhov: Yes, of course, sir. I'm reserving them for defense.

Kirk: Good. Fire at optimum range. Scotty, increase power to negative tractor beam.

Scotty: Aye. It's already strong, but I can add a wee more.

Spock: The Sparrowhawk has launched a plasma torpedo.

Sulu: It must be fake, Captain. We nearly outran their last torpedo, only sustaining minor damage.

Kirk: Agreed... Ignore that plasma, Chekhov. Take out those missiles!

Commander Corbomite: Captain, I suggest we need better tactics.

Uhura:  ::)


LOL, Umm, yeah, you do. I can't even imagine how much team coordination would be involved with timing that precisely right unless you were pretty much stopped, in which case you need two WW in the bay. You could also target the nearest seeking weapon repeatedly and when the plasma overtakes the drones, turn off PD until the torp hits and then reinitiate PD at the last second. I've done that before and it works if you are on your game.

Offline TarMinyatur

  • Lt.
  • *
  • Posts: 938
  • Gender: Male
Re: Hex Editing of Starfleet executables
« Reply #246 on: February 02, 2015, 06:02:58 am »
I've fought very good teams who did exploit the PD's one-size-fits-all system. The MoK guys knew it, and we GSG knew it. It was done once a game, not during ordinary peeling or weaving or castling with missiles approaching manageably. If I had time to turn PD off, I'd do so. My fingers do work. It's when you're pouncing at a closing rate of about 50, late in the battle, with a good negative tractor. The Sparrowhawk's can't-be-ignored plasma can bail the D5D out, at best, and possibly get you killed. All due to a UI flaw. Chekhov was forced to fire at that pathetic plasma, and the Enterprise lost the initiative.

This is pointless. Arguing about a battle from 15 years ago with someone who wasn't a participant!

Time to get back to work on the bytes.  :-X

Offline Corbomite

  • Commander
  • *
  • Posts: 2939
Re: Hex Editing of Starfleet executables
« Reply #247 on: February 02, 2015, 09:38:47 am »
I've fought very good teams who did exploit the PD's one-size-fits-all system. The MoK guys knew it, and we GSG knew it. It was done once a game, not during ordinary peeling or weaving or castling with missiles approaching manageably. If I had time to turn PD off, I'd do so. My fingers do work. It's when you're pouncing at a closing rate of about 50, late in the battle, with a good negative tractor. The Sparrowhawk's can't-be-ignored plasma can bail the D5D out, at best, and possibly get you killed. All due to a UI flaw. Chekhov was forced to fire at that pathetic plasma, and the Enterprise lost the initiative.

Most everyone tried to do that, but that was the game. Knowing it was like that allowed you to try to not get into that situation in a way that left you at a disadvantange. We couldn't change the game then, just our tactics, therefore there is a way to control that, even if it is advanced tactical.


This is pointless. Arguing about a battle from 15 years ago with someone who wasn't a participant!

Quite, but you gave very little info at first.  :-X

Offline Javora

  • America for Americans first.
  • Commander
  • *
  • Posts: 2999
  • Gender: Male
Re: Hex Editing of Starfleet executables
« Reply #248 on: February 02, 2015, 12:59:41 pm »
I finally found my old assembler text books.  From the looks of what I am seeing on this thread, Taldren used either a MASM or TASM 5.1 compiler.  This is based on four main scratch pad 16 bit registers (AX, BX, CX, DX) which is themselves broken up into two 8 bit registers (AX -->  AH {15 --> 8} and AL {7 --> 0}).  Colors are handled by the INT 10h, INT 16h, and INT 21h interrupts as apposed to INT 13h which handles common programming functions.  So looking for these interrupts should give you a clue as to where the colors are handled in the program.  Although IIRC, INT 21h was also used in old virus programming so I'm guessing you won't see any of that here.  I think I found some of the ASCII values in hexadecimal if you need them.  The book says that display memory is fixed in the first megabyte of the PC's memory which the book is saying is B800:0000 and that this information can be transferred using the MOV instruction.  Hope this helps.

Offline TarMinyatur

  • Lt.
  • *
  • Posts: 938
  • Gender: Male
Re: Hex Editing of Starfleet executables
« Reply #249 on: February 02, 2015, 04:23:19 pm »
The Point Defense hotkey in Orion Pirates works as a toggle.

Action                    PD status
Go to Red Alert: On (except for Ph-4)
Press hotkey:    Off
Press again:      On (including Ph-4)
Press again:      Off

This lessens micromanagement. I like this system. Usually, I want all or nothing.

---

The PD hotkey in EAW/CE is a semi-toggle.

Go to Red Alert: On (except for Ph-4)
Press hotkey:    Off (except for Ph-3 and Ph-G)
Press again:      On (including Ph-4)
Press again:      Off (except for Ph-3 and Ph-G)

I don't like it, but other players might. Your Ph-3/G's are going to fire at valid targets unless you raise the Defense Panel and click on the PD icon. Very tedious and far too slow for critical moments. It is, however, an easy way to toggle your Ph-1's and Ph-2's.

---

In SFC1 there is another system. The PD hotkey, big surprise, activates Point Defense. It can only turn PD on.

Go to Red Alert: On (except for Ph-4)
Press hotkey: On (including Ph-4)
Press a thousand more times: On

If you want to turn off PD, you have to raise the Defense Panel and click on the PD icon. I think this is a good scheme for new players. Via hotkey, you can never turn PD off by mistake. It is however, tedious and inadequate for quickly needed changes in PD status.

---

So my question to the folks here is this: Should CE adopt OP's pure toggle system? Or something else?

Offline TarMinyatur

  • Lt.
  • *
  • Posts: 938
  • Gender: Male
Re: Hex Editing of Starfleet executables
« Reply #250 on: February 02, 2015, 05:24:52 pm »
Quote from: Corbomite
Speaking of which, can you guys teach the Rom AI to use NSM?
If I can find the function that prohibits certain AI actions, I can perhaps change those ones to zeroes. If the AI action doesn't exist, a lot of work will be needed to create them.

The AI seems to be prohibited from using Erratic Manuevers, NSMs, Plasma-I in modes other than "main", Suicide Shuttles, EPTs, Shotgun Plasma, ESGs at ranges other than 1, and probably others.

Magnum said that the AI is programmed to never use EM. My guess is that there is no code to compute when it should be activated or deactivated.

if (AI_tactic == self_protection) {
  set_ECM(6);
  if (defense_shift < 2) set_erratics(on);
  }
if (AI_tactic == anti_plasma) {
  setECM(1);
  set_erratics(off);
  set_speed(phaserboat_speed); 
 }
etc.

Of course a computation must first be done to select an AI tactic. It gets complicated unless it is a 1v1 battle. What if the AI is facing a War Eagle and a D6? Go fast, go slow, use OL? What are the AI's weapons? I can imagine a matrix to select a not-too-terrible AI tactic. Getting that matrix into Starfleet2CE.exe via Hex Edit may be impractical. I first need to find any function that allows me to predictably modify AI behavior. No luck yet.

   

Offline TarMinyatur

  • Lt.
  • *
  • Posts: 938
  • Gender: Male
Re: Hex Editing of Starfleet executables
« Reply #251 on: February 02, 2015, 05:40:47 pm »
I know you haven't found the OP PD code as easy as the CE...
Try changing the 2nd range bracket for Ph-3's from 20.0f to 29.0f. If your Ph-3 PD continues to activate at 1.9 (instead of 2.8) you'll know there's a master PD range limiter of 20.0f.

Finding that exact 20.0f isn't easy, I know. You might be able to follow its external references to the code that descriminates between plasma and missiles.

Offline Javora

  • America for Americans first.
  • Commander
  • *
  • Posts: 2999
  • Gender: Male
Re: Hex Editing of Starfleet executables
« Reply #252 on: February 02, 2015, 06:52:05 pm »

if (AI_tactic == self_protection) {
  set_ECM(6);
  if (defense_shift < 2) set_erratics(on);
  }
if (AI_tactic == anti_plasma) {
  setECM(1);
  set_erratics(off);
  set_speed(phaserboat_speed); 
 }
etc.

Of course a computation must first be done to select an AI tactic. It gets complicated unless it is a 1v1 battle. What if the AI is facing a War Eagle and a D6? Go fast, go slow, use OL? What are the AI's weapons? I can imagine a matrix to select a not-too-terrible AI tactic. Getting that matrix into Starfleet2CE.exe via Hex Edit may be impractical. I first need to find any function that allows me to predictably modify AI behavior. No luck yet.

Since the AI can already detect missiles and plasma, it's just a matter of the AI finding out which is closer to the AI.  Then adjust tactics to better fit depending on difficulty level selected.

Offline TarMinyatur

  • Lt.
  • *
  • Posts: 938
  • Gender: Male
Re: Hex Editing of Starfleet executables
« Reply #253 on: February 02, 2015, 08:27:33 pm »
Corbomite, if a ship uses Erratic Manuevers, does its SFB turn mode get worse? I see no evidence of this in SFC.

A Fed-CA travelling at speed 11 or 15, took 20 seconds to complete a U-turn regardless of EM status. There's a branch in the EM code that multiplies the speed-cost of EM (6.0) by only these four values: 1.2, 1.1, 0.75, or 0.5. I can't think of a reason for it.

Offline Corbomite

  • Commander
  • *
  • Posts: 2939
Re: Hex Editing of Starfleet executables
« Reply #254 on: February 02, 2015, 08:47:21 pm »
Without looking it up I believe it increases turn mode by 1, but it does increase it. It always seemed to me that turns took longer, but I never timed it. It's supposed to add to your HET breakdown too, but doesn't (I'm pretty sure).


EDIT: Looked it up, it is 1 and 1 to HET Breakdown.
« Last Edit: February 02, 2015, 09:00:56 pm by Corbomite »

Offline TarMinyatur

  • Lt.
  • *
  • Posts: 938
  • Gender: Male
Re: Hex Editing of Starfleet executables
« Reply #255 on: February 02, 2015, 10:54:50 pm »
Thank you.

I also had a feeling that EM makes a ship more sluggish. I swear it did in SFC1. If OP has a penalty, I'll attempt to add it to 2.672.

OP doesn't penalize your HET% while under EM. Community Edition does at -16.6%.

Thought I found the PPD fire-hose bug tonight...Nope. I found a function which looks similar to a normal range checker but with an opposite return value. So if you've moved out of range, it gives a green light. Maybe it's a function to break the wavelock.

Offline Corbomite

  • Commander
  • *
  • Posts: 2939
Re: Hex Editing of Starfleet executables
« Reply #256 on: February 03, 2015, 08:46:19 am »
I wonder what the thinking behind that was. OP should have the penalty too as well as increased turn mode, especially since we have regenerating HET % and no tumbling.

Offline Wilmot

  • Lt. Junior Grade
  • *
  • Posts: 7
Re: Hex Editing of Starfleet executables
« Reply #257 on: February 03, 2015, 08:52:34 am »
With regard to EM, I thought one or more of the anti-pirate missions in original sfc has the hostile orion ships use em. Is that mission scripting? I guess it doesn't matter, because SFC volume I and SFC volume II: EAW/OP are probably too different from each other for code in one to be much help in the other.

Offline Corbomite

  • Commander
  • *
  • Posts: 2939
Re: Hex Editing of Starfleet executables
« Reply #258 on: February 03, 2015, 09:28:36 am »
The Point Defense hotkey in Orion Pirates works as a toggle.

Action                    PD status
Go to Red Alert: On (except for Ph-4)
Press hotkey:    Off
Press again:      On (including Ph-4)
Press again:      Off

This lessens micromanagement. I like this system. Usually, I want all or nothing.

---

The PD hotkey in EAW/CE is a semi-toggle.

Go to Red Alert: On (except for Ph-4)
Press hotkey:    Off (except for Ph-3 and Ph-G)
Press again:      On (including Ph-4)
Press again:      Off (except for Ph-3 and Ph-G)

I don't like it, but other players might. Your Ph-3/G's are going to fire at valid targets unless you raise the Defense Panel and click on the PD icon. Very tedious and far too slow for critical moments. It is, however, an easy way to toggle your Ph-1's and Ph-2's.

---

In SFC1 there is another system. The PD hotkey, big surprise, activates Point Defense. It can only turn PD on.

Go to Red Alert: On (except for Ph-4)
Press hotkey: On (including Ph-4)
Press a thousand more times: On

If you want to turn off PD, you have to raise the Defense Panel and click on the PD icon. I think this is a good scheme for new players. Via hotkey, you can never turn PD off by mistake. It is however, tedious and inadequate for quickly needed changes in PD status.

---

So my question to the folks here is this: Should CE adopt OP's pure toggle system? Or something else?


Barring the opportunity to mod the toggle to do the opposite of EAW, i.e. all on/off and micro-control of the phasers for Plasma defense with a shift function, I'd go with OP. The games should be standard in these "automatic" functions. Finer control is available in the MFD panel, although I never reallly knew anyone who used it since there wasn't time to do so. I suppose playing at a really slow speed to simulate actual turns could find the time.

For OP I'd really like to untie the PD toggle from OL Ph- X's. I find it stupid that when I OL phasers that my phaser PD shuts off. I realize that they didn't want to have OL firing for PD, but why can't phasers still fire at normal strength for that purpose?

Offline TarMinyatur

  • Lt.
  • *
  • Posts: 938
  • Gender: Male
Re: Hex Editing of Starfleet executables
« Reply #259 on: February 03, 2015, 04:56:25 pm »
A function in OP suggests that Ph-4's might be able to fire as Ph-3's against missiles, perhaps up to four times. Of course I could be wrong in my guesswork. Obviously, this doesn't happen in the game. But Taldren may have begun to implement this advanced ability.

Didn't X-technology allow a Ph-1 to fire twice as a Ph-3?

I agree that OL Phaser-X's in Orion Pirates should fire at seeking weapons if you want them to. It may be wasteful to do 12 points of damage against a single missile, but you're in command. I'm all for finer control of ship systems.

From what I've seen so far in the code, having the Ph-X operate in OL mode for offense but in standard mode for defense is impossible. I suppose PD could force your Ph-X panel into standard mode when threats are in range, fire at them, and then restore your panel to overloaded mode.

We need more people looking at the code. I'm still isolating mundane stuff, like weapon hold costs...
« Last Edit: February 03, 2015, 05:15:31 pm by TarMinyatur »