Bridge Commander Central
BC Forums => BC Scripting => Topic started by: cnotsch 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.
-
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.
-
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. ;)
-
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
-
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
-
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:
-
I just found a new a bit embarrasing error... I used the same icon nr.s for flyable and non-flyable ships...
:? :? :?
-
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.
-
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
-
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.
-
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).
-
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...
-
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'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?
-
You don't have to stop using them in the icons, but you can in the species to ship.
-
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
-
From what I've sofar seen, any.
But you must know that the ship species need to be incremental, starting at 0.
-
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
-
Define crashing.
-
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...
-
censored
-
Defiant is spot on. It is best to make sure it works by hand first, it's how I started before I wrote my MP ship adder programs. :-)
In addition, if it is really working fine until your PC (not BC) restarts, it might be something silly like an open file handle from your program? I know IDLE used to do strange things regarding keeping files open which I only found out because of a little empirical experimentation with the "quit" button.
-
I already added several ships manually and it worked...
so i saw you mentioned that the ship's icon species are listed in groups 100-199 for one race 200-299 for anoter.
is that just to keep track or has that a special reason? If so that would mean i'd have to change the ranges a bit because i definetly have more than 100 fed-ships!
so any idea there?
do i have to sort the first list in speciestoship.py in a special order that came out a bit weird?
-
nice idea there LJ but resarting anyting(BC or PC) didn't cange anything not even going onto another PC. The only thing working is to backup the scripts-folders ships,multiplayer & icons meaning resetting the game to the state bevore i ran my progam. The silly thing is it WORKED once!!!
-
do i got that right? :
1.) The order in both lists of speciestoship has to be the same
2.) The first list starts at 1 and has to be incrementing
3.) All flyable ships have to be before MAX_FLYABLESHIPS
4.) All not flyable ships have to be after that
5.) Othewise the order is not important unless you want to sort the list you choose the ships from
6.) The icon number or species as most call it (the second in kSpeciesTuple) is not important but: (or do i have to keep them sorted by race as mentioned before?)
7.) The species in ShipIcons.py has to be the same
8.) The species in The shipfile has to be the same too
9.) The order in ShipIcons.py in not important
did i forget anything?
may the species be below 100 or above 1000?
-
censored
-
i may not have placed my two questions well...
1.) may the species be below 100 or above 1000?
2.) do i have to sort the species by race as mentioned above
if you say all true wich one of those two is? they cant be both true unless it is possible to create new groups below 100 and above 1000 :?: :!: :?:
-
censored
-
If you would like I can *try* to find the source to mine?
(note: it was one of my first ever programs and the code will be pretty rubbish!)
-
would be very nice.
I had the idea to create a mod wich includes the best version of every ship-class on bc-files but making the mp-scripts by hand would be to difficult so i try to solve that first.
btw, whad language did you use?
(note: it was one of my first ever programs and the code will be pretty rubbish!)
do you think i'm better in writing clear ^^
-
Check your options.cfg, what does it say for Window Width and Window Height?
-
If I read correctly [which I doubt] a program that can take any ship, and put it into MP, isn't that like cheating, cause you'd have a verrrry strong , to your opponents semi weak-one.
-
Everyone needs the same scripts, so the other player also has it.
-
OH, since Ive only , plsyed MP for a very short time, I knew that each player need same scripts, this just alluded me that what he was up to, trying to make it easier to get the same scripts, Got it.
-
Check your options.cfg, what does it say for Window Width and Window Height?
i suppose you are referring to my suspicious errors... if so:
i've tried the following resolutions
windowed: 1024x768;
fullscreen: 1024x768,1280x1024,1600x1200;
but like i said the game works perfectly until the game normally loads the first ship (MP after choosing the first ship, QB during loading)
-
But what does the options.cfg say afterwards?
Don't load the game, just what does it say?
-
same as bevore
-
Same as before, as in, no change in BC still crashing, or options.cfg the same (in what way then)?
-
sorry, i meant the resolution in options.cfg stays as i set it
-
Another source of random crashes are missing projectile files.
Have you tried each ship on it's own in QB, firing all projectile based weapons?
-
i said the game crashes the first time a ship is tryed to be loaded so i don't even get to fly a ship.
-
Here you go dude. I think the source code in the mpmpship2.1 folder is that of the program in the shipaddercomp folder, but without a VB6 complier I cannot test it lol. You don't need the installer, it is just there lol.
I wrote this back in 2004 as one of my first pieces of code :D. It is *awful* hehe!
I really hope it helps you! :mrgreen:
Edit: would have been more helpful if i had clicked "upload" :lol: