Jump to content

Exodarion

Community Members
  • Content Count

    14
  • Joined

  • Last visited

Community Reputation

9 Neutral

About Exodarion

  • Rank
    Discens

Recent Profile Visitors

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

  1. Nephalim is planning to do a podcast this weekend where we will probably discuss this particular topic as well.
  2. Hey there, I had the exact same problem a few days ago and I just couldnt figure out what I was missing. after testing multiple theories of mine and asking around I found the solution. The solution is usually inside the interface file of that component. Engine.RegisterInterface("TechnologyManager"); /** * Message of the form { "player": number, "tech": string } * sent from TechnologyManager component whenever a technology research is finished. */ Engine.RegisterMessageType("ResearchFinished"); However, the research finished event is already sent from there in this case so that is not the problem. To fix this particular problem you will have to remove the method from the AIProxy component and convert it to a global method in AI Interface like this: AIInterface.prototype.OnGlobalResearchFinished = function (msg) { this.events.ResearchFinished.push(msg); }; Also make sure to add a disabler in the case that there are no AI players present. AIInterface.prototype.Disable = function() { this.enabled = false; let nop = function(){}; this.ChangedEntity = nop; this.PushEvent = nop; this.OnGlobalPlayerDefeated = nop; this.OnGlobalEntityRenamed = nop; this.OnGlobalResearchFinished = nop; this.OnGlobalTributeExchanged = nop; this.OnTemplateModification = nop; this.OnGlobalValueModification = nop; }; That should fix your event. Exodarion
  3. Thanks for the help, will surely try this.
  4. Hello people, This post is aimed at the 0AD Devs and more specifically, people that are aware of how the component and AI files function. Lately, I have been working on a large AI project for HC and recently made an attempt to register a new event inside the components that I can use inside the AI files. However, I am pretty sure I am still missing something after going through multiple files and testing my attempts. For example, I tried to replicate the method that was used for the TrainingFinished event. The actual registering of this particular event seems to be taking place in the productionqueue: https://gyazo.com/0da3f8f4de7211345e41c9f95c3a57eb Afterward, it seems the communication between the component and the AI takes place inside the AIProxy and AI Interface components: https://gyazo.com/97879f508c2280e2b5dbb3c0888f15f8 https://gyazo.com/0210965d087367d766b53e3c2cb7fc65 I am aware of the Trigger component file, but this doesnt seem to have a specific connection to the AI files in my testing. Whenever I try to copy this method of registering a new event and read it from the AI files it gives me the following error: https://gyazo.com/b85b0c086a517b3408682a44f09fc7f9 This leads me to the gui files where the startgame function is called, which (I assume) goes through the source code where these events might be checked. Also, I tried to replicate this using the ResearchFinished event, which is only registered inside the Trigger component. When I try to communicate this event using the AI components, it does not give me this error, but also doesnt actually run the OnResearchFinished function, which seems to be called somewhere from the source as well, since I cant find where this is called within any of the component files or other files that I went through for that matter. I believe that the code that calls these functions is looking for a function that starts with "On blah blah", since other functions that dont start with these 2 characters are ignored, but this is just a sidenote. Finally, I have come to the conclusion that I am probably missing some kind of event handler register that must be done for any event whether it be used for the Trigger or AI Interface component. I have no clue where this is located and also leads to my actual question. I would like to know what I am doing wrong here and/or even better, a description on how to register new events and communicate these properly between scripts. If anyone is able to explain this to me, I would greatly appreciate this. Anyway, thanks for reading this long post for the people who have and I hope someone can give me some insight into this problem. Exodarion
  5. I dont really believe this was anyones '"fault" nor does it really matter tbh. We basically used edited versions of the gamesetup and mainmenu files from the previous 0AD version, which caused multiple errors and conflicts. After updating them both the mod was fixed although it is true that the user settings had to be nuked for it to work again.
  6. Neph and I have merged files, so the next version will be released within the next 24 hours.
  7. First of all, thanks for pointing that out. I have heard about a similar problem from some players in the multiplayer community and Nephalim has also mentioned some issues with the spawning of entities on death. Unfortunately, I can't guarantee a fix in the next patch or release since there are other priorities on the list for the next patch, but I will make sure to put this on my todo list and discuss this with the rest of the team to see what we can do to resolve this matter. As a final note, I am planning to edit the entity spawning on death sometime in the future, so this problem could also be fixed during that process as a result.
  8. Thanks SirPope for spotting and making those fixes. I have added these 2 files to my own development version and will sent them over during the merge for the next release/patch.
  9. Just a few notes regarding the original 0AD factions for HC. Technically, making the game run for the vanilla factions should only require the citizen_xml edits like SirPope mentioned. However, the AI for HC is a heavily edited version and is currently not compatible with the other 0AD factions. It is still possible to get this working by changing all the original unit and structure templates, but that will take quite some time. As an example, the new magic damage types and unit/structure classes. There are also some new component additions and changes that have a large impact on the behaviour of the AI (which can also be set in the template files). I might have missed a few changes that fall outside the template files like the previously mentioned choosing hero functionality, which is dependant on the civ and technology files.
  10. Hey Angen, Thanks for your feedback on Hyrule Conquest. I have confirmed that there is indeed a problem with the Goron AI in regards to the error that you mentioned, but since it only seems to occur for the Gorons, I believe it has something to do with a specific tech that would also give the player this error. Nephalim and I will fix this problem in the upcoming weeks. I am not sure exactly when or if Neph plans to make a walking animation for the pig or if he has other plans for that particular asset.
  11. I am not sure if I have the authority to make tickets, but if so, in which category would you like me to put it?
  12. Just as a bit of extra info. The only thing I did is writing a few functions that uses the vanilla 0ad garrison functionality. This issue by itself has nothing to do with the code, but with the garrison system as a whole. If I were to remove all my garrison code, play the faction myself and garrison the units manually in the Hydrophant, the issue will remain the same. I am not expecting a fix to this anytime soon and also don't expect you to fix this for Hyrule Conquest specifically. However, I am almost 100% sure that this problem also exist in the vanilla game. Therefore, it would benefit 0ad in general if someone from the dev team would look into this problem at some point in time.
  13. Hey there, I have been working on the AI for Hyrule Conquest for a while now and have been focusing on the AI garrisoning units like Hydrophants and Chariots lately. I noticed that the movement of the Hydrophant was skippy and sometimes he would be completely unable to move for some reason. After testing for a few hours I came to an interesting conclusion. Apparently, some of the obstruction boxes seem to overlap with the Hydrophant, which causes this to occur. https://gyazo.com/cec4c29a680f459b6a804d0bc37f0cb8 I can put all the units in the Hydrophant, but not the one in the front row. I think this happens because the Hydrophant is trying to predict if anything overlaps and then finds the garrisoned units box as an overlap. Of course these are just my assumptions, but thought I'd mention this issue here to see if any of the original developers can confirm this. https://gyazo.com/748f65a1e6a44fecc7b442de9da22e2e
×
×
  • Create New...