Author Topic: Proposed changes to faction file parsing  (Read 1204 times)

0 Members and 1 Guest are viewing this topic.

Offline Yitzi

Proposed changes to faction file parsing
« on: March 06, 2015, 10:28:47 PM »
In the process of adding the IGNOREPREREQ faction ability (what I had previously been calling CANBUILDUNIT, but with somewhat more options), I can make a few changes to the way faction files are parsed, to make them more accommodating of common errors.  These are:

1. If something does not require a value, such as WORMPOLICE or TECHSTEAL, it will still treat the following entry as its "value", so something like WORMPOLICE, SOCIAL, ++RESEARCH would not give the desired +2 RESEARCH until it was changed to WORMPOLICE, 0, SOCIAL, ++RESEARCH.  I can remove this, so that WORMPOLICE, SOCIAL, ++RESEARCH gives +2 RESEARCH...however, this will mean that WORMPOLICE, SOCIAL, SOCIAL, ++RESEARCH, which previously would have given +2 RESEARCH, now thinks it's asking for "SOCIAL, SOCIAL" and "++RESEARCH", which are meaningless, so it gives only WORMPOLICE.  This would be no extra effort at all.

2. If something is meaningless (e.g. SOICAL) it is currently ignored.  I think I can have it give an error message instead with only minor extra effort.  (If #1 is used, the unnecessary number after WORMPOLICE or its like would not give an error message, but any non-number things would.)  This will help catch typos, but may cause certain faction files with harmless mistakes to not work until the mistake is fixed.

So...which changes would you like to see, which would you like to not have, and for which do you not care?

 

* 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

The Academician's private residences shall remain off-limits to the Genetic Inspectors. We possess no retroviral capability, we are not researching retroviral engineering, and we shall not allow this Council to violate faction privileges in the name of this ridiculous witch hunt!
~Fedor Petrov (Vice Provost for University Affairs)

* 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: 47 - 1280KB. (show)
Queries used: 40.

[Show Queries]