Example:
Code: Select all
ROOT = {
change_variable = {
which = current_potion_quality
value = 1
}
}
change_variable = { which = "laws" value = 1 }
change_variable = { value = -1 which = debate_score }
bad_function = { which = not_a_value }
#change_variable = { value = -1 which = not_a_value }
Correct values:
current_potion_quality
laws
debate_score
My script works fine, but it is excruciatingly long (At least 10 minutes):
Code: Select all
for %%F in ("C:\game\decisions\*.txt") do (
call BATCH_JREPL "(^[^#]*?)(\b(set_variable|change_variable)\s*=)([\s\S]*?)(which\s*=\s*\q?)([A-Za-z0-9_]+)" "$txt=$6" /jmatchq /x /m /f "%%F" >> "TEMP\ztemp0_all_variables.txt"
for %%F in ("C:\game\events\*.txt") do (
call BATCH_JREPL "(^[^#]*?)(\b(set_variable|change_variable)\s*=)([\s\S]*?)(which\s*=\s*\q?)([A-Za-z0-9_]+)" "$txt=$6" /jmatchq /x /m /f "%%F" >> "TEMP\ztemp0_all_variables.txt"
)
/m (multilines parameter) seems to be the cause, the rest of the script being fast.
Any ideas ?
Thanks.