As said countless times in PM's: I love you. This changes... so much.
Question: When you say BUILDING/ITEM_TOKEN you do mean ID? As in:
[INORGANIC:UPGRADE_BUILDING] => used in the workshop called "Spire"
[USE_MATERIAL_TEMPLATE:STONE_VAPOR_TEMPLATE]
[SPECIAL]
[SYNDROME]
[SYN_CLASS:here]
[SYN_CLASS:GREATER_SPIRE] => is the building ID of the building "Greater Spire"
[MATERIAL_VALUE:0]
Yes, what I mean is the ID, I should change that in my description.
Are vanilla buildings supported? Can I add a reaction to the tanner (which has no building raws, but I can reactions to it) and transform it into something else?
Vanilla buildings are not supported right now, although I was able to change between different vanilla workshops (tanner -> leatherworker). I will test how the game handles changing vanilla to custom and back. As long as the game doesn't have a fit about the changes it should be quite easy to implement vanilla buildings.
What exactly do you mean by this: "ITEM_TOKEN - this will change a randomly selected item of the given token (e.g. ITEM_ARMOR_TEST_1)" Does this mean it will not change the item used as reagent? Please make an example of its use, because I cant really think of anything...
Yeah, I really didn't know how to word what I meant. So basically I didn't want to have to make a whole crap ton of inorganics for every single upgrade so I made a system so that a single inorganic (included in my post above) will upgrade any item by changing the number included in the ID (ITEM_ARMOR_TEST_1 -> ITEM_ARMOR_TEST_2). This means you just need to use the same ID with different numbers for your items and it will do all the upgrading for you. But I realized that some people might like the option to totally change the item ID and might not want to rely on my naming convention. That is what the other option is for. You will need a separate inorganic for each upgrade, but it will allow you to change to any item ID of the same type.
Personally I will just stick with the naming convention of upgrades having different numbers, and only having one single inorganic.
EDIT: Just realized you were asking about something else. Yes that is exactly what it does, so say a dwarf prays at a shrine using a longsword, then someones longsword somewhere on the map will change. I was thinking an example might be if you have an opponents item, say a giants club, and then the giants invaded again, you could run a reaction that would weaken one of the giants clubs. Not incredibly useful, but was only about 2 minutes more of coding, so I figured I would include it.
"all - this will change all items of the same type and subtype as the items in the reaction"... so fort wide upgrades? Do you know if it affects items that are currently in use? For example could I send a priest to the shrine, pray to the gods, and they super-upgrade all armors.
Yep, that is exactly what it is, fort wide upgrades. It should work for all items, including those in use.
Its all reaction based, which makes it hard to do anything with time/ticks. I know I have plenty, no countless, of options with the scripts already, but how hard would it be to add a timer? Upgrade turns weapons into "blessed weapon" or "poisoned weapon" and the blessing or poison wears off.
Actually using the wrapper.lua script you could already get a timer effect, although it would be hackish and not very friendly to code. I will instead add an option for a third SYN_CLASS in both upgradebuilding and upgradeitem inorganics that will function as a duration. This will be fairly easy with both and would allow temporarily upgrading all armor or weapons. (I'll add it to the todo list)
Request/Suggestion: Changing materials is possible as well with this? Currently you allow to "take iron sword => make iron super-sword". You change item subtype. Another great use would be "take rusty iron sword => make iron sword". You change the material. Sword was made of "rusty iron" before, and now its "iron". You can even make "hardened iron" later on. This would be a very fine solution to the free goblinite. Give them bad-quality materials but good items, and your dwarves have to refine them first. You can still melt them, atomsmash or sell them, but you also have the option to remake them into more useful items.
Actually changing material is already possible with my imbueitem.lua script. In fact, that is all it does. I made it so that magic knights could "imbue" there weapons or armor with different properties (by physically changing the material). Currently it only works for equipped items. But I can add the functionality to a reaction system as well.
EDIT: PS: Is this a typo in your tokens.txt? MANNER)SM_EYELIDS => it has a ) instead of an I.
Yes, yes it is
Added to the todo list:
-Change TOKEN to ID
-Check vanilla building changes
-Add duration check
-Add material changing