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

Having now established a secure perimeter, we've made ourselves relatively safe from enemy incursions. But against the seemingly random attacks by Planet's native life, only our array warning sensors can help us, for the mind worms infiltrate through every crevice and chew through anything softer than plasma-steel.
~Lady Deirdre Skye 'The Early Years'

* 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]