Dynaverse.net

Taldrenites => General Starfleet Command Forum => Topic started by: Kumerian14 on May 09, 2018, 11:14:59 pm

Title: SFCOP+ - Questions and Bug? - Fighter UI "Fix"
Post by: Kumerian14 on May 09, 2018, 11:14:59 pm
Hello, folks!  After yet another long pause, I'm back at SFC:OP w/ OPPlus 4.11 on my Linux machine.  WINE has been ultra stable this time--no crashes at all.  I'm slowly gobbling up Klingon territory as the Hydrans in a conquest campaign.  I modified the .gs files to prevent the "creeping lag" syndrome (thanks Corbo) and all appears to be well.  However, I've noticed a possible bug, but I cannot find any mention of it after searching the forums, so I wanted to ask if any fix was known.

When I first started, I would buy fighters at the shipyard, but they would disappear when I entered a battle.  I found a thread on this, and it said that if you set your working directory to the location of "StarFleetOP.exe", then this would not happen.  I configured this in WINE, and poof!  My fighters re-appeared.  HOWEVER...

I have a new / separate problem.  When I open the shuttle bay listing, all my fighters, no matter what type / class, are displayed as "Patrol Fighters"--both the pop-up tip and the unit icon.  I typically carry 2 heavy squadrons of Hornet-III for long-range harassment and 1-2 assault squadrons of Wasp-III for self-protection.  With this bug, however, I cannot tell them apart, so I'm constantly launching the wrong type for the wrong role.

1) Is this at all related to the "disappearing fighters" problem?

2) Where is the text for this stored--in ftrlist.txt?  Could this be a problem of mis-labeling (or just omission) in a file somewhere?

3) Since both the icon AND the text are wrong, would this data be stored in the .exe or some other file not easily readable?

If I can get one or the other fixed, that would solve the problem.  I just want to know what I'm launching!

Thanks for your help, everyone!

(Edit on 5/11/18: Separate question about v2564 community patch removed and placed into separate thread.)
Title: Re: SFCOP+ - Questions and Bug?
Post by: TarMinyatur on May 10, 2018, 12:07:46 pm
The icon and name and quicktip for fighters are entirely based on the unit's BPV. Taldren never enabled a more sophisticated ID scheme. Even PFs use this same system. You can make a "heavy" fighter with tons of weaponry and armor, but if its BPV is less than 10(?), it'll always show "Patrol" on the UI. The targeting reticle should however truly identify the fighter type (Hornet.II) at range 5 or more. At close range it may display the generic term, Fighter, since those units never have designations like "Enterprise" or "Flamma Accipter".
Title: Re: SFCOP+ - Questions and Bug?
Post by: Captain Adam on May 10, 2018, 01:01:18 pm
So based on this, can you manually change the BPV so the game can analyze the values and display the icons correctly within the shuttle bays?
Title: Re: SFCOP+ - Questions and Bug?
Post by: Kumerian14 on May 10, 2018, 07:39:59 pm
Captain - Ha!  You took the question right out of my mouth.   ;)

Tar - Wow, thanks for the quick service!  So, based on your comment, is there a BPV amount that will "re-assign" each fighter group to their proper type?  Will, say, a BPV of 12 cause them to be identified as "Heavy", whereas a BPV of, say, 11 set them as "Interceptors"?  I can edit the ftrlist.txt if needed to get this to work, I just don't have any info on the required BPV entries.

Also, should I split out my second question?  I almost did that before I posted.

Thanks, folks!
Title: Re: SFCOP+ - Questions and Bug?
Post by: TarMinyatur on May 10, 2018, 10:45:26 pm
I forget the exact values. A text editor for ftrlist.txt in ../Assets/specs (and the ftrlist.txt in ../MetaAssets if you're doing a campaign) should quickly find the BPV breakpoints for Patrol, Interceptor, Assault(Heavy?).

It's something like 1-5, 6-9, 10+ for fighters. PFs may be 1-10, 11-18, 19+. Guesses from rusty memory.
Title: Re: SFCOP+ - Questions and Bug?
Post by: Kumerian14 on May 11, 2018, 12:58:58 am
Yep, I took a look in the ftrlist.txt to see what I could locate.

I think the OPPlus mod may have scaled the values to bring the BPVs closer into line with SFB standards, as virtually none of the fighters are rated any higher than about 8.  The Hornet-III was rated a 7, which potentially might have placed it into a non-Patrol category, based on your info.  However, it's one of the most powerful fighters in the game, so I would have thought that it would rate higher than 7.

According to one of the old reference books about the game, the "vanilla" BPVs were scaled by era, so even the early-era Assault fighters should cost no more than 5-6, while the late-era fighters of all types should be between 11-15.  If that reference is accurate, then all the fighters in the early era could show up as Patrol, but all late-era fighters could appear as Assault.   :D

I understand making short-cuts in coding to get around tenacious problems, but this is a bummer.  If it really is coded that way, I can adjust the BPVs in the file, but it's gonna skew the missions and drafting somewhat, so I'll have to account for that.   :-\

Tar, thanks for the help.  Any further suggestions?  I'm not against editing the BPVs, but do you know of a source where I can check the BPV ranges for what you indicated?
Title: Re: SFCOP+ - Questions and Bug?
Post by: TarMinyatur on May 11, 2018, 11:57:08 am
Just add a bunch of Hydran fighters called test7, test8, test9, etc. Set the BPV to 7, 8, 9, etc. Do a skirmish with a H-CAV
It's ten minutes of testing to find the breakpoints.

As far as BPV skewing campaign battle generation...I believe the fighters' BPV is never included. If you are matched with a 180 BPV H-Overlord, its partial squadron of Hornet.III with all those Ph-G and HellF is not relevant. The campaign thinks your F-BCG is a fair match (180 vs 180). It's been a while, so I might be mistaken. Same goes for a K-D5D with over a hundred fast misiles. The battle generator treats it identically to a D5D with slow missiles.
Title: Re: SFCOP+ - Questions and Bug?
Post by: Kumerian14 on May 11, 2018, 02:54:46 pm
Thanks for the reply again.

I figured the testing wouldn't take much time.  I just thought that this might be documented somewhere handy.  No prob, I'll fire up the testing when I get a few minutes.

Wow, really?!  Fighter and missile types aren't figured in?  I can see why writing code to account for this during drafting may be tricky, but man, that could really give Hydrans in particular a huge edge (and Mirak, in the case of missiles)!  If that's the case, then does fighter BPV have any impact on the game, other than determining what the UI shows in the shuttle bay listing?

Please understand, I'm not contradicting you, by any means, I'm just rather surprised, actually.  BPV is such an important value, at least in SFB.  It seems strange to relegate that crucial value to UI setup.
Title: Re: SFCOP+ - Questions and Bug?
Post by: TarMinyatur on May 11, 2018, 10:20:33 pm
Buying replacement Hornet.IIIs will cost more prestige than YellowJackets in spacedock The dynaverse server can make them very expensive for players. A plasma torpedo, however, always costs the same...so early on Plasma chuckers have an advantage, but as faster missiles, warcruisers, and hideous things called Caveat.III are deployed, the tide turns.
Title: Re: SFCOP+ - Questions and Bug?
Post by: Kumerian14 on May 12, 2018, 12:15:39 am
Yep, that makes sense.  I'll take a look at the relevant .gf files to see how that might affect replacement costs and such.

Thanks for all your help, sir!  You have been a fountain of information.
Title: Re: SFCOP+ - Questions and Bug? - Fighter UI "Fix"
Post by: Kumerian14 on May 12, 2018, 02:12:44 am
Folks,

After about 45 minutes of all-weather testing, I think I have a grip on what's happening with the strange fighter UI / BPV connection, so I wanted to post my data for community use.

Tar is very correct.  The shuttle bay UI is keyed to the BPV of each fighter.  Change the BPV in ftrlist.txt and both the roll-over text and the icon change.  Here is what I found:

BPV 1-9 = Patrol Fighter
BPV 10-12 = Interceptor
BPV 13-14 = Heavy Fighter
BPV 15-17 = Assault Fighter (I stopped at 17, as there wasn't any compelling reason to keep going)

To test out the effect this has on a large carrier, I purchased fighters for each of the 4 squadrons on a Hydran Monarch-V BBVx (it was handy in the shipyard).

Cost per single Fighter Purchased (Advanced Era):

Killer Bee-III = 32
Yellow Jacket-III = 43
Hornet-III = 50
Wasp-III = 61

In other words, to outfit a Monarch-V BBVx (which has 5 fighters per squadron) with 2 squadrons of Hornet-III and 2 squadrons of Wasp-III, the Prestige cost is 910.  :D  Ouch!

Now, there's a couple ways to take this.

1) Tar pointed out that ships which don't use fighters (such as some plasma ships) start out at an advantage, but as fighters get better, fighter-poor ships lose some of their economic advantage.  These numbers could be used as a way to balance any late-game advantage provided to fighter-heavy races.

2) If fighters are too cheap, players can treat them as a type of Phaser-based MIRV.  These increased costs could be used as a way to moderate casual "wastage".  Replacement costs will encourage better fighter management and more thought regarding their deployment and recall.

I know these last two points sound like justification, and to a certain degree, they are.  However, IMHO, fighters always seemed too inexpensive and disposable.  In the real world, especially modern times, crews wouldn't be sacrificed so casually--they're too valuable of a resource and too expensive to constantly replace.  So I'm interested to see how this affects my own playing style and tactical decisions.

Hope this smattering of data helps everyone else!
Title: Re: SFCOP+ - Questions and Bug? - Fighter UI "Fix"
Post by: Captain Adam on May 12, 2018, 06:52:25 am
Well since the numbers are figured out maybe someone or maybe sometime down the line of exploration; those numbers will be run into and can be manipulated to show the icons and also keep the purchasing balance by increasing the low brackets. You never know. But for now you have to decide whatís more important, icons or balancing. I know. Itís hard lol
We want the game just right.
Title: Re: SFCOP+ - Questions and Bug? - Fighter UI "Fix"
Post by: Javora on May 12, 2018, 06:58:06 am
Is there a way to change the fighter icon based on the BPV value?
Title: Re: SFCOP+ - Questions and Bug? - Fighter UI "Fix"
Post by: Captain Adam on May 12, 2018, 07:19:46 am
If those numbers can be located and altered to reflect a more sensible approach that keeps the price/balance then it would be great but itís not a priority at the moment. Itís a lot of work looking through the Hex just for this icon issue. Fighters donít even behave as we want them to, they donít fire strategically, waste ordinance, disobey orders and needlessly get themselves killed and wasted. Icon is the least of our problems. But if we run into those numbers by accident why not change them. But itís not a task Iím willing to spend hours on.

My planet project takes up most my time. Tim setup doesnít have this option atm and Carlosí project imho is more worth it than this. Personnel and resources are limited in our small group.
Title: Re: SFCOP+ - Questions and Bug? - Fighter UI "Fix"
Post by: Captain Adam on May 12, 2018, 07:50:34 am
But donít let this diminish or discourage you from contributing to the SFC project. Those numbers you have retrieved will help track down the bug. Maybe not in the immediate but eventually when one of us pokes around and sees that particular pattern, then it can be addressed. I hope you understand where I am coming from.

Adam
Title: Re: SFCOP+ - Questions and Bug? - Fighter UI "Fix"
Post by: TarMinyatur on May 12, 2018, 10:05:13 am
This is a good introductory task for someone new to hexediting and disassembly. Search for integers 9, 12, 14 or 10, 13, 15 in succession. The data will likely be found in StarfleetOP.exe. It might have the info stored as 14, 12, 9. There won't be many occurrences...it's too specific to be found a dozen times. They won't be stored as floating-point numbers. Probably ordinary integers in hexadecimal as the bytes 09, 0C, 0E or 0A, 0D, 0F (or perhaps 4-byte length as 09000000, 0C000000, 0E000000).
Title: Re: SFCOP+ - Questions and Bug? - Fighter UI "Fix"
Post by: d4v1ks on May 12, 2018, 01:05:54 pm
After about 45 minutes of all-weather testing, I think I have a grip on what's happening with the strange fighter UI / BPV connection, so I wanted to post my data for community use.

BPV 1-9 = Patrol Fighter
BPV 10-12 = Interceptor
BPV 13-14 = Heavy Fighter
BPV 15-17 = Assault Fighter (I stopped at 17, as there wasn't any compelling reason to keep going)

Thanks for your time, and for sharing those numbers.
I posted some extra info about this feature here (https://hotandspicyforums.com/hex-editing-of-sfc-executables-t18867-s275.html#p259501).
Title: Re: SFCOP+ - Questions and Bug? - Fighter UI "Fix"
Post by: Kumerian14 on May 12, 2018, 01:50:04 pm
Glad to be of service to everyone.  Given how much I've learned about the game from reading everyone's posts, it's probably about time I gave back to the group.

Captain - Based on other posts, I'm certain there are items on the repair list much higher than this.  This problem was just a minor annoyance for which I thought someone may have already found a fix.  Since I'm running SFCOP under WINE, I wondered if this might be another artifact from that.

Tar - Thanks for your help and additional info.  I adjusted all the BPVs in the ftrlist.txt so that I can continue my campaign and see how the BPV changes impact the situation.

d4v1ks - No problem, happy to help out.  I'll keep an eye on that forum thread you included, as that's some fascinating background on the game's coding.

Cheers!
Title: Re: SFCOP+ - Questions and Bug? - Fighter UI "Fix"
Post by: Captain Adam on May 12, 2018, 02:19:17 pm
Itís was going to be revisited. I was going to do something with those icons bc in my future mod I want to be able to distinguish btwn Peregrine fighters, Danube runabouts, etc...
We do have a lot on the list. I wish we had more time and resources. But Iím glad youíll stick around. Lots to read. Lots to learn and catch up on.
;-)
Title: Re: SFCOP+ - Questions and Bug? - Fighter UI "Fix"
Post by: Kumerian14 on May 12, 2018, 04:30:49 pm
I have hot and cold periods in my job, so right now, things are a bit slower.  Gives me more time to catch up on personal interests.  Sometimes I can't do more than just lurk.
Title: Re: SFCOP+ - Questions and Bug? - Fighter UI "Fix"
Post by: TarMinyatur on May 12, 2018, 05:07:27 pm
I wonder if Fast Patrol craft (PF) use the same BPV ranges for icons and hover-text. Ardak, can you test this, too?

(My Kindle Fire doesn't run StarfleetOP.exe otherwise I'd modify my shiplist.txt to test PFs.)
Title: Re: SFCOP+ - Questions and Bug? - Fighter UI "Fix"
Post by: Kumerian14 on May 13, 2018, 10:28:29 pm
Well, thanks for the inadvertent compliment, Tar, but I'm not Ardak.  ;)  My understanding is that Ardak Kumerian is a character created by an SFB player who wrote fan fiction.  This commander was sort of the prototypical Klingon strategist who made a name for himself along the Federation border and rose in the ranks over time.  Sort of the Klingon version of Horatio Hornblower.

As for the PF data, I might be able to look at this in the next few days, but my work schedule is picking back up, including some overtime projects that are coming due.  If possible, I'll try to fit in some additional testing time here and there.

The standard PF data is confined to the shiplist.txt file, just like the main-line ships, yes?  There isn't another data file floating around with additional stats, maybe one that I missed somewhere?  You guys know more about the directory structure than I do at this point.
Title: Re: SFCOP+ - Questions and Bug? - Fighter UI "Fix"
Post by: TarMinyatur on May 14, 2018, 05:08:36 pm
The data for the BPV of Fast Patrol craft is only found in the shiplist.txt files. The *.gf campaign files can affect prestige costs, but not BPV.
Title: Re: SFCOP+ - Questions and Bug? - Fighter UI - Data for "Fix"
Post by: Kumerian14 on May 25, 2018, 10:44:38 am
Folks,

I haven't had much time to follow-up on this (work and real life keep intervening), but I have determined a few things:

1) Using the Gorn as a reference, the BPV values in the original shiplist.txt and the OPPlus 4.11 shiplist.txt appear to be the same, in particular for the 5 main types of PFs (INT, PFS, PF, PF+, and PFL).  I've checked through my directories and compared several versions of each, just to be sure they were all the same (I made backups at several points before installing various mods).  This appears to be the case.  This result would suggest that the roll-over text for the UI is not linked to the BPV, at least not in the same way that fighter shuttles are linked.

2) Assuming that the numbers for the OPP4.11 shiplist.txt were the starting point, I wonder if changing the BPVs in a way similar to the fighter shuttles would be a valid fix anyway.  To get the UI text correct, I had to roughly double the BPV of the fighter shuttles (per squadron of 4, Hydran Killer Bee III went from 20 to 36, while Hornet III went from 28 to 56).  Assuming that we had to apply the same process by scaling the BPVs upward, a squadron of Gorn INT (26 each) might increase from 78 to 156 while PFL squadrons (53 each) might increase from 159 to 318.  That would make the cost of a PFL disproportionate to its actual combat effectiveness.  If, on the other hand, we scale the BPVs DOWNWARD, then PFs almost become more cost effective than fighter shuttles, which is also disproportionate to their respective combat effectiveness.

Now, I don't know as much about the innards of the code as some of you do, so maybe I'm missing a key item here.  However, it seems to me that using altered BPV numbers to "fix" the UI for Fast Patrol ships is less practical (and less cost effective) than for fighter shuttles.  Due to time constraints, I haven't tested any altered BPV numbers in-game yet, so I would still have to try this to get actual BPV data (assuming it works that way).

Sorry I'm slow on this, but I hope the analysis so far helps to clarify a few things.  Let me know if I'm way off track here.

EDIT: Looked at wrong column of numbers from fighter testing--had to correct BPV listings.  Sorry about that.
Title: Re: SFCOP+ - Questions and Bug? - Fighter UI "Fix"
Post by: TarMinyatur on May 25, 2018, 06:32:33 pm
Thanks for checking this out. I bet Taldren used a multiplier for the PF icon and hover-text.

An excellent PF is very roughly equivalent to two top-tier fighters. But a basic PF is just as crummy as 4 primitive fighters in Taldren's Ph-3 insane universe (firing at range 8+ consistently).

Since each "bay" on a carrier typically holds 4 fighters or exactly one PF, a multiple of four may be present.

Let's say a PF has a BPV of 41. It'll use the "interceptor" icon because it is greater than 4x10. Any PF with a BPV less than 40 would use the wimpy "patrol" icon. I don't know if the actual multiplier is x2 or x3 or something weird like x1.67. I highly doubt the calculation is logarithmic or exponential.