[MOD][WIP] My Little Pony; Faster-than-light travel is Magic

Discuss and distribute tools and methods for modding. Moderator - Grognak
User avatar
R4V3-0N
Posts: 1291
Joined: Sun Oct 06, 2013 11:44 am

Re: [MOD][WIP] My Little Pony; Faster-than-light travel is M

Postby R4V3-0N » Mon May 19, 2014 3:38 am

infrequentLurker wrote:I know this is likely to sound really dumb - I am not a modder - but I'm going to say it anyway. Would it be possible to create new systems that mimic the function of a system in every detail and take the same space as it, but can (as technically a different system) have its own settings?

As an example, the Flak Cannon and Advanced Flak Cannon for essentially equivalent items, the Medbay and Clone Bay for systems that share a space.

You could then make special ship specific versions of systems that take the same space as the default and cannot be bought, but could hypothetically be replaced at a store.

Example, an energy efficient shield system that provides a shield for every bar of power, but is very expensive to upgrade and weak to ion damage, so a normal shield system might still seem a good idea. It would be a completely seperate system, and would occupy the same space as normal shields so you could only have one or the other, sim ilar to the medbay vs clone bay


A more on topic example would be NewAgeOfPower's shields. Would it be possible to make a system called Light Shields, costs 125 in the stores, works like shields, etc. but has a cap of 6 upgrade levels, and make that system the default on lighter ships, and leave it possible to buy regular shields (which would replace Light Shields and inheret their upgrades, same as Clone Bays) and otherwise leave those alone?



nope, for weapons sure, it's easy, systems are hard coded....
R4V3-0N, a dreamer.
infrequentLurker
Posts: 3
Joined: Sun May 18, 2014 7:51 pm

Re: [MOD][WIP] My Little Pony; Faster-than-light travel is M

Postby infrequentLurker » Thu May 22, 2014 7:35 am

So, trying to be clear here, did a little research on the code. While new functioning systems do seem to not be viable from what I can see, I am not so sure that -new- systems that mimic the functions of existing ones can't be made. Here I REALLY wish there was a spoiler tag, because this might get a little long.

The shield system, copied out from the data, reads like this:

Code: Select all

<systemBlueprint name="shields">
   <type>shields</type>
   <title>Shields</title>
   <desc>Powers your shields. Each additional barrier can block one shot.</desc>
   <startPower>2</startPower>
   <maxPower>8</maxPower>
   <rarity>1</rarity>
   <upgradeCost>
      <level>100</level> <!-- level 2 -->
      <level>20</level> <!-- level 3 -->
      <level>30</level> <!-- level 4 -->
      <level>40</level> <!-- level 5 -->
      <level>60</level> <!-- level 6 -->
      <level>80</level> <!-- level 7 -->
      <level>100</level> <!-- level 8 -->
      <level>120</level> <!-- Imaginary level 9 -->
   </upgradeCost>
   <cost>125</cost>
</systemBlueprint>


The extremely relevant bit here is the <type> part of the code. That, unless I am very mistaken, isn't located in the data file (at least not the bit I looked through) and is how the game interprets what a given system does when installed on the ship. If that is a correct assumption (I would PM someone to ask, but apparently can't? Instead, this post.) then it should be possible to do something to the effect of this:

Code: Select all

<systemBlueprint name="lightshields">
   <type>shields</type>
   <title>Light Shields</title>
   <desc>Powers your shields. Each additional barrier can block one shot. Can't handle as much power as a heavier design could.</desc>
   <startPower>2</startPower>
   <maxPower>6</maxPower>
   <rarity>1</rarity>
   <upgradeCost>
      <level>100</level> <!-- level 2 -->
      <level>20</level> <!-- level 3 -->
      <level>30</level> <!-- level 4 -->
      <level>40</level> <!-- level 5 -->
      <level>60</level> <!-- level 6 -->
      <level>80</level> <!-- Imaginary level 7 -->
   </upgradeCost>
   <cost>125</cost>
</systemBlueprint>


With that second code, you would have a second, completely separate system that acts EXACTLY LIKE a shields system, but can only be upgraded to 6 bars (much like NewAgeOfPower was talking about) yet it can carry its own upgrade costs, store costs, store rarity, etc. independent of the Shields system.

As far as sorting out where they go on a given ship, the best I can really see would be to copy the Clone Bay model, or at least attempt to. Using the Kestrel's systems layout as a reference, I see this system layout:

Code: Select all

   <systemList>
      <pilot power="1" room="0" start="true" img="room_pilot">
         <slot>
            <direction>right</direction>
            <number>0</number>
         </slot>
      </pilot>
      <doors power="1" room="2" start="true" img="room_doors">
         <slot>
            <direction>up</direction>
            <number>1</number>
         </slot>
      </doors>
      <sensors power="1" room="3" start="true" img="room_sensors">
         <slot>
            <direction>down</direction>
            <number>1</number>
         </slot>
      </sensors>   
      <medbay power="1" room="4" start="true" img="room_medbay">  <!-- F????-->
         <slot>
            <number>1</number>
         </slot>
      </clonebay>
      <clonebay power="1" room="4" start="false"> <!-- T????-->
         <slot>
            <number>1</number>
         </slot>
      </clonebay>
      <oxygen power="1"  room="13" start="true" img="room_oxygen"/>
      <shields power="2" room="5" start="true" img="room_shields"/>
      <engines power="2" room="14" start="true" img="room_engines"/>
      <weapons power="3" room="10" start="true" img="room_weapons"/>
      <drones power="2" room="1" start="false"/>  <!-- F-->
      <teleporter power="1" room="15"   start="false"/>  <!-- F-->
      <cloaking power="1" room="8" start="false" />  <!-- F-->
      <battery power="1" room="11" start="false" img="room_battery"/>    <!-- F-->
      <mind power="1" room="7" start="false" img="room_mind"/>  <!-- F-->
      <hacking power="1" room="12" start="false" img="room_hacking"> <!-- F-->
         <slot>
            <direction>down</direction>
            <number>0</number>
         </slot>
      </hacking>
   </systemList>


Unfortunately, some parts of this have me a bit more stumped on my glance-over. Still, if I were to try to add the Light Shields system in to this, it would look a bit like this:

Code: Select all

<lightshields power="2" room="5" start="false" img="room_shields"/>


The part I can't quite get is the <!-- F????--> and <!-- T????--> tags, as well as the <slot><number>1</number> </slot> bit located on both the Medbay and Clonebay entry. I can't shake the feeling that those are important, perhaps even critical, to how that works. Similarly, both the Medbay and Clonebay end with a </clonebay> end tag, which may also be related to their interchangeable design.

Still, that's about the best I can really hope to derive from this after a few hours nosing around out of curiosity. Many apologies if I am wasting time (and pagespace. Gosh these get long fast....) pushing a subject that everyone else already knows the hard limits on.

and it is only now that i actually start looking around the forum and notice the dedicated Questions thread that is RIGHT THERE just a few posts away from the one I started asking questions in and derailing like a jerk :oops:
Llamageddon
Posts: 11
Joined: Mon May 19, 2014 1:33 am

Re: [MOD][WIP] My Little Pony; Faster-than-light travel is M

Postby Llamageddon » Thu May 22, 2014 11:03 am

Unless FTL uses something different than XML, that's how you mark comments(parts that are ignored by the parser) in XML, HTML, XHTML, etc.

And different systems of the same type would absolutely rock, I'd totally love alternate shields systems, like fortress-class that have like up to 8 bars, but regen slowly, or light class, that is much more expensive to upgrade, has up to 3, but regens fast, and perhaps an even lighter class, that regens constantly, even right after being hit, and half-negates Ion damage.

I imagine you could probably do some alternate versions of engines and cloaking as well.
English Narwhal
Posts: 402
Joined: Tue Dec 03, 2013 9:12 pm

Re: [MOD][WIP] My Little Pony; Faster-than-light travel is M

Postby English Narwhal » Thu May 22, 2014 12:42 pm

New systems CANNOT be added. End of story.
Llamageddon wrote:Unless FTL uses something different than XML, that's how you mark comments(parts that are ignored by the parser) in XML, HTML, XHTML, etc.

And different systems of the same type would absolutely rock, I'd totally love alternate shields systems, like fortress-class that have like up to 8 bars, but regen slowly, or light class, that is much more expensive to upgrade, has up to 3, but regens fast, and perhaps an even lighter class, that regens constantly, even right after being hit, and half-negates Ion damage.

I imagine you could probably do some alternate versions of engines and cloaking as well.

It's in XML.
Again, new systems aren't possible- or regen.
Image
zealous98
Posts: 1
Joined: Sun Mar 29, 2015 1:01 pm

Re: [MOD][WIP] My Little Pony; Faster-than-light travel is M

Postby zealous98 » Sun Mar 29, 2015 1:03 pm

Hey, I did something like this a long time ago for sillies.

https://www.youtube.com/watch?v=LpF8QOAZeZ4

... No, it wasn't something I took very seriously.