Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Full Conversion: How to get Player Name?
ehovda321 Offline
Junior Member

Posts: 38
Threads: 22
Joined: Dec 2011
Reputation: 0
#1
Full Conversion: How to get Player Name?

Do you think it is possible to get the user to input his/her name, and use that in the english.lang file? Any ideas? Thanks!
04-01-2013, 10:34 PM
Find
Rapture Offline
Posting Freak

Posts: 1,078
Threads: 79
Joined: May 2011
Reputation: 30
#2
RE: Full Conversion: How to get Player Name?

Dunno, if the LANG can call variables than you should be able to do it.
04-01-2013, 10:50 PM
Find
Statyk Offline
Schrödinger's Mod

Posts: 4,390
Threads: 72
Joined: Sep 2011
Reputation: 241
#3
RE: Full Conversion: How to get Player Name?

No, that's not possible.
04-02-2013, 05:09 AM
Find
DeAngelo Offline
Senior Member

Posts: 263
Threads: 26
Joined: Feb 2013
Reputation: 11
#4
RE: Full Conversion: How to get Player Name?

This would perhaps break the immersion a bit, but you could at the beginning of your CS (or in a readme file but most people don't look at those) ask the player to go into your lang file and press CTRL+H (Which is the command for Replace in most notepads I've used) and in the "Find What" field put PLAYERNAME (which you would put in your lang anywhere you want their name to be) and in the "Replace With" field put their name.

A little roundabout but would accomplish what you're trying.

A Late Night Drink http://www.moddb.com/mods/a-late-night-drink
Check out my LP channel, CatBearGaming, I take all Custom Story requests!
04-02-2013, 08:49 AM
Find
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#5
RE: Full Conversion: How to get Player Name?

If .lang files can do variables, then you could do it.

"Veni, vidi, vici."
"I came, I saw, I conquered."
04-02-2013, 08:56 AM
Find
xxxxxxxxxxxxxxxx Away
Posting Freak

Posts: 935
Threads: 0
Joined: Jun 2012
Reputation: 54
#6
RE: Full Conversion: How to get Player Name?

Isn't a .lang file basically just a .txt file with another ending? I don't think you can change it from within the game. Maybe you could code some sort of custom launcher instead that comes with your FC. It would ask for the player's name, automatically open, edit and save the .lang file and then start your Full Conversion...(or Amnesia, if you're making a CS instead) I'm a complete coding noob, though...maybe a batch file would work?
(This post was last modified: 04-02-2013, 04:06 PM by xxxxxxxxxxxxxxxx.)
04-02-2013, 03:48 PM
Find
Akos115 Offline
Member

Posts: 101
Threads: 14
Joined: Aug 2012
Reputation: 0
#7
RE: Full Conversion: How to get Player Name?

Sorry for my bad English, and I'm sure you won't understand it but...
It is possible (and will take a lots of time) , but only if you set the maximum amount of letters the player can use.
In your first map, create a letter selection thingy- a long corridor with for example 3 "slots".
In the corridor display every letter using billboards, and create examin. areas around them. Then add a setentityplayerinteract callback for all of them. With variables you can make player enter his/her name by interacting with the areas. This will give you 3 variables (var1, var2, var3) with 3 values.

If you want to use the players name in a note, it's really hard to do it.You need to make a VERY long script. You have to place as many notes in the map as the amount of the player possibility names are (in this case number of letters multiplied by number of letters multiplied by number of letters), and set all of them inactive. In the lang file you need to make a note with all different possibilities ( For example "Welcome aaa", "Welcome aab"...) When the player enters the map, you need to check all your 3 variables for their amounts, and set the matching note active.

For example the player enters ABE.
This will set var1 to 1 (var1 - the first letter, 1- the 1st letter "A"), var2 to 2, var3 to 5.
In the note map, you have to check all possibilities- if var1 is 1, then what var2 be?, if var1 is 2, then what var2 be?... same with var3.
After that just use setentityactive, and you are done Big Grin

04-03-2013, 10:09 PM
Find
Daemian Offline
Posting Freak

Posts: 1,129
Threads: 42
Joined: Dec 2012
Reputation: 49
#8
RE: Full Conversion: How to get Player Name?

actually if you check the file base_english.lang
it uses variables


<Entry Name="RunHint">To run, hold down $ButRun while moving.</Entry>



This message (on "Messages" category)
<Entry Name="zxc">Your argument is invalid $ButInteract .</Entry>


says ingame: Your argument is invalid LeftMouse .

it's something xD

04-04-2013, 07:07 AM
Find
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#9
RE: Full Conversion: How to get Player Name?

(04-04-2013, 07:07 AM)Amn Wrote: actually if you check the file base_english.lang
it uses variables


<Entry Name="RunHint">To run, hold down $ButRun while moving.</Entry>



This message (on "Messages" category)
<Entry Name="zxc">Your argument is invalid $ButInteract .</Entry>


says ingame: Your argument is invalid LeftMouse .

it's something xD
TBH, it's not a variable, if I'm correct. The "Shift" key was assigned to $ButRun. So, the game checks what key is assigned in $ButRun and when it finds it, it will show that specific key instead of $ButRun.

"Veni, vidi, vici."
"I came, I saw, I conquered."
04-04-2013, 07:31 AM
Find
xxxxxxxxxxxxxxxx Away
Posting Freak

Posts: 935
Threads: 0
Joined: Jun 2012
Reputation: 54
#10
RE: Full Conversion: How to get Player Name?

Yeah, it's something... but I wouldn't be surprised if those button thingies are one of those things that can't be changed. Just like you can't make custom controls for actions that are not in the original game. But who knows? It might work with other stuff, too. If it doesn't, I still think some sort of external script/batch file/ whatever is the easiest solution. (Okay, not exactly "easy" since you need to make it edit a .txt file...which is probably very hard to do Wink )You need a batch file anyway for the full conversion, so why not put some extra stuff in there or make it run another script before the line that starts amnesia with your custom .cfg?
(This post was last modified: 04-04-2013, 11:19 AM by xxxxxxxxxxxxxxxx.)
04-04-2013, 11:10 AM
Find




Users browsing this thread: 3 Guest(s)