How could I create this mod/mutator? Start in Spectator

Search, find and discuss about Mutators!
User avatar
sektor2111
Godlike
Posts: 5873
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: How could I create this mod/mutator? Start in Spectator

Post by sektor2111 » Mon Jun 13, 2016 9:44 pm

A game-type child of something from BotPack can be started with/without any player. If mod wants to deal with spectators will have to deal with that - is one of important points. The rest looks more or less nice as long as playerclass gets assigned at Login, which means reconnecting. The second point is player-state while spectates before game-start. It's a sort of spectator and spawns normally when game starts - I repeat, I START game when I want even if server is empty. For a better functionality I think you have to forget "mutator" and think about a "game-type", then everything comes more handy.

JackGriffin
Godlike
Posts: 3767
Joined: Fri Jan 14, 2011 1:53 pm
Personal rank: -Retired-

Re: How could I create this mod/mutator? Start in Spectator

Post by JackGriffin » Tue Jun 14, 2016 3:30 am

I don't really get the point of this entire discussion anyway. Why not just use the warm-up feature in certain versions of nexgen?
So long, and thanks for all the fish

MrLoathsome
Inhuman
Posts: 958
Joined: Wed Mar 31, 2010 9:02 pm
Personal rank: I am quite rank.
Location: MrLoathsome fell out of the world!

Re: How could I create this mod/mutator? Start in Spectator

Post by MrLoathsome » Tue Jun 14, 2016 5:36 am

My idea was the coolest, but also would require the most coding.....
blarg

User avatar
sektor2111
Godlike
Posts: 5873
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: How could I create this mod/mutator? Start in Spectator

Post by sektor2111 » Tue Jun 14, 2016 6:08 am

JackGriffin wrote:I don't really get the point of this entire discussion anyway. Why not just use the warm-up feature in certain versions of nexgen?
I'm on your side, no NEXGEN, please. If you compile that thing which I posted in servers Thread with random start you see that I trigger a game-start, then game-end, then MapVote will load a random map in case of NO player voting - I'm not using a "crash-map" - that's a shame for 2016. StartMatch() can be called from UScript without to explode anything, because BotPack calls it itself.
Then spectator problem: first case Player forced spectating or... reconnecting in spectator.

MrLoathsome
Inhuman
Posts: 958
Joined: Wed Mar 31, 2010 9:02 pm
Personal rank: I am quite rank.
Location: MrLoathsome fell out of the world!

Re: How could I create this mod/mutator? Start in Spectator

Post by MrLoathsome » Wed Jun 15, 2016 4:03 am

Got bored today, and was thinking about this thing.
Woke up this morning with some code floating around in my head.....

**Edit: Test1 version of this has been nuked. :pfff: :nonono:

Still screwing around with a Test2 version. Got it mostly working.
Stay tuned.....
blarg

MrLoathsome
Inhuman
Posts: 958
Joined: Wed Mar 31, 2010 9:02 pm
Personal rank: I am quite rank.
Location: MrLoathsome fell out of the world!

Re: How could I create this mod/mutator? Start in Spectator

Post by MrLoathsome » Thu Jun 16, 2016 7:46 am

sektor2111 wrote:
JackGriffin wrote:I don't really get the point of this entire discussion anyway. Why not just use the warm-up feature in certain versions of nexgen?
I'm on your side, no NEXGEN, please. If you compile that thing which I posted in servers Thread with random start you see that I trigger a game-start, then game-end, then MapVote will load a random map in case of NO player voting - I'm not using a "crash-map" - that's a shame for 2016. StartMatch() can be called from UScript without to explode anything, because BotPack calls it itself.
Then spectator problem: first case Player forced spectating or... reconnecting in spectator.
That was one of the issues with the deleted rough draft Test1 version. Attempt to force spectator mode does
cause other issues.

Forcing "Waiting" mode seems to be working much better so far.
blarg

MrLoathsome
Inhuman
Posts: 958
Joined: Wed Mar 31, 2010 9:02 pm
Personal rank: I am quite rank.
Location: MrLoathsome fell out of the world!

Re: How could I create this mod/mutator? Start in Spectator

Post by MrLoathsome » Fri Jun 17, 2016 2:43 am

BUMP! :highfive:

You will like this better, as it actually seems to work on and offline. With a few limitations.

To use just add SpecStart.SpecStart to your server mutators.

For this mode to work right, you do need to wait until the actual match starts, and then hit
Primary Fire once to enter the SpecStart Waiting/Spectating mode. (Not sure what to call it yet....)

**DO NOT hit the fire button while the game is still "Waiting for Players".
It won't break the game or anything horrible like that, but it will break the SpecStart mutator a bit.
Player will end up in a sort of behindview mode, that will go away next time they hit Primary Fire. (This is still a test version.... :roll: )
If you hit fire too early, worst thing that happens is you have to wait until next level change to try it again. (Or reconnect.)

But you do want to hit fire quickly soon as the match starts, then it will put you in the SpecStart Waiting/Spectating mode.
Very quickly if you are on a map with monsters or bots, as you want to get into SpecStart mode before they acquire you as Enemy.

If a player connects to a match currently in progress this might not even be an issue. Not tested.

Pretty sure I know exactly how I will fix all this, but haven't had time to write it yet.
(Gotta move some code to ModifyPlayer, and add crap so it only happens once for each player....)

Also added a config file with 2 variables.

Code: Select all

bDropIn=False
NumFires=1
bDropIn, should probably be left False for most cases, but it could be interesting if set True.

What it does, is let you just drop into the map and start playing from whatever location you were "Spectating" from.
i.e. You can cruise all around the map, check out where all the items/monsters/players are, and then drop right in on any of them.
(Or behind them. :shock: )

It almost seemed to "cheat-ish" to be left in. :what: BUT since this is a server-side only mutator, and every player will have the opportunity to do this when
they join the map, or at first spawn on map changes I decided to leave it in as an option.
I have it set True on my Test DM server, but False on my EXU Coop server. Only testing it on those 2 servers atm.
Want to set this false on Coop, or players could just go to the end of the map, and end it.... Probably best False for CTF also. :mrgreen:
Or maybe not.... If everybody can do it, it just changes the gameplay. Up to the server admin.

It's the Pick Your Own PlayerStart option ! :rock:

But it is very cool to be able to check out the whole map, and monsters etc before you jump in.

NumFires is the number of time the player has to hit fire before they actually join the game and SpecStart is done.

For servers set this at 1 currently. If you want to test this offline in practice matches, you should set it for 2 and you can
test the weird buggy behindview pre-SpecStart mode.

There is a chance you may have to set it for 2 for any online game that is set for Tournament mode. (All players press start when ready....)

Had to tweak this a bit to deal with the UT TournamentGame/TournamentPlayer differences, but tried to code it so that it might work with 227 still.
(If not, there are 3 lines that need to be deleted, and a recompile, and it will.)

Not posting the source this time. It is included.

Lemme know how/if it works.

*Edit: File deleted.
Will start a new thread for the completed SpecStart mutator soon in the event there is any interest.
blarg

MrLoathsome
Inhuman
Posts: 958
Joined: Wed Mar 31, 2010 9:02 pm
Personal rank: I am quite rank.
Location: MrLoathsome fell out of the world!

Re: How could I create this mod/mutator? Start in Spectator

Post by MrLoathsome » Tue Jun 28, 2016 12:23 am

Bump! Look here: viewtopic.php?f=7&t=11569

@Marscaleb
Not sure how you could create this mod/mutator, but see the above link for how I would create it.

@Jack

This KICKS ASS on coop servers in testing so far. Players seem to like it and figure it out right away.

Current version is UT only. I had a previous version that loaded up with 227 just fine, but then did nothing.
Haven't tried getting the current revision to work with U1 yet. It shouldn't take much....
blarg