Author Topic: Continuing Karajorma's work on SEXP containers  (Read 6173 times)

0 Members and 1 Guest are viewing this topic.

Offline jg18

  • A very happy zod
  • 210
  • can do more than spellcheck
Re: Continuing Karajorma's work on SEXP containers
Ok, builds updated with the fix. Var replacement is unchanged.

The changes from the last build began with commits on April 8: https://github.com/jg18/fs2open.github.com/commits/feature/sexp-containers-revised

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Continuing Karajorma's work on SEXP containers
Here's a quick test mission I put together to show what values in the briefings and debriefs would be expected by a FREDder. As you can see they're not correct.

[attachment deleted to save space]
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline jg18

  • A very happy zod
  • 210
  • can do more than spellcheck
Re: Continuing Karajorma's work on SEXP containers
I created a PR that should fix this.

EDIT: removed link to test build (no longer needed since the fix is now in master).
« Last Edit: May 04, 2021, 08:40:10 pm by jg18 »

 

Offline jg18

  • A very happy zod
  • 210
  • can do more than spellcheck
Re: Continuing Karajorma's work on SEXP containers
Builds in the OP updated with minor fixes and cleanup.

Hoping to start a PR in the next few days.

The remaining TODOs can get sorted out as part of PR review.

 

Offline jg18

  • A very happy zod
  • 210
  • can do more than spellcheck
Re: Continuing Karajorma's work on SEXP containers
Builds in the OP updated with (untested) container persistence support.

The only missing part is FRED controls to enable it. However, you can add the persistence options in Notepad, which should go after the $Data line.

The options (case-insensitive, include the '+'):

+Eternal
+Save On Mission Progress
+Save On Mission Close

"+Eternal", if used, must come before the "Save On" option.

Even though FRED doesn't have controls yet, it should still load/save the container persistence options.

EDIT: Forgot to mention that persistent containers should work for "Red Alert" missions as well.
« Last Edit: April 26, 2021, 01:45:01 am by jg18 »

  

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Continuing Karajorma's work on SEXP containers
Awesome. Will download and test now.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Continuing Karajorma's work on SEXP containers
A couple of minor issues I just noticed while putting together a campaign to test persistence.

  • If you want to rename a container and you open the dialog, rename it and click OK, it will be updated. If you rename it and then open a different variable, it isn't renamed on the list until the dialogue is reopened (which of course makes look like it hasn't been renamed)
  • If you try to rename an existing list by adding a space (Say renaming List -> List 2) as soon as you type the space the dialog will open up to tell you that names can't end in a space. You can avoid the issue by typing in the name without spaces and then adding them but it's a little clunky.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline jg18

  • A very happy zod
  • 210
  • can do more than spellcheck
Re: Continuing Karajorma's work on SEXP containers
Builds in OP updated with FRED controls for persistence options and also a formatting fix when saving persistence options to disk.

For the UI glitches with container renaming, I'm thinking of using a separate dialog to rename containers, something similar to the Add New Container dialog, and then making the list of container names non-editable. That'll make it much easier to fix those bugs.

 

Offline jg18

  • A very happy zod
  • 210
  • can do more than spellcheck
Re: Continuing Karajorma's work on SEXP containers
Builds in OP updated.

The main change is that the drop down box of container names is no longer editable. Instead, there's a new "Rename Container" button.

The container names box is now disabled when the last container is deleted.

The FRED UI glitch about a renamed container's name not getting updated in the drop down box should now be fixed.

I also rebased against latest master, which now includes my fix for variable replacement.