CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    May 2019
    Posts
    3

    [RESOLVED] Any idea how to "compile files by .xls macro"?

    Hello.
    I wanted to use SDK from one of really unpopular video game (Two Worlds I by Reality Pump) to change parameters of various gameplay aspects.

    Sadly, I've encountered some sort of "roadblock" because I know nothing about c++...

    Ok, here is how this situation looks like:

    The uncompiled game parameters values are stored in "TwoWorlds.xls" spreadsheet which can be opened and edited by Microsoft Excel for example.
    In SDK readme there are those instructions:

    Code:
    [Parameters]
      Parameters definition files. Must be "compiled" by macro Makra.xls!ExportParameters to create [Game]\Parameters\TwoWorlds.par file.
    What does that mean and how to do it?
    There is mentioned "Makra.xls" file bundled into SDK. Also there is "classmask.h" and "TwoWorlds.xls" files in same folder too.

    "TwoWorlds.par" is compiled file which is loaded by game - I've extracted it from game files, I have no idea how to compile it.

    Also there is ParamParser bundled in SDK which isn't even described what he does:
    Code:
    [ParamsParser.exe]
        Tool for build TwoWorlds.par file.
    Maybe that parser is required here too, I don't know.

    So... Anyone have idea how to compile "TwoWorlds.par" file with those instructions written in SDK?
    Because I don't get it.

    If someone wants to try it I'm uploading all mentioned files (not in attachments - can't upload files because 3 MB is too large )
    http://www.mediafire.com/file/sxx9mq...attachment.zip

    Thanks.

  2. #2
    2kaud's Avatar
    2kaud is offline Super Moderator Power Poster
    Join Date
    Dec 2012
    Location
    England
    Posts
    7,822

    Re: Any idea how to "compile files by .xls macro"?

    I haven't tried it, but looking at the files the makra.xls file has a macro which is used to produce the .par file from the twoworlds.xls file. This process uses the paramsparser.exe file. There is no c/c++ source (other than a single .h file and a compiled version of gcc). I think you are supposed to run the macro in makra.xls file which will produce the .par file. If you look at this macro then it specifies the various files it uses - for input and output etc.

    [As not a c/c++ question moved to General Developer]
    All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!

    C++23 Compiler: Microsoft VS2022 (17.6.5)

  3. #3
    Join Date
    May 2019
    Posts
    3

    Re: Any idea how to "compile files by .xls macro"?

    Quote Originally Posted by 2kaud View Post
    I haven't tried it, but looking at the files the makra.xls file has a macro which is used to produce the .par file from the twoworlds.xls file. This process uses the paramsparser.exe file. There is no c/c++ source (other than a single .h file and a compiled version of gcc). I think you are supposed to run the macro in makra.xls file which will produce the .par file. If you look at this macro then it specifies the various files it uses - for input and output etc.
    Thank You very, very much for Your answer and clear explaination.
    All You said was correct - I've managed to "compile" TwoWorlds.par file with this macro through WPS Office (MS Excel produced only errors while executing macro).
    ParamParser was used with this macro too.

    Compiled .par file is loaded by game without errors and changes made there works.

    Of course there were some minor problems - game and sdk had to be installed in D:\Games\TwoWorlds and D:\Games\TwoWorldsSDK - if not there, macro printed error about not finding files (mentioned parser and some other ones). Too bad I had no D: partition running on my PC so I had to create virtual machine windows xp with D: partition avaible and compile everything there.

    Again - thank You very much for help.

  4. #4
    2kaud's Avatar
    2kaud is offline Super Moderator Power Poster
    Join Date
    Dec 2012
    Location
    England
    Posts
    7,822

    Re: Any idea how to "compile files by .xls macro"?

    The file locations are hard-coded into the macro. For different locations you need to edit and change this macro.
    All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!

    C++23 Compiler: Microsoft VS2022 (17.6.5)

  5. #5
    Join Date
    May 2019
    Posts
    3

    Re: Any idea how to "compile files by .xls macro"?

    Quote Originally Posted by 2kaud View Post
    The file locations are hard-coded into the macro. For different locations you need to edit and change this macro.
    Thank You for that advice - actually had to edit only 3 lines (declared file paths) in this macro to make it works perfectly on my PC.

Tags for this Thread

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured