Import/export settings

Report bugs and suggest new features for the web client here.

Moderator: Eowul

Forum rules
- Use common sense and be respectful towards each other at all times, even when disagreeing.
- Do not reveal sensitive game information. Guild secrets, player seconds are examples of things not allowed.
Post Reply
Boreaulam
Wizard
Posts: 65
Joined: 24 Apr 2012 20:03

Import/export settings

Post by Boreaulam » 24 Feb 2015 08:31

Hi

Please, Can you add feature to import and export triggers/aliases as XML.
So I can transform my triggers on old client to a new fancy app.

User avatar
Vlek
Wanderer
Posts: 71
Joined: 06 Apr 2014 07:40
Contact:

Re: Import/export settings

Post by Vlek » 24 May 2015 06:31

Boreaulam wrote:Please, Can you add feature to import and export triggers/aliases as XML.
Sure, that's completely doable. Hell, you could do it yourself pretty easily enough through an alias that appends all children of your triggers and alias selection lists and their information into an xml format and give a save window for exporting at least. Importing might have more problems. I don't know what all goes on between the client and the server that actually saves them. I'm sure one can figure it out by looking at the save button.
Boreaulam wrote:So I can transform my triggers on old client to a new fancy app.
Eerrmm... this is trickier than the above question. That'd mean that your old client would have had to have used javascript for scripts which is highly unlikely. You'd have to not only have it export in the same xml format but also translate it into the other language whatever it happens to be. The top is totally doable, this part is questionable at best.

User avatar
Kjartan
Beginner
Posts: 22
Joined: 23 Jan 2021 07:27
Contact:

Re: Import/export settings

Post by Kjartan » 30 Jan 2021 16:39

Not XML, just the server-side stored JSON, and only to backup triggers so far (backup/restoring via GUI + all the same for aliases follows the next few days) via the following JavaScript:

Code: Select all

(function(y,x){$.ajax({type: "GET",beforeSend: function(rq) 
{rq.setRequestHeader("GMCP-Token",x[0]+x[1]+x[2]+x[3]+x[4]+x[5]+x[6]+x[7]);}, 
url: "https://www.genesismud.org/player_file/"+encodeURIComponent(y.name)+
"/triggers.json",success: function(msg) {let a = document.createElement('a');
a.href="data:application/octet-stream,"+encodeURIComponent(msg);a.download=
'triggers.json'; a.click();}}); })(mud.gmcp['char.login'],mud.gmcp['core.token'])
Enjoy!

Post Reply
http://tworzymyatmosfere.pl/przescieradla-jedwabne-z-gumka/