The game "Neir" has many different RPG mechanics, one of them, and one of the most interesting in the implementation, is a trading system. For a very long time, the most varied versions of this mechanics were moving. But after many iterations, the goal was achieved - a flexible system was created that allows you to configure what the NPC sells and at what price, taking into account various dependencies (relations with it, bonuses for pumping, etc.). All the most complicated mechanisms were optimized to a simple array in which links to items sold are stored, and the items themselves are stored in a separate script in which all the properties of the items are set (but this is a completely different story).
In principle, this can be said about all the gameplay mechanics that were made for the game: inventory, magic, skill upgrading, task log, etc.
There were many tests, mistakes, shortcomings, but after a while the desired result was nevertheless achieved (and, I hope, it will not disappoint in the future). And GameGuru provides all the possibilities for this. Lua scripts are quite simple and convenient, they have all the most necessary and basic functions. Only for some reason, many people are afraid to try to write their own big scripts. Guys, this is actually very simple and I advise you to try to make simple scripts, and then complicate everything and complicate them, and you will certainly achieve similar results, and even much better (well, yes, "global.lua" is our everything ;)!
The GameGuru community is expanding with more lessons and advice appearing; the forum can answer all your questions, so there are many opportunities to help you achieve your game dreams.
Watch ‘Neir’ in action: https://www.youtube.com/watch?time_continue=101&v=MDdvaFeoVME&feature=emb_logo
Read more about the development of ‘Neir’ on the GameGuru forum thread: https://forum.game-guru.com/thread/220415