Anyone else still need a SUR generator?
-
Right, half understand what you guys are on about now. To this end i’ve created my first multipart model. Comes in three sections, main body, and two wings. It’s the ELITE Pirate Gunboat btw
This is what i did to get it working. Exported in MS as 3 groups, all individually named, ended up with one cmp file but with the three sections included. Resized the model in FLModelTool, then used LS’s surbuilder v3 to make the multipart sur. After a bit of fiddling got it so that it made the three sections.
I’ve included it here with it’s seperate turret model, all hardpointed, scripted and ready to go. Can someone have a look to see if it crashes please as i’m out all day today. I made a single group version of this model and that works fine, but after talking to LS this morning, thought i’d try the multipart version.
Feedback welcome
Can be downloaded here: http://www.mediafire.com/?01195sma51m75ca
-
StarTrader wrote:
adoxa: It ran clean overnight, so it works.GetCollisions.txt now contains only the turret entries (turrets are used on the base ship). There are no entries for my special hardpoints, and this is unexpected.
Now I understand where the hpids are in the sur file, and found the answer to this: - adoxa had added in all of my hardpoints including the special ones.
So this is conclusive: -
If your sur file does not contain hardpoints then your sur is incomplete and will cause an FLServer crash eventually, if it is hit in the right place! So look out you modders who are running game servers!The good thing is that SUR Exporter v1.1 adds all vanilla-named Hardpoints (see the list above and keep it somewhere), just put them into MilkShape at the end of all the groups from your cmp file before you export your sur. But if you have more than 18 parts the Exporter cannot do this.
And the other good news is that even special named hardpoints can be added, so for you other guys who want to make ships with HpCannonxx HpBlasterxx you should also be able to add your own hpids as adoxa describes above by hex-editing the hpid section - remember if you increase the entry count, if you extend the file length the sur file may be destroyed, I haven’t tested this.
Here is mine:-
68706964 = hpid
09000000 = 9 (count of entries)
DEB90FF0 = HpMount (FLModel Tool doesn’t recognise it)
437E9611 = HpWeapon03
91C20AEC = HpShield01
E08B8E1D = My specialHp01
5ADA8706 = My specialHp02
CCEA800F = My specialHp03
D0FCFA12 = HpThruster01
6AADF309 = HpThruster02
B02324EF = HpCM01
9CD399F8 = Next mesh name. Don’t overwrite this!
03000000 = Mesh type
21667864 = !fxdIf you are clever you might be able to use SUR Exporter v1.1 to add extra hardpoints as standard names (remember to choose one with the sur shape you want) and then find and rename them in the sur file hpid section.
And for the battleship turrets I need to rename the hardpoints to use the HpTurret_n1_xx format in the cmp files, shiparch.ini, and loadouts_special.ini and/or solar\loadouts.ini as applicable so that the sur shape is the right size for my turrets.
At least now I understand a bit more about the sur files and about HpTurret hardpoint naming.
So - we now need an exporter or sur builder or sur generator that does all of this and tells us what part of a model cannot be generated and why!
-
Gibbon wrote:
… To this end i’ve created my first multipart model.Really? Thought you were an old hand at this, Gibbon?
Gibbon wrote:
Resized the model in FLModelTool,I don’t do this unless I see the disappearing problem, only on large objects.
I see straight away that your sur does not have any hardpoints in it and no hpid section, so you have the problem we just isolated.
Use SUR Exporter v1.1 with your hardpoints and it should be fine. As it’s a small ship you can use a shield bubble. I’ll check that for you if you uploaded it.
-
Thanks for looking at this ST. Just to clarify a few points from my end.
1. I’ve been converting models for years, but i’ve been lazy and making them all single group models and using vanilla surs until the sur builder came along.
2. I resize the model in FLMT because when i export them from MS they are normally a bit small for my taste. I now use Lancers sur builder on the resized model, not actually resizing the sur itself with FLMT
3. Which brings me to this point. All the single group models i’ve converted so far don’t have the hardpoints in the surs as all i’ve done is used the sur builder on them. I don’t get crashes. So the next question is, is this specific to multi part surs only where i need to add the hardpoints to the sur itself?
As to the shield bubble, the model is rheinland gunboat size so do i need a shield bubble?
-
1. Oh, OK, I thought you were “au fait” with making break-off parts and stuff.
2. When you export, the exporter scale sits at 1/92 - I model all mine using 1 MS unit to 1 metre, and set the exporter scale to 1 and all is well.
But remember that the cmp exporter has a bug and will not set the new scale unless you Save Settings or Load Settings first!
If you import the pilot model you will see that 1 to 1 is good.
3. You’ve perhaps not tested them in the same way I guess. Sushi also tested my sur but with NPCs vs NPCs and it didn’t fail for him.
I have a battleship station blasting NPCs using the test ships and surs, it can crash within 5 minutes, but usually takes a while but not more than 1 hour to crash. Then using adoxa’s GetCollisions dll we found it was hits on the hardpoints, as we mentioned above.
The problem is it crashes FLServer, not the client. So for a mod server it is an annoying problem. Good thing is we have now identified the cause, and since we deviated from standard FL it is better to go back to standards instead of inventing get-rounds that might cause other problems.
Anyway, if we fix them then there will be no chances of random unidentifiable crashes caused by this problem.
For your model - the vanilla gunboats and bigger ships don’t have shield bubbles (tnis is seen as HpMount, or crc=f00fb9de in the sur file), they are “shrink-wrapped” with just a bounding box. The SUR Exporter v1.1 does this, but Sur Builder does not.
NOTE: Gunships, cruisers, battleships, transports, lifters and trains do not have the shield_link entry in shiparch.ini - so this will not cause the logged hits in GetCollisions that would be logged if there were a shield_link entry.
If you don’t need break-off bits and your models are small with no gaps then single-part cmps and surs are fine, e.g. for your Elite models.
But if you get a good multi-part sur utility that inserts your hardpoints and does everything close to standard surs, wouldn’t you be happier than farting about fixing half-finished utilities?
And there are modders (not me at the moment) who want break-off parts too. And of course the large ships and station models need multiple parts, more than the 18 limit of our current utilities.
That still leaves the wing+weapon sur parts (type 5) which are in standard FL sur files. They must have a purpose so should be included in our surs for full compatibility/compliance.
Sur Builder would be great if it could be updated to do all this since LS already put so much into it.
But now we know more about what is needed, (actually Bejaymac told us all this many, many times years ago but we didn’t understand or didn’t want to do it his way), the other guys here will crack it hopefully. I’m hanging around here to make sure they get harassed into doing it!
-
I’m all for a PRESS HERE FOR A SUR FILE utility, i can’t finish the starlancer ships until there is one. Funny you mention npc v npc test, that’s exactly what i’m in the middle of doing and no crashes, been up for almost an hour now, but you reckon it won’t crash because it’s npc v npc.
I agree plenty of people want models with destructive parts etc and why wouldn’t they? I’m more interested in bases with holes i can fly into and not cheat by using the phantom physics command.
I can wait with everyone else for a form fitting, completely bug free sur making utility, and judging from what’s going on here, hopefully looks like it’s not that far away
-
Hopefully.
Now - we still need a method for surs with holes for docks and fly-through parts. I’ve used the manual method and Sur Splicer on mine successfully by making sur “bricks” aound the hole, each attached to a body part. But I’ve not put in any sur parts for the turrets etc, and hits on these are being logged by GetCollisions.
The Sur Builder might be good for holes, (I don’t know) but we have no way to patch in hardpoints after the sur is generated.
And if we use Sur Splicer the same applies.
It may be possible by exporting the hardpoints with the root group and then using Sur Splicer, but I haven’t tested that yet.
-
hardpoints are not groups. guess any sur attached to those is generally totally different from the usual surs. at least because they don’t attach to vmesh but to points, which are not existant. moreover - the turrets all have their own sur geometry and are destroyed if you hit this, though does it depend in any way on the hardpoint? i doubt…
-
Just be patient ^^ I am nearly finished and the only thing left is polishing for daily use. After I have released you can complain about the errors I did not find More hopefully in the next days…
-
Gibbon wrote:
You pull this off, you too will have earned the FL Modders Hero medal, at least from me. Take your time and get it as right as you can, we can all wait a bit a longerYep, take your time Schmackbolzen, better to get it right so you don’t have me pestering you later! lol
Gisteron - what on earth are you trying to say or ask?? :-?
Take that carrot out of your mouth and try again! :lol:
-
So did anybody encounter this problem when adding additional hardpoints to vanilla ships? As they also don’t have the part in the .sur file.
And could the random crashes I encounter in a mod of mine be also related to this? It only uses unedited vanilla models and surs (Including Battleships, cruisers, gunboats), but with edited, more complex fuses…and these crashes become a lot less when I remove the rh_gunboat, and even more less when I use a instant destruction fuse for the br_gunboat. So I always thought that the fuses were the problem for these, something with effects being played on a hardpoint that does not exist anymore because the part has already shot of or so.
But if I read all the posts here it could also be a poblem with the .sur files, right? Did anybody beside me experience this with the vanilla capships? -
Well i have the slight impression that the crash suppression in getroot (I use a fixed version of Cannons crashcatcher plugin) might catch such crashes. I recently changed the most used NPC Pilot to not attack solars and since then the catched crashes really went down, even as we had over 30 players last Saturday. The problem is, since we have an autoupdater it could well have been something else (even though none of the previous updates within nearly a year changed the amount of catched crashes).
-
Depends on the crash - tell us more - server crash or client crash?
You can isolate your problem very easily…
1. Change the surs for the vanilla ones temporarily.
2. Replace your fuse with the standard one.
3. Test the gunships one at a time by removing the factions in your encounters one at a time. -
A very interesting find…
After adding the HpTurretxx (and other) hpids into the sur file for my base ship, GetCollisions dll did not create the GetCollisions.txt file at all - no log messages!
EDIT:-
[d]And contrary to my earlier post, you CAN insert new hpids into the sur file and extend it. Just be careful not to alter the mesh name following the last hpid entry, and make sure the hpid count is correct (it is hex, so 10=0A, 36=24).[/d][d]So - best to be sure you do add all the relevant Hardpoints - use my list above to see which ones need to be in, so I don’t repeat that here.
[/d]LancerSolurus wrote:
A warning if you are hex editing the HPIDs in, you ARE overwriting important data in the sur file, don’t do it. I would suggest splicing it in.
I have no idea how to “splice in” the hpid’s.
And the table is not at the end on the two files I edited.
So as LS confirms the file will be damaged, it is best to regenerate the sur file using Sur Exporter v1.1 with the hardpoints included. This will also add the sur meshes for the hardpoints.
-
As far as I remember at the beginning is an entry which tells the total size of the sur file. So Freelancer should not load any added Hps to the list unless you change that entry too (could even be two values, would have to look it up).
-
Glad the problem was found, adding in the HPID section hopefully won’t be too difficult. The single part does add them.
The names of the HPs are not a big problem, they are all there in the CMP file including any oddball names (I used non-standard names as well).
A warning if you are hex editing the HPIDs in, you ARE overwriting important data in the sur file, don’t do it. I would suggest splicing it in.
@ Schmackbolzen - I feel for ya, guess you found out there really isn’t any decent code out there for making convex hulls. It’s why I ended up coming up with my own method (which unfortunately still doesn’t work 100% )
-
LancerSolurus wrote:
Glad the problem was found, adding in the HPID section hopefully won’t be too difficult. The single part does add them.So if we use single part sur files from your builder we shouldn’t have a problem?
But the multipart sur files are bolloxed?That’s weird if true, as ST was still getting crashes when using single part sur files from what I recall.
-
You may be right but I don’t think I tried single part surs with Sur Builder, Timmy - I don’t use single-part cmps, I’ve been trying the multi-part surs. Remember the group cube box and triangle tests were all multi-part.
I did make some single-part surs just to help me to isolate the problem of Sur Builder not making sur parts for all ship parts, and it was the same as with multi-part. But I don’t think I ever used them for testing, I don’t like them! lol
In passing, another reason for multi-part ships and surs is that when the ship is destroyed, the groups fly apart when using process = shatter in the explosion (defined in FX\EXPLOSIONS\explosion.ini) called in shiparch.ini.
-
StarTrader wrote:
I can now confirm that single-part surs for the same two ships also fail within 30 minutes.Sad.
Retested yet again with vanilla surs - all runs well for over 3 hours.
Here are the single-part surs if anyone would please test these and the multi-part ones (the ship cmps are the same) I would appreciate the help, it would tell me if the crashes are genuine or if it is indeed my setup.
The only thing I can think to cause this type of crash after a certain amount of time is perhaps large numbers of error messages accumulating in a hidden FL Server log or buffer?
Does anyone know where there is such a log/buffer? I don’t mean C:\FL-Server-errors.log, I know about that one and there is nothing in it.
I’m confused, when I read this I thought you meant you had proved single part were also failing for you.