Author Topic: Program to port ships from QB to MP  (Read 7517 times)

Offline cnotsch

  • Posts: 85
  • Cookies: 3
Program to port ships from QB to MP
« on: May 13, 2008, 04:44:47 AM »
I'm trying to write a program in vb.NET - not that that matters here - wich reads out all ship scripts, -plugins, -icons and so on lists them in tree boxes: flyable, non-flyable, and unsorted ships. Than you have to correct the automatically created lists until you only have flable and non-flyable ships. After that the program tries to assign icons races and all the stuff needed to create the plugins if it encouters an error finding the right pairs it asks witch to take.
It changes:
\ships\*SHIP*.py
ShipIcons.py
SpeciesToShip.py

So much for the program.

My problem is now the following:
If I look at the scripts they look OK but if I i play MP alone the shipicons are mixed up not there ore someting like that.
If i play with a 2nd PC i've got the same problems additionally the following:
The CLIENT crashes if I add some ships - but it works with others - the courious thing is that it crashes with nearly every romulan ship but works fine with andromeda ships.
Second thing I nearly acciedently see the same ship flying the same ship on the server as on the chient also the hardpoints seem to load from the wrong ships...

I've included my current version of the program as well as the files it created/changed for my install.
To run the program you need the .NET Framework

I'm so STUCK there please HELP a confused treky  :lol: :lol: :lol:

No, yoke aside -if i can say so in english- I really need some help there.

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Re: Program to port ships from QB to MP - HELP!!!
« Reply #1 on: May 14, 2008, 09:32:38 AM »
I think the problem is that the definition of ships is very liberal (no, not the definition of "ships", but the way you define ships) this is because they are scripts, they are executed.

So, to get information, you would have to execute said scripts, because there is absolutely no guarantee that things will be named similarly.


As for your problem with icons, it's the species number, normally, an icon is generated with an incrementing species number.

The species number is important in MP, since that defines all the different pieces (well, 2 pieces, ship and icon) that go to make a ship.

And another thing, everyone in an MP game needs to have the same scripts, and preferably, the same models.
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 FekLeyr Targ

  • DS9FX Team
  • Posts: 492
  • Cookies: 538
Re: Program to port ships from QB to MP - HELP!!!
« Reply #2 on: May 14, 2008, 10:18:59 AM »
And another thing, everyone in an MP game needs to have the same scripts, and preferably, the same models.
I think it isn't a big problem if your opponent lives near you: You can give him/her your installation or he/she give his/her installation to you. ;)
TaH pagh, Tah be.

Offline cnotsch

  • Posts: 85
  • Cookies: 3
Re: Program to port ships from QB to MP - HELP!!!
« Reply #3 on: May 14, 2008, 01:27:25 PM »
Sorry if that sounds a bit rude but I DO know that everyone needs exactly the same files - not even new compiled ones from the same source....

As for the species I don't know exactly what you mean because I have assigned an exactly incrementing species number for the ships as well as for the icons... see yourself I've attached an example...
As I said already I don't know what you mean.

I may mix it up a bit but now a statement to your first:
I thaught the shipnames listed in the second part of SpeciesToShip.py are the script-names.???

Oh an other idea is there a limit for the range of the species numbers? I've done it like this:
0-100: nothing
100++:ship-species
after the last ship-sp.:icon-sp.

may it be that i raises some errors because of my many ships? I think at the time there are about 400-500 in my install...

Sorry if I sound a bit silly, but I just don't know what you mean...

Thanks for trying to help me anyway

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Re: Program to port ships from QB to MP - HELP!!!
« Reply #4 on: May 14, 2008, 01:31:11 PM »
First of all, I like to state more information that strictly neccesary, and this issue (about file missmatch) crops up a lot. So stating it more can't hurt in the long run, except now I suppose.



Anyway, the species number for the icon and the ship needs to be the same.
The icon species number is set either implicitly, or in scripts\Icons\ShipIcons.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 cnotsch

  • Posts: 85
  • Cookies: 3
Re: Program to port ships from QB to MP - HELP!!!
« Reply #5 on: May 14, 2008, 01:34:53 PM »
Thanks I'll try that out, just thaught It should be different because it is in KM...
Sorry again if my statment didn't sound nice :lol:

Offline cnotsch

  • Posts: 85
  • Cookies: 3
Re: Program to port ships from QB to MP - HELP!!!
« Reply #6 on: May 14, 2008, 01:44:01 PM »
I just found a new a bit embarrasing error... I used the same icon nr.s for flyable and non-flyable ships...

 :? :? :?

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Re: Program to port ships from QB to MP - HELP!!!
« Reply #7 on: May 14, 2008, 02:15:15 PM »
The idea is that the species number for a ship is the same as the species number for an icon.

Meaning that if Ship A has number 1, then the icon for Ship A is also 1.
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 cnotsch

  • Posts: 85
  • Cookies: 3
Re: Program to port ships from QB to MP - HELP!!!
« Reply #8 on: May 14, 2008, 03:05:33 PM »
Besides that, do you know where the piece of script is wich is responsible for displaying the ship-names in the ship selection menue in MP? - I had the idea to load them from the ship-scrips/plugins from QB

Offline cnotsch

  • Posts: 85
  • Cookies: 3
Re: Program to port ships from QB to MP - HELP!!!
« Reply #9 on: May 14, 2008, 04:01:36 PM »
Ok now I did as you said: same number, increasing, starting at 0(1 if you don't count the UNKNOWN)
Result: bc crashes totally with windoof saying, I've to translate it now, stbc.exe does not work anymore. exit now? debug?
if i want to join the game(as host).
I hope you know what I mean since I don't know how the english error report looks like.

I added my files.

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Re: Program to port ships from QB to MP - HELP!!!
« Reply #10 on: May 14, 2008, 05:20:56 PM »
Try installing a console logger, and if it doesn't start anymore, try deleting options.cfg and rebooting (latter only if the first doesn't work).
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 cnotsch

  • Posts: 85
  • Cookies: 3
Re: Program to port ships from QB to MP - HELP!!!
« Reply #11 on: May 15, 2008, 03:31:47 AM »
The programm runs perfectly normal until the first ship is loaded. The console logger does not record any sign of an error that is the wired thing about that. resetting the files to normal solves the problem. so it have to be the two files SpToSh & IcToSh...

Maybe you could take a look at them...

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Re: Program to port ships from QB to MP - HELP!!!
« Reply #12 on: May 15, 2008, 06:08:03 PM »
I've been looking through things, and it appears that the second number in kSpeciesTuple of SpeciesToShip is the icon "species" number, I suppose I have been confused over the time because the 2 numbers were always the same.

Now, it appears that the ship species must match it's position in the kSpeciesTuple.

Meaning, that the first, Unknown, is 0, etc, etc.
So, if you keep the icon numbers (and the numbers in kSpeciesTuple) and replace your constant list (the list with the all caps names and numbers) with an incrementing one, then it might work even better.
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 cnotsch

  • Posts: 85
  • Cookies: 3
Re: Program to port ships from QB to MP - HELP!!!
« Reply #13 on: May 16, 2008, 11:58:54 AM »
I'll give it a try, besides that do I have to use the standard App.SPECIES_AMBASADOR, ... species-numbers or may I replace them too, because that would make it all a lot easier?

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Re: Program to port ships from QB to MP - HELP!!!
« Reply #14 on: May 16, 2008, 12:04:35 PM »
You don't have to stop using them in the icons, but you can in the species to ship.
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 cnotsch

  • Posts: 85
  • Cookies: 3
Re: Program to port ships from QB to MP - HELP!!!
« Reply #15 on: May 16, 2008, 12:15:15 PM »
so... how do I know which numbers I'm allowed to use or to use for the icon number?
Do you know what I mean?

EDIT:
I'll try to simply replace the ship species like you said -it may work-, but that wold cause that the icon and the ship-species anen't the same anymore, but otherwise it didn't crash the first time when they were different, so it ran at least somehow  :D

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Re: Program to port ships from QB to MP - HELP!!!
« Reply #16 on: May 16, 2008, 12:55:13 PM »
From what I've sofar seen, any.

But you must know that the ship species need to be incremental, starting at 0.
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 cnotsch

  • Posts: 85
  • Cookies: 3
Re: Program to port ships from QB to MP - HELP!!!
« Reply #17 on: May 16, 2008, 04:03:39 PM »
I've tried as you said and IT WORKED!....
....Only once. After restarting it went on crashing all the time. I'm going crazy here rrrrrr!  :x :x :x :x :x

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Re: Program to port ships from QB to MP - HELP!!!
« Reply #18 on: May 16, 2008, 05:52:11 PM »
Define crashing.
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 cnotsch

  • Posts: 85
  • Cookies: 3
Re: Program to port ships from QB to MP - HELP!!!
« Reply #19 on: May 16, 2008, 07:48:08 PM »
As before the game crashes with no reason when first loading a ship meaning the whole process crashes, just as last time: no error just dies... I've so no idea.
The funny thing is that the first time after recreating the scripts it run well for about 40min. until I restarted. I've tried to do ecactly the same again and again but the only result is a windoof error and no comment from python...