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

Discuss and distribute tools and methods for modding. Moderator - Grognak
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 16, 2017 4:20 am

mr_easy_money wrote:
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, https://subsetgames.com/forum/viewtopic ... 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. ;)



Alright so I believe I have made a basic start event text in notepad++. What do I save it as and where as I cant find anywhere that seems suitable. I cant even find the vanilla events to modify at all. I honestly hope your not too bothered by probably repeat questions I'm just having a hard time trying to figure this out.
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 16, 2017 6:38 pm

CarreraCT wrote:Alright so I believe I have made a basic start event text in notepad++. What do I save it as

save it as "events.xml.append", making sure the extension changed and not just the file name

Image

if you're on windows but can't see the file extensions, on the newer versions of windows there's a view tab at the top with an option to see them. there's some other way to do it in control panel or something, search online for that

Image
CarreraCT wrote:and where as I cant find anywhere that seems suitable.

place that file inside a folder called data. add that "mod-appendix" folder with a changed metadata.xml file to give it a custom description in Slipstream

Image

then finally send the folder(s) to a compressed zipped folder. once that's done you'll have a ".zip" which you can rename to a ".ftl" file, and then place in the "mods" folder of Slipstream. that should do it :)

Image

CarreraCT wrote:I cant even find the vanilla events to modify at all.

(by modify, I hope you mean take parts of them and change them, then make xml.append files to overwrite those parts)
go into Slipstream and select File → Extract Dats...

Image

it should bring up a dialog with the following header,

Image

then it should be straightforward, extract the dats into a folder, then go to that folder to see the extracted files.

I hope the pictures cleared up the confusion? :mrgreen:
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 16, 2017 9:35 pm

I'm sorry to keep on messaging you but I still cannot do it right. I have tried for almost an hour now trying to get the text to work but I've come to the conclusion that I've done it all wrong again. I have gotten it zipped up into a .ftl file and the event is a event.xml.append file in the same fashion as your screenshots have shown (Which yes they helped significantly with understanding as I'm more of a visual learner) but I have to be doing something wrong with the actual editing as its the only thing that I'm not fully confident in. Ive tried two ways to modify the startbeacon text, 1. I copied the code you sent two messages ago in your response
<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>

which I have tried editing its own custom file and 2. Taking a copy of the actual game data and modifying that directing as its own .append. Neither have worked. I'm starting to get rather upset at myself for not figuring this all out already with the amount of help you've given me, but sadly I still haven't gotten to it. Thanks for your help so far though
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 » Sun Sep 17, 2017 5:10 am

first off, do you see a blue choice at the start beacon? if that's true, then the mod is loading correctly, just that something is off about what you're trying to do (below). if it isn't true, post a download link to the ftl file here and I'll see if there are any errors with it.

CarreraCT wrote:Ive tried two ways to modify the startbeacon text

oh :oops: therein lies the problem. the text that's displayed when you start up the game on the first beacon consists of the text from the START_GAME event (in events.xml) and a tip from the TIPS_LIST_PC textList (in newEvents.xml). the text in the START_BEACON event is overwritten so that text should be ignored.

in events.xml.append,

Code: Select all

<event name="START_GAME">
   <text>Testing testing 123... Data you're carrying is vital to the survival of the Federation. Rebels' pursuing ya, be careful, but be sure to take as much time as you can to upgrade your ship's offenses and defenses. You're our last hope. Captain Tully out!</text>
</event>

<event name="START_BEACON">
   <text>Ignore this text it isn't used...</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>

I replaced the tip in newEvents.xml.append just to show it's possible. optional and should only be done if you don't want to see a random tip on the start beacon.

Code: Select all

<textList name="TIPS_LIST_PC">
   <text>Tip: This is a tip, you are reading... a tip. This tip isn't very helpful, but it's a tip! Or is it...</text>
</textList>

result:

Image
CarreraCT wrote:I'm starting to get rather upset at myself for not figuring this all out already with the amount of help you've given me, but sadly I still haven't gotten to it.

I'll take the blame for that, I must've missed something when explaining.. :roll:
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 » Sun Sep 17, 2017 10:18 pm

That's the problem. I still cant get it to load at all. Ive tried to edit the start_game now and still no luck regardless how I do it or install it. I simply cant understand why I keep failing to get this to work. Perhaps I should try a new way to look at this. Perhaps you can program the texts instead. I can at least make ship designs and I will try to make new weapons but for events you seem to be able to work this much easier then me. Would you be willing to help me with the events as a partnership?
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 :)
meklozz
Posts: 350
Joined: Wed Sep 23, 2015 9:11 am

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

Postby meklozz » Sun Sep 17, 2017 11:05 pm

CarreraCT wrote:I'm sorry to keep on messaging you but I still cannot do it right. I have tried for almost an hour now trying to get the text to work but I've come to the conclusion that I've done it all wrong again. I have gotten it zipped up into a .ftl file and the event is a event.xml.append file in the same fashion as your screenshots have shown (Which yes they helped significantly with understanding as I'm more of a visual learner) but I have to be doing something wrong with the actual editing as its the only thing that I'm not fully confident in. Ive tried two ways to modify the startbeacon text, 1. I copied the code you sent two messages ago in your response
<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>

which I have tried editing its own custom file and 2. Taking a copy of the actual game data and modifying that directing as its own .append. Neither have worked. I'm starting to get rather upset at myself for not figuring this all out already with the amount of help you've given me, but sadly I still haven't gotten to it. Thanks for your help so far though

This is functional except for the fact that you wrote event.xml.append, not events.xml.append - details like this will stop your stuff from working. It also needs to be in a folder named data, mr_easy_money probably covered it (structure goes like file.ftl/data/events.xml.append).
User avatar
stylesrj
Posts: 3644
Joined: Tue Jul 08, 2014 7:54 am

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

Postby stylesrj » Mon Sep 18, 2017 9:17 pm

When it comes to modding sound files, I noticed a thing called "Count"

Does that mean how long the sound plays for, or does it mean you need to reach that number of instances of that sound to hit full volume?
Because I think I may have made a horrible mistake with one of my sound files with a "count" of 17... because it was a 17-second long file...
WhiteWeasel
Posts: 248
Joined: Sun Apr 13, 2014 4:36 am

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

Postby WhiteWeasel » Wed Sep 20, 2017 11:41 pm

When playing around with a Chain Beam, I can't quite get the glow you get for each charge like you do with the vulcan to work. EDIT: I've Manage to resolve it, the Boot animation must be at the top. An easy thing to forget if it's not fresh in your mind.

Code: Select all

<animSheet name="beam_resonant" w="297" h="75" fw="33" fh="75">weapons/beam_resonant.png</animSheet>
<weaponAnim name="beam_resonant">
   <sheet>beam_resonant</sheet>
   <desc length="9" x="0" y="0"/>
   <chargedFrame>1</chargedFrame>
   <fireFrame>2</fireFrame>
   <firePoint  x="19" y="40"/>
   <mountPoint x="4" y="62"/>
   <boost>beam_resonant_charge</boost>
   <chargeImage>weapons/beam_resonant_glow.png</chargeImage>
beam_resonant_charge
</weaponAnim>

<animSheet name="beam_resonant_charge" w="132" h="75" fw="33" fh="75">weapons/beam_resonant_chain_glow.png</animSheet>
<anim name="beam_resonant_charge">
   <sheet>beam_resonant_charge</sheet>
   <desc length="4" x="0" y="0"/>
   <time>1.0</time>
</anim>
Image
User avatar
Arfy
Posts: 206
Joined: Mon Apr 11, 2016 4:14 am

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

Postby Arfy » Thu Sep 21, 2017 5:07 am

WhiteWeasel wrote:When playing around with a Chain Beam, I can't quite get the glow you get for each charge like you do with the vulcan to work. EDIT: I've Manage to resolve it, the Boot animation must be at the top. An easy thing to forget if it's not fresh in your mind.


Heh, there appears to be a unneeded line in the weaponAnim, "beam_resonant_charge" underneath the charge image line.

(And I also made a chainbeam and chainbeam vulcan myself, not significant in anyway but -- eh, something to bring up :P)
Discord: ATLAS#9226
User avatar
RAD-82
Posts: 796
Joined: Sat Nov 09, 2013 12:16 am

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

Postby RAD-82 » Mon Oct 09, 2017 5:13 am

Some questions from a person who doesn't want to install Java, so they can't test these things themselves.

1. Can the base damage of a weapon be a non-integer?
I know damage boosts on chain weapons can be non-integer.
I'm looking to make a weapon with 2.5 damage and boost it .1 damage for 15 shots. (Or maybe 2.4 damage, boosting .2 damage 8 times.)

2. How many artillery systems (or weapon mounts) can be put on a ship?
The Rebel flagship uses 4 (8), but I'm looking to use 5 (9) on my ship.

3. When using multiple artillery systems, which one gets upgraded: the first one or the last one in the shipBlueprint?
Is this the same system that doesn't require Zoltans for you to manipulate the power on it?
I should probably look at the Radithor code for research, but I don't feel like downloading it right now.
Image
Junkyard has FTL mods, mostly ships and a few other things.