Author Topic: weird #xxx line in univ.txt  (Read 1711 times)

0 Members and 1 Guest are viewing this topic.

Offline bvanevery

  • Emperor of the Tanks
  • Thinker
  • *
  • Posts: 6370
  • €659
  • View Inventory
  • Send /Gift
  • Allows access to AC2's quiz & chess sections for 144 hours from time of use.  You can't do without Leadship  Must. have. caffeine. -Ahhhhh; good.  Premium environmentally-responsible coffee, grown with love and care by Gaian experts.  
  • Planning for the next 20 years of SMACX.
  • AC2 Hall Of Fame AC Text modder Author of at least one AAR
    • View Profile
    • Awards
weird #xxx line in univ.txt
« on: November 29, 2018, 03:24:27 AM »
There's a strange line in univ.txt that I've never noticed before.  It comes after the faction help description section:

Code: [Select]
#DATALINKS2
^+2 RESEARCH:  {Brilliant research}
^-2 PROBE:  {Academic networks vulnerable to infiltration}
^Free NETWORK NODE at every base
^One BONUS TECH at beginning of game
^Extra DRONE for every four citizens {(lack of ethics)}
^{May not use Fundamentalist Politics.}

#xxx
^+2 SUPPORT: {Engineers readily improvise}

wth?  Maybe #xxx is a meaningless header, a way to insert something without having to comment the section?  It's still weird that this was shipped with the game.  I checked a few other faction .txt files and didn't see any similar line.


Offline gwillybj

Re: weird #xxx line in univ.txt
« Reply #1 on: May 29, 2019, 04:26:50 AM »

I'm sure you figured this out long ago. In case anyone is still wondering, though:


Starting a line in any of the game's txt files with a "#" makes it a comment line. The program does nothing with it and moves on to the next line. It's the same as starting a line in BASIC with REM. It becomes a remark instead of an instruction.
In this case, the writers initially thought of giving the University +2 SUPPORT, but took it out at the top of the file and commented it here where the specs of the faction are explained.


It's odd that it ended up being the only instance among all the factions.
Two possibilities exist: Either we are alone in the Universe or we are not. Both are equally terrifying. ― Arthur C. Clarke
I am on a mission to see how much coffee it takes to actually achieve time travel. :wave:

Offline bvanevery

  • Emperor of the Tanks
  • Thinker
  • *
  • Posts: 6370
  • €659
  • View Inventory
  • Send /Gift
  • Allows access to AC2's quiz & chess sections for 144 hours from time of use.  You can't do without Leadship  Must. have. caffeine. -Ahhhhh; good.  Premium environmentally-responsible coffee, grown with love and care by Gaian experts.  
  • Planning for the next 20 years of SMACX.
  • AC2 Hall Of Fame AC Text modder Author of at least one AAR
    • View Profile
    • Awards
Re: weird #xxx line in univ.txt
« Reply #2 on: May 29, 2019, 05:59:40 AM »
# does not make a subsequent line a comment line.  There is no # in front of ^+2 SUPPORT.

#xxx might make a subsequent line a comment line.  If so, this is the only place in any of the faction.txt files where such a convention is used.

It could be that once a comment line is encountered, subsequent information in a faction description is discarded.  If that was true, then #anything or possibly even # alone would have the same functionality as #xxx.

Offline gwillybj

Re: weird #xxx line in univ.txt
« Reply #3 on: May 30, 2019, 06:16:05 AM »

Yes, I was mistaken. It's been a while.

The easiest description of the hash [ # ] is that it starts a header. The first line of a header is always a single word in all capital letters. Sometimes it will be a sort of compound word. Because it is used by the program, its spelling must not be changed. alphax.txt has 48. univ.txt has 22. Some instances are of more than one line starting with # grouped together as a single header. In univ.txt they are the diplomacy sections. Each line means something to the program.

It is the semicolon [ ; ] that starts a comment. There are 538 ; in alphax.txt. They aren't all at the beginning of a line. It can be inside the line to flag a comment about what came before it in that line. univ.txt has only 12 (11 begin the first 11 lines, one begins the last line).

The # appears inside some comments as a symbol for the word number.

Interestingly, there are two sections in alphax.txt whose lines start with # but they aren't headers. They're actually comments.

The first such section starts with these two lines, then lists the seven SMAC factions after a line "Alien":

##### IMPORTANT NOTE TO TRANSLATORS
# For this list of adjectives, please translate to all genders & plurality:

The second such section has 29 lines starting with these three. Every line begins with ##:

##
##SAMPLE SENTENCES FOR TRANSLATORS
##


As for the
#xxx
^+2 SUPPORT: {Engineers readily improvise}
the # would indeed flag the line as a header, but if xxx is not defined, the program never reads into the database.
Two possibilities exist: Either we are alone in the Universe or we are not. Both are equally terrifying. ― Arthur C. Clarke
I am on a mission to see how much coffee it takes to actually achieve time travel. :wave:

Offline bvanevery

  • Emperor of the Tanks
  • Thinker
  • *
  • Posts: 6370
  • €659
  • View Inventory
  • Send /Gift
  • Allows access to AC2's quiz & chess sections for 144 hours from time of use.  You can't do without Leadship  Must. have. caffeine. -Ahhhhh; good.  Premium environmentally-responsible coffee, grown with love and care by Gaian experts.  
  • Planning for the next 20 years of SMACX.
  • AC2 Hall Of Fame AC Text modder Author of at least one AAR
    • View Profile
    • Awards
Re: weird #xxx line in univ.txt
« Reply #4 on: May 30, 2019, 08:47:45 AM »
The parsing on this is a bit baffling, with the mixing of use as header and use as comment.

Offline Vidsek

Re: weird #xxx line in univ.txt
« Reply #5 on: May 30, 2019, 12:24:25 PM »
   This topic has been oddly interesting.  If somewhat baffling.  Not that 'baffling' is surprising in SMACX....

   Since the #xxx section appears to do nothing, could one assume that deleting it would change nothing?
All this talk of fungus and worms makes me hungry...

Offline bvanevery

  • Emperor of the Tanks
  • Thinker
  • *
  • Posts: 6370
  • €659
  • View Inventory
  • Send /Gift
  • Allows access to AC2's quiz & chess sections for 144 hours from time of use.  You can't do without Leadship  Must. have. caffeine. -Ahhhhh; good.  Premium environmentally-responsible coffee, grown with love and care by Gaian experts.  
  • Planning for the next 20 years of SMACX.
  • AC2 Hall Of Fame AC Text modder Author of at least one AAR
    • View Profile
    • Awards
Re: weird #xxx line in univ.txt
« Reply #6 on: May 30, 2019, 07:38:51 PM »
One would hope so!  However so far I've left it in there, because it's such a kicker / relic.  Imagine the absurdity of what it purports to give the University.  +2 SUPPORT, hardy har har har!!

Offline Vidsek

Re: weird #xxx line in univ.txt
« Reply #7 on: May 30, 2019, 10:42:55 PM »
    I've been a professional Archaeologist.  Relics are my thing  8).   It stays.
All this talk of fungus and worms makes me hungry...

Offline bvanevery

  • Emperor of the Tanks
  • Thinker
  • *
  • Posts: 6370
  • €659
  • View Inventory
  • Send /Gift
  • Allows access to AC2's quiz & chess sections for 144 hours from time of use.  You can't do without Leadship  Must. have. caffeine. -Ahhhhh; good.  Premium environmentally-responsible coffee, grown with love and care by Gaian experts.  
  • Planning for the next 20 years of SMACX.
  • AC2 Hall Of Fame AC Text modder Author of at least one AAR
    • View Profile
    • Awards
Re: weird #xxx line in univ.txt
« Reply #8 on: May 30, 2019, 11:02:02 PM »
"Notice this crust of SUPPORT in our good Provost's dried up head.  Remarkably preserved."

 

* User

Welcome, Guest. Please login or register.
Did you miss your activation email?


Login with username, password and session length

Select language:

* Community poll

SMAC v.4 SMAX v.2 (or previous versions)
-=-
24 (7%)
XP Compatibility patch
-=-
9 (2%)
Gog version for Windows
-=-
103 (32%)
Scient (unofficial) patch
-=-
40 (12%)
Kyrub's latest patch
-=-
14 (4%)
Yitzi's latest patch
-=-
89 (28%)
AC for Mac
-=-
3 (0%)
AC for Linux
-=-
6 (1%)
Gog version for Mac
-=-
10 (3%)
No patch
-=-
16 (5%)
Total Members Voted: 314
AC2 Wiki Logo
-click pic for wik-

* Random quote

A ship at sea is its own world. To be the captain of a ship is to be the unquestionable ruler of that world and requires all of the leadership skills of a prince or minister.
~Col. Corazon Santiago 'Leadership and the Sea'

* Select your theme

*
Templates: 5: index (default), PortaMx/Mainindex (default), PortaMx/Frames (default), Display (default), GenericControls (default).
Sub templates: 8: init, html_above, body_above, portamx_above, main, portamx_below, body_below, html_below.
Language files: 4: index+Modifications.english (default), TopicRating/.english (default), PortaMx/PortaMx.english (default), OharaYTEmbed.english (default).
Style sheets: 0: .
Files included: 45 - 1228KB. (show)
Queries used: 36.

[Show Queries]