Author Topic: Figured out my issue  (Read 2957 times)

0 Members and 1 Guest are viewing this topic.

Offline Charlie Beeler (OP)

  • Registered
  • Vice Admiral
  • **********
  • Posts: 1381
  • Thanked: 3 times
Figured out my issue
« on: February 02, 2007, 01:46:38 PM »
I'm using a tech created for my campaign that is a smallcraft (boatbay) fighter.  

It's actually three issues:
   1)  Shipyards don't appear to be populating the system_id in the shipyard table when created.  All of the shipyards in my game have this field empty.  This appears to be a bug, but may be an issue with how I created them.  Figured this one out when I attempted to transfer a ship from the fleet screen to a shipyard and got an error stating that no shipyard was is the same system as the fleet, it was the race home system.

   2)  The Prepfighters shipyard task appears to only consider expendable_type 2 (fighters) as valid for prep from crate.  This one is strange since the crated strikefighters are listed as type 3 (ordinance).

   3)  The Prepfighters shipyard task appears to only consider fighterbays as a valid.  I expected a check for bay type of XO type based on expendable type.  (ie smallcraft requiring boatbays, strikefighters requiring fighter bays, and gunboats requiring XOg's)


Looks like won't be using crated smallcraft for this.  At least not without a lot of maual intervention in the database.
« Last Edit: December 31, 1969, 06:00:00 PM by Charlie Beeler »
Amateurs study tactics, Professionals study logistics - paraphrase attributed to Gen Omar Bradley
 

Offline Steve Walmsley

  • Aurora Designer
  • Star Marshal
  • S
  • Posts: 11644
  • Thanked: 20340 times
Re: Figured out my issue
« Reply #1 on: February 04, 2007, 09:31:11 AM »
Quote from: "Charlie Beeler"
I'm using a tech created for my campaign that is a smallcraft (boatbay) fighter.  

It's actually three issues:
   1)  Shipyards don't appear to be populating the system_id in the shipyard table when created.  All of the shipyards in my game have this field empty.  This appears to be a bug, but may be an issue with how I created them.  Figured this one out when I attempted to transfer a ship from the fleet screen to a shipyard and got an error stating that no shipyard was is the same system as the fleet, it was the race home system.
I've checked the SA database. All the older shipyards do have this field set but not the newer ones. I think this is because at some time in the past I changed the code so the shipyard complex checked the parent fleet to see how many modules it had. Therefore ComplexFleetID replaced SystemID in program terms. The system for the shipyard is now retrieved from the Fleet table. However, I obviously didn't take the shipyard button on the Fleet window into consideration when I made this decision, which is what caused the bug you describe. I have changed the code behind the shipyard button so the correct system for the shipyard is determined (by checking the location of the associated complex fleet).

Quote
2)  The Prepfighters shipyard task appears to only consider expendable_type 2 (fighters) as valid for prep from crate.  This one is strange since the crated strikefighters are listed as type 3 (ordinance).
Its been several years since I coded this area so I really have no idea what I intended at the time. However, the code in the end turn construction routine adds prepped fighters to ships exactly as if they were newly built fighters. From this, I assume that treating them as expendable type 2 is correct as there is no conversion in the code from a prepped type to a fully capable type. SA requires more manual intervention than Aurora because it was trying to replicate a board game and there were still areas in the game that were not covered by the code. It looks like what you do is create a prepped fighter task for the type of actual fighter than matches the crated fighter then manually delete the used up crated fighters in the Small Craft and Cargo Transfer window.

Quote
  3)  The Prepfighters shipyard task appears to only consider fighterbays as a valid.  I expected a check for bay type of XO type based on expendable type.  (ie smallcraft requiring boatbays, strikefighters requiring fighter bays, and gunboats requiring XOg's)
Looking at the code for the setup of the task, construct SC/GB/Fighters and Prep Fighters appear to be identical with the only difference being that for prep fighters a value is passed to the routine that populates the dropdown list that restricts it to fighters only. I could change this without much of a problem but it would only be available to you when I release an update. You couldn't change anything in the database to make this work.

Quote
Looks like won't be using crated smallcraft for this.  At least not without a lot of maual intervention in the database.

Well, based on the fact that build small craft is pretty much identical to prep fighters (in SA code at least), why not create your crated smallcraft in the DB as a tech item and bulid them as required. When you need to prep them, use the build SC task instead and delete the used up crated items on the Small Craft and Cargo Transfer window? Would that work?

Steve
« Last Edit: December 31, 1969, 06:00:00 PM by Steve Walmsley »
 

Offline Charlie Beeler (OP)

  • Registered
  • Vice Admiral
  • **********
  • Posts: 1381
  • Thanked: 3 times
(No subject)
« Reply #2 on: February 04, 2007, 11:08:47 AM »
Steve,

Thank you for looking into these.  

The shipyard tasking from the fleet window was a minor annoyance and easily worked around by pulling the ships from the shipyard window instead.  Having the fix from the fleed window will help.

I hadn't realized how much manual intervention you'd been doing for your campaign.  Which makes my adding a new tech from my side even more difficult to work out the mechanics for.  Many because I don't have a new enough version of Access on my home machines and have to take a copy of the database to work to make any chances.  Doable, but slow.  

One thing I'm going to try is setting the crated to type 2 instead of type 3 and see if your code will handle that.  This is do to the prep task not recigizing as valid when setting the task.  If that doesn't work then I'll try do other ideas I've had to get around the need for so much manual intervention.

I really need to get a newer version of Access for home.  Now where did I put that money tree?   :wink:

I'm not asking for you to make coding changes to SA.  I fully understand that your focus is Aurora.  I've been sort of keeping up on what your doing with it and like a lot of the funtionality that's been built into it.  I've been sticking with 3rdR since I'm familiar with it enough that I can pick where I left off, sometimes months later, and can move forward without to much trouble.
« Last Edit: December 31, 1969, 06:00:00 PM by Charlie Beeler »
Amateurs study tactics, Professionals study logistics - paraphrase attributed to Gen Omar Bradley