Register FAQ Search Today's Posts Mark Forums Read
Go Back   JazzJackrabbit Community Forums » Maintenance & Feedback » JJ2+ Issue Tracker

Bug Report Additional issues, mainly regarding secret levels.

RSGDB

JCF Member

Joined: Jan 1970

Posts: 25

RSGDB has disabled reputation

Sep 7, 2022, 12:50 PM
RSGDB is offline
Reply With Quote
Additional issues, mainly regarding secret levels.

In a previous thread, I brought up an issue in which completing a secret level resets your coin count in the original level back to 0. It turns out that it also happens with gems, and your health is also reset to 5 HP regardless of how little health you had when you entered.
However much more worryingly it seems that it also disables any angelscript component in the level. So if, for example you set a trigger to change the background music somewhere in the level, it will completely disappear if you return from a secret level, even if you haven't interacted with the trigger. Similarly if you change the tileset palette in MLLE it will reset to default on return.
This leads me to believe that the game doesn't actually bring you back to the original level after secret ones. Instead it creates a separate duplicate of the level you came from, a whole new level that is identical in terms of geometry and item placement and puts you in whatever coordinates you were last at.

And that's just the issues with secret levels, I have other things I want to bring up:
1. I mentioned how secret levels reset the tileset palette. Well, that's not the only instance of that happening. Dying in a palette swapped level also returns the tileset to its default colors. This is completely independent from the secret levels issues brought up above and will always happen. Other angelscript elements seem to be fine from my experience though, it's seemingly only the palettes that are affected.
2. Music from .j2bs is a bit lower in volume compared to other file types. Simply saving the .j2b as a .it/.s3m creates a difference. Does it have something to do with compression?
3. This is an issue that I should have brought up previously but I forgot about it. This has existed since at least OEM and has been something of a minor annoyance to me for a while: sometimes when I die in SP I revive with my weapon defaulting to the weapon in the last slot. So say I die while using the blaster and possessing full ammo to all weapons, I'll suddenly be using the electro blaster until I switch. If I don't have EB ammo I'll be using pepper spray and so on. It doesn't always happen, which is pretty odd. Is it even a bug? I never saw anybody else mention it.
Violet CLM

JCF Éminence Grise

Joined: Mar 2001

Posts: 11,047

Violet CLM has disabled reputation

Sep 7, 2022, 01:18 PM
Violet CLM is offline
Reply With Quote
Quote:
Originally Posted by RSGDB View Post
However much more worryingly it seems that it also disables any angelscript component in the level.
Saving in levels with any .j2as or .mut script modules is not--nor has ever been--supported by JJ2+. We just don't have a model for how to get that to work. That's why scripted single player episodes have dedicated tiny levels for players to save in, because it's not an option in the regular levels. "Save" is grayed out from the Esc menu, pressing F6 is disabled. Apparently we forgot to disable secret level entrances in scripted levels, but you shouldn't do that.
Quote:
Dying in a palette swapped level also returns the tileset to its default colors. This is completely independent from the secret levels issues brought up above and will always happen. Other angelscript elements seem to be fine from my experience though, it's seemingly only the palettes that are affected.
This is not a bug. There are any number of reasons to change a level's palette, and a level may change palettes multiple times. The game has no way of knowing which altered palette should apply after the player dies, because it may depend on which checkpoint they respawn at. You can write an onLevelReload hook to address this based on your individual needs.
(The next MLLE release will also include a checkbox to handle this automatically for you, for the simple cases of levels that only use one alternate palette ever.)
Quote:
2. Music from .j2bs is a bit lower in volume compared to other file types. Simply saving the .j2b as a .it/.s3m creates a difference. Does it have something to do with compression?
I wonder if this may be an effect of you having the Auto Volume Leveling setting enabled? It doesn't work on .j2b files because they use an entirely different codebase.


I'm aware of the bullet thing but don't actually know what causes it. I'll try to find time someday this week to try to track it down.
__________________

Last edited by Violet CLM; Sep 7, 2022 at 02:07 PM.
RSGDB

JCF Member

Joined: Jan 1970

Posts: 25

RSGDB has disabled reputation

Sep 7, 2022, 02:26 PM
RSGDB is offline
Reply With Quote
So does that mean that I can't put a secret level inside of a scripted one (without breaking it ofc)? That's a bummer, but it's also very understandable.
As for music, disabling auto volume leveling does seem to diminish the effect. Not the most ideal solution, but considering I'm not doing anything too crazy with the music it's fine for me.
Violet CLM

JCF Éminence Grise

Joined: Mar 2001

Posts: 11,047

Violet CLM has disabled reputation

Sep 7, 2022, 03:20 PM
Violet CLM is offline
Reply With Quote
You can come up with any number of weird workarounds, but you can't get the same built-in secret level entrance-and-then-exit-in-same-spot thing that Gargoyle's Lair uses, until we someday figure out how to save angelscript states.

ETA: Okay, I found the code that makes you select your last weapon when you die. I guess the question is, what would you expect/desire the behavior to be instead?
__________________

Last edited by Violet CLM; Sep 7, 2022 at 04:42 PM.
RSGDB

JCF Member

Joined: Jan 1970

Posts: 25

RSGDB has disabled reputation

Sep 8, 2022, 04:52 AM
RSGDB is offline
Reply With Quote
I think it should put you on whatever weapon you were using when you died, makes the most sense to me.
Anyway, regardless of AS issues, do you think something can be done about the whole level duplication thing or is it a lost cause?

Last edited by RSGDB; Sep 8, 2022 at 07:42 AM.
Violet CLM

JCF Éminence Grise

Joined: Mar 2001

Posts: 11,047

Violet CLM has disabled reputation

Sep 8, 2022, 06:55 PM
Violet CLM is offline
Reply With Quote
Quote:
Originally Posted by RSGDB View Post
I think it should put you on whatever weapon you were using when you died, makes the most sense to me.
And if you didn't have that weapon when you touched the checkpoint?
Quote:
Not the most ideal solution, but considering I'm not doing anything too crazy with the music it's fine for me.
I don't see how there's anything to make there be a "solution" for? You are applying a setting that changes the volume of music tracks and has no other effect or purpose. If you don't want the volumes to be changed, don't apply that setting.
Quote:
Anyway, regardless of AS issues, do you think something can be done about the whole level duplication thing or is it a lost cause?
Again, you don't appear to be describing something that's a problem. Yes, coins shouldn't get reset, and it's weird that they are, but that has no connection to how secret levels are implemented otherwise.
__________________
RSGDB

JCF Member

Joined: Jan 1970

Posts: 25

RSGDB has disabled reputation

Sep 9, 2022, 04:31 AM
RSGDB is offline
Reply With Quote
Quote:
Originally Posted by Violet CLM View Post
And if you didn't have that weapon when you touched the checkpoint?
Default to the blaster maybe?
Now that you bring that up perhaps instead of going to your last used weapon you should respawn with whatever you had equipped when you touched the checkpoint

Quote:
Originally Posted by Violet CLM View Post
Again, you don't appear to be describing something that's a problem. Yes, coins shouldn't get reset, and it's weird that they are, but that has no connection to how secret levels are implemented otherwise.
I may be wrong, but I believe that the way they're implemented IS the cause of the coin reset.
Of course I am not that knowledgeable about JJ2's inner workings so it's possible that I'm completely wrong. It's all just a theory based on my experiences after all, and I apologize for treating it as fact.

Last edited by RSGDB; Sep 9, 2022 at 09:14 AM.
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -8. The time now is 03:13 PM.