Jump to content

ramtzok1

Community Members
  • Posts

    51
  • Joined

  • Last visited

Recent Profile Visitors

1.031 profile views

ramtzok1's Achievements

Discens

Discens (2/14)

9

Reputation

  1. What are the probability for each category? I think all single player categories should have an equal probability to be shown during a single player loading and during a multi player game maybe have more chances to be shown towards the multi player tips. I agree with @Vantha, this is the best time to add more tips for multi player or anything else we are flexible by the categories we can create now. Edit: I have sorted all the tips but the tip "NOMAD MODE" doesn't belong to any category.
  2. It's fine. Not everything always pans out the way you want. We had great time though - chatting with you guys and researching all of the parts we needed was educating and the breakthroughs and help we got from you were beyond anything imaginable. We also got certificates of excellence for the path we took while creating and planning everything, so there's that!
  3. A quick update: The moving of files to the data folder did help the VFS error we were having, but now it's just back to error code number 0 and game freezes... Today is the presentation, and it's sad to end the project on this note,but we'll the best out of the situation. Thanks for everyone who tried to help us!
  4. Interesting, but unfortunately we won't have time to commit to a server right now. Therefore we will stay with the Files...
  5. Update: I've finally managed to upload the entire repo of our latest work,you can check it out yourself here :https://github.com/ram1660/0ad If you have any questions feel free to ask!
  6. I tried to make an E-Net server-client, however I was confused about how to make the connection also my guide told me and to my partner to do not tarry on it if we are getting stuck and just stick to the idea of the files which made sense because it "worked" until we found all of these problems.
  7. Yeah,It doesn't work. I guess it just defaults to everything in the simulation folder.
  8. Well, I tried to create a dummy file and just see if I could read data from it, but apparently it is not working at all, regardless of using a file or anything else. Does anyone know what could be the reason for that? I'm pretty sure that is what happens too since the VFS_load (Whatever that is) is the same that was for us beforehand.
  9. Okay, should I try just using the absolute path into a folder i create in the mod folder in My games? I'll also chekc the cpp file, thanks!
  10. I see. I guess it one of the main folders of the game, and not our custom-made,right? also, I did want to move the actual files to a place like My Documents, because I suspected a conflict early on, but as far as I understood the Engine.ReadFile and WriteFile wouldn't work with it, right? (The path needs to be like the one we used in the code examples above,and not absolute?) Also, is there a place where I can check error codes? I tried to change the way we handle a time when JS tries to access the .txt, and got the following error code: Assertion failed: "el_size != 0" Location: wdbg_sym.cpp:848 (dump_sym_array) Call stack: While generating an error report, we encountered a second problem. Please be sure to report both this and the subsequent error messages. errno = 2 (Error during IO) OS error = 0 (no error code was set) The changed code: winningPetential = this.getMLData(); if(winningPetential == -1) // Basically, the file reading was unsuccessful. { aMin -= 1; continue }
  11. Can you please explain what does hotloaded mean? I'm unfamiliar with the term. Interesting idea! Is there a good way to rename a file in JS? EDIT: I gave it some thought and I can't really see how it fits our code, since our objective is that the Python script will create a file and that file will be processed by the JavaScript.
  12. What you say may be true, but unfortunately we tried to figure out to be sure and it didn't quite work yet. Here is how we handle the file accessing, JS-side (defenseManger.js): let i = 0; while(i < 100000) // delaying the JavaScript Side so python can catch-up. i++; if( Engine.isFileInUse("D:\\Users\\micha\\Desktop\\ram-and-michael\\binaries\\data\\mods\\public\\simulation\\ai\\petraML\\mlData\\answer.txt") && !Engine.FileExists("simulation/ai/petraML/mlData/answer.txt")) return -1; Engine.AppendToBuffer("a"); Engine.WriteToFile("simulation/ai/petraML/mlData/zxccxz.txt"); // dummy file to check if worked. let chance = undefined; do { warn("before reading ") chance = parseFloat(Engine.ReadFile("simulation/ai/petraML/mlData/answer.txt")); // place where error occurs. this.counter += 1; warn("COUNTER: " + this.counter.toString()) warn("READ CHANCE: " + chance.toString()) } while (chance === undefined); Engine.AppendToBuffer("a"); Engine.WriteToFile("simulation/ai/petraML/mlData/gameState.txt"); // for python to check if JS is done. return chance; IsFileInUse() is a function that we created to check if a text file is in use, the code: inline bool JSI_VFS::isFileInUse(ScriptInterface::CxPrivate* pCxPrivate, const std::wstring& filePath) { struct stat buffer; return (stat((char*)filePath.c_str(), &buffer) == 0); } The only time we access Answer.txt in the python side is to write the output from our model. The only problem I can figure out regrading the one-sided solution is the fact that JS is a lot faster and just somehow manages to try and check if Answer.txt exists and in use before + reading it before it is even created. NOTE: we also tried to use the ReadFile function on a dummy file that we created to see if reading just a regular file that is not accessed brings trouble, and we faced the same error code you see regarding the file reading in the main post.
  13. We dealt with that problem where there was a data race between Python and the game where they both tried to access the same file. We added exceptions handling on the Python side and making sure no other process is using the file. I don't think the Python script is related to that problem any more. As I said I will upload the whole project including the ML model so you will be able to see every step we are making and maybe spot where we did wrong.
  14. Me and my partner modified functions and code I think it won't be possible to reproduce without uploading the whole project to GitHub and getting Anaconda set up correctly on your side. I will upload the project tomorrow.
  15. I am on Windows. I can give you the files we modified + the script or share our repo if you would like!
×
×
  • Create New...