EngineOfDarkness / Stalker-Anomaly-Ltx-Loader

A Lua Script based Solution to change Vanilla Stalker Anomaly LTX Files
GNU General Public License v3.0
4 stars 0 forks source link

Rewrite the way ltx Files are edited (Further Planning required) #6

Open EngineOfDarkness opened 3 years ago

EngineOfDarkness commented 3 years ago

Currently I use ini_file_ex from _g.script which has one major drawback

This means that things like #include "presets\trade_discounts.ltx" get parsed - meaning in the resulting file this line is missing and instead the sections of the included file are present in the file.

This also concerns inheriting sections [supplies_1]:common_stock - in the final file it will just be [supplies_1] with the inherited values of section common_stock

It is also currently not possible to add new sections (only via vanilla anomaly methods), to change the "parent" sections a section inherits from or "include" any other ltx files


The Idea floating around in my head requires using luas IO Library to modify the LTX and keep them "unparsed" to so speak https://www.lua.org/pil/21.html

I'd have to reimplement a LTX parser that can