pipje2001
-
Content Count
30 -
Joined
-
Last visited
Posts posted by pipje2001
-
-
@The Illusion Well its gonna be a lot of reading stuff and trying stuff and see what happends, I am also a beginner at making a world of tanks mod. But i just started with this example: https://bitbucket.org/_vb_/wot.mods/wiki/GettingStarted
Also to compile your code you can use: https://koreanrandom.com/forum/topic/15280-pjorion-редактирование-компиляция-декомпиляция-обфускация-модов-версия-135-дата-23082017/#comments
I write my code in visual studio code and then copy it pjorion to compile it.
If you have any questions feel free to ask me or contact me on discord: pipje2001#5929
-
@The Illusion Do you have any experiance in python? if not its gonna need a whole lot of explaination to make a mod yourself
- 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
-
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?
-
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?
-
2 minutes ago, Mixaill said:0) Please do not use .pyd in WoT if you can to implement your mod in pure python.
I wouldn't ask it if was possible in pure python :) , but why should I use it?
-
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?
-
-
18 minutes ago, Kotyarko_O said:from gui.Scaleform.daapi.view.battle.shared.indicators import SixthSenseIndicator def new_show(self): old_show(self) print("spotted") old_show = SixthSenseIndicator._SixthSenseIndicator__show SixthSenseIndicator._SixthSenseIndicator__show = new_show
well that was a simple fix, Thanks!
-
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
-
7 minutes ago, Kotyarko_O said:Thanks for the quick reply, but this is using xvm right?
-
@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?
-
@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
-
@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?
-
@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
-
-
-
@Kotyarko_O newSettings are the settings that you changed in the game so
print 'onModSettingsChanged', newSettings
will print
onModSettingsChanged {'enabled': True, 'ip_hub': '192.168.1.101', 'minimapClick': True}
so i need to get the newSettings from inside my own mod, because settings in the mod_modsettings.py don't change
otherwise i need to press apply everytime i restart the game
-
@Kotyarko_O still don't understand it though, how do i get the value from the textinput into my own mod? and how can i run a function in my mod when i press apply in the settings menu?
-
@Kotyarko_O I tried using https://bitbucket.org/The_IzeBerg/modssettingsapi/src and https://bitbucket.org/P0LIR0ID/wot-modslist/src/ce1e5c1d2662?at=master, but i can't find where the settings are saved and how is can access them from my own mod...
for example i want to be able to set the ip adress of the hub in the settings menu, but i have no idea how
-
@Kotyarko_O Thanks, that did the trick, do you mind if i ask you some more questions?
- how do you know if the tank is on fire?
- how do you know if modules are hit? and which module is hit?
- and how can you make a settings window in the game?
I tried to search for answers but because most stuff is in russian searching is kinda difficult
-
Is it possible to get the last damage that i have recieved? and if so how?
-
@Kotyarko_O Awesome, i got one more problem though, i try to run this code in a loop:
def LowHp(): while curHp > 0: b.set_light(1, 'xy', [0.678, 0.3168], transitiontime=0) b.set_light(1, 'bri', 254, transitiontime=10) time.sleep(1) b.set_light(1, 'bri', 0, transitiontime=10) time.sleep(1) print("LH_Done")
But i only want this function to run once at a time so i use this method to check if the tread is already running but it "forgets" that its running so the next time i get shot it just runs it again which kinda breaks my lights XD
if fcurHp/fmaxHp <= 0.1: LH = threading.Thread(target=LowHp) print(LH.is_alive()) if not LH.is_alive(): LH.start() print("LH_Start")
-
Unknow error caused be replacing code
in ActionScript & Python
Posted
For some reason i am getting wierd errors while there is nothing wrong with my code (I think), the python log isn't very clear about the problem but i will add the log and the mod. Hopefully someone understands whats going wrong
mod_Gamesense_v0.pyc python.log