Author Topic: multiplayer torpedo types  (Read 8614 times)

Offline Nighthawk

  • |______[o]_|
  • Posts: 750
  • Cookies: 18
Re: multiplayer torpedo types
« Reply #20 on: June 20, 2008, 02:03:27 PM »
If you mean the plugin, then you will need to actually load the plugin.
I think I can use __import__ and the same name I use to define the icon.

As for races, what exactly are you trying to do? You can just append extra information in the tuple.
I mean, remaking the definitions to use new integers instead of "App.SPECIES_"
I'm attaching the first working, non-finished, screenies

although, it still loads the old Akira icon in the interface, and the new one in the menu, and the ship was not even a SPECIES_AKIRA. it was a SPECIES_FREIGHTER :S


Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Re: multiplayer torpedo types
« Reply #21 on: June 20, 2008, 02:33:49 PM »
It's the speciesToShips that defines the icon.
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 Kirk

  • Posts: 1438
  • Cookies: 139
    • My Released Mods
Re: multiplayer torpedo types
« Reply #22 on: June 20, 2008, 02:37:26 PM »
(Sorry I don't intend to thread hijack!)
MLeo, is it possible that this could be the problem that I am having with my install?

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Re: multiplayer torpedo types
« Reply #23 on: June 20, 2008, 02:40:35 PM »
Potentially, but I really can't think of anything (there) that could cause it.


But MP doesn't work through that system.
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 Nighthawk

  • |______[o]_|
  • Posts: 750
  • Cookies: 18
Re: multiplayer torpedo types
« Reply #24 on: June 20, 2008, 02:45:40 PM »
It's the speciesToShips that defines the icon.
that's why I'm lost. I first defined it as SPECIES_FREIGHTER, never as SPECIES_AKIRA.
at most, outside the freighter, it was a SPECIES_AMBASSADOR.
but I can assure you, never an Akira.

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Re: multiplayer torpedo types
« Reply #25 on: June 20, 2008, 02:53:47 PM »
Code: [Select]
kSpeciesTuple = (
(None, 0, "Neutral", 0),
("Akira", App.SPECIES_AKIRA, "Federation", 1),
("Ambassador", App.SPECIES_AMBASSADOR, "Federation", 1),
The first part defines the ship file (scripts/Ships), the second the icon number, the third the "race", the fourth the "class" of ship (I think, judging from the scripts, it's for things like "Ok, this ship is size 1, the next is size 2, size 2 is bigger/heavier than size 1, think Fighter and Destroyer classes).

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 Nighthawk

  • |______[o]_|
  • Posts: 750
  • Cookies: 18
Re: multiplayer torpedo types
« Reply #26 on: June 20, 2008, 03:00:23 PM »
working on it, but still, keeps loading the akira. even with these settings.

Code: [Select]
kSpeciesTuple = (
(None, 0, "Neutral", 0),
("------Curry", 100, "Federation", 1),
("------Prometheus", App.SPECIES_AKIRA, "Federation", 1),
("------Galaxy", App.SPECIES_GALAXY, "Federation", 1),

Code: [Select]
def LoadShipIcons(ShipIcons = None):
if ShipIcons is None:
ShipIcons = App.g_kIconManager.CreateIconGroup("ShipIcons")
App.g_kIconManager.AddIconGroup(ShipIcons)

TextureHandle = ShipIcons.LoadIconTexture('Data/Icons/Bridge/Background/ScreenBlock.tga')
ShipIcons.SetIconLocation(App.SPECIES_UNKNOWN, TextureHandle, 0, 0, 8, 8)

ShipIconDef('------Curry', { 'species': 100 } )
ShipIconDef('------Prometheus', { 'species': 102 } )
ShipIconDef('------Galaxy', { 'species': 103 } )

the Custom\ships\plugin read App.SPECIES_AMBASSADOR. changed it to "100", but still nothing

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Re: multiplayer torpedo types
« Reply #27 on: June 20, 2008, 04:59:03 PM »
The ShipIconDef will attempt to load a texture called data/Icons/Ships/------Curry.tga


That won't work, I think.


Just make sure the numbers in the kSpeciesTuple match the numbers you use with LoadShipIcons.
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 Nighthawk

  • |______[o]_|
  • Posts: 750
  • Cookies: 18
Re: multiplayer torpedo types
« Reply #28 on: June 20, 2008, 07:13:16 PM »
The ShipIconDef will attempt to load a texture called data/Icons/Ships/------Curry.tga
That won't work, I think.
Just make sure the numbers in the kSpeciesTuple match the numbers you use with LoadShipIcons.
forget that, it's just a mod-cover thing.
both names point to the same file actually.

it's funny that that file loads an Akira, and the Galaxy one loads the FedStarbase icon. now, the curry pointer calls the sabre's icon file.
meh....
the ships load and work in the game, it's just this thing what doesn't
and also QB freezes and I can't open the console.

EDIT: just solved it. console tracker roxx! :D

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Re: multiplayer torpedo types
« Reply #29 on: June 21, 2008, 06:42:22 AM »
So what was it?
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 Nighthawk

  • |______[o]_|
  • Posts: 750
  • Cookies: 18
Re: multiplayer torpedo types
« Reply #30 on: June 21, 2008, 07:42:34 AM »
it was calling Multiplayer.SpeciesToShip.Galaxy, and I removed it from the SpeciesToShip replacing it with my galaxy.
strange thing is, it was calling it from c:\utopia\current\build\

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Re: multiplayer torpedo types
« Reply #31 on: June 21, 2008, 07:52:03 AM »
it was calling Multiplayer.SpeciesToShip.Galaxy, and I removed it from the SpeciesToShip replacing it with my galaxy.
strange thing is, it was calling it from c:\utopia\current\build\
That's either from one of the original pyc files, or from inside the engine.
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 Nighthawk

  • |______[o]_|
  • Posts: 750
  • Cookies: 18
Re: multiplayer torpedo types
« Reply #32 on: June 21, 2008, 09:30:17 AM »
something I just found out and couldn't figure:
all those torpedoes I was talking about, I actually either re-named or removed them. I changed some definitions in SpeciesToTorp so they point to my modded torpedoes, but also commented out the species line in some scripts, to test what might happen.
the point is, in multiplayer, commented out or not, pointed to the right file or not, they still load the torpedo they're supposed to load. and before that, it crashed when it couldn't find PhotonTorpedo.py.

I just don't get it...

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Re: multiplayer torpedo types
« Reply #33 on: June 21, 2008, 11:27:59 AM »
Well, if a projectile launcher (be it a torpedo launcher or a pulse weapon) can't find the projectile script (doesn't matter if it's QB, SP or MP), BC will crash.
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 Hunter83

  • Captain of the USS Cataja
  • Posts: 55
  • Cookies: 2
  • Excorting the Cataja
    • MySpace.com
Re: multiplayer torpedo types
« Reply #34 on: February 07, 2009, 09:41:49 AM »
gOT n LIITLE question here. The Torpedotypes, in Originaly it was this

# Multiplayer specific stuff.  Please, if you create a new torp
   # type. modify the SpeciesToTorp.py file to add the new type.
   import Multiplayer.SpeciesToTorp
   pTorp.SetNetType (Multiplayer.SpeciesToTorp.PHOTON)

The Changed THing is This

# Multiplayer specific stuff.  Please, if you create a new torp
   # type. modify the SpeciesToTorp.py file to add the new type.
   import Multiplayer.SpeciesToTorp
   pTorp.SetNetType (Multiplayer.SpeciesToTorp.AURORATORPEDO)

Is this right so?
Sometimes i think about the Past...

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Re: multiplayer torpedo types
« Reply #35 on: February 07, 2009, 09:45:08 AM »
Assuming that AURORATORPEDO is the constant you wish to identify that particular torpedo with, then yes.
Also assuming that AURORATORPEDO is an unique constant in SpeciesToTorp.py

Please note that this constant has the same implications as with ships, so it needs to correspond to the index in the kSpeciesTuple of SpeciesToTorp.py
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 Hunter83

  • Captain of the USS Cataja
  • Posts: 55
  • Cookies: 2
  • Excorting the Cataja
    • MySpace.com
Re: multiplayer torpedo types
« Reply #36 on: February 07, 2009, 11:49:03 AM »
Ok i guess, there are no more Probs with this, but i will move now to an special new Topic, about my Mods and upcoming ships, and the MP-Probs i currently have see in MP-Ships-Problems

Thnx in Anyway

;)
Sometimes i think about the Past...