Thread: Compiling a script that can write information to a word document

  1. #1
    Registered User
    Join Date
    Feb 2006
    Posts
    6

    Compiling a script that can write information to a text document

    Hi,
    I'm trying to extend a 'console' much like the one found in quake etc so that it writes the information that is added to it throughout the game to a text document so that an outside program can search this document for a certain string. I know where to add the code but i'm not sure how to start working out the code. I think the language used is C++ or very similar. Below is a copy of the code in .ini file where i need to add this code.

    Code:
     [Engine.Engine]
    GameRenderDevice=D3DDrv.D3DRenderDevice
    AudioDevice=Galaxy.GalaxyAudioSubsystem
    NetworkDevice=IpDrv.TcpNetDriver
    DemoRecordingDevice=Engine.DemoRecDriver
    Console=UTMenu.UTConsole
    Language=int
    GameEngine=Engine.GameEngine
    the relevant part is the
    Code:
     Console=UTMenu.UTConsole
    Does anyone have any ideas?
    Last edited by superflygizmo; 02-14-2006 at 03:09 AM.

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,656
    So why do you want to write something to a horrid platform specific thing like a MS-Word document rather than something nice and open like a text document?

    I mean, if you want something pretty to look at, consider HTML for format control.

  3. #3
    Registered User
    Join Date
    Feb 2006
    Posts
    6
    sorry i meant a txt document. It's so that an outside program can then search this txt document for a piece of information

  4. #4
    Registered User
    Join Date
    Jan 2005
    Posts
    847
    Since this is windows you can use functions like writeprivateprofilestring for working with INI files.

  5. #5
    pwns nooblars
    Join Date
    Oct 2005
    Location
    Portland, Or
    Posts
    1,094
    Sorry to inform you, you can't code in an ini file to add functionality unless the game has some scripting engine it runs from that ini file, even then, extending the functionality would A: be impossible, B: an ungodly horrific mess, if it is possible, C: Require documentation on the API and it most certainly wont be a C/C++ related question since C++ is compiled not interpreted.

    You would need the source of the game in order to change capabilities and add an output for the console window.

    Also, please don't double post your questions. Most of us that frequent the Game Programming Board, also goto the C++ or C boards.

  6. #6
    Yah. Morgul's Avatar
    Join Date
    Feb 2005
    Posts
    109
    Why are you trying to get a version of Unreal Tournament to write things people type into the console to a text document that another program can then read? Well, it doesn't matter, becuase you can't do it. The game has to know to do it itself. The text document just stores values for the game to use during runtime.
    Sic vis pacum para bellum. If you want peace, prepare for war.

  7. #7
    Registered User
    Join Date
    Feb 2006
    Posts
    6
    Yeah sorry about the double posting.

    There is an inbuilt log function within the console that can be extended to write the current game info to the game log. I got that from Epic, the game creators.


    Problem is now i just got to work it out!


    But thanks for answering my posts on his topic

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 5
    Last Post: 06-01-2009, 07:54 PM
  2. Replies: 3
    Last Post: 03-04-2005, 02:46 PM
  3. Replies: 1
    Last Post: 04-01-2003, 06:02 AM
  4. Word Count
    By simple in forum C Programming
    Replies: 12
    Last Post: 10-04-2002, 10:47 PM
  5. Using 'if' with char arrays or string objects
    By c++_n00b in forum C++ Programming
    Replies: 36
    Last Post: 06-06-2002, 09:04 PM