Announcement

Collapse
No announcement yet.

John, a few questions about commands in text files

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • John, a few questions about commands in text files

    John,


    I have a couple of questions you might be able to answer.
    You probably don't know me, cause I am primarily interested in Fantastic Worlds, not really so much in ToT (for the moment). Therefore what I am going to say is about FW, but the same probably applies for ToT as well.

    Since Captain Nemo has used the game.txt in a new way (as "extra" events used for pop-ups) in "Red Front" (see sleague forum), I have started seeing game.txt as a much more interesting file than I did before. It is for that reason that these things have attracted my attention. It is only last night I found all this out (instead of studying for my exams).

    Troughout game.txt, and also all other .txt files (great fun in the intro text file for scenarios) certain commands starting with @ are given. They seem to function almost like a programming language, and look at least as complex and interesting as events.


    The available commands as far as I can tell are as following. For the people who don't know how it works, I have explained briefly what it does.
    Code:
    @listbox=.... (box with choices. You can add @options later. .... is the no. of rows)
    @options      (radio buttons)
     @default=... (number of radio button selected by default)
     @checkbox    (uses checkboxes instead of radioboxes)
      option1     (text that shows up in available
      option2      options (every new line is new option))
    @columns=.... (columns, appears to be only used with listboxes and options)
    @button=..... (adds new button left of OK with .... as text)
    @width=...... (width of dialog box)
    @height=..... (height of dialog box)
    @length=..... (length of dialog box)
    @y=.....      (y location (- is lower))
    @x=.....      (x location (- is more to right))
    @title=...... (title of box)
    Now, what I was wondering if you could explain me
    1) what more functions are there?
    2) to what limit can this be used? (can it be used to
    - "link" to other parts of files,
    - link to show other pop-ups like the science advisor,
    - play a movie or show a unit/icon in the box ?)
    3) have any commands been added in ToT?
    4) are they standard Windows commands or civ2-only commands (i have absolutely no knowledge of programming, just a bit of common sense). I ask this cause there are places in CIV2.EXE where MS is written before Listbox and similar boxes.
    5) while looking for more of these values and hex-editing the file CIV2.EXE, I found all of them nicely summed somewhere near the end. However, 3 more commands were standing between the ones I found already that either did not work or made no visible difference. They are "prompt", "smallfont" and "system". Why do they not work?
    6) is it possible to make a button do something (in a simple way)?
    7) how is it possible that @options mostly comes up with radio boxes but occasionally (when typing in the leader name, etc.) with a box where you can type.


    I understand if you don't want to answer some of the questions because of copyright stuff, even though I think this is pretty much superficial and not substantially more than editing the rules.


    The reason for me asking this is that it could be very interesting for scenario making, adding a bit of flavour to the standard game. Therefore, I'm only really interested in these questions if they do not involve changing civ2.exe, but just the text files.
    Especially the linking to other pop-ups and the showing of icons, though I doubt this is feasible easily, because there is no difference between the windows with and without icon in game.txt.


    Anyway, I hope you can give answers to all my questions.

  • #2
    You've found the box formatting functions. They're very useful for making things look good. Unfortunately, you can't do as much with them as I would like.

    1) what more functions are there?

    It looks like you've found all the ones that actually work.

    2) can it be used to
    - "link" to other parts of files, Not that I know of.
    - link to show other pop-ups like the science advisor, Not that I know of.
    - play a movie or show a unit/icon in the box ?) Not that I know of.

    3) have any commands been added in ToT?

    Not to this part of the game.

    4) are they standard Windows commands or civ2-only commands.

    I have no idea. (I'm not a programmer, either.) I believe they are standard Windows calls modified to have specific functions in Civ II.

    5) while looking for more of these values and hex-editing the file CIV2.EXE, I found all of them nicely summed somewhere near the end. However, 3 more commands were standing between the ones I found already that either did not work or made no visible difference. They are "prompt", "smallfont" and "system". Why do they not work?

    Those are font commands that were written in in an early version, but it turned out we didn't use them in the final text boxes.

    6) is it possible to make a button do something (in a simple way)?

    Not really; the code specifies function, not the formatting commands. You can modify the text of existing boxes, but the function of each option will remain the same. (That's not to say you couldn't use events and flags to fake it convincingly...)

    7) how is it possible that @options mostly comes up with radio boxes but occasionally (when typing in the leader name, etc.) with a box where you can type.

    That's code based. The text boxes are controlled and determined by the code. These commands only affect the formatting of the text and the box itself.

    Hope that helps.

    Comment


    • #3
      John,

      thanks for the answer. A shame most of the answers are "no" (more or less), but that was already a bit what I expected. I just thought it couldn't hurt asking.
      I was hoping to add some flavour to scenario making with this (like linking to automatically move to the next part if using multiple events files).
      So I guess those buttons and options etc. can only be used for decorations.

      What I did find so far is
      -that it is possible to choose which civ you want to play (as scenario) from the first intro scenario screen (scenarioname.txt) and arrange them into columns, thus combining the two screens into one and be able to add notes on which civ to choose above it.

      -also (though instead of that) it is (using listbox and options) to add much longer text files in the scenario intro text (I have added about half a book in the scenario intro text now and it all shows up in the options box with a neat scrollbar on the right).


      Are there any more easy-to-change things in the various text files? I guess the %strings and %numbers are not usable (though with a bit of testing some fun might be achieved with it).

      Comment


      • #4
        I go over most of the text files in the Ultimate Guide to Scenario Building (or whatever that book was called). There's a lot (and of course there's not room or time to repeat it here), but most of it is concentrated in rules.txt, game.txt, labels.txt, and pedia.txt.

        Comment

        Working...
        X