Author Topic: Patch to display currently selected Mod  (Read 2148 times)

0 Members and 1 Guest are viewing this topic.

Offline Tomo

  • 28
Patch to display currently selected Mod
It's often useful have a reminder of which Mod you've got selected, and when debugging it's nice to know whether your modlist got processed in the order you expected.
(Inspired by the Portej's thread suggesting that we look at how data gets loaded again)

This is particularly useful if you prefer to use a different Pilot file depending

Attached is a small .patch file that shows the currently selected Mod in the Pilot Selection and Mainhall screen.
(Built against r5620)

In Release it only shows the first tag after -mod, in Debug it shows the full list.

[attachment deleted by admin]

  

Offline Zacam

  • Magnificent Bastard
  • Administrator
  • 211
  • I go Sledge-O-Matic on Spammers
    • Steam
    • Twitter
    • ModDB Feature
Re: Patch to display currently selected Mod
Does exactly as advertised on the tin.

Nice job.
Report MediaVP issues, now on the MediaVP Mantis! Read all about it Here!
Talk with the community on Discord
"If you can keep a level head in all this confusion, you just don't understand the situation"

¤[D+¬>

[08/01 16:53:11] <sigtau> EveningTea: I have decided that I am a 32-bit registerkin.  Pronouns are eax, ebx, ecx, edx.
[08/01 16:53:31] <EveningTea> dhauidahh
[08/01 16:53:32] <EveningTea> sak
[08/01 16:53:40] * EveningTea froths at the mouth
[08/01 16:53:40] <sigtau> i broke him, boys

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Re: Patch to display currently selected Mod
It would be better to show the full mod list even in release builds.  There's no guarantee that a bug will only pop up in the first mod on the list.

 

Offline Zacam

  • Magnificent Bastard
  • Administrator
  • 211
  • I go Sledge-O-Matic on Spammers
    • Steam
    • Twitter
    • ModDB Feature
Re: Patch to display currently selected Mod
Okay. Fatal Flaw here. We may just want it to parse the mod name from the mod.ini rather than the primary/secondary list fields.

Reason for this is for SVN testing the MediaVPs, they are not in VP format, and it barfs once the directory listing strings hit's the character limit.
Report MediaVP issues, now on the MediaVP Mantis! Read all about it Here!
Talk with the community on Discord
"If you can keep a level head in all this confusion, you just don't understand the situation"

¤[D+¬>

[08/01 16:53:11] <sigtau> EveningTea: I have decided that I am a 32-bit registerkin.  Pronouns are eax, ebx, ecx, edx.
[08/01 16:53:31] <EveningTea> dhauidahh
[08/01 16:53:32] <EveningTea> sak
[08/01 16:53:40] * EveningTea froths at the mouth
[08/01 16:53:40] <sigtau> i broke him, boys

 

Offline The E

  • He's Ebeneezer Goode
  • Moderator
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Re: Patch to display currently selected Mod
Same goes for Blue Planet. We use a similar setup for our svn folders.
If I'm just aching this can't go on
I came from chasing dreams to feel alone
There must be changes, miss to feel strong
I really need lifе to touch me
--Evergrey, Where August Mourns

 

Offline Tomo

  • 28
Re: Patch to display currently selected Mod
Ooops - I missed out the max_size sanity check.
I'm obviously too used to Delphi silently preventing buffer overflows in the string types.
*mutters* char is not string, char is not string...

@Goober:
Could be. I trimmed it in Release builds as the list is often long.

@ Zacam, The_E:
I specifically avoided opening mod.ini because FS2Open actually never touches it - it's only used by the Launcher to build the command line.

I suppose that takes us back to the stuff raised by Portej.

As a start to that, would it make sense for FS2Open to handle the Mod.Ini stuff itself, with the Launcher merely pointing FS2 at it?
For backwards compatibility:
FS2 counts -mod command line terms.
- If there is only one Mod term, process Mod.Ini to find the rest.
- Otherwise, process the additional terms.

Patch attached that corrects the issue.
This is also built against 5620, so revert to SVN before applying.

[attachment deleted by admin]
« Last Edit: October 26, 2009, 04:19:47 am by Tomo »

 
Re: Patch to display currently selected Mod
Tomo, use std::string.
STRONGTEA. Why can't the x86 be sane?

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Re: Patch to display currently selected Mod
I suspect the most useful format for displaying -mod information is, unfortunately, what we see in fs2_open.log.

Perhaps a change in strategy is in order.  What if we added a hotkey that displayed the -mod information in a gigantic popup window?