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

Discuss and distribute tools and methods for modding. Moderator - Grognak
User avatar
Gencool
Posts: 409
Joined: Sun Jun 16, 2013 1:21 pm

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

Postby Gencool » Tue Sep 29, 2015 11:57 am

FearTheBlaziken wrote:Also Is it possible to make a Charge Flak?

stylesrj wrote:Yes it's possible. The Arwing by Gencool sort of does that with the Twin Lasers. Shoots like Flak, can hold charges and it cools down quicker with each shot.



Not the best example; charges and boosts (cooldown or damage) don't play too well with each other.
To make the Laser Cannon work, I had to modify the weapon ui elements (they both have counters that overlap), and the weapon animation has to be fire directly after charging or it won't shoot.
For compatibility, it's best to stick with just one; either a boost or charge.

Also, Flak weapons don't work perfectly with charge;
Say you charge 3 vollys of 2 projectiles. The first volley works as normal, firing 2 projectiles at once, but the second and third volleys fire each projectile one at a time.
The stream, then, looks kind of like this;

[Ship> = - - - -

You can see this bug at work on the Arwing with any of the laser upgrades.


Featherwings' weapon attribute table is a very useful resource for this sort of stuff.
ImageImageImage
- Gencool (aka Puppetsquid) -- I make weird stuff
Captain Markus
Posts: 18
Joined: Fri Sep 18, 2015 2:05 pm

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

Postby Captain Markus » Sat Oct 03, 2015 8:54 pm

Hello dear comunity, do you know how to edit stores in the game?

I create a new drone mod for my game, with set rarity 1, according to this i must see this drone in stores often times, but its anyway very rare...
any tips?
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 Oct 19, 2015 10:18 pm

Can fire suppression systems stack?
Would fires be taken out faster?

Yes I am aware they're coded to not be stackable so what happens if the tag was changed and you got a second one or something.
User avatar
Biohazard063
Posts: 412
Joined: Fri Feb 14, 2014 4:38 pm

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

Postby Biohazard063 » Sat Oct 31, 2015 1:17 pm

How does one properly edit the game starting beacon?
I've been going through some mods of which I know that do that. But it just confuses me a bit. :?
It seems like I need to alter the START_GAME event, but also noticed that something needs to be done with the sector_data.xml.
I've managed to change the text that shows up at the starting beacon (with the code given below) but the event doesn't continue properly, which I know can be done (again, I've seen it been done before.)
It just gives me the first line of text but rather then giving me the option I've written, it just says continue. Clicking it ends the event.
Anyway, here's what I want for a starting beacon :

Code: Select all

<event name="START_GAME">
   <text>You are a scrap ship constructed by the rebels and designed to recover usable parts from decommissioned ships or those destroyed in battle and scrap whatever is beyond salvaging. You're next objective has just come in.</text>
   <choice hidden="true">
      <text>Open the encrypted file</text>
      <event>
         <text>"Scrapper S-158B : Proceed to the designated beacon. Carry out protocol A-1 : Scan, recuperate, scrap, deliver. Additional information : Area location of recent rebel-lanius skirmish. Size : minor. Hazard : None. End of message. </text>
         <choice hidden="true">
            <text>Continue...</text>
            <quest event="SCRAP_BEACON" />
         </choice>
      </event>
   </choice>
</event>
Amateur modder and Let's player (with a substantial FTL and ItB LP featuring countless mods).
Channel link
A list of all my mods can be found here.
User avatar
kartoFlane
Posts: 1488
Joined: Mon Jan 14, 2013 10:20 pm

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

Postby kartoFlane » Sat Oct 31, 2015 1:22 pm

From Universal Starting Beacon:
The problem with the START_GAME and START_BEACON is that the START_GAME event does nothing but replace the first beacon's <text> tag with its own. Its <choices> or <events> have no effect whatsoever.
START_BEACON, on the other hand, is triggered at the start of the game like you'd expect, but is also triggered every time the player enters a civillian sector. Initially, it just has its <text> replaced by the one in START_GAME.
Superluminal2 - a ship editor for FTL
User avatar
Biohazard063
Posts: 412
Joined: Fri Feb 14, 2014 4:38 pm

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

Postby Biohazard063 » Tue Nov 03, 2015 4:48 pm

Alright, been messing around a bit more with the entire starting event scenario.
So far, I've managed to make it say the correct line at the start beacon and show the correct option I want it to give.
But things get weird after that...
Rather then loading the event I want it to, it seems to just pick a random event and loads that instead.
Anyway, here's what I got in the code so far. (I reversed engineered this from the gencool's tardis mod.)
Event.xml.append :

Code: Select all

<mod:findName type="event" name="START_BEACON">
  <mod-append:choice hidden="true" req="SCRAP_COLLECTOR">
    <text>Open the encrypted file</text>
      <event load="INITIAL_START_BEACON_SCRAPPER"/>
  </mod-append:choice>
</mod:findName>

<mod:findName type="event" name="START_GAME_BEACON">
  <mod-append:choice hidden="true" req="SCRAP_COLLECTOR">
    <text>Open the encrypted file</text>
    <event load="INITIAL_START_BEACON_SCRAPPER"/>
  </mod-append:choice>
</mod:findName>

<event name="START_GAME">
   <text>You are a scrap ship constructed by the rebels and designed to recover usable parts from decommissioned ships or those destroyed in battle and scrap whatever is beyond salvaging. You're next objective has just come in.</text>
</event>

<event name="INITIAL_START_BEACON_SCRAPPER">
   <text>"Scrapper S-158B : Proceed to the designated beacon. Carry out protocol A-1 : Scan, recuperate, scrap, deliver. Additional information : Area location of recent rebel-lanius skirmish. Size : minor. Hazard : None. End of message. </text>
   <choice hidden="true">
      <text>Continue...</text>
      <quest event="SCRAP_BEACON" />         
   </choice>
</event>

Sector_data.xml.append :

Code: Select all

<mod:findName type="sectorType" name="CIVILIAN">
       <mod:findLike type="sector">
         <mod:selector>CIVILIAN_SECTOR</mod:selector>
         <mod:removeTag />
      </mod:findLike>
</mod:findName>

So basically, it won't load the INITIAL_START_BEACON_SCRAPPER event, but goes with a random event instead.
Amateur modder and Let's player (with a substantial FTL and ItB LP featuring countless mods).
Channel link
A list of all my mods can be found here.
meklozz
Posts: 350
Joined: Wed Sep 23, 2015 9:11 am

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

Postby meklozz » Tue Nov 03, 2015 6:20 pm

It looks fine and works for me. Are you sure your INITIAL_START_BEACON_SCRAPPER event structure is good? That's usually what triggers the random event call for me.

@edit2

Wait a moment, I totally didn't scroll down and missed that you also included the event. Let me look through this

And is removing civilian sectors part of the mod? That shouldn't have much to do with the starting beacon?

@edit

And are you sure you're running it with the USB on?

@edit3

Yes, the structure was the problem. You need to put the quest event in an another event tag, not a choice tag. Sorry for the messy post.
User avatar
Biohazard063
Posts: 412
Joined: Fri Feb 14, 2014 4:38 pm

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

Postby Biohazard063 » Tue Nov 03, 2015 7:31 pm

meklozz wrote:Snip

Well, as I said, I reversed engineered this from an existing mod who had this.
I also had a look at the Universal starting beacon and it had something about sector_data as well, so I thought it was a necessary bit...

In either case, it's working now with the pointers you gave me and I get the quest marker.
Now the game crashes when I reach it, but I'm pretty sure I can figure this one out on my own.

Thanks for the help, much appreciated.

Also, now I don't even need USB, so I guess that's a win in my books.
Amateur modder and Let's player (with a substantial FTL and ItB LP featuring countless mods).
Channel link
A list of all my mods can be found here.
meklozz
Posts: 350
Joined: Wed Sep 23, 2015 9:11 am

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

Postby meklozz » Tue Nov 03, 2015 7:44 pm

Biohazard063 wrote:
I also had a look at the Universal starting beacon and it had something about sector_data as well, so I thought it was a necessary bit...

Also, now I don't even need USB, so I guess that's a win in my books.


Right. But you're deleting a whole sector.

You could use something like this:

sector_data.xml.append:

Code: Select all

<mod:findName type="sectorDescription" name="STANDARD_SPACE">
    <mod:findLike type="startEvent">
      <mod:selector>START_BEACON</mod:selector>
      <mod:setValue>START_BEACON_BIOHAZARD</mod:setValue>
   </mod:findLike>
</mod:findName>


events.xml.append (look at the bottom of the post, this one is kinda bad):

Code: Select all

<event name="START_BEACON_BIOHAZARD">
  <mod-append:choice hidden="true" req="engines">
    <text>Open the encrypted file</text>
      <event load="INITIAL_START_BEACON_SCRAPPER"/>
  </mod-append:choice>
</event>

<mod:findName type="event" name="START_GAME_BEACON">
  <mod-append:choice hidden="true" req="engines">
    <text>Open the encrypted file</text>
    <event load="INITIAL_START_BEACON_SCRAPPER"/>
  </mod-append:choice>
</mod:findName>

<event name="START_GAME">
   <text>You are a scrap ship constructed by the rebels and designed to recover usable parts from decommissioned ships or those destroyed in battle and scrap whatever is beyond salvaging. You're next objective has just come in.</text>
</event>

<event name="INITIAL_START_BEACON_SCRAPPER">
   <text>"Scrapper S-158B : Proceed to the designated beacon. Carry out protocol A-1 : Scan, recuperate, scrap, deliver. Additional information : Area location of recent rebel-lanius skirmish. Size : minor. Hazard : None. End of message. </text>
   <choice hidden="true">
      <text>Continue...</text>
      <event><text>eevent</text><quest event="ENGI_SEX" /> </event>       
   </choice>
</event>


That way, you're basically checking for whether the user has the original starting beacon, and if so, changing it to yours. If they have someone else's (mod's) beacon changed, it won't work (but it wouldn't anyway), and your mod will stop any other that changes start_beacon from working, but that compatibility is gone anyway if you're not using USB. It will still work with USB.

Another solution I like even more, but would like kartoFlane to look through first, is just adding USB to your mod:

sector_data.xml.append:

Code: Select all

<!-- This sets the framework in motion. Don't change this. -->
<mod:findName type="sectorDescription" name="STANDARD_SPACE">
    <mod-overwrite:startEvent>START_GAME_EVENT</mod-overwrite:startEvent>
</mod:findName>


events.xml.append (USB part):

Code: Select all

<event name="START_GAME_EVENT">
   <text>Talk about the importance of your mission and Rebels chasing you goes here.</text>
   <choice>
      <text>Continue...</text>
      <event load="START_GAME_BEACON" />
   </choice>
</event>
<event name="START_GAME_BEACON">
   <text>You are about to set out on your journey.</text>
    <choice>
        <text>Continue...</text>
        <event load="START_GAME_CHOICES" />
    </choice>
</event>
<event name="START_GAME_CHOICES">
   <text>You have arrived at the beacon, and your FTL drive is ready to make the jump.</text>
</event>

<event name="START_GAME_EVENT">
   <text>Talk about the importance of your mission and Rebels chasing you goes here.</text>
   <choice>
      <text>Continue...</text>
      <event load="START_GAME_BEACON" />
   </choice>
</event>
<event name="START_GAME_BEACON">
   <text>You are about to set out on your journey.</text>
    <choice>
        <text>Continue...</text>
        <event load="START_GAME_CHOICES" />
    </choice>
</event>
<event name="START_GAME_CHOICES">
   <text>You have arrived at the beacon, and your FTL drive is ready to make the jump.</text>
</event>

<mod:findName type="event" name="START_GAME_EVENT" reverse="false" start="1">
   <mod:removeTag/>
</mod:findName>
<mod:findName type="event" name="START_GAME_BEACON" reverse="false" start="1">
   <mod:removeTag/>
</mod:findName>
<mod:findName type="event" name="START_GAME_CHOICES" reverse="false" start="1">
   <mod:removeTag/>
</mod:findName>

The last 9 lines (with the start advanced tag) should take care of normal repeated USB compatibility issues. The reason for the first part of USB being there twice is just backwards compatibility to slipstream below 1.5 or 4, one can be deleted.


events.xml.append continued (your mod):

Code: Select all

<mod:findName type="event" name="START_GAME_BEACON">
  <mod-append:choice hidden="true" req="engines">
    <text>Open the encrypted file</text>
    <event load="INITIAL_START_BEACON_SCRAPPER"/>
  </mod-append:choice>
</mod:findName>

<event name="START_GAME">
   <text>You are a scrap ship constructed by the rebels and designed to recover usable parts from decommissioned ships or those destroyed in battle and scrap whatever is beyond salvaging. You're next objective has just come in.</text>
</event>

<event name="INITIAL_START_BEACON_SCRAPPER">
   <text>"Scrapper S-158B : Proceed to the designated beacon. Carry out protocol A-1 : Scan, recuperate, scrap, deliver. Additional information : Area location of recent rebel-lanius skirmish. Size : minor. Hazard : None. End of message. </text>
   <choice hidden="true">
      <text>Continue...</text>
      <event><text>eevent</text><quest event="ENGI_SEX" /> </event>       
   </choice>
</event>


@edit

Actually, I wrote it all too fast. If you use the second solution you should also make your event's texts appropriately formated to USB (as described in the original thread), with all the event swaping etc. You should probably do it anyway if you want it to work with the mod properly. The stuff I wrote will not work right unless you adjust it, just use it as a... template or whatever.

@@edit

If you were to use START_GAME_CHOICES rather than START_GAME_BEACON, it would work without swapping the USB stuff and wouldn't break other USB compatible mods.

And if you were to use the first method, this:

Code: Select all

<event name="START_BEACON_BIOHAZARD">
  <mod-append:choice hidden="true" req="engines">
    <text>Open the encrypted file</text>
      <event load="INITIAL_START_BEACON_SCRAPPER"/>
  </mod-append:choice>
</event>

<mod:findName type="event" name="START_GAME_BEACON">
  <mod-append:choice hidden="true" req="engines">
    <text>Open the encrypted file</text>
    <event load="INITIAL_START_BEACON_SCRAPPER"/>
  </mod-append:choice>
</mod:findName>

<event name="START_GAME">
   <text>You are a scrap ship constructed by the rebels and designed to recover usable parts from decommissioned ships or those destroyed in battle and scrap whatever is beyond salvaging. You're next objective has just come in.</text>
</event>

<event name="INITIAL_START_BEACON_SCRAPPER">
   <text>"Scrapper S-158B : Proceed to the designated beacon. Carry out protocol A-1 : Scan, recuperate, scrap, deliver. Additional information : Area location of recent rebel-lanius skirmish. Size : minor. Hazard : None. End of message. </text>
   <choice hidden="true">
      <text>Continue...</text>
      <event><text>eevent</text><quest event="ENGI_SEX" /> </event>       
   </choice>
</event>


should look more like:

Code: Select all



<event name="START_BEACON_BIOHAZARD">
  <choice hidden="true" req="engines">
    <text>Open the encrypted file</text>
      <event load="INITIAL_START_BEACON_SCRAPPER"/>
  </choice>
</event>

<mod:findName type="event" name="START_GAME_BEACON">
  <mod-append:choice hidden="true" req="engines">
    <text>Open the encrypted file</text>
    <event load="INITIAL_START_BEACON_SCRAPPER"/>
  </mod-append:choice>
</mod:findName>

<event name="START_GAME">
   <text>You are a scrap ship constructed by the rebels and designed to recover usable parts from decommissioned ships or those destroyed in battle and scrap whatever is beyond salvaging. You're next objective has just come in.</text>
</event>

<event name="INITIAL_START_BEACON_SCRAPPER">
   <text>"Scrapper S-158B : Proceed to the designated beacon. Carry out protocol A-1 : Scan, recuperate, scrap, deliver. Additional information : Area location of recent rebel-lanius skirmish. Size : minor. Hazard : None. End of message. </text>
   <choice hidden="true">
      <text>Continue...</text>
      <event><text>eevent</text><quest event="ENGI_SEX" /> </event>       
   </choice>
</event>


I really hope I'm not just confusing you more. Really sorry if I am.
Last edited by meklozz on Tue Nov 03, 2015 8:48 pm, edited 1 time in total.
User avatar
Biohazard063
Posts: 412
Joined: Fri Feb 14, 2014 4:38 pm

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

Postby Biohazard063 » Tue Nov 03, 2015 8:18 pm

meklozz wrote:Snip

I believe I did end up going with something similar to that, but thought it didn't work as it loaded the random event. Of which we now know was due to sloppy parsing.
In any case, now that the event is solid, I will look into making it cleaner and compatible. Considering I personally play with CE whenever I get the option to, compatibility is something I always try to strive to.
Hence I also rather not wish for people to have to download USB, but rather incorporate it into the mod I'm making.
As I've said, now that I know that the events themselves work, time to trim off the fat, and work on compatibility.
Thanks again !
Amateur modder and Let's player (with a substantial FTL and ItB LP featuring countless mods).
Channel link
A list of all my mods can be found here.