Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsCog Forum → SetSubModeFlags
SetSubModeFlags
2008-11-26, 8:54 AM #1
Not that I think anyone in particular is going to read this, but I just found that if you use SetSubModeFlags(0x1); in a singleplayer game, not only does it have special text for it -- when you die, it says 'Press any key to return to the last saved position' -- but it also seems to transport you to a semi-random location on the map.

I think I need to explore this more.

[EDIT: Like multiplayer, it seems to believe that there are multiple spawn points, and randomly transports you to them. However, I seriously doubt that LEC put in extra walkplayers, so what the hell?]

[EDIT 2: It seems that LEC did in fact put extra walkplayers in their levels, as it only happens in LEC levels, and the spawn points are fairly regular...]
"And lo, let us open up into the holy book of Proxy2..." -genk
His pot is blacker than his kettle!
2008-11-26, 5:13 PM #2
According to the DataMaster (the Holy Bible of cogging, I think):

Quote:
"Level is not reset when the player dies"

The 0x1 flag is set by JK for multiplayer games. When the player dies while this flag is set, the level will not be reset as it is in normal SP games. Everything will be where it was and in the same state that it was when the player died. Clearing this flag in an MP game and killing the player will crash the game.


I seem to recall goofing around with this a number of years ago and SM was right on the mark -- the 0x1 sub mode flag makes a SP level act like a MP level.
Makes sense that this would be tied into the random spawn-point-selector code.
And when the moment is right, I'm gonna fly a kite.
2008-11-26, 6:04 PM #3
Aye, but it's only in LEC levels that it selects a random spawn point -- indicating that they perhaps included more than one walkplayer per level? It works in other levels, but you always start back at the beginning...
"And lo, let us open up into the holy book of Proxy2..." -genk
His pot is blacker than his kettle!
2008-11-26, 6:40 PM #4
Should be pretty easy to check for that... ;)
And when the moment is right, I'm gonna fly a kite.
2008-11-27, 7:13 AM #5
Yep. LEC included multiple Walkplayers in each level -- I just checked. I wonder what reason they have for that is? Perhaps they were originally designed to be easy to convert to multiplayer; or maybe JK was going to have a checkpoint system ala Halo...
"And lo, let us open up into the holy book of Proxy2..." -genk
His pot is blacker than his kettle!
2008-11-27, 7:21 AM #6
Possibly for co-op.
Bassoon, n. A brazen instrument into which a fool blows out his brains.
2008-11-27, 10:13 AM #7
The locations of them don't make sense for that, though -- they're distributed throughout the level.
"And lo, let us open up into the holy book of Proxy2..." -genk
His pot is blacker than his kettle!
2008-11-27, 3:54 PM #8
Just an odd thought...maybe the MP mode of not resetting the level was originally going to be used for SP too?
And when the moment is right, I'm gonna fly a kite.
2008-11-27, 5:29 PM #9
I think you may be right -- especially since they seem to be at various progress points throughout the level, most of the time. It seems like Baron's head may be a bit of an exception, though... But then, given the level's architecture, I suppose that makes sense.

Again, I was thinking that perhaps LEC was originally going to do SP with a checkpoint system...
"And lo, let us open up into the holy book of Proxy2..." -genk
His pot is blacker than his kettle!
2008-12-04, 12:41 PM #10
Realised what it was probably designed for today -- the original Dark Forces had lives, and when you died you would essentially teleport backwards in the level. I think that JK originally had a very similar system...
"And lo, let us open up into the holy book of Proxy2..." -genk
His pot is blacker than his kettle!
2008-12-04, 2:35 PM #11
Originally posted by LordVirus:
Realised what it was probably designed for today -- the original Dark Forces had lives, and when you died you would essentially teleport backwards in the level. I think that JK originally had a very similar system...


I'd say your probably spot on. I seem to recall writing some basic coop cogs some years ago, and it was fairly easy to "set" which spawnpoint you would respawn at in cog.
And when the moment is right, I'm gonna fly a kite.
2008-12-04, 2:47 PM #12
Got curious and poked around a little in Res2.gob, found this little gem:

Code:
# Jedi Knight Cog Script
# 00_PlayerStarts.cog
# This cog sets the player startpoint once the player enters the referenced sector
#
#
# [SXC]
# (C) 1997 LucasArts Entertainment Co. All Rights Reserved

symbols
   message     entered
   message     startup
   message     pulse

   sector      sect0    linkid=0, mask=0x400
   sector      sect1    linkid=1, mask=0x400
   sector      sect2    linkid=2, mask=0x400
   sector      sect3    linkid=3, mask=0x400
   sector      sect4    linkid=4, mask=0x400
   sector      sect5    linkid=5, mask=0x400
   sector      sect6    linkid=6, mask=0x400
   sector      sect7    linkid=7, mask=0x400
   sector      sect8    linkid=8, mask=0x400
   sector      sect9    linkid=9, mask=0x400

   sector      sect10      linkid=10, mask=0x400
   sector      sect11      linkid=11, mask=0x400
   sector      sect12      linkid=12, mask=0x400
   sector      sect13      linkid=13, mask=0x400
   sector      sect14      linkid=14, mask=0x400
   sector      sect15      linkid=15, mask=0x400
   sector      sect16      linkid=16, mask=0x400
   sector      sect17      linkid=17, mask=0x400
   sector      sect18      linkid=18, mask=0x400
   sector      sect19      linkid=19, mask=0x400

   sector      sect20      linkid=20, mask=0x400
   sector      sect21      linkid=21, mask=0x400
   sector      sect22      linkid=22, mask=0x400
   sector      sect23      linkid=23, mask=0x400
   sector      sect24      linkid=24, mask=0x400
   sector      sect25      linkid=25, mask=0x400
   sector      sect26      linkid=26, mask=0x400
   sector      sect27      linkid=27, mask=0x400
   sector      sect28      linkid=28, mask=0x400
   sector      sect29      linkid=29, mask=0x400
end

code
entered:
   // SetRespawn(GetSourceRef(), GetSenderID());
   return;

startup:
   SetPulse(30);
   Return;

pulse:
   Print("Waypoints should be removed !!!");
   Return;

end


For those who don't follow the code, it boils down to this: the listed sectors also specify link IDs (which would have corresponded to the thing IDs of the extra walkplayers), and set the respawn point to the corresponding walkplayer whenever one of the sectors is entered.
And when the moment is right, I'm gonna fly a kite.
2008-12-08, 5:46 PM #13
Originally posted by Emon:
Possibly for co-op.

Wish you were correct, but probably not. JK is very co-op unfriendly, (just look at ai). I would think that the waypoint system is most likely correct. Do you think they had code for it at one point only to be nixed as a release? Rather, is it still feasible?
This is retarded, and I mean drooling at the mouth
2008-12-12, 11:35 PM #14
I wish someone would have written a book about the JK development process. Over ten years now of figuring out the quirks of the game.
2009-02-01, 1:52 PM #15
Well, I suppose you are correct about the way points. But what they released instead are walkplayers and a cheat code called "hyper/quickzap" which makes people believe that the "hyper" code is a developers cheat to test a certain area of a level without having to run through all the monsters and puzzles. Put that you said about Barons Hed does sound like "autosave waypoints" (if that is a real frase of some kind).

/Edward
Edward's Cognative Hazards

↑ Up to the top!