titanforever Posted July 12, 2010 Report Share Posted July 12, 2010 Ticket #272Citizens should auto-gather from Fields after finishing construction.I was looking forward to impliment this functionality . As while playing the demo i felt that this functionality is a must for a player..there are a few questions I have regarding the game engine ...Due to the lack of familarty of the code i cant seem to find the basic things that i require to solve this ticket effectivelyI have a few very simple questions1) I cant seem to find out the the places where the resources definition is there2) Also i am unable to find the Vilage women ....where actions are defined?? Quote Link to comment Share on other sites More sharing options...
WhiteTreePaladin Posted July 12, 2010 Report Share Posted July 12, 2010 (edited) Really, this should apply to all resources, not just fields. I think this is related to the basic AI (like auto-attacking nearby enemies). We are planning on redoing the existing AI code which will probably fix this (or at least provide the base for fixing it). Still, feel free to experiment and see what you can do. 1) I cant seem to find out the the places where the resources definition is thereIf you're on Windows, then the gameplay components are located here: C:\0ad\binaries\data\mods\public\simulation\components. You will see ResourceDropsite.js, ResourceGatherer.js, ResourceSupply.js, etc. However, I think the fix will likely need to be done in the basic AI code which I'm not familiar with.2) Also i am unable to find the Vilage women ....where actions are defined??This should also apply to soldiers that can gather, so I don't think you'll need anything specific to a villager. However, just in case you want to take a look, the XML unit templates are found here: C:\0ad\binaries\data\mods\public\simulation\templates\units.[edit]I misread your post. I though you were referring to units continuing to gather a specific resource automatically. It appears you are actually asking how to get units to farm a field immediately after building it, not to search for other fields if the current one is exhausted. However, both seem AI related. Edited July 12, 2010 by WhiteTreePaladin Quote Link to comment Share on other sites More sharing options...
titanforever Posted July 13, 2010 Author Report Share Posted July 13, 2010 Thanks for the info... There is a TODO note in ResourceDeposite.js what does this js needs to impliment ?? i guess this might be required to solve one of the 2 bugs(gather from nearby fileds/resources) ... which are there ...Yea they seem to be AI related but i guess atleast one of them can be fixed very easily . Quote Link to comment Share on other sites More sharing options...
WhiteTreePaladin Posted July 13, 2010 Report Share Posted July 13, 2010 Umm, there are lots of "TODOs" in the code. I think ResourceDropsite.js is dependent on the Auras.js component (which is not yet implemented either). The dropsite is a resource center building that allows units to gather resources a certain distance away. Right now you can gather resources anywhere on the map because the dropsite isn't implemented. I don't think the dropsite will control the aspects you want to change. ResourceGatherer.js would be more likely to have relevant information, but it will likely not be a good place to try to fix it. When we get the basic AI (not the same as a "computer player") working, I think it will be much easier to fix it. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.