-
Who's Online 1 Member, 1 Anonymous, 621 Guests (See full list)
-
Topics
-
Posts
-
An interesting video with several proposals on cohesion. A few ideas could be inspiring for 0 A.D.
-
So that's user maps, mmh. Does that happen with community mod maps as well ?
-
Yes we used exactly same versions of 0ad mod (0.27.0) and community-mod (0.27.2). The game's version itself is on borth clients Build 14.07.20025 (release-a27.1, 6a576). The map was designed with the editor (Atlas) that comes with that version and was placed into %UserProfile%\Documents\My Games\0ad\mods\user\skirmishes\. Skirmish maps that come with 0ad work as expected, though. Strange that no one else came along with this problem. Besides it's a huge map.
-
Ah right, that makes some kind of sense since there is no GUI in non visual ... So probably nothing gets initialized and nothing listen to the messages No problem, sorry we couldn't figure out a solution. I do believe that using the RL interface might be better in this case, since it should have a lot more access to the engine functions because you can send arbitrary js to the engine. The tickets hyperion mentioned above. https://gitea.wildfiregames.com/0ad/0ad/issues?q=autostart&type=all&state=all&labels=43
-
By CulturedCait · Posted
That was good suggestion. I placed as much "warns" as possible and discovered that in my OnInitGame trigger: Trigger.prototype.TestLearningStart = function() { warn("Init"); //zapytajmy czy jest plik startowy inicjalizujacy nasz algorytm wstepnymi entities itp let cmpGuiInterface = Engine.QueryInterface(SYSTEM_ENTITY, IID_GuiInterface); cmpGuiInterface.PushNotification({ "type": "load-json", "players": [0], "name": "testlearning-last", "param": "init" }); warn("Init finish"); //this.TestLearningStartFromScratch(); } PushNotification sends the request without errors, but OnCommand never receives it. It is was clear that my custom message "load-json", which loads JSON file, is simply not being push further. This is my load-json msg: "load-json": function(notification, player) { warn("Received load-json"); let name = notification.name || "testlearning"; let data = null; if (Engine.FileExists("simulation/" + name + ".json")) data = Engine.ReadJSONFile("simulation/" + name + ".json"); Engine.PostNetworkCommand({ "type": "dialog-answer", "dialog": "json", "answer": { "param": notification.param, "data": data, }, }); warn("finished load-json"); }, And this is how I run the game with loading mod with customized "messages.js": $ pyrogenesis -mod="public" -mod="train" -autostart-victory="endless" -autostart="skirmishes/test_sparta" -autostart-disable-replay -quickstart -autostart-nonvisual Mod "train" contains just one single file with modified "messages.js". Since warning "Received load-json" never appears, we can be sure this message never hits in headless mode. So the only explanation is that under -autostart-nonvisual, custom "messages.js" coming from my mod is either ignored or, which is more likely, overlapped with different set of "messages.js" designated for -autostart-nonvisual. Since I need custom messages to communicate with some GUI APIs, I can't get rid of this pattern... I think it is not worth investigating further. I'm satisfied with my current solution as it is and although headless mode certainly could be nice improvement it is not that important for these type of calculations. Thank you again for your help.
-
