Feedback Beta 1

The new update adds the option to allow users to set custom data for a script as a JSON object, and while I haven't tested this specifically (since we'd need to submit a new script to test this feature), I don't see an option to retroactively enable this as part of a script revision or a script metadata after it's already approved, this might be an oversight

On the same line, maybe it would be nice to provide script devs with some examples of how data can be set and retrieved from there - while I assume "TribalWars.scriptData" will create a key to whatever json object we provide based on our script name, we need more clarity.
 
It seems as if this feature (scriptdata) goes against the original plan of the library

I thought one of the goals of the libaray was to make configuring scripts easier for new players (and non technical players) by requiring a settings screen.
As far as I understand the user must enter the JSON themself and the script can't modify it. Writing json is not user friendly in my opinion.

Also how does it work if a user runs 2 scripts at the same time where each one uses script data? My guess is that the data of the 2nd script overrides the data from the first one.
So for every script that uses Scriptdata the first thing it should do is a clone of the data, because you can't rely on it being there without getting modified.


What is nice about this feature is that this means settings are now stored in the quickbar and if a player switches browser or world they can keep their settings (as far as I understand)

My proposal for something like scriptdata would be that the script should be able to modify it easily And that the data is only injected into the local variable space of the script and not the global one (this can be done by adding a preload script that runs inside the generated try { } catch block while also wrapping the try { } catch in a (function() {.....})() block

The really nice version of this feature would be that the Scripters who want to use script data must also provide a JSON Schema definition for their data. The game will then automatically build input boxes for the user based on this JSON Schema (in that case modification of that data by the script might not be necessary). The only problem I can see with this idea is that the configuration options might depend on the word settings (e.g. a fake script only needs to be configured for the units that are actually available on that world.
 
Last edited:
How do we get scripts marked as approved if they were set to 'TemporarilyBroken'? I got a new revision approved but the script is still not useable in the script library
 
On the same line, maybe it would be nice to provide script devs with some examples of how data can be set and retrieved from there - while I assume "TribalWars.scriptData" will create a key to whatever json object we provide based on our script name, we need more clarity.

I added information on this topic - ScriptData
 
can ge get a purge the last week of beta 1 and disable the "no attack" rule? :D

nearly no one is willing to fight sadly
its impossible to test fighting scripts like that
 
I have been nobled on on Beta 1 today without giving any player consent. The first round of attacks including nukes and trains took 3 of 6 villages and now my remaining 3 are being taken . So I no longer have a platform to test the script library. I did not build full troops in my villages. But I was active and responded immediately to the player after nobles were sent on the first three.

I sent a ticket 12 hours ago when this occurred.

The player did not email igm me prior to sending attacks and did nothing to correct the situation when I advised them it was not allowed. As player attacks are not allowed without permission, it would not even be allowed for me to try to retake my own villages without their consent.

Now they are nobling the remainder of my account.

I'm not happy.
 
that sucks
well it would have been better to start this map in "sandbox" mode like on german servers

you can attack people below and above 20% of your own points

thern u can actually test all scripts - PVE and PVP

and you cant get decent and fair fights since its only 20% of your own points attackrange
 
I added information on this topic - ScriptData
Hi,
Thanks for the option with TribalWars.scriptData.
The check of the field 'User data (JSON)' is very strict.
{ "target": "500|500", "troops": { "axe": 7000, "light": 3000, "ram": 240 }} is good but
{ 'target': '500|500', 'troops': { 'axe': 7000, 'light': 3000, 'ram': 240 }} gives because of the simple quotation mark an error 'User data must be valid JSON.'
Can this still be changed, please?
 
Back
Top