Topic: I think I solved the double-fighter bug..  (Read 27986 times)

0 Members and 9 Guests are viewing this topic.

Offline Bonk

  • Commodore
  • *
  • Posts: 13298
  • You don't have to live like a refugee.
Re: I think I solved the double-fighter bug..
« Reply #100 on: July 29, 2004, 03:27:39 pm »
The Gravity Well is running the latest Total War pack now.
« Last Edit: July 29, 2004, 04:03:20 pm by Bonk »

el-Karnak

  • Guest
Re: I think I solved the double-fighter bug..
« Reply #101 on: July 30, 2004, 01:41:23 pm »
*sigh*

From the API, there are 4 mCreateShip functions. Here are their prototype, with the important bit in red.

TeamInfo.h:
Quote
   void   mCreateShip( const type_info& shipClass, const tShipInGame& ShipData);
   void   mCreateShip( const type_info& ShipClass, const char* ClassName, int32 Position, int32 MetaDatabaseID, int32 CustomID, int32 StartX, int32 StartY, int32 EndX, int32 EndY, const char* CustomName, eShipOptions ShipOptions ); // The only one used
   void   mCreateShip( const type_info& ShipClass, int32 TotalBPV, eClassTypes ShipType, int32 VariantPercent, int32 Position, /*int32 MetaDatabaseID,*/ int32 CustomID, int32 StartX, int32 StartY, int32 EndX, int32 EndY, const char* CustomName, eShipOptions ShipOptions, eRace Race = kNoRace );

   void   mCreateShip( const type_info& ShipClass, int32 TotalBPV, eClassTypes SmallestHullSize, eClassTypes LargestHullSize, int32 VariantPercent, int32 Position, int32 CustomID, int32 StartX, int32 StartY, int32 EndX, int32 EndY, const char* CustomName, eShipOptions ShipOptions );

They all use the shipClass param which allows you to define your own ShipInfo code. Within the ShipInfo file is where the problem is, so the issue is not[/red] the mCreateShip function.

But I'll play along.  ::)

  • The first mCreateShip listed here, above, calls mCreateTeamShip to do the final work.
  • The 2nd comes from my original example. It also  calls mCreateTeamShip to do the final work
  • The 3rd comes from your complaint. Within the API I see that that one calls
    mCreateFleet, which in turn calls mCreateTeamFleet, which in turn calls mCreateTeamShip within its loop.
  • The 4th mCreateShip also calls mCreateFleet, and follows the same path as the 3rd one.

So. They all use the parameter which defines the shipClass to use. You use that to track down the bug within the source, where the Registeration of TeamState is, and you make it more restrictive to prevent the double-fighters/weapons.. .. and they all end up within the same function of the API.

I would like to point out that other functions, such as mCreateTeamFleet and mCreateCPUFleet, also do this.


Edit: Oh! NOTE:
If you're Registering the TeamState elsewhere, for whatever reason you need to do this, then you need to add the restriction that only the host should Register that State for the AI ships. The focus is the State: make sure it's not run on all machines.

I'm more interested in actual test results that use API in question rather than the theory.

This "that only the host should Register that State for the AI ships" makes a whole lot more sense rather than say all human controlled team need to register the ship states too.  If so, it's not gonna work and we have the test results to prove it *jerks thumb at DH*.

Where are yours?

Come back with evidence that API calls to every one of these API routines:

li]The first mCreateShip listed here, above, calls mCreateTeamShip to do the final work.[/li]
[li]The 2nd comes from my original example. It also  calls mCreateTeamShip to do the final work[/li]
[li]The 3rd comes from your complaint. Within the API I see that that one calls
mCreateFleet, which in turn calls mCreateTeamFleet, which in turn calls mCreateTeamShip within its loop.[/li]
[li]The 4th mCreateShip also calls mCreateFleet, and follows the same path as the 3rd one.[/li]

work and then we can say it's fixed. It's an empirical science not theoretical conjecture.

As for your arrogant *sighs*. Kindly put them away in the Castrin and Cleaven toybox with the rest of their toys.

Quote from: Cleaven
Nothing has changed. Not one single solitary thing.
Quote
Yep, still after all these years, you still don't need a hair-cut. *snicker*



Offline FPF-DieHard

  • DDO Junkie
  • Captain
  • *
  • Posts: 9461
Re: I think I solved the double-fighter bug..
« Reply #102 on: July 30, 2004, 01:44:28 pm »
Karnak, I chat with both you and FS all the time.   There is no need for this pissing contest.   Please edit that post and make it a little more civil.

Both of you are a great asset to the community.  he is being nice, you should be to.
Who'd thunk that Star-castling was the root of all evil . . .


Offline FireSoul

  • Modder of shiplists
  • Lt. Commander
  • *
  • Posts: 1306
  • mew.
    • http://klingon.lostexiles.net/
Re: I think I solved the double-fighter bug..
« Reply #103 on: July 30, 2004, 01:49:22 pm »
I give up. He doesn't want to understand nor try.


Author: OP+ Mod
Maintainer: Coopace
Author: Fests+ for OP
Creator: SFC-OP Mini Updater
Maintainer: SFC-EAW for OP Campaigns
Kitbash: SFC2 models

el-Karnak

  • Guest
Re: I think I solved the double-fighter bug..
« Reply #104 on: July 30, 2004, 02:04:58 pm »
he is being nice, you should be to.

If I thought he was being nice then I would be civil.

Offline FPF-DieHard

  • DDO Junkie
  • Captain
  • *
  • Posts: 9461
Re: I think I solved the double-fighter bug..
« Reply #105 on: July 30, 2004, 02:06:39 pm »
he is being nice, you should be to.

If I thought he was being nice then I would be civil.

HE IS BEING NICE!!   FS and I chat all the time and he doesn't have a mean intention in him.  Stuff gets lost on the forums and misunderstood.   FS is only trying to be helpful.
Who'd thunk that Star-castling was the root of all evil . . .


el-Karnak

  • Guest
Re: I think I solved the double-fighter bug..
« Reply #106 on: July 30, 2004, 02:28:03 pm »
Quote from: Die Hard
HE IS BEING NICE!!   FS and I chat all the time and he doesn't have a mean intention in him.  Stuff gets lost on the forums and misunderstood.   FS is only trying to be helpful.
Quote

Yeah, it comes out a lot more clearer in TS conversations.  Get Dizzy to say the same and then we can assess that issue in a different light.

Quote from: FireSoul
I give up. He doesn't want to understand nor try.
Quote

Am trying very hard not to give out one of your arrogant *sigh*'s and inject your arrogant tone in the post.

Simply speaking, you only see half the picture here and only have half-a-solution.  Don't make like you got it all figure out when you don't. I have gone through everything you posted and 90% of it was already tried months ago.  The remaining 10% got quickly disproven in a couple tests with DH a couple nights ago.  When I have time I'll figure this mess out and then post the results.   If somebody comes up with it and I see it then I will happily acknowledge it. You can say that I come from the "Show Me" state of Missouri.

Offline FireSoul

  • Modder of shiplists
  • Lt. Commander
  • *
  • Posts: 1306
  • mew.
    • http://klingon.lostexiles.net/
Re: I think I solved the double-fighter bug..
« Reply #107 on: July 30, 2004, 02:50:40 pm »
(dammit!   :banghead: :cuss: )

The mCreateShip functions are not part of the problem. Don't you see? They're named here because they are useful only to indicate what shipClass you're using. You then track down the state file for this shipState and you find out where the TeamStates are being registered.
So do me a favour and drop the focus on these functions and look at what I have written here below.


What you need to do is this, very specifically:
Prevent non-hosts from handling TestStates for AI teams. Only the Host should do that.


Since I don't have access to your sources, I will leave it up to you to figure out how it applies. However, feel free to use the example I have posted in the very very first post of this thread.


Author: OP+ Mod
Maintainer: Coopace
Author: Fests+ for OP
Creator: SFC-OP Mini Updater
Maintainer: SFC-EAW for OP Campaigns
Kitbash: SFC2 models

Offline Astarte

  • Feline Mixtress
  • Lt. Junior Grade
  • *
  • Posts: 156
  • Gender: Female
  • Mew? *grins*
Re: I think I solved the double-fighter bug..
« Reply #108 on: July 30, 2004, 05:52:50 pm »

Am trying very hard not to give out one of your arrogant *sigh*'s and inject your arrogant tone in the post.

Simply speaking, you only see half the picture here and only have half-a-solution.  Don't make like you got it all figure out when you don't. I have gone through everything you posted and 90% of it was already tried months ago.  The remaining 10% got quickly disproven in a couple tests with DH a couple nights ago.  When I have time I'll figure this mess out and then post the results.   If somebody comes up with it and I see it then I will happily acknowledge it. You can say that I come from the "Show Me" state of Missouri.


Luc arrogant?  Sometimes, but this isn't one of those times.  Frustrated? Tired?  That sounds more like it.

Perhaps this fix won't work for your missions.  As far as I have gathered, you have not shared your source code with anyone, so it is up to you and you only to be able to assess its impact in your missions.

Luc tested his results fairly carefully, and in the examples he stated.  He has also stated what he does and does not know about it.  It is not for him to prove anymore.  This fix is being used and tested now.

In the end, it is up to you to use the fix or not.  *shrugs*

Offline Cleaven

  • Lt. Junior Grade
  • *
  • Posts: 375
  • Gender: Male
Re: I think I solved the double-fighter bug..
« Reply #109 on: July 30, 2004, 07:40:32 pm »
he is being nice, you should be to.

If I thought he was being nice then I would be civil.

Folks, you are dealing with the Toad Prince here, get used to it.

Not sure I can be bothered, but as you are the Doc, can you run an AI standard patrol in 2 minutes in a KRC? If so, there is no problem and I am utterly wrong. If you cannot, then the KRC is a worse ship for AI missions than ones I know can.

Offline FireSoul

  • Modder of shiplists
  • Lt. Commander
  • *
  • Posts: 1306
  • mew.
    • http://klingon.lostexiles.net/
Re: I think I solved the double-fighter bug..
« Reply #110 on: July 31, 2004, 10:40:46 pm »


Core missions
Total War missions
The whole shebang




OK, I've completed the script revisions and tested the majority of the core/total war missions (plus a handful of the weirdo specialty missions) and no glitches so far.

EDIT: all three updated versions are now online

Keep your eyes peeled for abnormal mission endings or results reporting,
hopefully other than that we'll be ok

thanks again!
dave




Have you ever thought of making installers? It's darn easy, and the installer kit's free:
http://nsis.sourceforge.net/

Also, I'm sure some people here would be happy to help you out on this matter. After all, all you need the installer to do is look up the SFC:OP/EAW install dir, confirm things and let her rip. An uninstaller is automatically created with a quick command within the installer-generator-instruction file, and you can have it added to the control panel's uninstall menu as well as add an icon to the uninstaller somewhere.

In fact, I'm betting the installer's size would be smaller than these .ZIPs with the new compression LZMA scheme..


Author: OP+ Mod
Maintainer: Coopace
Author: Fests+ for OP
Creator: SFC-OP Mini Updater
Maintainer: SFC-EAW for OP Campaigns
Kitbash: SFC2 models

Offline FireSoul

  • Modder of shiplists
  • Lt. Commander
  • *
  • Posts: 1306
  • mew.
    • http://klingon.lostexiles.net/
Re: I think I solved the double-fighter bug..
« Reply #111 on: July 31, 2004, 11:30:01 pm »
Uhhh... Dave? I think you should forget about zipping your missions from now on..  I decided to spend a little bit of time to make you an example installer for your "WholeShabang" all OPMissions pack.

The results are this:
Code: [Select]
Output: "C:\Documents and Settings\FireSoul\Desktop\NW\ED_OPMissions.exe"
Install: 3 pages (192 bytes), 1 section (24 bytes), 163 instructions (4564 bytes), 189 strings (4686 bytes), 1 language table (230 bytes).
Uninstall: 3 pages (192 bytes),
1 section (24 bytes), 158 instructions (4424 bytes), 192 strings (7950 bytes), 1 language table (214 bytes).

Using lzma (compress whole) compression.

EXE header size:               33280 / 35328 bytes
Install code:                          (10000 bytes)
Install data:                          (46524042 bytes)
Uninstall code+data:                   (13872 bytes)
Compressed data:             3993825 / 46547914 bytes
CRC (0x595B8C7A):                  4 / 4 bytes

Total size:                  4027109 / 46583246 bytes (8.6%)

4. Megs. Four Megabytes.

4 MB! .. yes sir. That's your 20MB ZIP file right there beaten to a pulp with this new fancy-dandy compression protocol. ;)

Here's the installer:  http://pet.dhs.org/~firesoul/sfc2/NW/installer/ED_OPMissions.exe
Here's the installer instructions file: http://pet.dhs.org/~firesoul/sfc2/NW/installer/Z_NW_All_OP_Missions.nsi


Seriously, take this and stop using ZIP. You'll do us all a favour.  ;D
This installer will install everything into the right place. It also creates an uninstaller and places it into  the Control Panel's Add/Remove Programs which uninstalls all files it added. Additionally, you can run the uninstaller from the SFC:OP directory.

I suggest you take and tweak the installer file to do whatever you want it to do.

-- Luc


Author: OP+ Mod
Maintainer: Coopace
Author: Fests+ for OP
Creator: SFC-OP Mini Updater
Maintainer: SFC-EAW for OP Campaigns
Kitbash: SFC2 models

Offline NuclearWessels

  • Evil Dave
  • Serverkit Development Team
  • Lt. Commander
  • *
  • Posts: 1249
  • Scripter and general nuisance
    • NukeDocs
Re: I think I solved the double-fighter bug..
« Reply #112 on: August 01, 2004, 12:07:33 am »

LOL - thanks again Firesoul, will take a look at it on Monday - do you ever sleep man? :D

dave

Offline Astarte

  • Feline Mixtress
  • Lt. Junior Grade
  • *
  • Posts: 156
  • Gender: Female
  • Mew? *grins*
Re: I think I solved the double-fighter bug..
« Reply #113 on: August 01, 2004, 02:36:59 am »

LOL - thanks again Firesoul, will take a look at it on Monday - do you ever sleep man? :D

dave


*drags FS off to bed*

I'm sure he will slip out sometime and start working on the models.

Offline FireSoul

  • Modder of shiplists
  • Lt. Commander
  • *
  • Posts: 1306
  • mew.
    • http://klingon.lostexiles.net/
Re: I think I solved the double-fighter bug..
« Reply #114 on: August 01, 2004, 11:06:31 am »
yeah. See? I just got up, and it's noon.   ;D
-- Luc


Author: OP+ Mod
Maintainer: Coopace
Author: Fests+ for OP
Creator: SFC-OP Mini Updater
Maintainer: SFC-EAW for OP Campaigns
Kitbash: SFC2 models

Offline FireSoul

  • Modder of shiplists
  • Lt. Commander
  • *
  • Posts: 1306
  • mew.
    • http://klingon.lostexiles.net/
Re: I think I solved the double-fighter bug..
« Reply #115 on: August 01, 2004, 04:29:10 pm »
I updated the 2 files above (installer).

.. also: Dave, ou have way too many MCT files. OP has a limit of 64, and between your pack, and my EAW_for_OP pack, there's not enough room.

.. I can help you with adding install component options, if you want. I had to figure it out today because I made an installer pack for the EAW for OP missions.


Edit: See: http://www.dynaverse.net/forum/index.php?topic=163344617.msg1122416343#msg1122416343


Author: OP+ Mod
Maintainer: Coopace
Author: Fests+ for OP
Creator: SFC-OP Mini Updater
Maintainer: SFC-EAW for OP Campaigns
Kitbash: SFC2 models

Offline NuclearWessels

  • Evil Dave
  • Serverkit Development Team
  • Lt. Commander
  • *
  • Posts: 1249
  • Scripter and general nuisance
    • NukeDocs
Re: I think I solved the double-fighter bug..
« Reply #116 on: August 01, 2004, 05:49:25 pm »

Yeah, the mcts are a legacy of the different pack combos - kept on adding them and not thinning the beasties out.  You're right though, I really need to go through and clean that up.  <adds to list>

dave

Offline NuclearWessels

  • Evil Dave
  • Serverkit Development Team
  • Lt. Commander
  • *
  • Posts: 1249
  • Scripter and general nuisance
    • NukeDocs
Re: I think I solved the double-fighter bug..
« Reply #117 on: August 04, 2004, 12:35:08 am »
Thanks again FS - I finally downloaded NSIS and think I have the installer set up the way I want, and will definitely be using that from now on instead of the zip files.

I did also finally go through and clean up all the .mct files (cut it back to just the one biggie per race) and eliminated the errors and redundancies within the mcts themselves.

I'm still testing some additional fixes and tweaks for DH, then will probably post the installer for the updated pack tomorrow arvo

thanks!
dave

Offline Rod ONeal

  • D.Net Beta Tester
  • Commander
  • *
  • Posts: 3592
  • Gender: Male
Re: I think I solved the double-fighter bug..
« Reply #118 on: August 04, 2004, 12:51:36 am »
Very good news. I'll be DLing this on ASAP. Thanks for all of the hard work, guys. Without the scripters this game would be in real trouble, IMO.
If Romulans aren't cowards, then why do they taste like chicken?

el-Karnak

  • Guest
Re: I think I solved the double-fighter bug..
« Reply #119 on: August 06, 2004, 10:10:44 pm »
(dammit!   :banghead: :cuss: )

What you need to do is this, very specifically:
Prevent non-hosts from handling TestStates for AI teams. Only the Host should do that.


If this was true then dbl-fighter EEK would have been fixed in SS2.  You still have not explained why the dbl-fighter bug does not show up in stock missions. 

What you need to do is this, very specifically:  spit out a mission script that uses the mCreateShip function I detailed and see if it works. Don't use any of the dynascript mCreateSHip(). Just the stand-alone mCreateShip() functions.

Quote from: Astarte
In the end, it is up to you to use the fix or not.  *shrugs*
So far, it's not usable in EEK which is the point I have been trying to get across. Unless you know something about scripting perhap you should stay out of it?  There's a thought.... :banghead: