Questions here: an inquiry thread! [Updated Sep 15th, 2014]

Discuss and distribute tools and methods for modding. Moderator - Grognak
User avatar
mr_easy_money
Posts: 625
Joined: Fri May 29, 2015 9:05 pm

Re: Questions here: an inquiry thread! [Updated Sep 15th, 2014]

Postby mr_easy_money » Thu Aug 24, 2017 1:49 pm

PR0T05T33L wrote:And now the console glow images won't stay where I put them in Superluminal and the floor image has shifted randomly. Did I do something wrong? I've tried changing the console image to a different image entirely and it changed back to the original image in the same weird place. I've tried making the changes and adding a room, 'cause I thought that would help, but the only change that stayed was the new room. Am I missing something?

EDIT: I've changed the room image and the console glow is still off, but at the very least, it's only two pixels off to the side as opposed to being halfway across the room. I'd really like to fix this up completely though.

take a look inside the rooms.xml.append file inside the 'data' folder and make sure there are only at max 4 roomLayout tags per ship layout.

I don't know if that was relevant to you since you're only changing one ship it seems, but for multiple ships, you want superluminal to 'include mod files from' the previous version of the ship mod. if you change the rooms and then shift the glows before saving the ship with the previous version files, it won't delete the room glows from the previous versions (probably because it has no way of marking which ship they refer to).

I don't know why this makes the console glows screwy, flipped around even though you saved them right, but if you clean up that 'rooms.xml.append' file, it fixes that problem, and the glows won't look weird for your ship or pack of ships :roll:
Gaiajack
Posts: 1
Joined: Tue Sep 05, 2017 6:35 pm

Re: Questions here: an inquiry thread! [Updated Sep 15th, 2014]

Postby Gaiajack » Tue Sep 05, 2017 6:38 pm

I'd like to run some statistical analysis on the game files, to answer questions like "Which gives better scrap on average, Green or Red sectors?" and "Should you really avoid all non-ship beacons if you have Long-Range scanners?". I've started writing my own python code to do this, but has anyone already created tools that would assist in this endeavor?
User avatar
CarreraCT
Posts: 10
Joined: Wed Sep 06, 2017 1:04 am

Re: Questions here: an inquiry thread! [Updated Sep 15th, 2014]

Postby CarreraCT » Sat Sep 09, 2017 12:43 pm

Hello,
I'm new to posting with community so I apologize in advance if I'm posting in the wrong forum.

I have played FTL for a long time now and I enjoy the mods people come out with. I found this while searching for more mods and saved the mods forum in my tabs to return and check to see if anything new was around. Now I'm interested in personal modding and I have spent quite a few hours searching through the forums looking for modding tools like ftldat and superluminal. Unfortunately I'm getting quite a few issues with even the basic points. Once I finish creating a player ship, I send it to Slipstream, install and test it out. However, all ships, including the defaults when my mod is installed, get various amounts of yellow and black checkered patterns over it. (I suspect a visual bug as when the room is empty with no sensors, the pattern isn't there.) Next, I've tried adding enemy ships but they do not show up. After a few minutes I realized they needed an event in which to show up in. So I searched on here for a bit and found CaptianShooby's FTL Modding Tutorial. This also wasn't helping as the very first download (FTLdat) I cant even get the computer to run since it is files. (I don't know how to run files honestly). I also cant find anyway to make events and after briefly reviewing CaptianShooby's tutorial again I only came out confused.

So my question would be these:

1. How do you fix the yellow and black checked pattern?

2. How do you run files like NSH Files and GITIGNORE Files?

3. Is there anything easier to understand on how to add events to sectors?


Thanks for anyone's help and sorry about the really long post.

Cheers.
Scilencerz Constantly develop their technology with the help of many games, one of their biggest belong to FTL ships even outpacing Pixel Starships' ships and Galaxy on Fire's Ships with its mass of weapons and systems. Keep on modding :)
User avatar
mr_easy_money
Posts: 625
Joined: Fri May 29, 2015 9:05 pm

Re: Questions here: an inquiry thread! [Updated Sep 15th, 2014]

Postby mr_easy_money » Sat Sep 09, 2017 10:27 pm

CarreraCT wrote:Hello,
I'm new to posting with community so I apologize in advance if I'm posting in the wrong forum.

Hello! This is the modding questions thread so you're in the right place. :)
CarreraCT wrote:Once I finish creating a player ship, I send it to Slipstream, install and test it out. However, all ships, including the defaults when my mod is installed, get various amounts of yellow and black checkered patterns over it.
...
1. How do you fix the yellow and black checked pattern?

There is an answer to this on the Superluminal FAQ
Q: When I try to play my ship in-game, it has black-yellow checkered images on it!
This happens when you've installed mods with SMM while the editor was running, and then saved the ship. The solution is to either not do that, or use File > Reload Database as soon as you return to the editor.
Update: Since beta10, the editor will reload the database automatically when it detects that you've modified the game's archives.

CarreraCT wrote:Next, I've tried adding enemy ships but they do not show up. After a few minutes I realized they needed an event in which to show up in. So I searched on here for a bit and found CaptianShooby's FTL Modding Tutorial. This also wasn't helping as the very first download (FTLdat) I cant even get the computer to run since it is files. (I don't know how to run files honestly). I also cant find anyway to make events and after briefly reviewing CaptianShooby's tutorial again I only came out confused.

Therein lies the problem. CaptainShooby's tutorial, while maybe good as a guideline for tracing how sector_data.xml works with the events files, is outdated. Nobody uses ftldat anymore because Slipstream Mod Manager is better in every way.

CarreraCT wrote:3. Is there anything easier to understand on how to add events to sectors?

first and foremost, open readme_modders.txt in the folder you run Slipstream from. The first two sections, "Creating an .ftl File" and "The Append Extension" will get you up to speed on some modding basics.

Unfortunately, most of the modding guides having to do with event structure are outdated. Finding the vanilla files and just looking at those to trace how sector_data.xml works with events.xml and so on can be more helpful than deciphering them, though I will say that some of the older guides can give you pointers on how to read the xml stuff, for example this, https://ftlwiki.com/wiki/Events_file_structure

using a text editor like notepad++ or vim can help to give colors and folding on xml files rather than using the default notepad which imo is just impossible to look at.

(for getting the vanilla files, useful for seeing how sector_data file, events files, and autoBlueprints files are interconnected)
go to slipstream and click patch once it opens to restore it to vanilla, then go to File -> Extract Dats... This'll extract the dat files into a collection of files, xml (and txt) data files for data.dat, and various resource files for resource.dat.

Try looking through CaptainShooby's tutorial again, only paying attention to steps 2) and 3).

(for just adding an event with a ship to the start beacon for testing purposes)
pop this in events.xml.append

Code: Select all

<event name="START_BEACON">
   <text>Welcome to a new sector! Get to the exit beacon and jump to the next sector before the pursuing Rebels catch you!</text>
   <choice>
      <text>Testing an event...</text>
      <event load="MY_CUSTOM_SHIP_EVENT" />
   </choice>
</event>
<event name="MY_CUSTOM_SHIP_EVENT">
   <text>Uh oh, an enemy ship! Battle Stations!</text>
   <ship load="HELLO_SHIP" hostile="true">
</event>
<ship name="HELLO_SHIP" auto_blueprint="NAME_OF_SHIP_IN_AUTO_BLUEPRINTS">
   <destroyed load="DESTROYED_DEFAULT"/>
   <deadCrew load="DEAD_CREW_DEFAULT"/>
</ship>

think that should work...

sorry, I got distracted, uh, I hope that helps, and if there is still confusion I'll answer your questions with a fresh look later... :roll:
User avatar
Jimli_
Posts: 84
Joined: Sat Feb 20, 2016 1:16 am

Re: Questions here: an inquiry thread! [Updated Sep 15th, 2014]

Postby Jimli_ » Sun Sep 10, 2017 3:42 am

Hey there, don't know much about event modding and I followed what you just said but the event I whipped up here doesn't seem to be loading in game.

Code: Select all

<event name="START_BEACON">
   <text>Welcome to a new sector! Get to the exit beacon and jump to the next sector before the pursuing Rebels catch you!</text>
   <choice>
      <text>First, let's recruit another crew member.</text>
      <event load="J_CUSTOM_CREW" />
   </choice>
</event>
<event name="J_CUSTOM_CREW">
   <text>Before leaving the station, you're given the oppurtunity to choose a skilled addition to your crew. You have a few options.</text>
   <choice>
      <text>The ace pilot.</text>
      <crewMember amount="1"/>
   </choice>
   <choice>
      <text>The Engi mechanic.</text>
      <crewMember amount="1"/>
   </choice>
   <choice>
      <text>The Rock mercenary</text>
      <crewMember amount="1"/>
   </choice>
</event>


I know I haven't specified the race of the crew member, but shouldn't this event still load and give random crew members? It's just not changing anything, no event at the starting beacon.
ImageImageImage
User avatar
mr_easy_money
Posts: 625
Joined: Fri May 29, 2015 9:05 pm

Re: Questions here: an inquiry thread! [Updated Sep 15th, 2014]

Postby mr_easy_money » Sun Sep 10, 2017 5:57 am

Jimli_ wrote:Hey there, don't know much about event modding and I followed what you just said but the event I whipped up here doesn't seem to be loading in game.

Code: Select all

<event name="START_BEACON">
   <text>Welcome to a new sector! Get to the exit beacon and jump to the next sector before the pursuing Rebels catch you!</text>
   <choice>
      <text>First, let's recruit another crew member.</text>
      <event load="J_CUSTOM_CREW" />
   </choice>
</event>
<event name="J_CUSTOM_CREW">
   <text>Before leaving the station, you're given the oppurtunity to choose a skilled addition to your crew. You have a few options.</text>
   <choice>
      <text>The ace pilot.</text>
      <crewMember amount="1"/>
   </choice>
   <choice>
      <text>The Engi mechanic.</text>
      <crewMember amount="1"/>
   </choice>
   <choice>
      <text>The Rock mercenary</text>
      <crewMember amount="1"/>
   </choice>
</event>


I know I haven't specified the race of the crew member, but shouldn't this event still load and give random crew members? It's just not changing anything, no event at the starting beacon.

the problem lies with the "choice" element having only two possible sub-elements, "text" and "event". in this case you need the "event" element to house the "crewMember" element, like so.
I added other details to the "crewMember" elements to account for their descriptions before realizing the last part of what you wrote... uh.. :roll: Engi mechanic is rather vague considering Engi's are mechanics...

Code: Select all

<event name="J_CUSTOM_CREW">
   <text>Before leaving the station, you're given the oppurtunity to choose a skilled addition to your crew. You have a few options.</text>
   <choice>
      <text>The ace pilot.</text>
      <event>
         <crewMember pilot="2" amount="1"/>
      </event>
   </choice>
   <choice>
      <text>The Engi mechanic.</text>
      <event>
         <crewMember class="engi" repair="1" amount="1"/>
      </event>
   </choice>
   <choice>
      <text>The Rock mercenary</text>
      <event>
         <crewMember class="rock" amount="1"/>
      </event>
   </choice>
</event>

In general, looking at the vanilla files can help you determine what tags/elements go where, as can files of other mods, and that events file structure wiki page might provide some clues.

additionally, I advise using FTL Error Checker, viewtopic.php?f=12&t=17034, to check for problems, though it does think some things are wrong when they aren't, like having a weapon refer to a blueprintList or removing more than one crewmember at a time.

I hope that cleared up the confusion? ;)
User avatar
Jimli_
Posts: 84
Joined: Sat Feb 20, 2016 1:16 am

Re: Questions here: an inquiry thread! [Updated Sep 15th, 2014]

Postby Jimli_ » Sun Sep 10, 2017 1:06 pm

Thanks, that was a big help.
ImageImageImage
User avatar
mr_easy_money
Posts: 625
Joined: Fri May 29, 2015 9:05 pm

Re: Questions here: an inquiry thread! [Updated Sep 15th, 2014]

Postby mr_easy_money » Sun Sep 10, 2017 6:48 pm

Jimli_ wrote:Thanks, that was a big help.

I realized I forgot one detail about "event" elements. usually, all events should have a "text" sub-element, which is missing from the event I made within the choice that gives you a crew member.

Code: Select all

<choice>
   <text>The ace pilot.</text>
   <event>
      <crewMember pilot="2" amount="1"/>
   </event>
</choice>

In this case it isn't really necessary because there aren't any choices or a ship fight to follow the event, though a text element might be helpful to better introduce the new crew members, but if you don't want to because you can see the crew you're hiring it's not a big deal, and vanilla does this in some places.
However without the text element, anything afterwards will be skipped, which can lead to a big problem if it's left out when a ship is introduced because it will skip right to the ship fight, no prompt that it's hostile. Now that I think about it, that's probably how slow's No Time to Lose mod works.
User avatar
CarreraCT
Posts: 10
Joined: Wed Sep 06, 2017 1:04 am

Re: Questions here: an inquiry thread! [Updated Sep 15th, 2014]

Postby CarreraCT » Tue Sep 12, 2017 12:47 am

mr_easy_money wrote:
CarreraCT wrote:Hello,
I'm new to posting with community so I apologize in advance if I'm posting in the wrong forum.

Hello! This is the modding questions thread so you're in the right place. :)
CarreraCT wrote:Once I finish creating a player ship, I send it to Slipstream, install and test it out. However, all ships, including the defaults when my mod is installed, get various amounts of yellow and black checkered patterns over it.
...
1. How do you fix the yellow and black checked pattern?

There is an answer to this on the Superluminal FAQ
Q: When I try to play my ship in-game, it has black-yellow checkered images on it!
This happens when you've installed mods with SMM while the editor was running, and then saved the ship. The solution is to either not do that, or use File > Reload Database as soon as you return to the editor.
Update: Since beta10, the editor will reload the database automatically when it detects that you've modified the game's archives.

CarreraCT wrote:Next, I've tried adding enemy ships but they do not show up. After a few minutes I realized they needed an event in which to show up in. So I searched on here for a bit and found CaptianShooby's FTL Modding Tutorial. This also wasn't helping as the very first download (FTLdat) I cant even get the computer to run since it is files. (I don't know how to run files honestly). I also cant find anyway to make events and after briefly reviewing CaptianShooby's tutorial again I only came out confused.

Therein lies the problem. CaptainShooby's tutorial, while maybe good as a guideline for tracing how sector_data.xml works with the events files, is outdated. Nobody uses ftldat anymore because Slipstream Mod Manager is better in every way.

CarreraCT wrote:3. Is there anything easier to understand on how to add events to sectors?

first and foremost, open readme_modders.txt in the folder you run Slipstream from. The first two sections, "Creating an .ftl File" and "The Append Extension" will get you up to speed on some modding basics.

Unfortunately, most of the modding guides having to do with event structure are outdated. Finding the vanilla files and just looking at those to trace how sector_data.xml works with events.xml and so on can be more helpful than deciphering them, though I will say that some of the older guides can give you pointers on how to read the xml stuff, for example this, https://ftlwiki.com/wiki/Events_file_structure

using a text editor like notepad++ or vim can help to give colors and folding on xml files rather than using the default notepad which imo is just impossible to look at.

(for getting the vanilla files, useful for seeing how sector_data file, events files, and autoBlueprints files are interconnected)
go to slipstream and click patch once it opens to restore it to vanilla, then go to File -> Extract Dats... This'll extract the dat files into a collection of files, xml (and txt) data files for data.dat, and various resource files for resource.dat.

Try looking through CaptainShooby's tutorial again, only paying attention to steps 2) and 3).

(for just adding an event with a ship to the start beacon for testing purposes)
pop this in events.xml.append

Code: Select all

<event name="START_BEACON">
   <text>Welcome to a new sector! Get to the exit beacon and jump to the next sector before the pursuing Rebels catch you!</text>
   <choice>
      <text>Testing an event...</text>
      <event load="MY_CUSTOM_SHIP_EVENT" />
   </choice>
</event>
<event name="MY_CUSTOM_SHIP_EVENT">
   <text>Uh oh, an enemy ship! Battle Stations!</text>
   <ship load="HELLO_SHIP" hostile="true">
</event>
<ship name="HELLO_SHIP" auto_blueprint="NAME_OF_SHIP_IN_AUTO_BLUEPRINTS">
   <destroyed load="DESTROYED_DEFAULT"/>
   <deadCrew load="DEAD_CREW_DEFAULT"/>
</ship>

think that should work...

sorry, I got distracted, uh, I hope that helps, and if there is still confusion I'll answer your questions with a fresh look later... :roll:



Hello again,
I wanted to thank you for explaining all my questions I had. Unfortunately I'm slow witted and still remain confused. I took a look on slipstream for the modder section but I don't quite understand what its talking about.

Second I have no idea where to exactly find these events.xml.append as well as any other files to modify besides the ships, img, and sounds. Which reminds me what if forgot to mention.

How to create and add custom sounds and images. I'm sure the image is standard with events now that I think about it however.

Anyways feel free to respond to which ever at any rate.
Thanks again for your help!
Scilencerz Constantly develop their technology with the help of many games, one of their biggest belong to FTL ships even outpacing Pixel Starships' ships and Galaxy on Fire's Ships with its mass of weapons and systems. Keep on modding :)
User avatar
mr_easy_money
Posts: 625
Joined: Fri May 29, 2015 9:05 pm

Re: Questions here: an inquiry thread! [Updated Sep 15th, 2014]

Postby mr_easy_money » Tue Sep 12, 2017 3:09 am

CarreraCT wrote:Hello again,

hello! :)
CarreraCT wrote:I took a look on slipstream for the modder section but I don't quite understand what its talking about.

I guess I'll go over it here then.

Where does modding come from?
The two files in that "resources" folder of wherever FTL is installed contain everything that modding consists of. I said how to extract these two files in my previous reply, which should have resulted in getting the following folders,
from data.dat:
  • data
all the files inside the data folder are text-type files mods will either replace or add onto.

from resource.dat:
  • audio
  • fonts
  • img
all the files inside these folders are what you'd expect them to be: fonts can only be changed, audio in the audio folder can be changed or other sounds can be added (the better approach), and images can be added into some of the img folder's sub-folders, but not all. the other sub-folders have files that can only be changed.

What does slipstream do?
Slipstream opens up these two files, data.dat, and then uses files inside mods to replace existing (vanilla) files, add onto existing files, or add new files. Then slipstream puts all the stuff in and repacks these two files, which are crucial to FTL.

What are mods made of?
Mods come in the form of .ftl files. These .ftl files are just renamed .zip files (compressed zipped folders), which can have all the folders inside that result from extracting the data.dat and resource.dat files, along with a mod-appendix folder (see below). extracting one of the example mods that comes with Slipstream, Beginning Scrap Advantage, gives us a folder with the following sub-folders.
  • data
inside this folder we have an "events.xml.append" file, with the following code inside. all this event does is let you get a reward on the start event.

Code: Select all

<event name="START_GAME">
   <text>The data you carry is vital to the remaining Federation fleet. You'll need supplies for the journey, so make sure to explore each sector before moving on to the next. But get to the exit before the pursuing Rebel fleet can catch up!</text>
</event>

<event name="START_BEACON">
   <text>Welcome to a new sector! Get to the exit beacon and jump to the next sector before the pursuing Rebels catch you!</text>
   <choice hidden="true">
      <text>Continue...</text>
      <event/>
   </choice>
   <choice req="engines" lvl="1" hidden="true">
      <text>(Mod) Strip a near-by asteroid for scrap.</text>
      <event>
         <text>You take a shuttle and grab as much metal as you can.</text>
         <autoReward level="HIGH">scrap_only</autoReward>
      </event>
   </choice>
</event>

notice that this file has an .append extension at the end of the file name. if an .append extension was not used, this mod would replace the entire contents of the existing events.xml file, which is problematic because that file contains event information which is used in other files. if you're just going to add events or replace some existing events, use the .append extension.
this goes for other data files where you're just going to add some stuff, not replace all of a file's contents. as an example, you can see this when you saved the enemy ship in superluminal, you get an "autoBlueprints.xml.append" file in the mod's "data" folder, so that it doesn't replace that entire file, just adds something into it.

note that you can override vanilla events and other existing tags by simply repeating that tag again. in this case, the event "START_BEACON" is overridden so that a choice for free scrap is there. (note that there is a way to add stuff to existing events without replacing them, promoting compatibility with other mods, under the "Advanced XML" section in that modders readme, but I'll only go over it if you want)

  • mod-appendix
inside this folder we have a "metadata.xml" file. this file is just for the description you see when you select a mod in Slipstream. helpful, but does not change FTL whatsoever.

CarreraCT wrote:Second I have no idea where to exactly find these events.xml.append as well as any other files to modify besides the ships, img, and sounds.

the "events.xml.append" file is a file you as the modder create. you can create a .txt file, and then rename it to match both the name and extension/file-type.
CarreraCT wrote:Which reminds me what if forgot to mention ... How to create and add custom sounds and images. I'm sure the image is standard with events now that I think about it however.

if you're wondering how to create custom sounds and images for weapons, see this guide, viewtopic.php?f=12&t=17122

if you're wondering how to add custom background images and planets, look in the vanilla folders (the extracted data.dat and resource.dat files) at the "events_imageList.xml" file in the "data" folder and compare it with the images in the "stars" folder in the "img" folder. events and text tags in the events files reference the imageLists in this "events_imageList.xml" file to load them in the game. I'm not entirely certain if you can switch to another image after loading one into an event, but it might be possible.

I hope that cleared up the confusion, but as always, if you have any questions, please ask away. ;)