|Thread:||More suggestions for PCC2|
|In reply to:||Re: More suggestions for PCC2|
|Date:||Thu, 2016-06-16 07:17 GMT|
Writing scripts or plugins is still a bit above my level, but I started using my own expressions for labeling and searching. To not type these over and over again I manipulated the lru.ini file to show my own expressions as last used expressions. Because lru.ini is rewritten after every PCC2 run, I replace the file by my own version before each run. It'd be nice to make it somehow easier to use own expressions. A section 'own labels' and 'own search expressions' in lru.ini would be sufficient or another file own_expressions.ini.
This feature exists, although heavily under-documented: place a text file expr.usr in your game directory. The content is the similar as lru.ini:[Find] my planets [p] owner$=my.race$
These expressions will appear at the end of the search function's drop-down list. The "p" in brackets means you want to search only planets, it could also be "s" or "b".
I had the same issue but for some reason (which I can't remember anymore ) I decided against adding another expr.usr file in the game directory. Maybe that was because added lines are added at the bottom of the list which is a bit inconvenient for obvious reasons. However I decided to modify the expr.c (or was it cc?) directly in the installation directory (or maybe some subdirectory). That's quite easy since the form is already set with many examples to try out. The downside is that I have to "repair" that file manually everytime I upgrade PCC2 to a current version, which is still far better than for every start of PCC though.
Cool, it is already implemented. Also, interesting workaround from ComCitCat . (Of course, I do not manually repair the file before each run.)
Maybe the expressions from expr.usr could be moved to the beginning of the drop-down list?