The value you bring to the firm is a factor in that it is a cap on what you'll get paid. Value is also relative, if a monkey can provide 90% of your value then you'll get paid a little more than peanuts.
If a monkey can provide 90% of your value, but there's a shortage of people who can provide the other 10%, you might still get paid well.
I mean, if the monkey doing the can generate 900k of value per year, but a human doing is can generate 1MM per year, then it would be better to hire the human for anything up to 96k/year (assuming peanuts cost less than 1k/quarter).