Map Editor: Script Export/Import

Avatar
  • Views 7642
  • עדכן
  • Completed - Resolved

I have a map that has a lot of scripts/variables in it and I want to use these scripts/variables again in other maps.  Would it be possible to add a script import/export feature so we can move scripts between maps as well as share scripts with other creators?

Game Version:
Steam Public
Platform:
Windows
Avatar
anonymous
  • Accepted
Avatar
anonymous

The code team will review and make a call on this

Avatar
anonymous
  • Declined
Avatar
anonymous
  • Accepted
Avatar
[Dev] Nanorock

I have a workaround but it got limitations. 

I can provide a debug console copy/import functionality. (Debug console allow me to bypass the UI as it's a real time sink)

However the import of mightyscript would override any current setup, meaning it would need to be done as first thing on a map. 

Merging two mighty script would be a real challenge, and I'm on limited time ^^'

Avatar
[Dev] Nanorock
  • Started
Avatar
[Dev] Nanorock
  • Completed - Next Patch
Avatar
[Dev] Nanorock

So I added 

CopyMightyScript command, which copy the current MS state into it's own pastebin, with an optional file path argument, if it exists will try to save MS into the file

ImportMightyScript command, it will use a file path if provided, otherwise the pastebin. This will nuke the current MS /!\ and replace it with the copied one. Obviously any world reference will be all over the place. Invalid ones will be removed but overlapping IDs will remain, but invalid. (Like I copied a script, it was waiting KO on a unit, I imported it in another map, and the KO ended up listening to an impenetrable wall :D)

So you still can share scripts, it's just not as nice as on the workshop ^^'

Avatar
journeywithin

Awesome!  Thank you so much!

Avatar
anonymous
  • Completed - Resolved