Missing Cob Business

Missing Cob Business

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
User avatar
Neuralize
Posts: 876
Joined: 17 Aug 2004, 23:15

Missing Cob Business

Post by Neuralize »

You might want to look at your code again, and make sure it lookings for a cob file with the same name as the fbi file, and not the same name as the .3do file.
Gnomre
Imperial Winter Developer
Posts: 1754
Joined: 06 Feb 2005, 13:42

Post by Gnomre »

They generally all have the same name anyway... do you have spaces in the filenames? That'll break Spring, I believe...
User avatar
Neuralize
Posts: 876
Joined: 17 Aug 2004, 23:15

Post by Neuralize »

It's not mine, I'm just browsing through different mods, porting them to spring, and noticing patterns in the incompatibilities.
Gnomre
Imperial Winter Developer
Posts: 1754
Joined: 06 Feb 2005, 13:42

Post by Gnomre »

I'm going to speak in OTA terms here, as I'm not quite as familiar with the inner workings of Spring as I am with OTA: The thing is, the filename of the .FBI file is completely arbitrary and irrelevent. The thing that matters is the "UnitName=xxx;" tag in the FBI file. This is the unit's true internal name. This is the name the model and script must have, period. This is also the name referenced in download TDF files and other places in OTA. It just so happens that almost every unit shares the UnitName = FBI filename convention because Cavedog started it, and it works for organizational means. It just makes sense. If you really wanted, you could probably have multiple units defined in one .FBI file (in OTA, at least) without any detrimental results technically.

The point of this is that every unit that worked in OTA will have names that are exactly the same for the UnitName tag, the 3do filename, and the cob filename. Therefore, it is not unreasonable at all for Spring to skip loading the UnitName tag from the FBI and just compare filenames, since if the unit worked in the first place (in regards to file names) in OTA, it will work in Spring. That is unless it has spaces in the name, which as stated, Spring doesn't like. Of course, Spring may very well load the UnitName tag from the FBI for the basis of comparison. I haven't really poked in that part of the source that much.

I'm not trying to say your point is totally invalid--there may be some very obscure scenario that I can't think of which would cause this, but going by what I already know I'd have to come to the conclusion that the problem lies somewhere else, not in the naming convention, unless the naming convention contains spaces.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6242
Joined: 29 Apr 2005, 01:14

Post by FLOZi »

Gnome wrote:I'm going to speak in OTA terms here, as I'm not quite as familiar with the inner workings of Spring as I am with OTA: The thing is, the filename of the .FBI file is completely arbitrary and irrelevent. The thing that matters is the "UnitName=xxx;" tag in the FBI file. This is the unit's true internal name. This is the name the model and script must have, period. This is also the name referenced in download TDF files and other places in OTA. It just so happens that almost every unit shares the UnitName = FBI filename convention because Cavedog started it, and it works for organizational means. It just makes sense. If you really wanted, you could probably have multiple units defined in one .FBI file (in OTA, at least) without any detrimental results technically.

The point of this is that every unit that worked in OTA will have names that are exactly the same for the UnitName tag, the 3do filename, and the cob filename. Therefore, it is not unreasonable at all for Spring to skip loading the UnitName tag from the FBI and just compare filenames, since if the unit worked in the first place (in regards to file names) in OTA, it will work in Spring. That is unless it has spaces in the name, which as stated, Spring doesn't like. Of course, Spring may very well load the UnitName tag from the FBI for the basis of comparison. I haven't really poked in that part of the source that much.

I'm not trying to say your point is totally invalid--there may be some very obscure scenario that I can't think of which would cause this, but going by what I already know I'd have to come to the conclusion that the problem lies somewhere else, not in the naming convention, unless the naming convention contains spaces.
You're wrong, Gnome. :P

The .fbi MUST have the same name as the UnitName=xxx; for TA or the unit won't work. Script must also be the same. 3do is defined in the fbi and so can be anything. So neuralize has a very valid point.
Fnordia
Former Engine Dev
Posts: 425
Joined: 13 Aug 2004, 16:11

Post by Fnordia »

Looks like it indeed uses the model name to figure out the cob name. I'll change that then.
User avatar
Neuralize
Posts: 876
Joined: 17 Aug 2004, 23:15

Post by Neuralize »

*Claps and shreaks with joy.*
Gnomre
Imperial Winter Developer
Posts: 1754
Joined: 06 Feb 2005, 13:42

Post by Gnomre »

FLOZi wrote:You're wrong, Gnome. :P

The .fbi MUST have the same name as the UnitName=xxx; for TA or the unit won't work. Script must also be the same. 3do is defined in the fbi and so can be anything. So neuralize has a very valid point.
Really? I never had any problems with different names... or maybe my memory is just shaky :D Oh well, when you're wrong you're wrong... *shrug*
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6242
Joined: 29 Apr 2005, 01:14

Post by FLOZi »

Well, the modelname is arbitrary, for *SURE*. Was fairly sure on the fbi naming convention. :shock:
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Post by zwzsg »

Have you never seen the Objectname tag in the FBI? That's the name of the .3do. It can be completly different from the filename of everything else, I used it many times when trying diff models for the same unit.
Post Reply

Return to “Engine”