Jump to content

Envelope_Void

Members
  • Posts

    14
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Envelope_Void's Achievements

  1. No. Where does that happen within the existing code for loading resources? If I'm tracing the normal workflow for generating resource nodes from the CraftingPlugin it goes something like this: CraftingPlugin.InstanceLoadedHook() resourceNodes.put(instanceOid, cDB.loadResourceNodes(instanceID, instanceOid, resourceNodeGroups)) ContentDatabase.loadResourceNodes() ResourceNodeGroup.spawn() ObjectManagerClient.generateObject(ObjectManagerClient.BASE_TEMPLATE_ID, ObjectManagerClient.BASE_TEMPLATE, markerTemplate) WorldManagerClient.spawn(objectOID) I don't see any obvious reference to a model in this code path. In my code, I put a log after the WorldManagerClient.spawn to make sure that my code was hitting that. My code was successfully spawning resources at locations using WorldManagerClient. That did it! What does that check box specifically do? I now have this: As I wrote above, I have essentially copied and pasted the code from the CraftingPlugin.InstanceLoadedHook() and the ContentDatabase.loadResourceNodes() functions. How do I attach everything else I need to these created objects?
  2. To add on to my last post, I fired up the game this morning and did nothing while I looked at some UI elements. I went to open my logs and noticed this that the mobserver logs were going crazy! I have attached a screen shot of my world logs folder and one of the archived log files. mobserver_1-3.log.gz
  3. I've made some progress in getting all of this to work but I'm having trouble understanding how the server actually generates GameObjects in the game. So far, I have created a new plug-in with a custom hook called BeginGatheringHook. This hook mirrors a hook that I found in the CraftingPlugin.java class called InstanceLoadedHook. Specifically, I took the following statement from InstanceLoadedHook: resourceNodes.put(instanceOid, cDB.loadResourceNodes(instanceID, instanceOid, resourceNodeGroups)); I created my own version of this in my plugin, and I have started to look at the ContentDatabase.java function that is being called. I have been able to successfully call that function and pass parameters from the game, and I've looked extensively at the WorldManagerPlugin spawn() and the ObjectManager generateObject() methods. I don't believe that the game is spawning any GameObjects when I click the appropriate button, but it's hard to tell from my logs. Any help in understanding this workflow would be appreciated. I've attached some object manager logs from when I spammed the button and got the server responding. I THINK the server is tracking the objects as created, but I'm seeing nothing in the game. I only tested this live for a few seconds. When I logged into the game, I spammed the "Gathering" button that I created about 20 times. In those few seconds, the server generated 4 full objmgr.log files, so something is definitely happening. I have attached the objmgr.log files. objmgr-3.log contains the actual logs of me pressing the button. These can be found by searching the file for "GATHERING:" and "CONTENT DATABASE:". I have also attached the modified code I used within content database. All the code beyond line 37 is unmodified from the original function (which is ContentDatabase.loadResourceNodes(). objmgr.log objmgr-1.log.gz objmgr-2.log.gz objmgr-3.log.gz contentdatabasefunction.txt
  4. 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.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.