Community Forum

g_shopScreen function

Forum Overview >> Scripting

CategoryScripting
Created01.07.2015 21:31


Sleis Mira (Unknown) 01.07.2015 21:35
Hi,
does anyone know what is at LS15 features for self.selectedStoreItem and directly to self.selectedStoreItem.xmlFilename ?

Thanks for the reply "Saty"

Emil Drefers (Unknown) 02.07.2015 07:21
Hi,

what do you want to do by using these variables?

Cheers,
Emil

Sleis Mira (Unknown) 02.07.2015 08:55
In the game LS13 I have a script that checks at the store, according data from xml, whether it is a my mod.
If so, can someone checks whether it has been modified I3D file.
I would like this applied even in LS15 ...

Please excuse my English, I use GoogleTranslator ...

Sleis Mira (Unknown) 02.07.2015 08:58
I will ask more, is there any way to check the file HASH?

Emil Drefers (Unknown) 02.07.2015 13:18
Hi,

sorry but I don't understand what the modd should be good for.

To test if it is a mod which loads a default vehicle?

To test if a mod has been modified again?


The check for the hash of a mod on a server is done in the engine (not on the scripting/LUA) side.


Cheers,
Emil

Sleis Mira (Unknown) 02.07.2015 16:46
I have in the LS13 appendedFunction for g_shopScreen.draw, where I read from vehicle.xml writing for author. If so, I check i3D (I will not describe them how). Subsequently in the case of unauthorized modifications, will not allow the machine purchase ...

if self.isOpen and self.selectedStoreItem and fileExists(self.selectedStoreItem.xmlFilename) then
local xmlFile = loadXMLFile("xml", self.selectedStoreItem.xmlFilename);
if getXMLString(xmlFile, "vehicle.author") == "xxx" or getXMLString(xmlFile, "placeable.author") == "xxx" then
....

I could eventually read from the file moddesc.xml, but also do not know how ...


Bilbo Beutlin (BBeutlin) 02.07.2015 19:28
And where is the sense of your intention?
You want to validate your mod whether it has been modified in any form and deny access if so?
That's totally against the sense of the FS to have an 'open modding platform'. Nearly everyone changes a little the datas to adapt a mod to his own purposes - and that's right so.
Nobody is perfect and there's no mod or even original model which could not be improved.
Last not least such a 'validation function' could be easily disabled by someone who has basic knowledge.

Sleis Mira (Unknown) 03.07.2015 13:48
At the moment I is not about this, I suppose it would not work as the LS13 ...

The primary purpose of the script is adding extra banner in store with our logo for modds created by us.
Similarly as for example in "MoreRealisticDLCs" ...


Note: Log in to post. Create a new account here.