Dynaverse.net

Taldrenites => Starfleet Command Mission Scripting => Topic started by: Lieutenant_Q on December 21, 2005, 10:03:46 pm

Title: Scripting Question: OP
Post by: Lieutenant_Q on December 21, 2005, 10:03:46 pm
Is it possible for a Mission Script to change the status of your ship in the dynaverse?  When a ship comes out of a script damaged, it retains the same amount of damage that it had sustained in the previous mission, going into the next mission.

My questions are, is it possible for a script to be written that could repair a starship?  Like a mission where you flew into your own drydock, lowered your shields.  The Dry Dock Tractors you to hold you in place and begins to repair you.  While you are being repaired, its possible for an enemy attack force to attack the drydock.  You can't do anything but watch...and hope that the repairs are done in time, while your team mates are desperately trying to buy you enough time to get repairs completed.

Now the bigger question, is it possible for the Mission scripts to CHANGE the ship you are flying?  For example, you're flying a D7C, and the K- refit becomes available.  Rather than purchase a new D7L and then selling your D7C, could a script be written that would allow you to fly into a drydock press the "refit" button on the communications panel and after the mission is over you have a D7L instead of the D7C?
Title: Re: Scripting Question: OP
Post by: Bonk on December 24, 2005, 11:22:49 am
Theoretically I beleive this is possible. (though I am not an experienced scripter). Check out Dave's Master's Series missions where one or two of the scripts substitute your current ship for the mission if I recall correctly.
Title: Re: Scripting Question: OP
Post by: NuclearWessels on December 28, 2005, 02:20:24 pm
<disclaimer> I'm REALLY rusty on the scripting, but IIRC </disclaimer>

it is possible to change the damage and supply status of your ship (that I'm sure of), but it isn't possible to change the actual type of ship (not even basic refits).  The script can give you a different ship for the duration of the mission, but once you leave the mission you'll be back in your old vessel.

Essentially the server keeps track of what ship it thinks you have, and (more or less) exchanges a status string with the mission, identifying the level of damage and supplies.   At the end of the mission the server applies the status string to the type of ship it thinks you have in order to update your damage/supplies (which is why your ship is unaffected if you drop out of a mission - the updated status never gets applied). 

That said, if the SQL server kit was debugged and in use then it probably would be possible to do the exchange by having the script connect directly to the database and issue the appropriate SQL commands.

dave the rusty