Jump to content

Ticket #272


Recommended Posts

Ticket #272

Citizens 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 effectively

I have a few very simple questions

1) I cant seem to find out the the places where the resources definition is there

2) Also i am unable to find the Vilage women ....where actions are defined??

Link to comment
Share on other sites

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 there
If 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 by WhiteTreePaladin
Link to comment
Share on other sites

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 .

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...