Modified Knapsack Problem I have a problem with the following optimisation problem:

In total there are $n=100$ items. A quality level $L_i \in \{0,1,2,3,4,5\} $  must be selected for each of these items. The greater $L_i$ is, the greater  weight $w_i$ and its value $v_i$, starting with $w_i=0$ and $v_i=0$ for $L_i=0$.
Furthermore, $w_i$ depends on both item $n$ and its quality level $L_i$ and is calculated using function $w_i = w(n,L_i)$. $v_i$ depends on the total set of items and their selected quality levels $L_0 \dots L_n$ and is calculated using the relatively cost-intensive function $V$.

The question now is, what are the optimal quality levels improvements for each item, given random initital quality levels for the items and a capacity $W$? An important restriction is that a quality level can only be increased by one level in total. Each item must be selected exactly once (quality level $L=0$ is effectively the same as if the corresponding item had not been selected).

I see a difficulty in the fact that an items's value v depends on all other items. Can the problem still be solved optimally with an acceptable time complexity, or would it be necessary to use other algorithms, if so which ones? Maybe greedy algorithms?

Thank you very much for your help!
You can't.  If the function $V$  (for computing the $v_i$'s) is arbitrary, in the worst case you will need to try all possible combinations of quality levels -- there is no algorithm faster in the worst case.  That takes exponential time.

To do better, we need to know something about the function $V$: e.g., about its structure or proeprties.