Jump to content
Korean Random

pipje2001

User
  • Content Count

    27
  • Joined

  • Last visited

Community Reputation

0 Noob

Recent Profile Visitors

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

  1. @MixaillThanks for the response, a wotmod is not such a big deal so i guess using xfm.native is fine. But is there some explanation about how to use it? i am not that experienced and i can't find an explanation anywhere
  2. I see why it's bad to use CD but what I am trying is just not possible in python so I don't have a choice :/ Is xfm only needed to build the file or also when using the mod?
  3. I see, I want to be as independent from other stuff as possible so I will try the second option I think, also why is it bad to use pyd?
  4. I wouldn't ask it if was possible in pure python :) , but why should I use it?
  5. Is it possible to import a pyd file? i tried to import the file testC.pyd with this as code: (not actually a usefull code but just for testing) #include <Python.h> static PyObject *testCError; static PyObject* testC_say_hello(PyObject* self, PyObject *args){ const char* msg; int sts=0; if(!PyArg_ParseTuple(args, "s", &msg)){ return NULL; } if(strcmp(msg, "this_is_an_error") == 0){ PyErr_SetString(testCError, "This is a test exception"); return NULL; }else{ printf("This is C world\nYour message is: %s\n", msg); sts=21; } return Py_BuildValue("i", sts); } static PyMethodDef testC_methods[] = { {"say_hello", testC_say_hello, METH_VARARGS, "description"}, {NULL, NULL, 0, NULL} }; PyMODINIT_FUNC inittestC(void){ PyObject *m; m = Py_InitModule("testC", testC_methods); if(m == NULL) return; testCError = PyErr_NewException("testC.error", NULL, NULL); Py_INCREF(testCError); PyModule_AddObject(m, "error", testCError); } and i want to import this from mod_test.pyc: import testC status = testC.say_hello("morning") both files are in C:\Games\World_of_Tanks_EU\res_mods\1.5.0.0\scripts\client\gui\mods but when i try this it just gives me this error: ERROR: [EXCEPTION] (scripts/client/gui/mods/__init__.py, 74): Traceback (most recent call last): File "scripts/client/gui/mods/__init__.py", line 67, in _findValidMODs File "scripts/common/Lib/importlib/__init__.py", line 37, in import_module File "mod_test", line 2, in <module> ImportError: No module named testC i feel like i am doing something very simple wrong or it isn't even possible in world of tanks. Does anyone has an idea?
  6. @DKRUBENthanks, but i don't want to use XVM thats why i wanted to know how it works without it
  7. well that was a simple fix, Thanks!
  8. Alright, i don't want to use xvm mainly because there is a lot of discussion about this right now (or is that something else?). I tried to make my own hook but i am just doing something and it doesn't seem to work (which is not suprising because i don't understand shit about how it actually works XD) so i tried this: from gui.Scaleform.daapi.view.battle.shared.indicators import SixthSenseIndicator def new_show(self): old_show(self) print("spotted") old_show = SixthSenseIndicator.show SSixthSenseIndicator.show = new_show but this resulted in a lot of error's
  9. Thanks for the quick reply, but this is using xvm right?
  10. @Kotyarko_O Its a long time ago since i needed some help. In the meanwhile i got a lot of stuff working. But one thing i can't find is the function which runs when i am spotted. I want to run some code when i am spotted but i can't seem to find how, have you got any idea?
  11. @Kotyarko_O No problem at all, its good to know it is possible though, if you have time for it and you like to help it would be really appreciated
  12. @Kotyarko_O Thats awesome, so i already got a next question, i want to try to dynamically create a textinput for the modsettingapi, so if a certain value is 5 it needs to create 5 textinputs, is this even possible or not?
  13. @Kotyarko_O Awesome that did it! thank you so much but i guess this wont be the last time i ask you something if you don't mind
  14. @Kotyarko_O Alright done that, but how do i get the mod to load the saved settings?
  15. @Kotyarko_O it should be in one file? so mod_modsettings.py and mod_hello.py sould be one file?
×