bckobayashimaru.de

Bridge Commander Kobayashi Maru Project
It is currently Tue Jun 25, 2019 3:22 am

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Ship Icons in MP
PostPosted: Sat Feb 24, 2007 8:15 am 
Offline
Chief Engineer
Chief Engineer
User avatar

Joined: Fri May 06, 2005 10:41 am
Posts: 2449
Location: Hamburg, Germany
This is a copy of
http://bridgecommander.3dactionplanet.g ... hp?t=14109

Defiant wrote:
Ok,... this is a little Blueprint how to do it...
i cant guaratee 100% success it usually worked for me, so it should work for others
too..
Its important to know that the icon for a ship is fixed to the "Species" number.
wich means that every available ship needs his own number.

Here are the Species numbers of the "stock" (original) Ships:

Code:
erik@defiant:/misc/daten/Spiele/Bridge Commander/sdk/Build/scripts/ships/Hardpoints$ grep -i species *.py
akira.py:Akira.SetSpecies(103)
amagon.py:AsteroidMass.SetSpecies(712)
ambassador.py:Ambassador.SetSpecies(104)
asteroid1.py:AsteroidMass.SetSpecies(712)
asteroid2.py:AsteroidMass.SetSpecies(712)
asteroid3.py:AsteroidMass.SetSpecies(712)
asteroidh1.py:AsteroidMass.SetSpecies(712)
asteroidh2.py:AsteroidMass.SetSpecies(712)
asteroidh3.py:AsteroidMass.SetSpecies(712)
asteroid.py:AsteroidMass.SetSpecies(712)
birdofprey.py:BirdofPrey.SetSpecies(401)
cardfacility.py:CardassianOutpost.SetSpecies(704)
cardfreighter.py:Cardfreighter.SetSpecies(203)
cardhybrid.py:CardassianHybrid.SetSpecies(204)
cardoutpost.py:CardassianOutpost.SetSpecies(704)
cardstarbase.py:CardassianStarbase.SetSpecies(703)
cardstation.py:CardassianStation.SetSpecies(705)
commarray.py:CommArray.SetSpecies(708)
commlight.py:CommArray.SetSpecies(708)
drydock.py:DryDock.SetSpecies(706)
escapepod.py:EscapePod.SetSpecies(714)
fedoutpost.py:FedOutpost.SetSpecies(702)
fedstarbase.py:FederationStarbase.SetSpecies(701)
freighter.py:Freighter.SetSpecies(108)
galaxy.py:Galaxy.SetSpecies(101)
galor.py:Galor.SetSpecies(201)
GenericTemplate.py:Ship.SetSpecies(1)
keldon.py:Keldon.SetSpecies(202)
kessokheavy.py:KessokHeavy.SetSpecies(501)
kessoklight.py:KessokDestroyer.SetSpecies(502)
kessokmine.py:KessokMine.SetSpecies(503)
marauder.py:Marauder.SetSpecies(601)
nebula.py:Nebula.SetSpecies(105)
peregrine.py:Peregrine.SetSpecies(105)
probe2.py:Probe2.SetSpecies(711)
probe.py:Probe.SetSpecies(710)
shuttle.py:Shuttle.SetSpecies(106)
sovereign.py:Sovereign.SetSpecies(102)
spacefacility.py:Spacefacility.SetSpecies(707)
sunbuster.py:SunBuster.SetSpecies(713)
transport.py:Transport.SetSpecies(107)
vorcha.py:Vorcha.SetSpecies(402)
warbird.py:Warbird.SetSpecies(301)




Here u notice that Fed Ships have a number between 100 and 199, klingons between 400
and 499 Romulans from 300 - 399


So the Next move would be to give every ship his own Species Number.

Exemple Defiant:
in scripts/ships/Hardpoints/Defiant.py search for "species" depending on defiant
version it should looks like:
Code:
Defiant.SetSpecies(102)


Well the 102 is already (look up) given away to the sovereign.
so we give the brave little ship the number 136

good
Now we gonna get to the next file:
Scripts/multiplayer/SpeciesToShip.py
Search for a line like:
Code:
("Defiant", App.SPECIES_AKIRA, "Federation", 1),


(Master Darkshimmer would probaly know what its gonna look like ;)
This App.SPECIES_AKIRA is now going to replaced with the number wich we gave the
defiant in the SetSpecies on the hradpointfile
We gonna get:
Code:
("Defiant", 136, "Federation", 1),


good now the pc only has to know what name the symbol has

For that to Know we open the File: scripts/icons/ShipIcons.py
near the line 50 we find a list that looks like this:

Code:
ShipIconDef('Galaxy', { 'species': App.SPECIES_GALAXY } )
        ShipIconDef('Sovereign', { 'species': App.SPECIES_SOVEREIGN }
)
        ShipIconDef('Akira', { 'species': App.SPECIES_AKIRA } )
        ShipIconDef('Ambassador', { 'species': App.SPECIES_AMBASSADOR
} )
        ShipIconDef('Nebula', { 'species': App.SPECIES_NEBULA } )
        ShipIconDef('FedShuttle', { 'species': App.SPECIES_SHUTTLE }
)
        ShipIconDef('Transport', { 'species': App.SPECIES_TRANSPORT }
)


at the end of that list we gonna attach (and its VERY IMPORTANT THAT THE SPACES ARE
THE SAME AS HERE,,, AND THE <TAB>s and no <Space>s ok?

Code:
ShipIconDef('Defiant', { 'species': 136 } )


the nr 136 is indeed our species number. the string "defiant" there is for the icon
wich should be used.
So that the defiant gets the icon data/icons/Ships/Defiant.tga we gonna write
simply "defiant" ok?

_________________
Shuttle Launching Framework carrier file creator

--
Whenever you find that you are on the side of the majority, it is time to reform.
-- Mark Twain


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat Feb 24, 2007 3:54 pm 
Offline
Administrator / Hardpoints
Administrator / Hardpoints
User avatar

Joined: Mon Jun 13, 2005 7:45 pm
Posts: 1437
Location: Toronto, Canada
a nice little tutorial... it doesnt show however how to change the arcs, as the hardpoints change as well.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat Feb 24, 2007 7:56 pm 
Offline
Chief Engineer
Chief Engineer
User avatar

Joined: Fri May 06, 2005 10:41 am
Posts: 2449
Location: Hamburg, Germany
It is to get the correct ship icons in MP, not for Hardpoints.

_________________
Shuttle Launching Framework carrier file creator

--
Whenever you find that you are on the side of the majority, it is time to reform.
-- Mark Twain


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sun Dec 09, 2007 6:14 pm 
Offline
Cadet 1st Year
Cadet 1st Year

Joined: Sun Dec 09, 2007 5:51 pm
Posts: 11
Location: UK
What exactly is scripting?

_________________
"I protest, I am not a merry man!"


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group