Wow, sorry about my incoherence the other day, I wasn't paying much attention to what I was saying or something
.
The caste and position tags have another level of trickyness: what if I want to delete a position -- what should happen to all the tags it sorta-contains?
(The sorta-containment is a ripe source for confusion; say, in an ENTITY after POSITION:MCHAMMER, the tag DUTY_BOUND will apply to McHammer but something with no position relevance like WEAPON:WHIP will still fall through to affecting the ENTITY
)
Perhaps something like this could be generally useful:
include ENTITY:MOUNTAIN
between POSITION:MAYOR and POSITION:.*
remove .*
scope all
remove POSITION:MAYOR
You could do the same scope limiting with before and after tags too, if you also made scoping move the 'insert position' ... This example would just neaten the order of the output file, but I could see "before first CASTE" or "after last USE_MATERIAL_TEMPLATE" being useful. Heck, "first" and "last" as prefixes to search patterns in general might be useful
.
include OBJECT:ENTITY
select PREMITTED_REACTION:.*
after last PERMITTED_REACTION:.*
append PERMITTED_REACTION:MY_THING
append PERMITTED_REACTION:MY_OTHER_THING
select inverse
at top
append PERMITTED_REACTION:MY_THING
append PERMITTED_REACTION:MY_OTHER_THING
select *
Hm, let's see if I can find a way to use something close to your syntax to solve some other problems I've had...
This is to change the native metals and such to something that isn't considered both a stone and a metal in its unsmelted form. I had to do something I found unobvious in uristmod or it put the new template at the bottom, overwriting the specifics and making them all appear as blank-wall "METAL" in the game.
include OBJECT:INORGANIC
select IS_STONE
select USE_MATERIAL_TEMPLATE:METAL
delete USE_MATERIAL_TEMPLATE:METAL
at top
append USE_MATERIAL_TEMPLATE:METALROCK
select *
This is to apply a tanmod variation to scaled creatures; you need to take 10-ish lines of body details which contain remove_materials and use_material_templates and replace it with two or three lines about variations, and they really need to be right where the original lines were. I couldn't even reliably delete everything required with uristmod.
include OBJECT:CREATURE
select USE_MATERIAL_TEMPLATE:SCALE:SCALE_TEMPLATE
between inclusive BODY_DETAIL_PLAN:STANDARD_MATERIALS and BODY_DETIAL_PLAN:VERTEBRATE_TISSUE_LAYERS:.*
remove .*
# Scope still active so tokens will be appended in place of the area that has been deleted
append APPLY_CUREATURE_VATIATION:SCALED
append APPLY_CURRENT_CREATURE_VARIATION
scope all
select *
This is my most pipe-dream example that uses as many crazy features as possible, to automatically achieve something I've done by hand:
include OBJECT:INORGANIC
select USE_MATERIAL_TEMPLATE:METAL
deselect IS_STONE #filter any unfixed native metals
duplicate INORGANIC:%ID%_FIBER # %ID% = name of found object
# From this point we're modifying the duplicate
remove ITEMS_*
append ITEMS_SOFT
append WAFERS
modify VALUE, {%ID%:VALUE} + 2 # Reference to token of other object, math?!
# tabs indicate template for create?
create REACTION:EXTRUDE_%ID%
[NAME:extrude fiber from {%ID%:STATE_NAME_ADJ:ALL_SOLID} bars]
[REAGENT:%ID%:NONE:NONE:NONE]
[PRODUCT:100:15000:THREAD:NONE:%ID%_FIBER]
# this is not a proper reaction. i don't have access to one that works now ^_^
# i have no idea how this part would work prpoerly:
include secondary ENTITY:MOUNTAIN
after last PERMITTED_REACTION
append PERMITTED_REACTION:EXTRUDE_%ID%
I hope this post is less scatterbrained than the last one; I'm really just sort of working what (I think) you'd need to be able to do to achieve things.