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

0 Members and 2 Guests are viewing this topic.

Offline xeryx

  • Lt. Junior Grade
  • *
  • Posts: 49
Re: Hex Editing of Starfleet executables
« Reply #640 on: January 13, 2017, 10:45:08 am »
Tar you are Nailing these Numbers man!

Those Missile numbers affect the campaign too!!

I set my medium missile numbers to 11 and fast 21, and they showed up on the correct years in the campaign, so they affect both!!  As far as the Fighters, you need to move to another starbase for them to become active for some reason, but they do show up in the proper year. Missiles do also, you just exit out of the equip screen and go back in. Maybe they have some verifiers and button clicks too that were missed the first time.

I am glad they used a 17 as well to make it easy to find!

Now I can match my missiles to my eras!!! WOOT WOOT!! This is friggin AWSOME!!

I will test the ERA's numbers today for campaign effects.

I think the Bases are loaded and you are about to hit a grand slam!

EDIT: After further Testing, because I could not wait.

I am going to break this down, I hope that I can make this simple without wordiness bear with me.

The TIME.GF file controls the START date of an Era for a campaign. 

The Time 1 Tab in the EXE controls the END of an era in the Skirmish mode only and also
your Base Year.  Both Base year numbers in the EXE and Time .GF need to be the same in order for your years to be in sync with each other.

Here is what I did in my mod.

I start my time at 2253,
Early ERA = +10yrs (2263)
Middle ERA = +15Yrs (2278)
Late Era =+15yrs (2293)

Ok so this is how you set up the TIME.GF file for those eras.

[Clock/StartingDate]
BaseYear   = 2253
0         = 0  //Start of EARLY Era (This should always be 0)
1         = 10   //Start of MIDDLE Era
2         = 25   //Start of LATE Era
3         = 40   //Start of ADV Era

In my EXE I edit the time tab for the ending of the ERA's like this
Because I want my skirmish eras to coincide with my campaign for testing of ships and balance.

10, 25, 40, and 100

10= End of EARLY
25= End of Middle
40= End of Late
100= End of Advanced 

I would appreciate if someone else could double check in their game.

Outstanding work TAR you MADE my friggen month. As far as I am concerned this is probably one of the BEST edits available because it really opens up possibilities for many mods.  In case you don't realize it you just closed a subspace tear in the Time space continuum. (and fixed an error with the game that even the developers never caught)

The slipstream is now fluid and can pass through time with ease.

I dub thee
Tar The Time Lord.
« Last Edit: January 15, 2017, 02:18:06 pm by xeryx »

Offline TarMinyatur

  • Lt.
  • *
  • Posts: 938
  • Gender: Male
Re: Hex Editing of Starfleet executables
« Reply #641 on: January 13, 2017, 02:22:54 pm »
Glad to help.

I understand why 14 Degrees East and Taldren used the 7th year (2270) as a limit for Mid Era Skirmishes. If you include ships with in-service dates of 2271+, they become more powerful each year. The year 2270 includes a few fantastic ships (L-BCP+, L-CWLP, I-CAY) but typically gives the first decent upgrade for most races (F-NCL, G-CA+, H-DG+, H-CAV,  I-CLY, K-D5C, Z-CM, R-K7RB). Changing Mid Era to the 6th year would be rough for the Gorn and Feds and Hydrans -- they need the 2270 arrivals to compete in free-for-alls against experienced captains. (The Lyrans arguably rule Mid Era that closes on the 7th year. Check out the Nexus Traveler's Ship Guide.)

Whenever you end an era, it is arbitrary. 2270 seems fine for Mid. Changing it to 2269 or 2271 would benefit some empires more than others and ignite arguments. But in singleplayer, you don't have to compromise. :-)

I guess the programmers used SFB's 2267 and 2280 for the introduction of medium-speed and fast-speed missiles respectively. Using 2274 (+11) and 2284 (+21) would not comply with the board game's history. Some people care about this SFB stuff more than others. But with the SFC_Editor you can customize as you see fit.

It can be argued that Early Era soon ended when the Romulan shipyards produced warp-capable cruisers, such as the War Eagle (R-WE) in 2262. They had purchased some Klingon D6's for conversion to the R-KR a bit earlier (as shown in TOS). Again, it's arbitrary. 16 years ago, Overon and I requested that Taldren's programmers (Dave Ferrell) change the blocky era function to an incremental function -- you set the precise year per scenario. Dave liked the idea, but it never happened...I'm sure it would have been good and bad for multiplayer. What Klingon wouldn't ask for 2277 in a Starlance match, which just happens to exclude the F-BCF (2278) by one year? Actually I take that back, the Klinks I knew had a sense of fairness. Most of us were not terms campers regardless of empire.   
« Last Edit: January 13, 2017, 03:49:36 pm by TarMinyatur »

Offline TarMinyatur

  • Lt.
  • *
  • Posts: 938
  • Gender: Male
Re: Hex Editing of Starfleet executables
« Reply #642 on: January 13, 2017, 03:54:33 pm »
Hmmm, you mean Kirk is refusing to decommission the Enterprise when he's suppose to, it's plausible.
Sidebar: Tar, I just put the Saratoga Mega Phasers on an Excelsior pylons, LMAO, looks like a BEAST!


That is a beast, Adam. Phaser-4's for Mega Phasers?

Offline Captain Adam

  • Lt.
  • *
  • Posts: 749
  • Gender: Male
Re: Hex Editing of Starfleet executables
« Reply #643 on: January 13, 2017, 04:27:47 pm »
I made this kitbash for Xeryx, he was thinking PhA/B but I was thinking if you use Ph4, just 1x each side and place it on Heavy Hardpoints, they'll be a delay in firing once the standard compliment of phasers is exhausted within the capacitor. That minor delay would work well. The ship could be used for Base/Planetary Assaults. I'm thinking a Federation experiment with placing Ph4 on a mobile platform. Make the ship slow, poor maneuverability and underpowered.
But I do like the Saratoga megaphasers on it. Looks great.
« Last Edit: January 13, 2017, 06:43:20 pm by Captain Adam »

Offline TarMinyatur

  • Lt.
  • *
  • Posts: 938
  • Gender: Male
Re: Hex Editing of Starfleet executables
« Reply #644 on: January 13, 2017, 08:02:01 pm »
Tar you should probably include these numbers in your next update so games will work right.(10,20,30, 100)
...I would also remove the references to the "Skirmish mode" in the time tab as that may confuse people, if possible.

Hmm...I don't see how the .exe edits for the end of each era affects a campaign. You can run a campaign with these numbers: 0, 1, 2, 3 in the Year tab. Try it. I don't think the Dynaverse cares, right? These numbers only restrict ship selection in singleplayer and multiplayer skirmish modes, as far as I can tell. I could very well be mistaken though. Time.gf, on the other hand, is the controller in a campaign. It acts as a fast-forward button.

I found an oddity, however, tonight. In a multiplayer Free-for-all, selecting "Advanced" era allows all ships to be browsed through, including tournament ships (with YFA of +999) even if Advanced era is customized to end at year +3 (2266)! So there is an override that I haven't discovered yet. The tournament stuff must ignore the hardcoded era limit of +100 (default for Adv), otherwise these important ships (F-TCA, K-D7CT, R-TKE, etc.) would never be available.
« Last Edit: January 13, 2017, 10:39:49 pm by TarMinyatur »

Offline Captain Adam

  • Lt.
  • *
  • Posts: 749
  • Gender: Male
Re: Hex Editing of Starfleet executables
« Reply #645 on: January 13, 2017, 08:16:40 pm »
Just when we thought we had it all figured out bam! Another curve ball. Ehh

Offline TarMinyatur

  • Lt.
  • *
  • Posts: 938
  • Gender: Male
Re: Hex Editing of Starfleet executables
« Reply #646 on: January 14, 2017, 01:43:13 pm »
Xeryx, I will look for the game going out of sync. It would be good to have this time thing straight in my head. It is complicated.  :o I actually think the best solution may be to modify the processing of the time.gf file to read negative numbers. Then we don't have to mess with the shiplist in-service dates.

[Clock/StartingDate]
BaseYear=2263
0=-15
1=0
2=15
3=30

But that's not going to be easy to implement.

Anyway, I tested these values in a campaign:

Year Tab = 2263, 0, 1, 2, 3

[Clock/StartingDate]
BaseYear   = 2263 // Should equal value in Year Tab in SFC_Editor
0   = 0 // Negative numbers not allowed yet
1   = 4 // Medium-speed missiles arrive in 2267
2   = 17 // Fast-speed missiles arrive in 2280
3   = 100 // TNG stuff

I tried "Late" era, shown in red. This ought to be out of sync, right? Well, I created a bunch of Romulan War Eagles named WE2, WE4, WE6, ..., WE24, etc. with the YFA in the designation to do easy math in my head. Each ship had a service period of two years (e.g. YFA2 -> YLA4).

The game began in 2280 as expected (2263+17). The annual economy ran in 2281 and a few WE16 (YFA 2279) and WE18 (YFA 2281) appeared in the shipyard for purchase. Seems good. In 2282, all WE16 (YFA 2279) were properly removed from the shipyards. In 2283, a WE20 showed up in the shipyard. The news properly displayed the new available ships and fighters every year. This continued for 4 more years. Nothing unusual happened. Apparently the Year Tab can be set to 2 (instead of 35) for the end of Late Era without causing a problem.

Perhaps a problem occurs if the BaseYear is not equal to 2263. I'll try a BaseYear of zero...

...from economy.gf:
Code: [Select]
[General]
// This is how often the economy gets run. 10 = every 10th turn
TurnFrequency                           = 1
[Auction/Ship]
// This is the number of turns a ship will stay in the auction que before being removed
MaximumAge= 1

...from time.gf:

Code: [Select]
[Clock]

TurnsPerYear = 1
MilliSecondsPerTurn = 90000 // (60000)
DelayBeforeFirstTurn                 = 10000
TimeStopWhenInTactical = 1 // (0) ALWAYS 0 for Server!

Offline xeryx

  • Lt. Junior Grade
  • *
  • Posts: 49
Re: Hex Editing of Starfleet executables
« Reply #647 on: January 14, 2017, 04:05:16 pm »
It is a lot to get your head around and of course I am still learning as well, and why I am a pest! I will process your results and see why you came up with something different.  It is always possible to misinterpret data, and that is why I wanted you to test as well.

So basically you are saying, that the Skirmish numbers have zero effect on campaign and the original numbers that  are in the skirmish mode,  are setup that way because of developments in the SFB universe? Correct?  Not to correlate with the campaign timing in the campaign ERAs right?

Change the base years to be different in the files and see what the effects are please. I will have some time to do more testing tomorrow.  I definitely did have an out of sync condition with different era's.

Ok here are the original years in the campaign right?

[Clock/StartingDate]
BaseYear   = 2263
0         = 0
1         = 10
2         = 20
3         = 40


« Last Edit: January 14, 2017, 04:36:32 pm by xeryx »

Offline TarMinyatur

  • Lt.
  • *
  • Posts: 938
  • Gender: Male
Re: Hex Editing of Starfleet executables
« Reply #648 on: January 14, 2017, 09:58:52 pm »
Xeryx, you're not a pest. Heh.

I tried these settings:
Year Tab:0; 0, 1, 2, 3

time.gf:
[Clock/StartingDate]
BaseYear=0
0=0
1=4
2=17
3=100

Started a campaign in Mid Era (4). WE6 appeared in year 6 as expected. WE8 appeared in year 8. WE10 appeared (and WE6 was removed) in year 10. I don't see an out-of-sync situation here.

Yeah, I think the default settings are these in time.gf:

[Clock/StartingDate]
BaseYear=2263 // this value is increased by the following choices to define the first year
0=0       // start of "Early"
1=10     // start of "Mid"
2=20     // start of "Late"
3=40     // start of "Advanced"

Trial #2:
I tried these settings:
Year Tab:0; 0, 100, 200, 300

time.gf:
[Clock/StartingDate]
BaseYear=0
0=0
1=4
2=17
3=100

I chose Late Era. Game began in Year 17 (0000+17). My War Eagles, the WE16's, were soon available. Year 18 arrived...a WE18 quickly appeared in shipyard. Year 19 arrived...a WE16 stayed in auction as obsolete. Year 20 arrived...WE20 and WE18 were available and the WE16 was retired. Nothing strange here as far as I can tell.

Trial #3:
Year Tab:100; 0, 4, 17, 100

time.gf:
[Clock/StartingDate]
BaseYear=0
0=0
1=4
2=17
3=100

Started in Mid Era (4). Nothing unusual. WE4's available right away. WE6's available after two years (year 6). WE4's mothballed in year 8 as WE8's were deployed.

YLA's are inclusive. So any ship with a YFA of 4 and YLA of 6 can be built in year 4 or 5 or 6. It can also linger in the auction for a number of turns (set in economy.gf as "Maximum Age"). In my case, I allowed a ship to remain in the auction for one turn. Since my turns/year is set to the minimum of 1, a ship gets a whole year to gather dust -- year 7 in the example above. In year 8, it gets kicked out of service.
« Last Edit: January 15, 2017, 12:59:47 am by TarMinyatur »

Offline xeryx

  • Lt. Junior Grade
  • *
  • Posts: 49
Re: Hex Editing of Starfleet executables
« Reply #649 on: January 15, 2017, 02:09:36 pm »
Thanks Tar the Time Lord for your testing and input! 8)

I also did some more testing today while just changing the skirmish years. As you said Tar "They do not affect the campaign". Only having different base years in the EXE and Time.gf seems to have the effect of time warpage.

The only thing I can think that caused my out of sync condition when I first tested is that I forgot to save the change in the exe while seeing it was the same on the screen.   

I will go fix my previous post so no one gets the wrong idea about the time space continuum.

On to the next challenge.

I do have a question though..are there any Campaign debugging commands?

Xeryx
« Last Edit: January 15, 2017, 04:38:12 pm by xeryx »

Offline TarMinyatur

  • Lt.
  • *
  • Posts: 938
  • Gender: Male
Re: Hex Editing of Starfleet executables
« Reply #650 on: January 15, 2017, 02:55:04 pm »
Another complexity is that game uses two shiplists (and ftrlists). The campaign uses the shiplist.txt in the MetaAssets folder by default. Skirmish Mode uses the shiplist.txt in Assets\specs. Testing eras via a skirmish won't provide any useful information about the campaign shiplist.

Taldren specifically did this to allow players to simultaneously have different specification environments. One for mPlayer Arcade (later Gamespy and Gameranger and Evolve) and a second for Dynaverse campaigns. You could play on a TNG Dynaverse server for a while and then jump into the arcade version for a free-for-all without having to overwrite your shiplist and ftrlist.

If you want to automatically use your skirmish specs for your singleplayer Dyna campaign, change the assets.txt in MetaAssets\ServerProfiles\Singleplayer.

[Files]
ShipSpecs      = ".\Assets\Specs\shiplist.txt"
FighterSpecs   = ".\Assets\Specs\ftrlist.txt"

A multiplayer Dynaverse server will validate spec files in MetaAssets, never in Assets\Specs, however.

Offline xeryx

  • Lt. Junior Grade
  • *
  • Posts: 49
Re: Hex Editing of Starfleet executables
« Reply #651 on: January 15, 2017, 03:05:01 pm »
I am aware of the two sets of lists, and usually change both when I make changes.

I did not think to change those values in the assets.txt file to keep them the same.
That will be helpful.

Not sure if you saw my question because I was editing my previous response.

Are there any campaign debugging tools?  I would like to see more of what is going on under the hood.

Also can you tell me what the final verdict on cloaking ended up being. I read through the posts, but there was a lot of indecision about it at the time.
« Last Edit: January 15, 2017, 04:36:42 pm by xeryx »

Offline TarMinyatur

  • Lt.
  • *
  • Posts: 938
  • Gender: Male
Re: Hex Editing of Starfleet executables
« Reply #652 on: January 15, 2017, 08:34:22 pm »
Campaigns can be run in a debug mode, but I don't know how to do it. Campaigns can also use SQL instead of flat file databases. Again, I am a novice in that department. These forums may contain the info you seek, Xeryx.

Cloaking works differently depending on the version.

Stock SFC1, EAW, OP, and CE use a simple TrueRange*2+5 equation to get the effective range to the fully cloaked target.
OP uses an additional modifier, the so-called Cloak Chart, to adjust incoming damage.

OP Cloak Chart
33% Full damage
33% Half damage
33% Quarter damage

All fractional results are rounded down.

This chart is very effective vs Disruptors and Hellbores because the effective range is used to determine the weapon's strength instead of the true range. Star Fleet Battles uses true range for these weapons, so an OL Disruptor could do 10 points max instead of 6 points at a true range of 0 (0.99k) or 1 (1.99k). Photon Torpedo warheads don't degrade with range, so they work properly with this chart. Phasers and Fusion Beams use effective range. ESG's ignore the cloak as they should. PPD's can only hit a cloaked ship via a bug.

This chart is also crucial in surviving the high-speed Phaser-1 overrun. Without this chart, an attacking ship with 6 Ph-1 will do on average 21 points of damage to the cloaked ship every turn! With the chart, that is reduced to an average of 11 points.

The other effect of cloak is to break lock-ons of seeking weapons. Generally a ship must be going slowly (speed < 4) to have a good chance of making an incoming missile vanish or making a plasma torpedo strike for nothing. OP's cloak is very effective if the ship stops moving -- almost 100% of missiles and plasma torps are fooled by the cloak (Suicide Shuttles are immune however, a quirk well-known by the Gorn, and countered by Romulans via a Wild Weasel). The cloak in SFC1 and EAW and CE is not nearly as good at this -- all plasma will strike, but for moderately reduced damage (half, quarter, and very rarely a twentieth).

OP's cloak is a very valuable device for Romulans and Orions. Use it. Ships like the R-KVL, R-KE, R-RGK, and R-XCA are extremely hard to crack. The cloak in stock SFC1, EAW, and CE is occasionally useful for ships that cannot reach speed 30 (R-WE) but high speed or high ECM is often the superior tactic to the power-hungry come-and-kill-me croaking device.

In EAW 2.037 and CE 2.679, I set the effective range equation to be TrueRange*2+6. This is essential to make the cloak a worthwhile option in those games. Ph-1's typically slaughter cloaked units. Doing so makes the cloak very similar to the SFB version in terms of damage mitigation.

Offline TarMinyatur

  • Lt.
  • *
  • Posts: 938
  • Gender: Male
Re: Hex Editing of Starfleet executables
« Reply #653 on: January 16, 2017, 08:42:19 pm »
In a nutshell; Any and all (-) service dates are seen by the game as already commissioned (again watch the Auction you should see those ships available in the auction in and in the News you will never see them).  They are not released year by year, I repeat they are not released the year of their in-service date, they are all released at one time. You would use these (-) in-service dates to supplement your early auction with ships for the first year, until more ships get commissioned.

Yep. Every ship with a negative YFA is available immediately in a campaign no matter what you do. That's a serious flaw in my opinion. But if you adjust those YFA numbers in the shiplist.txt, these ships can be produced over a great number of years...

Lets say my Vulcan Cruiser comes out in -100 normally (2163) as we reckon. Well, I can set that as the earliest date possible via YFA=0 in shiplist.txt. I start my campaign in Early Era (time.gf: BaseYear=2163, 0=0, 1=7, 2=35, 3=100) and the V-CA is available. I have to wait more than 60 years, however, for the F-CA to appear in the Dynaverse (old YFA=-33, new YFA=67)! That's how it should work.

To simplify this approach, just add 100 to all YFA's to get rid of the troublesome negative values for ships (planets will still have negative values, but that doesn't matter). Compensate by reducing the BaseYear to 2163 in time.gf and in the Year Tab for the SFC_Editor --- Last year of Early could be set to 100, last year of Mid could be set to 107, last year of Late could be set to 135, and last year of Advanced can be 200 (or even better 999).

So Early Era would run 100 years (instead of 1!), Mid Era would run 7 years, Late would run 28 years, and Advanced would run until the variable overflows (4 billion years?).

A good spreadsheet (Open Office Calc) can easily add 100 to the entire YFA and YLA columns in shiplist and ftrlist -- "TAB delimited" files. It'll do the right addition such that -50 becomes 50, -10 becomes 90, 12 becomes 112, etc. No need to edit a thousand entries by hand. Just edit two columns and be done.

Offline TarMinyatur

  • Lt.
  • *
  • Posts: 938
  • Gender: Male
Re: Hex Editing of Starfleet executables
« Reply #654 on: January 16, 2017, 09:20:38 pm »
Just browsing the StarfleetOP.exe with IDA today. Found what looks like the variable for Overloaded Phaser-X.

Obviously the Ph-X chart is multiplied by 1.5 to get the OL Ph-X damage. This 4-byte float variable is shared by 12 functions so we can't safely change it. We can either create a new variable with the pi filler or change the offset to a different existing variable. The offset of this variable in the associated Phaser-X function is found in IDA at 0x4E5AED.

fmul ds:float_1point5
D8 0D 28 72 79 00

Change that to D8 0D ## ## ## 00

## ## ## is little endian. So I could use 58 75 79 to change this offset to find the float value 2.5 in IDA at 0x797558.

StarFleetOP.txt

Tab Phasers

Code: [Select]
E5AEF: 4b 16 // Offset to Ph-X overloaded damage multiplier // 28 72 79 00
E5BC9: 4b 16 // Offset to Ph-X overloaded damage multiplier for HUD (Average) // 28 72 79 00
E5C25: 4b 16 // Offset to Ph-X overloaded damage multiplier for HUD (Max) // 28 72 79 00
E5BFA: 4b 16 // Offset to Ph-X overloaded damage multiplier for HUD (Min) // 28 72 79 00
397270: 1f // Custom value for Ph-X overloaded damage multiplier at 70 72 79 00 // junk

I set up a space for a custom value, such as 1.25 or 1.75. It'll only work if the 4 offsets above it are set to 70 72 79 00. If you don't do anything, the Ph-X will continue to do 1.5 * regular damage when overloaded.
« Last Edit: January 18, 2017, 01:24:01 am by TarMinyatur »

Offline Captain Adam

  • Lt.
  • *
  • Posts: 749
  • Gender: Male
Re: Hex Editing of Starfleet executables
« Reply #655 on: January 17, 2017, 04:04:00 am »
Cool, thanks for the YFA explanation I completely understand. As for the 1.5x damage of OL PhX. That's awesome. Much appreciated. If you happen to run into the PhB 3x variable that keeps eluding me please let me know.
Besides the function that redirects the PhX OL to 1.5x of the Ph1 chart; is there anything else there that can be useful such as a redirect or calling of a particular function. My initial goal concerning the overloaded PhX was to see if I could call for another color so that the PhX would essentially act as Ph1 but when overloaded would change color.

Offline TarMinyatur

  • Lt.
  • *
  • Posts: 938
  • Gender: Male
Re: Hex Editing of Starfleet executables
« Reply #656 on: January 17, 2017, 08:21:59 pm »
No luck with the Phaser-B vs shields variable. I followed the damage with a debugger. Seems the Ph-B reads the chart, grabs a 15, let's say, and sends that to somewhere mysterious (literally var10 which is ignored in the rest of the function). The shield damage allocator must modify it -- and its location has not been discovered. All damage coming off the PhB table is full strength, even against ships with strong shields. The damage gets divided by 3 (or multipled by 0.33 or 0.3333333ish) later. It must work this way to process Hellbores and Enveloping Plasma too. I've looked at all the Ph-B's top layer functions -- none use a divide by three or multiply by 0.33.

I noticed that the Phaser-A and Phaser-B have a "Load zero" function for the HUD's minimum damage calculator. Max and average are ok. This is misleading for the Ph-A. It's only noticeable with Ph-B at range 0.99k or less. I'd need 21 consecutive bytes of space to fix each of these calculators -- borrowing the format from the max-damage calculator while switching one offset to the final row of the chart.

Offline Captain Adam

  • Lt.
  • *
  • Posts: 749
  • Gender: Male
Re: Hex Editing of Starfleet executables
« Reply #657 on: January 17, 2017, 09:23:05 pm »
Hmmmm. Well who knows, sometimes when you aren't looking for something things pop up.
Thanks again though.  ;)

Offline xeryx

  • Lt. Junior Grade
  • *
  • Posts: 49
Re: Hex Editing of Starfleet executables
« Reply #658 on: January 18, 2017, 10:43:48 am »
I did re-confirm my testing results; That if the start year in the EXE is not the same as the one in your campaign Time file, Dates will indeed be out of sync. I attached the screenshots, please note that my years were kind of going fast and I was three years late snipping the Auction screenshot. You can download the jpg and check the time stamps, they are legit.

All ships list were the same, and all years have been compensated for by adding 10 years to the YFA's because my mod starts in 2253. I also made sure I saved my changes in the EXE. :D

I went with 2263 (Time tab "Date Introduced") in the Exe, and 2253 in the Campaign Time.Gf file. I started in the late era and initially, I was seeing ships with a YFA of 2285 and I should not have seen any ships past 2278. Then in 2279 a ship popped up and showed a YFA of 2289. The ship attached in the screenshot became available in 2281 with a YFA of 2291. As expected, it confirms a 10-year shift forward does exist.

When my Starting dates are the same, then there is no time shift. I tested this both before and after this test, and only changed the date introduced tab, while ensuring it was saved all 3 times.

Hypothesis; The Main game clock (MGC) from EXE always starts at the same date, this is set in the Exe with the Time tab "Date Introduced", regardless of what is set in the Time.gf. You just can't see that (MGC) time running in the game, it is in the background. This also proves that the (MGC) time in the EXE is the one used for the ships list and fighter list (as the label suggests) for both skirmish and campaign modes. Furthermore, even though you can see the time flow within the campaign. I believe the Time.gf just provides a cosmetic overlay for the campaign. This is the most logical explanation, as to why there is a time shift present if they are not the same, that I can present.


You were correct about the Skirmish years, they do not affect the campaign and cannot cause a time shift.

Maybe trying dates of 2300 would work better for you, I am completely miffed as to why your testing did not show a time shift as mine has. Maybe there is a valid date range?

My Assest.gf was set to this
Code: [Select]
Name = "Assets"
[Paths]
Maps = ".\MetaAssets\"
Scripts = ".\Assets\Scripts\"
Campaigns = ".\Assets\Scripts\Campaigns\"

[Files]
ShipSpecs = ".\MetaAssets\shiplist.txt"
FighterSpecs = ".\MetaAssets\ftrlist.txt"
CurMap = ".\MetaAssets\MiddleMap.mvm"

Thank you, Tar, for the explanation on the cloaking. One last question on that; Does the +5 mean that is +5 columns on the damage chart or +5K added to range?

I also had no luck finding any campaign debugging codes on this forum. Just Volley info and Mission script stuff.

I wanted to also ask if this game has a cache file. I believe everything is loaded into memory at the start of the game.
« Last Edit: January 18, 2017, 03:52:17 pm by xeryx »

Offline TarMinyatur

  • Lt.
  • *
  • Posts: 938
  • Gender: Male
Re: Hex Editing of Starfleet executables
« Reply #659 on: January 18, 2017, 03:15:26 pm »
I'll test the year stuff again. The BaseYear in time.gf seems to be minimally important, as we agree -- you could start with 0 or 5000, it doesn't matter. The "Date Introduced" in the .exe is important. And we're close to verifying its function...

Edit: I don't see any time shift, Xeryx.

StarfleetOP.exe
Date Introduced = 2263 (or 2253 or zero -- it doesn't matter)

time.gf
BaseYear = 0
0=0
1=15
2=30
3=45

Everything is like clockwork. I start a Late Era campaign (0000 + 30). The visible campaign clock shows 30.0 for the initial date as expected. Economy runs for year 31.0. A bunch of WE30's are available, a few WE28's too.  Economy runs for year 32.0. A couple WE32's are in the shipyard, while the WE28's are mothballed. No ship appears before its YFA. Maybe I'm missing something.

I wouldn't use the Vessel Library to test a campaign because it can't view the campaign shiplist in MetaAssets, only the one in Assets\specs, which may be different. If you want a F-DSCS to appear in the 30th year of your Early Era campaign, set its YFA to 30. It will certainly appear no sooner than the 30th year. Make things easy on yourself by using BaseYear=0 in time.gf. The clock will therefore display the exact integer that is compared with the shiplist's and ftrlist's YFA data.

If you start a campaign in Mid Era as BaseYear + 15, you'll have to wait 15 years for that same F-DSCS to show up. The clock will tick from 15.0 to 30.0, and there you go, a F-DSCS in the news and now for sale in the shipyard.

The campaign time always starts at zero behind the scenes because it is based on YFA, not 2263 or 163 or any other ascii string. The only way to modify this starting point is to use time.gf's fast-forward buttons:

0=0 // "Early" -- Don't do anything. All ships with negative YFA values are ready. 
1=15 // "Mid" -- Fast-forward such that ships with YFA's up to and including 15 are ready. 
2=30 // "Late" -- Fast-forward such that ships with YFA's up to and including 30 are ready. 
3=45 // "Advanced" -- Fast-forward such that ships with YFA's up to and including 45 are ready. 

----

Cloak details...

In OP2.563, all units firing at a fully cloaked ship must double the true range and then add 5.0k to obtain the effective range.

F-CA fires 4 OL Photons at a nearby cloaked R-WE...

True range = 1.9k
Effective Range = 1.9k*2 + 5.0k = 8.8k

Photons therefore have a 50% chance to hit (they use the range 5.0-8.9 column) assuming the Fed has more ECCM than the Romulan's ECM, which is likely. The cloak itself does not produce additional ECM, but the War Eagle may use ECM like any other ship. Although not much energy is available for ECM if a ship cloaks, arms Plasma, reinforces shields, moves, etc.

Overloaded Photons that hit may be modified for damage because of the Cloak Chart -- 1/3 do Full (16), 1/3 do Half (8), 1/3 do Quarter (4). So we can expect two torps to hit. Probably one of them will strike for reduced damage. Common damage yields would be 32, 24, 20, 16, 12 with an average around 21.3. The Fed-CA will receive 4 points in feedback for every Overloaded Photon that hits at this true range.
« Last Edit: January 19, 2017, 02:58:04 am by TarMinyatur »