PYmods icon indicating copy to clipboard operation
PYmods copied to clipboard

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

Open dkruben opened this issue 5 years ago • 8 comments

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]

dkruben avatar Apr 05 '20 23:04 dkruben

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,...

PolyacovYury avatar Apr 07 '20 07:04 PolyacovYury

thank you very much, sir. big help 👍

dkruben avatar Apr 07 '20 17:04 dkruben

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

PolyacovYury avatar Apr 29 '20 23:04 PolyacovYury

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

ChaoGaoo avatar Jun 05 '20 14:06 ChaoGaoo

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

helpful allot 💯

dkruben avatar Jun 06 '20 00:06 dkruben

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

dkruben avatar Jun 06 '20 00:06 dkruben

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

ChaoGaoo avatar Jun 07 '20 13:06 ChaoGaoo

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.

PolyacovYury avatar Jun 07 '20 23:06 PolyacovYury