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
Can we read/write any text file?
vvanus Offline
Junior Member

Posts: 5
Threads: 1
Joined: May 2012
Reputation: 1
#1
Can we read/write any text file?

Hi, I'm working on some horror game research and currently finding a good environment to work with.

I'm familiar with programming but completely new to this engine so I have some questions to ask.

- Can I script the modded version of this game so that it can write some kind of in-game event log file? like when is this event occurred? when is this sound played? what is the status of a player?
- Is it possible to make some parameters in game changeable via config file?(without changing it in editor or in game) like volume of sound or brightness of the game.
- Are the sound FX and music used in Amnesia accessible? Can I get those sound, make some adjustment and then put it in a game again?

Thank you >_<
(This post was last modified: 05-16-2012, 03:39 AM by vvanus.)
05-16-2012, 03:14 AM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#2
RE: Can we read/write any text file?

Study: http://wiki.frictionalgames.com/hpl2/amn..._functions

Tutorials: From Noob to Pro
05-16-2012, 03:20 AM
Website Find
vvanus Offline
Junior Member

Posts: 5
Threads: 1
Joined: May 2012
Reputation: 1
#3
RE: Can we read/write any text file?

Currently looking at it!

I found that many functions read a file directly so it should be easy to adjust something in the game.

But I cannot find any function that can write an output text file, so, it is impossible right? Undecided

Thank you for very fast reply anyway Smile
05-16-2012, 03:36 AM
Find
Homicide13 Offline
Senior Member

Posts: 323
Threads: 41
Joined: Nov 2010
Reputation: 14
#4
RE: Can we read/write any text file?

There's always

Print (string& asString);

which prints a string to the log file (apparently).

(This post was last modified: 05-16-2012, 04:47 AM by Homicide13.)
05-16-2012, 04:46 AM
Find
vvanus Offline
Junior Member

Posts: 5
Threads: 1
Joined: May 2012
Reputation: 1
#5
RE: Can we read/write any text file?

(05-16-2012, 04:46 AM)Homicide13 Wrote: There's always

Print (string& asString);

which prints a string to the log file (apparently).
This should be the one I'm looking for Rolleyes

Can't try it out because I'm not bought this game yet but going to do so.
Anyway, Thank you very much!
05-16-2012, 04:57 AM
Find
Cranky Old Man Offline
Posting Freak

Posts: 986
Threads: 20
Joined: Apr 2012
Reputation: 38
#6
RE: Can we read/write any text file?

You could also look into the ProgLog() function. Maybe you can solve what it does.

Noob scripting tutorial: From Noob to Pro

05-16-2012, 05:51 AM
Find
FragdaddyXXL Offline
Member

Posts: 136
Threads: 20
Joined: Apr 2012
Reputation: 7
#7
RE: Can we read/write any text file?

(05-16-2012, 03:14 AM)vvanus Wrote: - Are the sound FX and music used in Amnesia accessible? Can I get those sound, make some adjustment and then put it in a game again?
And, yes. You can easily play around with all the sound files. Though, if you make any adjustments, you may want to rename it instead of over-wrighting it.

Dark Seclusion Here
05-16-2012, 06:35 AM
Find
vvanus Offline
Junior Member

Posts: 5
Threads: 1
Joined: May 2012
Reputation: 1
#8
RE: Can we read/write any text file?

(05-16-2012, 05:51 AM)Cranky Old Man Wrote: You could also look into the ProgLog() function. Maybe you can solve what it does.
Sorry but I can't figure it out what does this function actually do?
05-17-2012, 05:59 AM
Find
Homicide13 Offline
Senior Member

Posts: 323
Threads: 41
Joined: Nov 2010
Reputation: 14
#9
RE: Can we read/write any text file?

(05-17-2012, 05:59 AM)vvanus Wrote:
(05-16-2012, 05:51 AM)Cranky Old Man Wrote: You could also look into the ProgLog() function. Maybe you can solve what it does.
Sorry but I can't figure it out what does this function actually do?
Haha that's the point... None of us know....

05-17-2012, 06:49 AM
Find
vvanus Offline
Junior Member

Posts: 5
Threads: 1
Joined: May 2012
Reputation: 1
#10
RE: Can we read/write any text file?

(05-17-2012, 06:49 AM)Homicide13 Wrote:
(05-17-2012, 05:59 AM)vvanus Wrote:
(05-16-2012, 05:51 AM)Cranky Old Man Wrote: You could also look into the ProgLog() function. Maybe you can solve what it does.
Sorry but I can't figure it out what does this function actually do?
Haha that's the point... None of us know....
I just found that if I turn UseProgLog in user_settings.cfg to true, I can use ProgLog() function to print out the text to ProgLog file. Is this new?


I found that this is useful because it logged the total gameplay time, health, sanity, oil, tinderbox at each entry that ProgLog() get called. and there are also some log that I didn't print on the log like enemy in range or player died


--- Amnesia Progress Logger ----
Player: dev_user Date: 18/5 - 2012
---------------------------------
# High # 00:00:29 | 01_old_archives | H:100 | S:88 | O:100 | T:0 | C:0
> Collide trigger grunt
# Low # 00:00:29 | 01_old_archives | H:100 | S:88 | O:100 | T:0 | C:0
> Enemy 'servant_grunt_1' is in range
# Low # 00:00:29 | 01_old_archives | H:100 | S:88 | O:100 | T:0 | C:0
> Enemy 'servant_grunt_1' is in range
# Low # 00:01:21 | 01_old_archives | H:100 | S:73 | O:100 | T:0 | C:0
> Forced Instant Exit in Journal (player finished reading).
# High # 00:04:14 | 01_old_archives | H:-31 | S:13 | O:100 | T:0 | C:0
> Player died!
# Low # 00:04:14 | 01_old_archives | H:-31 | S:13 | O:100 | T:0 | C:0
> Enter main menu.
# Low # 00:04:15 | 01_old_archives | H:-31 | S:13 | O:100 | T:0 | C:0
> Return to game from menu
# Low # 00:04:19 | 01_old_archives | H:-31 | S:13 | O:100 | T:0 | C:0
> Enter main menu.
05-17-2012, 04:16 PM
Find




Users browsing this thread: 1 Guest(s)