ryleyra
Registered:1399599588 Posts: 3,214
Posted 1728245630
Reply with quote
#1
I looked into the new SecretMeeting scenario script, but since I didn't play the actual script itself, this post is more about how the scripting system works, and the LegendaryMissions script as well. First of all, a "scenario script" isn't really a script. It's more a folder full of scripts. But for now, I think the existing terminology seems to work okay. I might be willing to discuss thoughts on the subject, but I'm just being pedantic. I will use "scenario" below to refer to a set of missions on the same script and "mission" to refer to those individual missions. So, I noticed that most of SecretMeeting was just cut and pasted. It has the same two icons on the scenario button and displays the same name and description in the header. I immediately wanted to change this, just to see how easy it was. From what Xavier Wise told me, I went to the file missions/SecretMeeting/description.txt and confirmed that the file is referring to the icons in the file graphics/grid-icon-sheet.png. These icons are number sequentially starting with 0. So, the top icon is a Private's chevron, and the bottom icon is indeed an acorn, as I guessed. ("Big things grow from little acorns", I guess) The scenario name (with a space between Legendary and Missions, I hadn't noticed that originally) and some sort of category identifier are in the two lines above. All of the above were copied from LegendaryMissions and not edited. So, I went ahead and changed it to this: Unique Secret meeting 116 #F0D56E 119 #9da36c This keeps the "Private" difficulty rank for the top icon but changes the bottom one to the one with a masked bandit. Pretty cool if I do say so myself. I'll explain the first line below. I then went looking for the scenario header and the mission list. This took a lot more work, but I eventually found the files required and put together an approach to modifying them for any new scenario script. This is what I came up with: Scenario description, order, and icons are found in the file missions/<mission>/description.txt Scenario script header is found in the file missions/<mission?/consoles/server_console.mast Import your mission script files into the file missions/<mission>/maps/__init__.mast Add any files needed for additional assets such as other ships in the same file Remove the default missions or copy them into your mission folder (if you want to use them) Create your mission file (could be called "mission_map.mast") with the following heading: @map/<missiontolower> "<mission name>" " <your mission description> " <additional lines> Note no closing quote This is the quickest and easiest approach I could think of to "bash" LegendaryMissions into a new scenario script of your own. I went ahead and made these modifications to SecretMeeting so if you want me to post my changes here let me know. I figured the author of SecretMeeting might prefer to use his own words instead. Now, clearly the author of SecretMeeting figured out how to edit the __init__.mast script and insert his own mission script. However, he did not delete the old LegendaryMissions scripts from his directory, he just copied them over. So, I would suggest deleting the copied mission files since they are no longer imported in __init__.mast. I said that I would give an explanation of the first line of the description.txt file as well. In short, this line, whatever is entered, will be used as an alphabetical placeholder to sort the list of scenario scripts. The reason I used "Unique" is because it is alphabetically after "Standard" which is the contents of this line in LegendaryMissions. Originally, SecretMission appeared after LegendaryMissions because ties in sort order appear to be sorted in order of the folders in the missions directory. But I wanted to make sure this single unique mission appeared after all "Standard" mission scripts. So, I chose a word starting with "U". I imagine that we will want to decide upon a list of scenario categories that we as script writers want to use, such as "Standard", "Timed", "PvP', "Short", and so on, but we'll probably also want to consider how that will cause them to be sorted. I think "Unique" fits well for scenarios that only have a single mission, it would put them at the end of the list. "Standard" is pretty far down alphabetically for a mission type that should be near the head of the list. I like the top icon being the difficulty of the scenario's missions. Each mission can have its own selectable difficulty, of course, but "Easy" missions would be those which don't need a lot of effort or experience, while "Ultra Hard" would be those that will either take an extremely long time or require full crews that are experienced operating as a team. There can be either three or four difficulty levels depending on if you want to use the "Private First Class" symbol as a "Master Sergeant" symbol instead. I'll also note that adding additional ships to the script is not the same thing as adding new player ships to the server selection screen. As I noted elsewhere, this doesn't seem to be working perfectly at this time, but I did figure out how it is done. In fact, "LegendaryMissions" explicitly adds a new ship to the roster, called "Legendary", which appears to be the original Artemis from Artemis 1.3+ and 2.0. This ship is already in the roster, as "Light Cruiser", using a modified version of the original mesh and texture map (the white and grey version) but I assume this was meant to allow that ship to be used only with the Legendary Missions. Or maybe it was the original 1.0 Artemis, since the model is listed only as "artemis" and there is no file with that name I don't know. Additional ships are added with the missions/<mission>/extraShipData.json file, and in fact this file should be removed from the SecretMission scenario. It is broken anyway, and likely to be changed or deleted in the next release. There are also two files, extra_grid_data.json and extra_grid_data.json.bak, which can be removed as well, but they won't be used without the extraShipData file. They certainly don't need to be copied over to a new script. It's important to note that there is nothing to edit in the script directory that changes the server customization based on the mission selected. There is apparently the ability to add a control in a mission, as Border War adds a second timer, but I haven't looked into this. For the most part, though, the server setup must be the same for all missions in the scenario. Likewise, except for the ability to add player ships as shown above, there does not seem to be any way to select which player ships are available. You may choose which ship is default (I forget where this is, but it was one of the first things I found) but you will get everything that can be loaded as a player ship in shipData.json. In the previous version I downloaded I noticed that some ships seemed to be intended to be playable, and could be added with some edits, but I'm not sure I want to try to fix them until the ability to skip certain ships is added. (And maybe even change the selection order) At any rate, the reason the Battle Cruiser is first in LegendaryMissions is because it is selected by default. The Light Cruiser is actually the first ship in the file and is placed last in LegendaryMissions, after its custom ship. This applies to SecretMeeting as well, and another default may be better to select instead. (Although if you select for instance the Heavy Cruiser you will have to skip all the way to the end of the list to get to the Battle Cruiser)