[Solved]Convert NewGame menu to zscript

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: [Solved]Convert NewGame menu to zscript

Re: Convert NewGame menu to zscript

by gramps » Sun Jan 27, 2019 3:08 am

AFADoomer wrote:I've attached a .pk3
Thanks for posting that, very interesting. Had no idea the menus were so flexible. This inspired me to do a simplified "save+quit" and "resume game" single-save permadeath menu :twisted:

Not sure how future-proof this kind of stuff is supposed to be, but it's fun to mess with.

Re: Convert NewGame menu to zscript

by Collegia Titanica » Fri Jan 25, 2019 8:25 am

Absolutely incredible. Amazing.

You will live forever.

Re: Convert NewGame menu to zscript

by AFADoomer » Thu Jan 24, 2019 7:06 pm

I've attached a .pk3 that uses a ZScript event handler and a custom menu class to 'lock' the skill menu by redirecting the skill menu entry's "new game" action to a menu that just says "This skill is locked" and changing the color of the menu item.

You can quickly test the menu by starting a new game and using 'netevent unlockskill x' in the console, where 'x' is the number of the skill you want to unlock (starting at skill 0) - so 'netevent unlockskill 3' will unlock up to skill 3 (all but Nightmare).

In-game, you an use ACS to unlock a skill level...

Code: Select all

ScriptCall("SkillCheck", "SetLevel", 3);
will do the same as the command listed above.
Attachments
skillunlock.pk3
(1.96 KiB) Downloaded 120 times

Re: Convert NewGame menu to zscript

by Arctangent » Thu Jan 24, 2019 3:16 pm

Collegia Titanica wrote:The only question is, how do I circumvent the skill menu ? I'd need some sort of "Start" button that changes map from TITLEMAP to this PREMAP when clicked. IF I know that, I could pull the rest of this off
No, not remotely. The noskillmenu episode property does exactly what you need without any ridiculous workarounds. In fact, have a direct quote from the wiki description:
This is useful for WADs that implement skill selection by an introduction map.

Re: Convert NewGame menu to zscript

by Collegia Titanica » Thu Jan 24, 2019 3:11 pm

Starting a game should change to PREMAP, black map, input locked, a zscript menu activated that has the same visuals as the current skill selection for familiarity.

However, this menu's difficulties will only be selectable/clickable if they are available.Each zscript version of a diff. corresponds to it's "normal" counterpart.

The only question is, how do I circumvent the skill menu ? I'd need some sort of "Start" button that changes map from TITLEMAP to this PREMAP when clicked. IF I know that, I could pull the rest of this off

Re: Convert NewGame menu to zscript

by Enjay » Thu Jan 24, 2019 2:01 pm

Collegia Titanica wrote:Well then, is this even doable in any way ?
You can circumvent the skill menu entirely and use a map to select the difficulty setting (similar to how it was done in Quake).*

So, I suppose you could have the routes to the harder difficulty settings in the map blocked by a barrier of some sort (again, similar to how the later episodes in Quake are blocked). Then when you complete the last map for the first time, it would make the next difficulty up available in the difficulty setting map... rinse and repeat for all difficulties.


*It's done via [wiki]ChangeSkill[/wiki] so, given that it's in ACS, there are a number of different ways that you could implement it.

Re: Convert NewGame menu to zscript

by Collegia Titanica » Thu Jan 24, 2019 1:44 pm

Well then, is this even doable in any way ?

Re: Convert NewGame menu to zscript

by Graf Zahl » Thu Jan 24, 2019 12:25 pm

The new game menu chain is programmatically generated. "Shouldn't be too hard" is somewhat misunderstanding this thing because it has to follow a strict protocol to allow the engine to start a game afterward. The safest way to ensure that this protocol isn't broken is to not expose the menu to scripting.

[Solved]Convert NewGame menu to zscript

by Collegia Titanica » Thu Jan 24, 2019 12:17 pm

Had a cool idea, lock a difficulty setting until the highest available is beaten (and by that I mean complete 7 maps on that difficulty). [Diablo 3 anyone ?]

Same thing could be used(in mods) to lock episodes, to make it one by one, like a proper campaign. If someone is pairing a campaign with this mod, one could add a certain threshold to level completion/difficulty. This has never been done before here ..

If this thing was to be ported over, I imagine it would be a matter of a few overrides and some obscure cvar saved somewhere. Shouldn't be too hard

Top