Author Topic: troops scripting  (Read 1757 times)

Offline sg2

  • Always outnumbered,Never outgunned.
  • Posts: 45
  • Cookies: 1
  • Always outnumbered,Never outgunned.
troops scripting
« on: May 22, 2007, 02:36:58 PM »
hi,does anyone know how to make more troops for a ship or does anyone know where the script is cos i want to put more on certain ships.

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Re: troops scripting
« Reply #1 on: May 22, 2007, 02:45:35 PM »
You mean for the Marines script?

You'll have to explain what mod, since there aren't any "troops" in stock BC.
I still can't read peoples minds, nor can I read peoples computers, even worse, I can't combine the two to read what is going wrong with your BC install...

"It was filed under 'B' for blackmail." - Morse, Inspector Morse - The dead of Jericho.

Offline tiqhud

  • BCFiles File Poster
  • Posts: 1763
  • Cookies: 1067
  • San Francisco Shipyards (HPer) file manuiplater
Re: troops scripting
« Reply #2 on: May 22, 2007, 03:21:58 PM »
I do think he mean "Marines" dont ya?

 If you plan to use them to capture a ship, you better go to the StarBase and get more.
TiqHud
you sir, are unable to strike, the port or starboard parts of hull , of a bovine storage facility.
Canon , what people argue exists, that doesn't really  exist.
It is all the little details, that cause headaches.
"Never judge wealth with Money"
'Intelligence has Nothing to do with Politics'
it is Late, Do you know where your Towel is?

Offline sg2

  • Always outnumbered,Never outgunned.
  • Posts: 45
  • Cookies: 1
  • Always outnumbered,Never outgunned.
Re: troops scripting
« Reply #3 on: May 22, 2007, 06:02:37 PM »
yea i mean marines.it came with KM or BCS:TNG and i wanna know which script controled the number of marines there are in each ship.its in the engineering menu.

Offline FekLeyr Targ

  • DS9FX Team
  • Posts: 492
  • Cookies: 538
Re: troops scripting
« Reply #4 on: May 23, 2007, 09:49:07 AM »
You need the Shuttle Launching Framework for this. I quote the Readme now.

Quote
README:
==========
0.8 (beta: all functions implemented, but maybe buggy)

This script allows you to beam Troops over to another Ship:
You will get a few new Buttons in the Engineering Menu.
Using the 'capture' button, your troops wil atack your current target.
If you target a subsystem, your crew will try to damage this, else they will to
capture the whole Ship.
Damaging a subsystem will take between 10 and 20 seconds, capturing up to 2 minutes.
And you can still loose your troops...
The Rescue Button can be used to rescue the Crew of a dying, friendly Ship,
and you can swap your Marines between Ships using the two transfer Buttons.

I also tried to make Miguels 'Scan Area' and 'Scan Target' useful in QuickBattle.


German people can get help at the Forum here: http://StarTrek.webhop.info


Requirements:
<---------->
-Engieering Extension 0.5 or higher.

The Shuttle Launching Framework by sleight42 is not required but maybe needed if
you want to create your own configuration files (optional).


Author:
<---------->
Defiant <mail@defiant.homedns.org>
My STBC directory: http://defiant.homedns.org/~erik/STBC/


Install:
<---------->
1. Please put the file into their right place.
   I will not answer any questions regarding "Where to put the file(s) in" - Just watch
   the directory structure.

2. (Optional) You may edit your Carrier files to set your Troops Number to a static Version.
   You are not required to do that, but it is always better, else the script will calculate
   the Number by using the Ship size.
   However you can two functions, GetNumMarines() (Number of attacking human) and
   GetNumPeople() (Number of Crew flying this Ship, they can not be send to attack, but can
   help defending your vessel).
   See the file Carriers/Defiant.py in the examples/ -directory how to do that.
   And yes, you have to keep the Spaces (tab)!
   If you don't know what I'm talking about here, just leave the files untouched...
   

Thx to:
<---------->
Banbury for writing the first Transporter script,
Book (Lord Apophis ) for coming up with this Idea first,
Sim Rex for writing some code for the ReturnShuttles Mod, which I'm also using here and
the game Klingon Academy, being the model for this.


Todo, Bugs & Changes:
<---------->
see Marines.py for details
If you want to help writing, be welcome: mail@defiant.homedns.org


License:
<---------->
GPL (see GPL.txt for details)

"THIS MATERIAL IS NOT MADE OR SUPPORTED BY ACTIVISION."

LIMITATION ON DAMAGES. IN NO EVENT WILL ACTIVISION BE LIABLE FOR SPECIAL,
INCIDENTAL OR CONSEQUENTIAL DAMAGES RESULTING FROM POSSESSION, USE OR
MALFUNCTION OF THE PROGRAM OR PROGRAM UTILITIES, INCLUDING DAMAGES TO
PROPERTY, LOSS OF GOODWILL, COMPUTER FAILURE OR MALFUNCTION AND, TO THE
EXTENT PERMITTED BY LAW, DAMAGES FOR PERSONAL INJURIES, EVEN IF ACTIVISION
HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.


Sorry for...:
<---------->
My Bad English.

And here the example:
Code: [Select]
# Defiant.py
# April 11, 2002
#
# by Evan Light aka sleight42, all rights reserved
#
# Permission to redistribute this code as part of any other packaging requires
# the explicit permission of the author in advance.
##############################################################################

# A simple example of how to define a custom Carrier with a specified
# compliment of vessels
Carrier = __import__( "ftb.Carrier")
class Defiant( Carrier.Carrier):
    def __init__( self, pShip):
        Carrier.Carrier.__init__( self, pShip)
        # The script name should be the name of the "ship" script, not the
        # hardpoint (otherwise, you'll crash your BC and this is bad)
        LauncherGroup = __import__( "ftb.LauncherGroup")
        group = LauncherGroup.LauncherGroup()

        LauncherManager = __import__( "ftb.LauncherManager")
        launcher = LauncherManager.GetLauncher( "Shuttle Bay", pShip)
        group.AddLauncher( "Shuttle Bay", launcher)
        launcher.AddLaunchable( "Shuttle", "QuickBattle.QuickBattleFriendlyAI", 2)

        self.AddLauncher( "Group 1", group)

        # Play with this feature if you dare... MUHAHAHAHAHAHAHAHAHAHAHAHA!!!!!
        #group.SetLaunchMode( LauncherGroup.ALL)
       
    # Define how much Shuttles we can carry maximal (Return Shuttles script)
    def GetMaxShuttles(self):
    return 3
    def GetNumMarines(self):
    return 60
    def GetNumPeople(self):
    return 20

# "Defiant" is the "ShipProperty" name of the ship to be registered as
# defined in the Hardpoints PY file for your ship
ShipManager = __import__( "ftb.ShipManager")
ShipManager.RegisterShipClass( "Defiant", Defiant)
TaH pagh, Tah be.

Offline sg2

  • Always outnumbered,Never outgunned.
  • Posts: 45
  • Cookies: 1
  • Always outnumbered,Never outgunned.
Re: troops scripting
« Reply #5 on: May 23, 2007, 12:14:23 PM »
thats it exactly.thanks FekLeyr Targ.