Author Topic: A password in game?  (Read 2408 times)

0 Members and 1 Guest are viewing this topic.

Offline Abyss

  • 25
Is it possible to have the game check if a player enters a certain combination of keys correctly and if they do, have something happen. For example, the player comes across a crate, if he targets it and types the correct combination of keys, which would be reviled in a previous mission if a bonus objective was complete, he would receive the contents of the crate (which would probably be extra ammo for missiles). Also, I do have another reason for wanting this, if I can get it to do that I can also have the player self-destruct if the player types "www.freespace2.com"  (mwahahahahahaha)  :P. (Last part is sort of a joke, though I would probably still do it).

 

Offline The E

  • He's Ebeneezer Goode
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Key input is certainly possible, but a bit ... convoluted. I'll let someone who did it explain.
If I'm just aching this can't go on
I came from chasing dreams to feel alone
There must be changes, miss to feel strong
I really need lifе to touch me
--Evergrey, Where August Mourns

 

Offline FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
Definitely possible but probably not too easy to implement due to remapping and such.  You would have to pick keys that people wouldn't be using for other things.  For instance T wouldn't be a good choice as it's a default input for targeting.  Then again there is nothing to keep anyone from mapping another key you might want to use for targeting so lets say you use 7 in your code and they have it set for target friendly.  The input would read it as F instead of 7. 

So in short doable yes.  Good idea yes.  Implementation bad. 

Although while just typing that I thouhgt of a way that it might work.  Put the player under AI control while he is typing.  Never tried it but and the player would still have to take into account mapped keys but it takes a lot of the problems out of it. 
No-one ever listens to Zathras. Quite mad, they say. It is good that Zathras does not mind. He's even grown to like it. Oh yes. -Zathras

 

Offline Colonol Dekker

  • HLP is my mistress
  • 213
  • Aken Tigh Dekker- you've probably heard me
    • My old squad sub-domain
Is there any way to add a "keypress-while-tilde-held" or something. Only suggesting it as that's how most codes are currently entered. . . Might be completely irrelevant but i'll never know :p
Campaigns I've added my distinctiveness to-
- Blue Planet: Battle Captains
-Battle of Neptune
-Between the Ashes 2
-Blue planet: Age of Aquarius
-FOTG?
-Inferno R1
-Ribos: The aftermath / -Retreat from Deneb
-Sol: A History
-TBP EACW teaser
-Earth Brakiri war
-TBP Fortune Hunters (I think?)
-TBP Relic
-Trancsend (Possibly?)
-Uncharted Territory
-Vassagos Dirge
-War Machine
(Others lost to the mists of time and no discernible audit trail)

Your friendly Orestes tactical controller.

Secret bomb God.
That one time I got permabanned and got to read who was being bitxhy about me :p....
GO GO DEKKER RANGERSSSS!!!!!!!!!!!!!!!!!
President of the Scooby Doo Model Appreciation Society
The only good Zod is a dead Zod
NEWGROUNDS COMEDY GOLD, UPDATED DAILY
http://badges.steamprofile.com/profile/default/steam/76561198011784807.png

 

Offline Abyss

  • 25
Is there any way to add a "keypress-while-tilde-held" or something. Only suggesting it as that's how most codes are currently entered. . . Might be completely irrelevant but i'll never know :p

Well if I'm going to go for the anti-cheating and cant check the master code, maybe that would work, is it possible to check if ~ is pressed at all (if so then it will be press ~ and boom [though I will feel sorry for the person who presses c, ~, and then gets blown to bits in the middle of the mission], if not then oh well)

 

Offline The E

  • He's Ebeneezer Goode
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
The problem is that you basically have the engine against you there. It is hardcoded to parse the keypress sequences directly, before the sexps get a look at the keypresses.
In other words, you can't "redirect" the keypresses to prevent cheating.
If I'm just aching this can't go on
I came from chasing dreams to feel alone
There must be changes, miss to feel strong
I really need lifе to touch me
--Evergrey, Where August Mourns

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Anti cheating is pointless. Any halfway competent FREDder could remove your convoluted anti-cheating method in seconds.

Not to mention that someone could simply run a debug build and activate the cheats without typing in the code.

While stopping in game cheating is a good idea (making sure the player can't find an easy way to blow up the enemy by getting his wingmen to do it or something) is worth doing, when dealing with the cheat codes you're dealing with someone who has deliberately decided to cheat at your mission, not simply exploited a flaw in it. Trying to prevent them is a waste of time.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline Abyss

  • 25
Anti cheating is pointless. Any halfway competent FREDder could remove your convoluted anti-cheating method in seconds.

Not to mention that someone could simply run a debug build and activate the cheats without typing in the code.

Meh, that was just the secondary reason I wanted this. I thought I would state it so people know everything I wanted to gain out of this. However there are other implications that I want it for.

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
The other stuff is fine. I was just pointing out not to waste your time trying to cancel out the cheat code.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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