Hard Light Productions Forums

General FreeSpace => FreeSpace & FreeSpace Open Support => Topic started by: Simoen on September 28, 2019, 11:33:10 am

Title: FSO: "Slaying Ravana" Cyclops Torp Missing
Post by: Simoen on September 28, 2019, 11:33:10 am
Just ran into this bug that seems to date from 2011 (?) with latest FSO and GoG.com install:

Level Slaying Ravana; where you are supposed to use Cyclops torpedoes to destroy the Ravana. You need to use the Cyclops torpedo to destroy the Ravana. Getting to the ship load out screen, the only missiles I can equip are Tempest and Hornet missiles. If I just hit play without getting to the loadout screen, the only missiles I have are the Hornet missiles, and not the Cyclops.

>>>>> Only available secondary weapons are GTM-4 Hornet and GTM MX-6 Tempest - irrespective of whether GTB Ursa or GTB Medusa is selected as ship.

Thinking it might be related to MediaVPs MV_Assets, I ran game without them and still could not select Cyclops.

grepping for Cyclops shows
release/bin/ReadMe.txt:- Cyclops bomb names fixed
--- perhaps it isn't loading due to misnaming?

It's a gamestopper bug, of course. Maybe it can be fixed in mission editor?
Title: Re: FSO: "Slaying Ravana" Cyclops Torp Missing
Post by: General Battuta on September 28, 2019, 11:35:58 am
Huh. That’s not good.

Please post your fs2_open.log file.  Instructions on how to do this can be found in this post.
Title: Re: FSO: "Slaying Ravana" Cyclops Torp Missing
Post by: Simoen on September 28, 2019, 11:48:30 am
Building a debug build... will update this post.

log is attached. 

screenshot (http://0x0.st/zv94.png)

scanning the log i see it loading model hornet.pof and Tempest.pof but no cyclops.pof or Cyclops.pof


[attachment eaten by a Shivan]
Title: Re: FSO: "Slaying Ravana" Cyclops Torp Missing
Post by: Nightmare on September 28, 2019, 12:06:13 pm
The "bomb name fix" isn't the cause as it just makes the bomb use Cyclops.pof, the retail one used Belial.pof. Errors with that would make you fire Shivan sentry guns as there's a Belial ship.
Title: Re: FSO: "Slaying Ravana" Cyclops Torp Missing
Post by: Simoen on September 28, 2019, 12:11:16 pm
$ grep -ri hornet.pof *
Binary file release/MediaVPs_2014/mv_assets.vp matches
Binary file release/bin/Root_fs2.vp matches
Binary file release/bin/sparky_fs2.vp matches

$ grep -ri cyclops.pof *
Binary file release/MediaVPs_2014/mv_assets.vp matches

scanning for Belial.pof returns:

$ grep -ri Belial.pof *
Binary file release/bin/Root_fs2.vp matches
Binary file release/bin/sparky_fs2.vp matches

Is FSO looking for cyclops.pof or Cyclops.pof but not finding it in the original mediaVPs?
Title: Re: FSO: "Slaying Ravana" Cyclops Torp Missing
Post by: Nightmare on September 28, 2019, 12:12:42 pm
Are you using any Media VPs? Log says no. I am not sure how FSO handles the retail files, it has been a while since I tested that.
Title: Re: FSO: "Slaying Ravana" Cyclops Torp Missing
Post by: General Battuta on September 28, 2019, 12:22:41 pm
Obviously a bug when using just retail data is serious and needs to be fixed, but try turning on the MediaVPs. Might be an effective workaround.
Title: Re: FSO: "Slaying Ravana" Cyclops Torp Missing
Post by: Simoen on September 28, 2019, 12:37:43 pm
enabling the mediaVPs i note the log has some entries:

2029 Loading model 'cyclops.pof' into slot '20'

2972 Class: cyclops
2973 FR: 100
2974 FE: 6
2975 BEI: 0.6
2976 BEDu: 2000
2977 BEDi: 1000
2978
2979 Class: cyclops#short
2980 FR: 100
2981 FE: 6
2982 BEI: 0.6
2983 BEDu: 2000
2984 BEDi: 1000

... but it can not be selected in loadout and is not loaded by default.

The gog url for the problem is here:
https://www.gog.com/forum/freespace_series/wrong_secondary_weapons_on_freespace_2/page1 (https://www.gog.com/forum/freespace_series/wrong_secondary_weapons_on_freespace_2/page1)

I can see the Cyclops in the weapons previewer in-game with stock or new mediaVPs
(http://0x0.st/zvpo.png)


[ added data/players files to attachment ]



[attachment eaten by a Shivan]
Title: Re: FSO: "Slaying Ravana" Cyclops Torp Missing
Post by: General Battuta on September 28, 2019, 01:11:15 pm
Try forcing one of your banks to Cyclops using cheats? If cheats work on Linux.
Title: Re: FSO: "Slaying Ravana" Cyclops Torp Missing
Post by: Simoen on September 28, 2019, 01:25:44 pm
To rule out corrupt download, I attach md5sums of the GoG.com Freespace 2 installed files.

Generated with: find -type f -exec md5sum "{}" + > md5sums.log

  I do note the installer crashed at the end of the install, so it is possible there is bad/missing data.

Fixing things is the best game of all :)

[EDIT]
enabling cheats by typing www.freespace2.com in-engine returns a Cheats Enabled message on screen, but none of the cheats I tried from https://wiki.hard-light.net/index.php/Cheats (https://wiki.hard-light.net/index.php/Cheats) have any effect.

[EDIT2] some of my large allied ships died in prior missions, perhaps because i play badly.  This might lead to a different gamestate from when more skilled testers try to reproduce?

[attachment eaten by a Shivan]
Title: Re: FSO: "Slaying Ravana" Cyclops Torp Missing
Post by: Novachen on September 28, 2019, 01:45:46 pm
That is a very strange error, i was never able to reproduce.

Such similar error was reported to happen in my FreeSpace Port Translation Upgrade with the Hornet Swarm Missile without any reason.
Title: Re: FSO: "Slaying Ravana" Cyclops Torp Missing
Post by: Simoen on September 28, 2019, 02:36:49 pm
I might be able to look at what is happening with a debugger, but first I'd need help

1) confirming that my original game data is correct (post your md5sums.log).
2) confirmation whether someone ekse can recreate the problem with my pilotfile posted above (is it sufficient to set game-state to mine?)

After that, i can dig down into the code.   Since the default loadout is wrong (just Hornets) the bug probably isn't in missionweapoinchoice.cpp.

Of course best would be if a programmer who knew the codebase could look at it.

[EDIT]
Also, can i use some editor (fred?) to see what the mission specifies for ship type and weapons loaded?
Title: Re: FSO: "Slaying Ravana" Cyclops Torp Missing
Post by: Nightmare on September 28, 2019, 03:35:27 pm
You could/should try the Knossos launcher, which handles checking file integrity automatically.

You check mission loadout in FRED too.
Title: Re: FSO: "Slaying Ravana" Cyclops Torp Missing
Post by: Simoen on September 28, 2019, 08:47:11 pm
1) Bisecting the problem - it doesn't seem to be related to an unusual gamestate from my first playthrough.  I replayed up to Ravana mission and got the same Hornet-only loadout for secondary weapons
(http://0x0.st/zvVt.png)

2) If nobody shares any here, I will try to find checksums for the download elsewhere.

3) I will check the Ravana mission loadout in fred after that.

[EDIT] I also see that both ships for this mission list the 'Tempest' in the secondary weapons selection, but trying to select them returns a message that neither ship is able to carry the Tempest.  Why are these listed then?  Is the Cyclops supposed to appear in the Weapon Loadout screen instead of the Tempest?
Title: Re: FSO: "Slaying Ravana" Cyclops Torp Missing
Post by: niffiwan on September 28, 2019, 09:17:30 pm
Your MD5 sums for the VP (i.e. retail game data files) look OK to me:

Code: [Select]
$ md5sum *vp
7a22c0d1f98357d00e70a7eeeba82e3d  multi-mission-pack.vp
21f208418acd99fc03c0379bfa777dad  multi-voice-pack.vp
0d9fd69acfe8b29d616377b057d2fc04  root_fs2.vp
0d662decc0b443ccb8e8aa2e3a0887ce  smarty_fs2.vp
2a47bdf14860071cf0196d92e9ee7c2f  sparky_fs2.vp
97661124cdc47c0a2f0678982b8cbd91  sparky_hi_fs2.vp
e88f0e0011b3e525a5ad625933684c03  stu_fs2.vp
8ca7330cfe63329b41868efc2e40e048  tango1_fs2.vp
6fb6e9a36248980540155a9777c51c47  tango2_fs2.vp
d42c20b6ffb4782e431899c211ae55c4  tango3_fs2.vp
d1f3c39d4fe1bbd56b7b06fe66eef4a6  warble_fs2.vp

I've also just tried playing Slaying Ravana from the tech room (on Linux as well) and the Cyclops is correctly appearing in my loadout. Could you please try playing from the tech room & report the results?

i.e. Tech Room -> Mission Simulator -> Select Campaign Missions -> Press CTRL-SHIFT-S (to see all missions in the campaign)

I had a look at your pilots, unfortunately I can't test with them because you seem to have included files from two different pilots? I was expecting to see NAME.json & NAME.Freespace2.csg. However you seem to have Simeon.json & Clort.Freespace2.csg :)
Title: Re: FSO: "Slaying Ravana" Cyclops Torp Missing
Post by: Simoen on September 28, 2019, 09:36:56 pm
Your MD5 sums for the VP (i.e. retail game data files) look OK to me:

Code: [Select]
0d9fd69acfe8b29d616377b057d2fc04  root_fs2.vp
Thanks! 

Tthe root_fs2.vp seems to have the problematic mission SM1-07.fs2. 

I've also just tried playing Slaying Ravana from the tech room (on Linux as well) and the Cyclops is correctly appearing in my loadout. Could you please try playing from the tech room & report the results?
i.e. Tech Room -> Mission Simulator -> Select Campaign Missions -> Press CTRL-SHIFT-S (to see all missions in the campaign)

In the tech room simulator, I can load Cyclops in the weapons loadout screen (but it is not equipped by default).  Using cyclops during simulated mission works as well.

I noticed that SM1-06.fs2 was not available as a simulation until I hit ctrl-shift-s.  Should have it been, at this stage of the game?

I had a look at your pilots, unfortunately I can't test with them because you seem to have included files from two different pilots?
My mistake, sorry.  I'll attach both files for both pilots in a couple of minutes. 

I have extracted SM1-07.fs2 and loaded into Fred.  It seems to indicate the Cyclops#short is available, but not Cyclops.  Attached is screenshot:
(http://0x0.st/zvVn.png)


[attachment eaten by a Shivan]
Title: Re: FSO: "Slaying Ravana" Cyclops Torp Missing
Post by: Nightmare on September 29, 2019, 03:55:53 am
The mission simulator should show all missions that have been completed in the campaign at this point. The only exception are missions that have been skipped by failing 5 times in a row.
Title: Re: FSO: "Slaying Ravana" Cyclops Torp Missing
Post by: Cyborg17 on September 29, 2019, 10:50:59 am
Also if SM1-06 is not loading, then it could be that somehow your progress in that mission wasn't saved, but the campaign still sent you to the next mission. Weapons are marked as allowable by sexp in campaigns.  I'm willing to guess that SM1-06 has a sexp allowing the Cyclops to be used by the player which also wasn't properly triggered.

EDIT: It looks like the same event is responsible for progress in the campaign file as is the ability to arm Cyclop#short, "Return to Base".  This event is triggered as part of a chain after the Iblis is either destroyed or dropped below 30% hull.  The Ravana arrives and the Lysander is actually made to self-destruct as the Ravana shoots at it so that it will never actually survive. 

But leaving before the Lysander is destroyed literally fails you the mission.

So the most logical conclusion is that the ability to skip a mission after 5 attempts was used before the Lysander was destroyed, and the cyclops#short was never allowed.

 It's just an edge case for the campaign.

Did you end up skipping SM1-06?
Title: Re: FSO: "Slaying Ravana" Cyclops Torp Missing
Post by: General Battuta on September 29, 2019, 01:21:19 pm
That’s a very sharp diagnosis. It may not turn out to be right but it’s very sharp.
Title: Re: FSO: "Slaying Ravana" Cyclops Torp Missing
Post by: Simoen on September 29, 2019, 02:40:40 pm
Also if SM1-06 is not loading, then it could be that somehow your progress in that mission wasn't saved, but the campaign still sent you to the next mission. Weapons are marked as allowable by sexp in campaigns.  I'm willing to guess that SM1-06 has a sexp allowing the Cyclops to be used by the player which also wasn't properly triggered.

EDIT: It looks like the same event is responsible for progress in the campaign file as is the ability to arm Cyclop#short, "Return to Base".  This event is triggered as part of a chain after the Iblis is either destroyed or dropped below 30% hull.  The Ravana arrives and the Lysander is actually made to self-destruct as the Ravana shoots at it so that it will never actually survive. 

But leaving before the Lysander is destroyed literally fails you the mission.

So the most logical conclusion is that the ability to skip a mission after 5 attempts was used before the Lysander was destroyed, and the cyclops#short was never allowed.

 It's just an edge case for the campaign.

Did you end up skipping SM1-06?

Nope
- In both playthroughs the Lysander was destroyed and I jumped-out after instructed, and was presented the completed mission debriefing.  This might be a bug to investigate!

- Can I enable the missing sexp for Cyclops#short be in the pilot file?   My pilot files are attached above.

Title: Re: FSO: "Slaying Ravana" Cyclops Torp Missing
Post by: General Battuta on September 29, 2019, 02:57:40 pm
Just to be sure, is that event in 'The Great Hunt' calling the right weapon names?
Title: Re: FSO: "Slaying Ravana" Cyclops Torp Missing
Post by: Nightmare on September 29, 2019, 02:59:40 pm
Hand editing pilot files isn't possible AFAIK. Hard to say what to do instead- you can of course add the sexp to the mission yourself. Alternatively, just cheat in the bombs when they are missing and you need them.
Title: Re: FSO: "Slaying Ravana" Cyclops Torp Missing
Post by: Nightmare on September 29, 2019, 03:03:42 pm
Just to be sure, is that event in 'The Great Hunt' calling the right weapon names?

The event uses "Cyclops#short", the correct one and the same used in the loadout of Slaying Ravana.
Title: Re: FSO: "Slaying Ravana" Cyclops Torp Missing
Post by: Cyborg17 on September 29, 2019, 03:43:27 pm
There might be a line in the campaign save that you can edit.  This is very very odd.
Title: Re: FSO: "Slaying Ravana" Cyclops Torp Missing
Post by: Nightmare on September 29, 2019, 03:58:37 pm
The campaign safes actually don't look like thay colud be edited without a hex editor and an exact idea what to do.
Title: Re: FSO: "Slaying Ravana" Cyclops Torp Missing
Post by: Simoen on September 29, 2019, 04:04:42 pm
To keep playing:
- I should edit the campagn in FRED to enable Cyclops#short by default, then somehow merge that back into the main campaign?

To help debug
- Should I start a new pilot, play up to SM1-06 and then share the pilot file?
- Should I upload my FSO build?  E.g. github or something?

[EDIT]
If finding the cause of the bug will be hard, could FSO remove the requirement for the Cyclops#short qualification in SM1-07 - maybe with a mediaVPs mod?
Title: Re: FSO: "Slaying Ravana" Cyclops Torp Missing
Post by: Cyborg17 on September 29, 2019, 04:26:47 pm
We may just have to keep asking questions because this one will probably be hard to track down.

Well, what about this. Have you been playing with an FSO build the whole time or did you switch?
Title: Re: FSO: "Slaying Ravana" Cyclops Torp Missing
Post by: Nightmare on September 29, 2019, 05:17:06 pm
Quote
- I should edit the campagn in FRED to enable Cyclops#short by default, then somehow merge that back into the main campaign?

You'd have to do that in the mission file; the campaign loadouts are only applied when you start the campaign.

[EDIT]
If finding the cause of the bug will be hard, could FSO remove the requirement for the Cyclops#short qualification in SM1-07 - maybe with a mediaVPs mod?

It has been there since retail, so that's not really an option I'd guess.
Title: Re: FSO: "Slaying Ravana" Cyclops Torp Missing
Post by: Simoen on September 29, 2019, 05:38:57 pm
We may just have to keep asking questions because this one will probably be hard to track down.

Well, what about this. Have you been playing with an FSO build the whole time or did you switch?
FSO build whole time. No recompiles or changes until i hit the bug.
Title: Re: FSO: "Slaying Ravana" Cyclops Torp Missing
Post by: niffiwan on September 30, 2019, 05:48:20 am
In an effort to gather more data I've just played through the campaign (skipping all the training missions, and on easy) and I can't repro. i.e. the Cyclops is available in Slaying Ravana.

Do your wingmen have any Cyclops loaded? If you might be able to steal them. Alternatively, you might be able to get past the mission by hiding behind the corvette and waiting until it destroys the Ravana with beam fire? (you might need a higher difficulty level for this to work, so the corvette's beam do more damage, in which case I'd recommend the Medusa because it's the most manoeuvrable bomber you have and thus will probably be easiest to survive in)

Unfortunately there's a few more missions later that require the Cyclops#short, but you could add a sexp into Slaying Ravana that at least allows you to use this future missions? The following should work:

Code: [Select]
$Formula: ( when
   ( true )
   ( allow-weapon "Cyclops#short" )
)
+Name: gimme cyclops
+Repeat Count: 1
+Interval: 1

Apart from that, maybe a new pilot & replaying the campaign could offer more insight into what's going wrong.
Title: Re: FSO: "Slaying Ravana" Cyclops Torp Missing
Post by: Simoen on September 30, 2019, 11:55:38 pm
In an effort to gather more data I've just played through the campaign (skipping all the training missions, and on easy) and I can't repro. i.e. the Cyclops is available in Slaying Ravana.

Do your wingmen have any Cyclops loaded? If you might be able to steal them. Alternatively, you might be able to get past the mission by hiding behind the corvette and waiting until it destroys the Ravana with beam fire? (you might need a higher difficulty level for this to work, so the corvette's beam do more damage, in which case I'd recommend the Medusa because it's the most manoeuvrable bomber you have and thus will probably be easiest to survive in)

Unfortunately there's a few more missions later that require the Cyclops#short, but you could add a sexp into Slaying Ravana that at least allows you to use this future missions? The following should work:

Code: [Select]
$Formula: ( when
   ( true )
   ( allow-weapon "Cyclops#short" )
)
+Name: gimme cyclops
+Repeat Count: 1
+Interval: 1

Apart from that, maybe a new pilot & replaying the campaign could offer more insight into what's going wrong.
0) Thanks niffiwan!  I don't know how to check wingmen loadouts or steal weapons from them.

1) I added that using FRED2 and then checked results in  my modified SM1-07.fs2 -- Could have just pasted it i guess, but i wanted to confirm.  How do i bring the modified mission into the game campaign?

2) I played a second pilot through to SM1-07 and got the same error.  Both pilot files are attached above. I don't see how a third playthrough would be worth the time investment.

How do i merge patched SM1-07.fs2 into the game?
Title: Re: FSO: "Slaying Ravana" Cyclops Torp Missing
Post by: niffiwan on October 01, 2019, 05:08:18 am
To take weapons off your wingmen; in the weapon selection screen click on one of your wingmen's ship, then click-and-drag their weapons out of their secondary bays. Or put something else into their secondary bays, like hornets, and the Cyclops (if they have them) might go into the weapons pool. I should note that I'm not sure this will work, because I'm not sure what FSO's behaviour will be in this situation! It may still refuse to load the Cyclops onto your ship.

To add the modified mission, go to the location that the mediavps are stored in (assuming you are using the mediavps!). That should be a location like KNOSSOS_FOLDER/FS2/MVPS-3.8.1. From there, create two folders, data & data/missions. And finally save the modified SM1-07.fs2 file to that location. i.e. the full path to the file should be KNOSSOS_FOLDER/FS2/MVPS-3.8.1/data/missions/SM1-07.fs2

Lastly, I couldn't see a new attachment with both your pilot files?
Title: Re: FSO: "Slaying Ravana" Cyclops Torp Missing
Post by: Simoen on October 01, 2019, 06:00:10 pm
Hello, I created the subdirs in my mediavps, copied the file in.  I verified that the sexp hack was in the file, verbatim, and changed a word in the mission briefing to confirm it gets loaded.  It does load the modified mission.
Code: [Select]
1974 $Formula: ( when
1975    ( true )
1976    ( allow-weapon "Cyclops#short" )
1977 )
1978 +Name: AddCyclops
1979 +Repeat Count: 1
1980 +Interval: 1
I tried specifying also +Team -1, 0 and 1

However there's no Cyclops on me or my wingmen.

Still, set to very easy I managed to kill Ravana (well the capitol ship did).




[attachment eaten by a Shivan]
Title: Re: FSO: "Slaying Ravana" Cyclops Torp Missing
Post by: Cyborg17 on March 07, 2021, 09:17:48 pm
Soooooooo.... I'm hoping beyond hope here, but does anyone still happen to have the campaign file he attached way back in 2019?  :nervous: