User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 14

Thread: ICP - Change string in a eng / wag files in MSTS

  1. #1
    Clicker Install Creator Pro

    Join Date
    Jul 2008
    Location
    UK
    Posts
    83
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    ICP - Change string in a eng / wag files in MSTS

    Hi,

    I remember when I did software development for MS Flight Sim that I was able to add or change string values in a config file.

    I have a .eng file which contains the following:

    Wagon ( EBPHGNERDU1
    Type ( Engine )
    WagonShape ( EBPHGNERDU1.s )

    Size ( 2.69944m 4.00661m 17.179m )
    comment( 420k lb is the maximum )
    Mass ( 70t )
    WheelRadius ( 52cm )
    InertiaTensor ( Box ( 2.69944m 4.00661m 17.5388m ) )
    Coupling (
    Type ( Automatic )
    Spring (
    Stiffness ( 1e6N/m 5e6N/m )
    Damping ( 1e6N/m/s 1e6N/m/s )
    [color:#3333FF]Break ( 1.1e7N 1.1e7N )[/color]
    Is it possible to use the ICP (Install Info) to change the blue string into "Break ( 5.1e7N 5.1e7N )"?

    It's similar for a wag file.

    Thanks for any help in advance,
    If not I can get users to edit the files manually themselves but would obviously prefer a automated option via ICP.

  2. #2
    Clickteam Clickteam

    Join Date
    Jun 2006
    Location
    France
    Posts
    12,844
    Mentioned
    84 Post(s)
    Tagged
    2 Thread(s)

    Re: ICP - Change string in a eng / wag files in MSTS

    I don't see any way to do it automatically with ICP. ICP can modify entries in INI-like files, this file doesn't sound like a .INI file.

    The only way I see is to build a little program file that does it and run it from your installer.

  3. #3
    Clicker Install Creator Pro

    Join Date
    Jul 2008
    Location
    UK
    Posts
    83
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: ICP - Change string in a eng / wag files in MSTS

    Thanks for the quick reply Yves,

    I am a little unsure what you mean by little program file?

    Could you point me in the direction of the sort of file and I can go away and learn how to do this myself. Thanks again.

    PS: Do you mean something like a batch file?

  4. #4
    Clickteam Clickteam

    Join Date
    Jun 2006
    Location
    France
    Posts
    12,844
    Mentioned
    84 Post(s)
    Tagged
    2 Thread(s)

    Re: ICP - Change string in a eng / wag files in MSTS

    I meant something like a C++ program. I don't think you can do it with a batch file (well, I don't know very well, maybe there are commands that allow you to replace a string in a text file...).

    If I can find 15 minutes free I'll try to do it.

  5. #5
    Clicker Install Creator Pro

    Join Date
    Jul 2008
    Location
    UK
    Posts
    83
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: ICP - Change string in a eng / wag files in MSTS

    Could VB do it? I have done VB before and realise it is extremely similar. It would be much appreciated for any help.

    PS: I have Visual Studios and MSDN library available to me so it is possible for to install them and program away.

  6. #6
    Clickteam Clickteam

    Join Date
    Jun 2006
    Location
    France
    Posts
    12,844
    Mentioned
    84 Post(s)
    Tagged
    2 Thread(s)

    Re: ICP - Change string in a eng / wag files in MSTS

    VB could do it, but a VB application requires the VB runtime to be installed on the user's machine... VC is better.

  7. #7
    Clicker Install Creator Pro

    Join Date
    Jul 2008
    Location
    UK
    Posts
    83
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: ICP - Change string in a eng / wag files in MSTS

    Ah, I have a couple of friends who know C++ so will ask them for some help (assuming that is VC?)

  8. #8
    Clicker Install Creator Pro

    Join Date
    Jul 2008
    Location
    UK
    Posts
    83
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: ICP - Change string in a eng / wag files in MSTS

    One friend has suggested using PHP code to do it:

    <?php
    $file = 'myfile.txt';
    $content = file_get_contents($file);

    $myvar = '5.1e7N 5.1e7N';

    $content = str_replace('1.1e7N 1.1e7N',$myvar, $content);

    $f = fopen($file,'w');
    if($f) {
    fwrite($f, $content);
    fclose($f);
    } else {
    echo 'failed to update file';
    }

    ?>

  9. #9
    Clickteam Clickteam

    Join Date
    Jun 2006
    Location
    France
    Posts
    12,844
    Mentioned
    84 Post(s)
    Tagged
    2 Thread(s)

    Re: ICP - Change string in a eng / wag files in MSTS

    Err... I don't see how that could work unless you install a web server with php.

  10. #10
    Clicker Install Creator Pro

    Join Date
    Jul 2008
    Location
    UK
    Posts
    83
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: ICP - Change string in a eng / wag files in MSTS

    Oh. Is the only option C++ / VC? then?

Page 1 of 2 1 2 LastLast

Similar Threads

  1. CF 2.5 - Change an string by the name of an active
    By SergioAndre in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 3rd January 2014, 08:17 AM
  2. Change word color in a string
    By iOSC in forum iOS Export Module Version 2.0
    Replies: 0
    Last Post: 1st October 2013, 10:40 AM
  3. Unable to change a string with the list obect if string contains three periods in row
    By redpandagames in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 4th January 2013, 03:01 PM
  4. Change Background color of string at runtime.
    By Earl in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 15th June 2012, 09:23 AM
  5. Change the hotspot of a string object?
    By ChrisBurrows in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 12th March 2012, 12:12 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •