Incorporating "Village XP / Levels"

Previous post about what I want to acheive

So after you finish a quest, I want too incorporate Village EXP. for instance after doing the random event quests (or side missions for the villagers) you get exp and your village quests level up, so the quests get harder for better rewards.

I need the Village EXP to be a variable that can be changed from quests and that the game can reference. I currently have it so you can upgrade peoples houses e.c.t. but I want it to be your level "needs to be this high". if xp and level is too much, I could just go off XP (you need 500 village exp to upgrade the weapon shop)

Apologies if I haven't explained it well enough!
Use a general variable for this, one variable named for each village, and check that when branching your events.

If you need too many variables or would need too many branches for that, check PK8's self data suite and use map-based self-variables from that script

Original thread: https://forums.rpgmakerweb.com/threads/incorporating-village-xp-levels.41561/