Hello,
I would like to implement a new system in my game that allows the player to search an area for herbs to gather. I've got this working on the client side, but obviously this will be a completely different challenge to implement on the server. Here is the workflow:
1. (client) Player presses gather button
2. (server) Server receives client button press, player world location, world location season/weather/time of day, player gathering skill level, player attributes, player modifiers affect gathering (racial/item/magic bonuses)
3. (server) Server does some logic based on that stuff and a global herb table data
4. (client) Player receives a list of potential herbs that can be gathered and the difficulty. Player clicks on one of the options
5. (server) Server receives client button press, does some RNG magic, and returns success/fail
6. (client) Client receives success/fail. If successful, a prefab of the herb is generated nearby that the player can harvest for an item
Here are my questions/assumptions to start this project:
1. I assume that UI modifications will be relatively straightforward and can all be done in Unity. For now, after the "gather" cooldown, I want a UI window to pop up showing herbs that can possibly be gathered. After a player selects an herb and successfully "finds" it, a path will be displayed nearby and a prefab will be generated. Then, I assume that the player can harvest the herb via normal loot mechanics. Is that correct?
2. For the server code, I assume that I should create a plugin that can subscribe to the button clicks, send server messages asking for player and world data, and send client messages with relevant data back to the player. I've started by looking at the QuestPlugin and QuestClient code, because that's a system that is pretty easy to understand and interact with in Atavism. Where can I see the Log.debug messages for the server code? I modified world.properties to show Debug logging, but I'm not sure which log handles quest messages.
3. I have the herb prefabs created, but I'm not sure how to reference them within the existing server logic. Resource node doesn't seem to fit. Perhaps as a mob that could be spawned? I can't seem to find an example in the code that I could reference for something like dynamic prefab spawning.