Author Topic: Loading multi missions using an incompatible mod  (Read 1492 times)

0 Members and 1 Guest are viewing this topic.

Offline Galemp

  • Actual father of Samus
  • 212
  • Currently modeling SG Rahu and FREDding for Scroll
    • Steam
    • User page on the FreeSpace Wiki
Loading multi missions using an incompatible mod
POW!

Figured I'd repurpose an old topic. I've been playing FSPort (cross-platform, woot) with my 8-year-old stepdaughter and the FSPort multi missions are commingled with the retail ones. There's no way to distinguish them and of course picking an FS2 mission would kill the game.

Is there a way to hide retail multi missions when a mod is loaded? Failing that, can we edit the FSPort multi missions to appear at the top of the list, or identify them as such?
"Anyone can do any amount of work, provided it isn't the work he's supposed to be doing at that moment." -- Robert Benchley

Members I've personally met: RedStreblo, Goober5000, Sandwich, Splinter, Su-tehp, Hippo, CP5670, Terran Emperor, Karajorma, Dekker, McCall, Admiral Wolf, mxlm, RedSniper, Stealth, Black Wolf...

 

Offline mjn.mixael

  • Cutscene Master
  • 212
  • Anims: 420, Cutscenes: 10, Mainhalls: 7, Logos: 52
    • Steam
    • Twitter
    • Mix-Hai Productions
Re: Loading multi missions using an incompatible mod
Well, we do have a game_settings.tbl flag to not display campaigns and their associated missions in single. Perhaps that same code could be repurposed for this case as well?
Cutscene Upgrade Project - Mainhall Remakes - MixaelANITools - Between the Ashes - MjnMixael's Render Boutique - Mix-Hai Productions
Youtube Channel - P3D Model Box - Photobucket Albums - Model Releases - Downloads
Between the Ashes is looking for committed testers, PM me for details.
Report MediaVP issues, now on the MediaVP Mantis! Read all about it Here!

 

Offline Goober5000

  • HLP Loremaster
  • Administrator
  • 214
    • Goober5000 Productions
Re: Loading multi missions using an incompatible mod
This should be opened as a request on the SCP board.  There isn't a general-purpose solution for this, and it's not specific to FSPort -- it would affect every mod.  And neither a whitelist nor a blacklist would be appropriate if you want to allow users to create their own multi missions based on a mod.  Solutions can be brainstormed, but at the very least the code should be modified so that loading a mission for the wrong mod does not kill the game.

 

Offline Galemp

  • Actual father of Samus
  • 212
  • Currently modeling SG Rahu and FREDding for Scroll
    • Steam
    • User page on the FreeSpace Wiki
Re: Loading multi missions using an incompatible mod
As a temporary fix I was thinking of editing the mission names to identify them as FSPort, at least...
"Anyone can do any amount of work, provided it isn't the work he's supposed to be doing at that moment." -- Robert Benchley

Members I've personally met: RedStreblo, Goober5000, Sandwich, Splinter, Su-tehp, Hippo, CP5670, Terran Emperor, Karajorma, Dekker, McCall, Admiral Wolf, mxlm, RedSniper, Stealth, Black Wolf...

 

Offline Goober5000

  • HLP Loremaster
  • Administrator
  • 214
    • Goober5000 Productions
Re: Loading multi missions using an incompatible mod
Don't edit the mission names or filenames; you'll confuse people who are looking for the old ones.  But putting FSPORT at the beginning of all mission descriptions would be a good idea.

 

Offline mjn.mixael

  • Cutscene Master
  • 212
  • Anims: 420, Cutscenes: 10, Mainhalls: 7, Logos: 52
    • Steam
    • Twitter
    • Mix-Hai Productions
Re: Loading multi missions using an incompatible mod
This should be opened as a request on the SCP board.  There isn't a general-purpose solution for this, and it's not specific to FSPort -- it would affect every mod.  And neither a whitelist nor a blacklist would be appropriate if you want to allow users to create their own multi missions based on a mod.  Solutions can be brainstormed, but at the very least the code should be modified so that loading a mission for the wrong mod does not kill the game.

Wait, how would a blacklist stop modders from creating missions based on a mod and having them included? You blacklist the retail missions and all others, even new ones go through. It seems like... actually nevermind. This is FSPort and I don't have capacity to care.
Cutscene Upgrade Project - Mainhall Remakes - MixaelANITools - Between the Ashes - MjnMixael's Render Boutique - Mix-Hai Productions
Youtube Channel - P3D Model Box - Photobucket Albums - Model Releases - Downloads
Between the Ashes is looking for committed testers, PM me for details.
Report MediaVP issues, now on the MediaVP Mantis! Read all about it Here!

 

Offline Goober5000

  • HLP Loremaster
  • Administrator
  • 214
    • Goober5000 Productions
Re: Loading multi missions using an incompatible mod
This should be opened as a request on the SCP board.  There isn't a general-purpose solution for this, and it's not specific to FSPort -- it would affect every mod.  And neither a whitelist nor a blacklist would be appropriate if you want to allow users to create their own multi missions based on a mod.  Solutions can be brainstormed, but at the very least the code should be modified so that loading a mission for the wrong mod does not kill the game.

Wait, how would a blacklist stop modders from creating missions based on a mod and having them included? You blacklist the retail missions and all others, even new ones go through. It seems like... actually nevermind. This is FSPort and I don't have capacity to care.

Yes, you never miss the opportunity to say how much you don't care, do you? :rolleyes:

Never mind that I said this affects every mod, not just FSPort.  The reason is that there is no way to blacklist every conceivable mission.  A user might have some multiplayer missions in his data directory that he created himself, or that he downloaded, that aren't listed in the FSPort blacklist.  Or he might be playing a mod release that doesn't have a blacklist (let's say Blue Planet or Inferno).  Either way, he still risks loading a mission that isn't compatible with that mod.

That's why I said the proper solution should be in the code.  Ideally the mission listing should detect somehow that the mission isn't compatible.  If that can't be done, then at least loading an incompatible mission shouldn't crash the game.

 

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Re: Loading multi missions using an incompatible mod
The reason is that there is no way to blacklist every conceivable mission.  A user might have some multiplayer missions in his data directory that he created himself, or that he downloaded, that aren't listed in the FSPort blacklist.
If a user is leaving missions in their bare data directory instead of a mod folder, that's entirely their fault and a really stupid reason for not having a blacklist of the retail FS2 multi missions which are known not to work.

That's why I said the proper solution should be in the code.  Ideally the mission listing should detect somehow that the mission isn't compatible.  If that can't be done, then at least loading an incompatible mission shouldn't crash the game.
I agree that it shouldn't crash the game, but unless you can actually determine that they're incompatible and prevent them from showing up in the menu in the first place without actually loading them, a blacklist would be superior from a UX perspective.
Ph'nglui mglw'nafh Codethulhu GitHub wgah'nagl fhtagn.

schrödinbug (noun) - a bug that manifests itself in running software after a programmer notices that the code should never have worked in the first place.

When you gaze long into BMPMAN, BMPMAN also gazes into you.

"I am one of the best FREDders on Earth" -General Battuta

<Aesaar> literary criticism is vladimir putin

<MageKing17> "There's probably a reason the code is the way it is" is a very dangerous line of thought. :P
<MageKing17> Because the "reason" often turns out to be "nobody noticed it was wrong".
(the very next day)
<MageKing17> this ****ing code did it to me again
<MageKing17> "That doesn't really make sense to me, but I'll assume it was being done for a reason."
<MageKing17> **** ME
<MageKing17> THE REASON IS PEOPLE ARE STUPID
<MageKing17> ESPECIALLY ME

<MageKing17> God damn, I do not understand how this is breaking.
<MageKing17> Everything points to "this should work fine", and yet it's clearly not working.
<MjnMixael> 2 hours later... "God damn, how did this ever work at all?!"
(...)
<MageKing17> so
<MageKing17> more than two hours
<MageKing17> but once again we have reached the inevitable conclusion
<MageKing17> How did this code ever work in the first place!?

<@The_E> Welcome to OpenGL, where standards compliance is optional, and error reporting inconsistent

<MageKing17> It was all working perfectly until I actually tried it on an actual mission.

<IronWorks> I am useful for FSO stuff again. This is a red-letter day!
* z64555 erases "Thursday" and rewrites it in red ink

<MageKing17> TIL the entire homing code is held up by shoestrings and duct tape, basically.

 

Offline niffiwan

  • 211
  • Eluder Class
Re: Loading multi missions using an incompatible mod
I think you'd need to partially parse the code looking for weapons & ships that don't exist, and then ensure that you gracefully bail with a warning message instead of crashing. But that's only part of the issue, you could have mod table settings that'd seriously alter the behaviour of a mission, e.g. full colour head anis, alternate sexp behaviour, and probably others that I can't think of off the top of my head. To have a better solution FSO would need to be more aware of what mod it's currently running; or you could flag each mission with the mod directory it was found in.
Creating a fs2_open.log | Red Alert Bug = Hex Edit | MediaVPs 2014: Bigger HUD gauges | 32bit libs for 64bit Ubuntu
----
Linux OBS Packages: FSO 3.7.0 | FSO BP Build | wxLauncher (?) | PCS2 (?) | wxVPView (?)
Debian Packages (testing/unstable): Freespace2 | wxLauncher
----
m|m: I think I'm suffering from Stockholm syndrome. Bmpman is starting to make sense and it's actually written reasonably well...

 

Offline Goober5000

  • HLP Loremaster
  • Administrator
  • 214
    • Goober5000 Productions
Re: Loading multi missions using an incompatible mod
I'll split and move this to the SCP forum.

If a user is leaving missions in their bare data directory instead of a mod folder, that's entirely their fault and a really stupid reason for not having a blacklist of the retail FS2 multi missions which are known not to work.

Where is he going to put multi missions based on the bog-standard FS2 other than in data/missions?  I suppose he could create an extra mod folder just for that, but that's an extra step that most people won't take.

But you make a good argument about the blacklist; a solution doesn't have to be 100% foolproof for it to be useful.

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Loading multi missions using an incompatible mod
Well the biggest problem with a code blacklist is how the hell it can tell the difference between, let's say, the media VPs and Blue Planet? Both are mods but one shouldn't run FS2 missions while the other absolutely should.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline niffiwan

  • 211
  • Eluder Class
Re: Loading multi missions using an incompatible mod
How about mods need to configure (in game_settings.tbl?) what other mods and/or retail ~directories~ that they compatible with? When you find a mission (after first making sure that parsing it won't crash FSO no matter what you find) then toss out any which aren't in the correct directory, or in a VP in said directory? (or maybe more intelligently, do that check before loading the mission)

i.e. FSPort with 2014 mediavps could have:
Code: [Select]
valid_mod_mission_dirs = fsport-mediavps_2014, fsport

BP:WiH could have:
Code: [Select]
valid_mod_mission_dirs = blueplanet2, blueplanet, <RETAIL>

That could require a reasonable amount of work though, I can't remember if it's possible to find the full path of a file within a VP or not, but I'm fairly sure that you can easily find the full path of a file not inside a VP.
Creating a fs2_open.log | Red Alert Bug = Hex Edit | MediaVPs 2014: Bigger HUD gauges | 32bit libs for 64bit Ubuntu
----
Linux OBS Packages: FSO 3.7.0 | FSO BP Build | wxLauncher (?) | PCS2 (?) | wxVPView (?)
Debian Packages (testing/unstable): Freespace2 | wxLauncher
----
m|m: I think I'm suffering from Stockholm syndrome. Bmpman is starting to make sense and it's actually written reasonably well...

 

Offline Goober5000

  • HLP Loremaster
  • Administrator
  • 214
    • Goober5000 Productions
Re: Loading multi missions using an incompatible mod
Well the biggest problem with a code blacklist is how the hell it can tell the difference between, let's say, the media VPs and Blue Planet? Both are mods but one shouldn't run FS2 missions while the other absolutely should.

The idea -- at least as I understood it -- was for each mod to have their own blacklist, something like multi_blacklist.tbl.  It wouldn't be in the code itself.  But as mentioned above, it would require each mod to add this file to their distribution.


How about mods need to configure (in game_settings.tbl?) what other mods and/or retail ~directories~ that they compatible with?

Now this is an interesting idea.  It doesn't need to be limited to multi missions either; it could be used in the Tech Room single-mission list.

 

Offline Yarn

  • 210
Re: Loading multi missions using an incompatible mod
I like niffiwan's idea, but using a whitelist like that would break every campaign for that mod unless those campaigns included their own whitelist. I think it should instead be implemented as a blacklist, like this:
Code: [Select]
Invalid mod mission dirs: mediavps*, <RETAIL>

What's that asterisk at the end of "mediavps*", you ask? Well, it indicates that every mod folder beginning with "mediavps" should be included in the blacklist. Thus, the "mediavps*" mod refers not just to "mediavps" but also "mediavps_3612", "mediavps_2014", "mediavps-95603dt", "mediavpsanythingreally", and so on. This eliminates the need to change game_settings.tbl (or whatever file this line is stored in) every time a new version of the MediaVPs is released.
"Your fighter is running out of oil.  Please check under the hood and add more if necessary"
--strings.tbl, entry 177

"Freespace is very tired.  It is shutting down to get some rest."
--strings.tbl, entry 178

 

Offline jg18

  • A very happy zod
  • 210
  • can do more than spellcheck
Re: Loading multi missions using an incompatible mod
If a user is leaving missions in their bare data directory instead of a mod folder, that's entirely their fault and a really stupid reason for not having a blacklist of the retail FS2 multi missions which are known not to work.
Maybe better suited for a new topic, but you're saying they currently don't work at all? Are you referring to the standard multi mission pack? It's of interest to me since I'm currently digging through the netcode.
wxLauncher 0.12.0 RC2/RC3 now available! Toggle FRED launching with F3! | wxLauncher 2.0 Request for Comments
Hey mod authors! Did you know you can customize wxL's recommended lighting preset through your mod.ini? Check it out!

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: Loading multi missions using an incompatible mod
It sounds like the only time that this becomes an issue is when an FS2 mod gets to the point where it can't be turned into a standalone but is so heavily modified that it breaks retail missions.  This isn't something that happens often, and at that point, perhaps just simply not loading any root level missions via an option would be enough to suffice?  Because at that point, the mod is probably using less retail data than it provides, and anything for that mod specifically should be put within the mod's data folder.

But we're saying that even in this case, there are some missions that do work and some that don't cause crashes, for say, BP, or FSPort?  Then include those missions in the mod explicitly.  Make a few tweaks to make it worth doing that.  Trying to hybridize one mission environment that is mostly broken into another environment the ways being discussed all sound like pretty nasty hacks to me.
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays

 

Offline Goober5000

  • HLP Loremaster
  • Administrator
  • 214
    • Goober5000 Productions
Re: Loading multi missions using an incompatible mod
Maybe better suited for a new topic, but you're saying they currently don't work at all?

He means FS2 multi missions that are known not to work under a particular mod.  Not that they are known not to work at all.


It sounds like the only time that this becomes an issue is when an FS2 mod gets to the point where it can't be turned into a standalone but is so heavily modified that it breaks retail missions.  This isn't something that happens often, and at that point, perhaps just simply not loading any root level missions via an option would be enough to suffice?

It doesn't have to be heavily modified.  AFAIK, all that's necessary to trigger it is to have a ships.tbl or weapons.tbl that doesn't include an asset that the mission requires.

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: Loading multi missions using an incompatible mod
And how many mods go so far as to modifying/removing ships from that table, especially with modular tables nowadays?
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays

 

Offline Cyborg17

  • 29
  • A-1 Supar
Re: Loading multi missions using an incompatible mod
Whenever a mod has lot of ships.tbl entries.  We had to remove table entries for The Aftermath to get it to work.  Yes, it was based on BP, but there you go.

In case we're still brainstorming, why not have an optional string within the mission file that saves what mod the mission was created under and maybe its dependencies?  Then you can blacklist the appropriate mods.  (Yes, you would have to add this to a lot of existing mission files, but it's probably the most efficient way to distinguish.  You also wouldn't be able to use specific missions from a mod, but that feels like an edge case, anyway)

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: Loading multi missions using an incompatible mod
If a mod has that many ships.tbl entries I think the focus of the mod is on those ships, and not the retail ones.  Therefore there are probably missions built to use those ships, no?  Would you still need to list those retail missions then?  Why?

As far as I'm concerned, you start deleting retail data, you lose retail missions.  I don't see why it has to be any more complicated than that.  If you want to play retail missions, then fire it up without the mods.  If you want to play the mods, then play the mod's missions.

The only other solution I can think of here is to find a way to gracefully not allow a mission if its required assets aren't available.  Having any kind of list is going to be a nightmare for maintainability reasons, and I personally would recommend against it.
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays