Author Topic: Proposed changes to faction file parsing  (Read 1245 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.

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
-=-
104 (33%)
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: 315
AC2 Wiki Logo
-click pic for wik-

* Random quote

Have you ever wondered why clouds behave in such familiar ways when each specimen is so unique? Or why the energy exchange market is so unpredictable? In the coming age we must develop and apply nonlinear mathematical models to real world phenomena. We shall seek, and find, the hidden fractal keys which can unravel the chaos around us.
~ Academician Prokhor Zakharov, University Commencement

* 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: 39.

[Show Queries]