So I would change various ore smelting reaction so that one gold ore gives you a gold bar with say 20% probability and nothing otherwise.
Easy to do, change [METAL_ORE:GOLD:100] to [METAL_ORE:GOLD:20] in the appropriate gold ore definition.
Also abolish all ore to alloy reactions, if you want alloys like bronze make them from bars. I know how do this, all are simple changes in the mineral raws
Just remove the appropriate reactions from the entity files.
I would like to increase the amount of food and alcohol a dwarf needs by about a factor of 5. Is this in the raws somewhere, or are there good workarounds that achieve the sam effect?
Hard-coded. You can't change that.
increase the amount of wealth needed to make a room great, legendary etc by a factor of 10. I could mod the raw value of the items but is there a more direct way to do that?
Room values are hard-coded.
Currently a cat produces the same amount of leather as an elephant, can I change it so that the amount of raw hides corresponds to the amount of meat you get from slaughtering? Then change tanning so that that a raw hide gives a leather only about 10% of the time, so an elephant would still give several leather but one would need half a dozen cats to get a single unit of leather.
Very difficult to do, but not impossible. Start by removing [MATERIAL_REACTION_PRODUCT:TAN_MAT:LOCAL_CREATURE_MAT:LEATHER] from
[MATERIAL_TEMPLATE:SKIN_TEMPLATE], and also remove the standard leather making reaction from the raws. Then add to each creature's definition a line that adds a custom MATERIAL_REACTION_PRODUCT:TAN_MAT_x to that creature's skin. You probably don't need to have a different reaction for each creature, just multiple different reactions for different sizes of creature. Then create for each TAN_MAT_x a new TAN_A_HIDE_x reaction, that gives a different number of pieces of leather. This is massively labor-intensive to do by hand, but I have a script that does something very similar for my own mod. The only downside is that you lose the ability to tan the skin of procedurally generated creatures, since they won't have your custom reaction added.
possible change masonry so that it requires several stones for a table or a wall.
Masonry is hard-coded. You can't even remove the masonry workshop from a civilization.