PolyacovYury / PYmods

Storage for World of Tanks mods.
25 stars 10 forks source link

It's not a problem. I need help with the core. #7

Open dkruben opened 4 years ago

dkruben commented 4 years ago

hello, I use your core in my mods, because it is simple to use, but now I needed to know, if in your core there is some way to (write and read) a json file (to create a cache file), already tried this.

class ConfigInterface (PYmodsConfigInterface): def init (self): self.values={} super (ConfigInterface, self) . init ()

def readCurrentSettings (self, quiet = True):
     super (ConfigInterface, self) .readCurrentSettings (quiet)
     self.values = loadJson (self.ID, 'cache', self.values, {}, quiet = quiet) # [0]
PolyacovYury commented 4 years ago

Yes, there is. Check File config/interfaces/Simple.py, in readCurrentSettings. Long story short - if you extend Simple.ConfigInterface - you already have loadDataJson and writeDataJson methods, that read from/write to %(MOD_ID)s.json file. Examples of additional usage of loadJson function can be found in mod_Skinner/config.py, mod_RemodEnabler/config.py,...

dkruben commented 4 years ago

thank you very much, sir. big help 👍

PolyacovYury commented 4 years ago

Wait. Was this sarcastic or actually helpful?) I can always elaborate, if such need arises.

ChaoGaoo commented 4 years ago

hello, masterPolyacovYury, i can not understand your code, i am a outsider about code, can you tell me where to get the mood file? please. and where to get the compatible version for version 1.9.0.2 for chinese server?. thanks a lot

dkruben commented 4 years ago

Wait. Was this sarcastic or actually helpful?) I can always elaborate, if such need arises.

helpful allot 💯

dkruben commented 4 years ago

hello, masterPolyacovYury, i can not understand your code, i am a outsider about code, can you tell me where to get the mood file? please. and where to get the compatible version for version 1.9.0.2 for chinese server?. thanks a lot

hello, 1.9.0.3 is probably the same as 1.9.02, so all mods work correctly for the rest only @PolyacovYury can help you

ChaoGaoo commented 4 years ago

ha,the code makes me puzzle,i don't know where to download the files and how to make the function successful in game, can you help me? @PolyacovYury

PolyacovYury commented 4 years ago

Check out https://github.com/PolyacovYury/PYmods/wiki/Home_EN, it has some links to compiled files. The rest can be deduced.
You can also visit my KoreanRandom topic, it has all the info you'll ever need.