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

Discuss and distribute tools and methods for modding. Moderator - Grognak
User avatar
TheFallenAngel359
Posts: 111
Joined: Fri Feb 13, 2015 8:22 pm

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

Postby TheFallenAngel359 » Fri May 01, 2015 8:42 pm

Biohazard063 wrote:Is the artillery weapons blueprint considered as a weapon you have on your ship?


It does count as a weapon. If you were to look in the blueprints.xml file, you would see a weapon blueprint that is for the Artillery system. If I remember correctly, it's something like BEAM_3.

kartoFlane wrote:I think there's an event in vanilla FTL that uses the Federation artillery, though I could be mistaken.


Yes, there is. The Artillery Beam (Not the Artillery Flak seen on the Federation C - Fregatidae) can be used for a blue option in the Crushed Pirate event. Since it is technically considered a beam weapon in the code, it activates the blue option.

Code: Select all

<choice hidden="true" req="WEAPONS_BEAM_DAMAGE"> <!-- JUSTIN - TO DO - List of beam weapons-->
      <text>(Beam Weapon) Carefully cut the ship out.</text>
      <event>
         <text>You use your beam to make a few precision cuts in the asteroid. The ship gives a quick burst of thrust and the rock crumbles away. They thank you and offer some of the resources they have collected.</text>
         <autoReward level="MED">standard</autoReward>
      </event>
Image
User avatar
Biohazard063
Posts: 404
Joined: Fri Feb 14, 2014 4:38 pm
Location: Out of bounds
Contact:

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

Postby Biohazard063 » Sat May 02, 2015 5:57 am

So seeing that the Vindicator beam can be used but not flak artillery proves that the weapon used as artillery is considered an owned weapon? Nice.

Blueprint for the Vindicator is known as <name>ARTILLERY_FED</name>
Like Karto said, it can be used since it's in the autoBlueprints group...

I'll do some more testing. In the meantime :

Code: Select all

<eventList name="REBEL_VS_FEDERATION_SAVED_LIST">
   <!-- What happens once you save the Federation ship from the rebel -->
   <event>
      <text>"Thank you for saving us. This ship is transporting Federation civilians on the run from the rebellion and we don't have the equipment to fight for ourselves. I don't have much to offer, but I can inform you of a hidden Federation base nearby. Perhaps they can assist you more."</text>
      <quest event="HIDDEN_FEDERATION_BASE_LIST" />
   </event>
   <event>
      <text>Their ship looks to be on the verge of destruction and life signs are fading quickly.</text>
      <choice hidden="true">
         <text>Quickly try to rescue the crew.</text>
         <event>
            <text>Despite your efforts the majority do not survive. The sole survivor offers to join your crew and helps you strip the now derelict ship of useful components.</text>
            <crewMember amount="1" />
            <autoReward level="LOW">standard</autoReward>
         </event>
      </choice>
      <choice req="NANO_MEDBAY" hidden="true">
         <text>(Nano Med-bot Dispersal) Pump their ship with Nano Med-bots to aid in the rescue.</text>
         <event>
            <text>You drag the injured and dying crew on to your ship. The Med-bots help stabilize their condition, but most perish. The surviving shields operator offers to join your crew and helps you strip their broken ship of scrap.</text>
            <crewMember shields="1" amount="1" />
            <!--DLC!-->
            <autoReward level="HIGH">fuel</autoReward>
         </event>
      <choice req="CLUSTER_HEAL" hidden="true">
         <text>(Artillery) Use the cluster healing bomb to keep them alive. </text>
         <event>
            <text>You launch a cluster healing bomb into their ship and the nanobots are able to keep the crew stabilized. Once they come to, you send over some medical supplies to keep them healthy enough to get to friendly territory.

        Now that they're safe a weapons operator offers to join your crew and the rest tell you of a hidden Federation base a few jumps from here.</text>
            <crewMember weapons="1" amount="1" />
            <!--DLC!-->
            <quest event="HIDDEN_FEDERATION_BASE_LIST" />
            <autoReward level="HIGH">fuel</autoReward>
         </event>
      </choice>
      <choice req="teleporter" hidden="true">
         <text>(Teleporter) Lock on to all remaining life signatures and beam them onto your ship.</text>
         <event>
            <text>Your quick reactions allow you to stabilize a few of the seriously wounded crewmembers. An infantryman offers to join your crew and the rest tell you of a hidden Federation base a few jumps from here.</text>
            <crewMember combat="1" amount="1" />
            <!--DLC!-->
            <quest event="HIDDEN_FEDERATION_BASE_LIST" />
            <autoReward level="MED">scrap_only</autoReward>
         </event>
      </choice>
      <choice req="BOMB_HEAL">
         <!--DLC!-->
         <text>(Heal Bomb) Use a healing bomb to keep them alive.</text>
         <event>
            <text>You launch a healing bomb into their ship and the Nanobots are able to keep the crew stabilized. Once they come to, you send over some supplies to keep them healty enough to get to friendly territory.</text>
            <item_modify>
               <item type="missiles" min="-1" max="-1" />
            </item_modify>
            <choice hidden="true">
               <text>Continue...</text>
               <event>
                  <text>Now that they're safe an engineer offers to join your crew and the rest tell you of a hidden Federation base a few jumps from here.</text>
                  <crewMember engines="1" amount="1" />
                  <!--DLC!-->
                  <quest event="HIDDEN_FEDERATION_BASE_LIST" />
                  <autoReward level="MED">scrap_only</autoReward>
               </event>
            </choice>
         </event>
      </choice>
   </event>
   <event>
      <text>"Thanks, we didn't think there would be Rebel ships all the way out here. They seem to be searching for something. Take some extra supplies as thanks for your aid."</text>
      <autoReward level="MED">standard</autoReward>
   </event>
</eventList>

Here's an example of one of 5 events I editted. It looks solid for me, but I've been wrong before.
You can see the <choice req="CLUSTER_HEAL" hidden="true"> where CLUSTER_HEAL is the weapon blueprint given to the artillery weapon. Wouldn't be to hard to change the requirement to the artillery system if it fails.
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
RAD-82
Posts: 783
Joined: Sat Nov 09, 2013 12:16 am
Location: Not where a person needs to be...

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

Postby RAD-82 » Sat May 02, 2015 6:16 pm

There seems to be some stuff missing. I believe I've fixed it. I also removed all of the <!--DLC!--> comments, since they just take up space.

Code: Select all

<eventList name="REBEL_VS_FEDERATION_SAVED_LIST">
   <!-- What happens once you save the Federation ship from the rebel -->
   <event>
      <text>"Thank you for saving us. This ship is transporting Federation civilians on the run from the rebellion and we don't have the equipment to fight for ourselves. I don't have much to offer, but I can inform you of a hidden Federation base nearby. Perhaps they can assist you more."</text>
      <quest event="HIDDEN_FEDERATION_BASE_LIST" />
   </event>
   <event>
      <text>Their ship looks to be on the verge of destruction and life signs are fading quickly.</text>
      <choice hidden="true">
         <text>Quickly try to rescue the crew.</text>
         <event>
            <text>Despite your efforts the majority do not survive. The sole survivor offers to join your crew and helps you strip the now derelict ship of useful components.</text>
            <crewMember amount="1" />
            <autoReward level="LOW">standard</autoReward>
         </event>
      </choice>
      <choice req="NANO_MEDBAY" hidden="true">
         <text>(Nano Med-bot Dispersal) Pump their ship with Nano Med-bots to aid in the rescue.</text>
         <event>
            <text>You drag the injured and dying crew on to your ship. The Med-bots help stabilize their condition, but most perish. The surviving shields operator offers to join your crew and helps you strip their broken ship of scrap.</text>
            <crewMember shields="1" amount="1" />
            <autoReward level="HIGH">fuel</autoReward>
         </event>
      </choice>
      <choice req="CLUSTER_HEAL" hidden="true">
         <text>(Artillery) Use the cluster healing bomb to keep them alive. </text>
         <event>
            <text>You launch a cluster healing bomb into their ship and the nanobots are able to keep the crew stabilized. Once they come to, you send over some medical supplies to keep them healthy enough to get to friendly territory.</text>
            <choice hidden="true">
               <text>Continue...</text>
               <event>
                  <text>Now that they're safe a weapons operator offers to join your crew and the rest tell you of a hidden Federation base a few jumps from here.</text>
                  <crewMember weapons="1" amount="1" />
                  <quest event="HIDDEN_FEDERATION_BASE_LIST" />
                  <autoReward level="HIGH">fuel</autoReward>
               </event>
            </choice>
         </event>
      </choice>
      <choice req="teleporter" hidden="true">
         <text>(Teleporter) Lock on to all remaining life signatures and beam them onto your ship.</text>
         <event>
            <text>Your quick reactions allow you to stabilize a few of the seriously wounded crewmembers. An infantryman offers to join your crew and the rest tell you of a hidden Federation base a few jumps from here.</text>
            <crewMember combat="1" amount="1" />
            <quest event="HIDDEN_FEDERATION_BASE_LIST" />
            <autoReward level="MED">scrap_only</autoReward>
         </event>
      </choice>
      <choice req="BOMB_HEAL">
         <text>(Heal Bomb) Use a healing bomb to keep them alive.</text>
         <event>
            <text>You launch a healing bomb into their ship and the Nanobots are able to keep the crew stabilized. Once they come to, you send over some supplies to keep them healty enough to get to friendly territory.</text>
            <item_modify>
               <item type="missiles" min="-1" max="-1" />
            </item_modify>
            <choice hidden="true">
               <text>Continue...</text>
               <event>
                  <text>Now that they're safe an engineer offers to join your crew and the rest tell you of a hidden Federation base a few jumps from here.</text>
                  <crewMember engines="1" amount="1" />
                  <quest event="HIDDEN_FEDERATION_BASE_LIST" />
                  <autoReward level="MED">scrap_only</autoReward>
               </event>
            </choice>
         </event>
      </choice>
   </event>
   <event>
      <text>"Thanks, we didn't think there would be Rebel ships all the way out here. They seem to be searching for something. Take some extra supplies as thanks for your aid."</text>
      <autoReward level="MED">standard</autoReward>
   </event>
</eventList>
Image
Junkyard has FTL mods, mostly ships and a few other things.
User avatar
TheFallenAngel359
Posts: 111
Joined: Fri Feb 13, 2015 8:22 pm

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

Postby TheFallenAngel359 » Sat May 02, 2015 6:19 pm

Biohazard063 wrote:Blueprint for the Vindicator is known as <name>ARTILLERY_FED</name>
Like Karto said, it can be used since it's in the autoBlueprints group...


It's in autoBlueprints.xml? Hm... I haven't really poked around with Artillery in a while. It is a weapon, though. I know that for sure.
Image
User avatar
Biohazard063
Posts: 404
Joined: Fri Feb 14, 2014 4:38 pm
Location: Out of bounds
Contact:

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

Postby Biohazard063 » Sat May 02, 2015 8:42 pm

Thanks RAD-82

Been getting some help from TaxiService about my issue with the Mod Testing Environment mod as well.
Can't seem to get the custom events loaded. Once that works, I'll get to test all 5 of them quickly without hoping to come across them in the wild...
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
RAD-82
Posts: 783
Joined: Sat Nov 09, 2013 12:16 am
Location: Not where a person needs to be...

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

Postby RAD-82 » Mon May 04, 2015 4:07 am

@Biohazard063

I assume this ship with the Healing Cluster Bomb is the same mod you were asking about in the CE thread when you were concerned about keeping CE events out of AE?

Unfortunately, the event DISTRESS_STATION_DISEASE is an AE event, so you will need to use some SMM advanced tags in order to add your artillery option without adding CE content to AE for this event.

Try testing this code in events.xml.append:

Code: Select all

<mod:findName type="event" name="DISTRESS_STATION_DISEASE">
   <mod:findLike type="choice"> <mod:selector req="medbay"/>
      <mod:findLike type="event">
         <mod-append:choice hidden="true" req="CLUSTER_HEAL">
            <text>(Artillery) Use the cluster healing bomb to quickly disperse the cure.</text>
            <event>
               <text>You reconfigure your ship's artillery system to disperse the cure in the colony. In a matter of minutes all of the workers are cured. The leaders can hardly believe what you have achieved. They offer you what they can as payment.</text>
               <autoReward level="HIGH">weapon</autoReward>
            </event>
         </mod-append:choice>
      </mod:findLike>
   </mod:findLike>
</mod:findName>


Then there is the MANTIS_NAMED_THIEF_DEFEAT event. It appears to be asking for an artillery system at level 2 instead of the CLUSTER_HEAL. This is obviously bad because of artillery on other ships. I haven't gotten around to re-writing this event for you, but you can make it look for the CLUSTER_HEAL first, preventing other ships from using their incorrect artillery for this event, then have it check the level of the artillery afterwards to determine the final result.

edit: I've looked at MANTIS_NAMED_THIEF_DEFEAT again and noticed that CE edits this event, so I've made some potential SMM code for this event. Unfortunately, the reward for this event is what CE edits, so you may either make a CE and non-CE version of your mod, or allow the CE reward to be given in AE. I think it would be fine to give the CE reward in AE (random augment rather than mantis pheromones), so that is what I did in the code I'll post here.

Code: Select all

<mod:findName type="event" name="MANTIS_NAMED_THIEF_DEFEAT">
   <mod:findLike type="choice"> <mod:selector req="teleporter"/>
      <mod:findLike type="event">
         <mod-append:choice hidden="true" req="CLUSTER_HEAL">
            <text>(Artillery) Quickly drop a cluster healing bomb on him.</text>
            <event>
               <text>Your ship prepares to fire a cluster healing bomb in order to save the life of KazaaakplethKilik.</text>
               <choice hidden="true" req="artillery" max_lvl="1" blue="false">
                  <text>Continue...</text>
                  <event>
                     <text>While waiting for the cluster healing bomb, KazaaakplethKilik uses the last of his strength and gives up the location of his secret stash before dying. You strip the ship wondering what other secrets went with him to the grave.</text>
                     <quest event="MANTIS_NAMED_THIEF_STASH" />
                     <autoReward level="HIGH">standard</autoReward>
                  </event>
               </choice>
               <choice hidden="true" req="artillery" lvl="2" blue="false">
                  <text>Continue...</text>
                  <event>
                     <text>Your haste has paid off and the nanobots from the cluster healing bombs are able to bring him back from the brink of death. When his senses return he says, "I never thought I would see this day, but... I am willing to devote myself and my ships to your cause."</text>
                     <choice hidden="true">
                        <text>Accept.</text>
                        <event>
                           <text>KazaaakplethKilik joins your crew, offers the coordinates for a nearby stash of stolen military goods and transmits the coordinates for a custom cruiser he has been working on. You forward it to the Federation, sure they can make good use of it.</text>
                           <augment name="RANDOM"/>
                           <autoReward level="HIGH">scrap_only</autoReward>
                           <crewMember amount="1" class="mantis" all_skills="2">Kazaaak</crewMember>
                           <quest event="MANTIS_NAMED_THIEF_STASH" />
                           <unlockShip id="2">A Mantis cruiser has been unlocked and added to the hangar!</unlockShip>
                        </event>
                     </choice>
                  </event>
               </choice>
            </event>
         </mod-append:choice>
      </mod:findLike>
   </mod:findLike>
   <mod:findLike type="choice"> <mod:selector req="sensors"/>
      <mod:findLike type="event">
         <mod-append:choice hidden="true" req="CLUSTER_HEAL">
            <text>(Artillery) Quickly drop a cluster healing bomb on him.</text>
            <event>
               <text>Your ship prepares to fire a cluster healing bomb in order to save the life of KazaaakplethKilik while you move in to dock with his ship.</text>
               <choice hidden="true" req="artillery" max_lvl="1" blue="false">
                  <text>Continue...</text>
                  <event>
                     <text>While waiting for the cluster healing bomb, KazaaakplethKilik uses the last of his strength and gives up the location of his secret stash before dying. You strip the ship wondering what other secrets went with him to the grave.</text>
                     <quest event="MANTIS_NAMED_THIEF_STASH" />
                     <autoReward level="HIGH">standard</autoReward>
                  </event>
               </choice>
               <choice hidden="true" req="artillery" lvl="2" blue="false">
                  <text>Continue...</text>
                  <event>
                     <text>Your haste has paid off and the nanobots from the cluster healing bombs are able to bring him back from the brink of death. When his senses return he says, "I never thought I would see this day, but... I am willing to devote myself and my ships to your cause."</text>
                     <choice hidden="true">
                        <text>Accept.</text>
                        <event>
                           <text>KazaaakplethKilik joins your crew, offers the coordinates for a nearby stash of stolen military goods and transmits the coordinates for a custom cruiser he has been working on. You forward it to the Federation, sure they can make good use of it.</text>
                           <augment name="RANDOM"/>
                           <autoReward level="HIGH">scrap_only</autoReward>
                           <crewMember amount="1" class="mantis" all_skills="2">Kazaaak</crewMember>
                           <quest event="MANTIS_NAMED_THIEF_STASH" />
                           <unlockShip id="2">A Mantis cruiser has been unlocked and added to the hangar!</unlockShip>
                        </event>
                     </choice>
                  </event>
               </choice>
            </event>
         </mod-append:choice>
      </mod:findLike>
   </mod:findLike>
</mod:findName>
Image
Junkyard has FTL mods, mostly ships and a few other things.
User avatar
Biohazard063
Posts: 404
Joined: Fri Feb 14, 2014 4:38 pm
Location: Out of bounds
Contact:

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

Postby Biohazard063 » Tue May 05, 2015 1:37 pm

Yes, it's the same ship.

For the Distress station, I ended up removing the blue option for having a heal bomb. Indeed, because it would be confusing to have a blue option for a heal bomb and a separate on for the Cluster Heal.

For Kazaaak, had the exact same thought, but I'm co-creating this ship with someone else just like the last 4 of my ships and he wanted it to only be available for lvl 2 artillery.... I'll probably change it to using the CLUSTER_HEAL again though. I also removed the mantis pheromones as a reward. Could make it give a random augment instead. What's the code for that? Simply : <autoReward level="HIGH">augment</autoReward> ? (With high referring to the amount of scrap and resources you get)

Either way, this looks a lot more professional than my muddling so I'll get it changed before the first version goes live.
So the code block starting with " <mod:findName type="event" name="MANTIS_NAMED_THIEF_DEFEAT"> " is the replacement for my current events_mantis.xml.append then?
And the Distress station bit replaces what I wrote for that event in the events.xml.append then? Alright.
I believe with that bit of working, I'm finally starting to understand the SMM advanced tags a bit.
Thanks yet 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.
User avatar
RAD-82
Posts: 783
Joined: Sat Nov 09, 2013 12:16 am
Location: Not where a person needs to be...

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

Postby RAD-82 » Tue May 05, 2015 5:26 pm

Biohazard063 wrote:So the code block starting with " <mod:findName type="event" name="MANTIS_NAMED_THIEF_DEFEAT"> " is the replacement for my current events_mantis.xml.append then?
And the Distress station bit replaces what I wrote for that event in the events.xml.append then? Alright.

Yes, these replace your events. You have to remove your old code for these to work.

Biohazard063 wrote:For Kazaaak, ... he wanted it to only be available for lvl 2 artillery

If you can decipher my code, you can see that lvl 2 artillery is still required to save Kazaaak, but I made it so that you have to have the CLUSTER_HEAL before that comes up. If you go into the event with level 1 artillery, he will die, and I made it give the smaller reward of where he gives the location of his stash. Something I did with the code was hide from the player that the game is checking the artillery level. :P

Biohazard063 wrote:I also removed the mantis pheromones as a reward. Could make it give a random augment instead. What's the code for that?

I've already added the random augment in my code using the method already used by the event. I guess the line you posted would also work, but the game didn't use that because it was originally giving a specific augment and had to use this other method to give it.
Image
Junkyard has FTL mods, mostly ships and a few other things.
User avatar
Biohazard063
Posts: 404
Joined: Fri Feb 14, 2014 4:38 pm
Location: Out of bounds
Contact:

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

Postby Biohazard063 » Tue May 05, 2015 6:02 pm

Changes have been made.
Did manage to decipher your code, I'm fairly decent at reverse engineering.
From what I can decipher, you can use lvl 1 artillery to try and save him but fail making him simply give up his stash,in the same way that hearing him out does. Whilst having lvl 2 actually saves him like a lvl 2 medbay does.
Neat, always wondered how you could make that happen. I thought it had something to do with the :max_group="0"

Pretty sure you could still do that based of the following :

Code: Select all

<choice hidden="true" req="cloaking" lvl="1" max_group="0">
            <text>(Cloaking) Use your Cloaking to disable the system.</text>
            <event>
               <text>You use your ship's Cloaking to try to prevent the defense system from getting a lock. However before you are able to safely disable the system your cloaking gives out and you are forced to destroy the satellite. No one was harmed but they don't seem happy with your solution.</text>
               <autoReward level="LOW">standard</autoReward>
            </event>
         </choice>
         <choice hidden="true" req="cloaking" lvl="2" max_group="0">
            <!--DLC!-->
            <text>(Improved Cloaking) Use your Cloaking to disable the system.</text>
            <event>
               <text>You use your ships Cloaking to prevent the defense system from getting a lock. Once closer, you hasten to disable the system without damaging it. It was a sloppy job but they appreciate it and offer a reward.</text>
               <autoReward level="MED">standard</autoReward>
            </event>
         </choice>
         <choice hidden="true" req="cloaking" lvl="3" max_group="0">
            <!--DLC!-->
            <text>(Advanced Cloaking) Use your Cloaking to disable the system.</text>
            <event>
               <text>Your ship's Advanced Cloaking allows you to approach the defense system without an issue. Once closer, you are able to safely disable the system. They thank you for your help and offer a reward.</text>
               <autoReward level="HIGH">standard</autoReward>
            </event>
         </choice>

From what I can tell it means only 1 blue option can show up requiring cloaking. Well, if your method works as well, I see no reason to change it.
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
RAD-82
Posts: 783
Joined: Sat Nov 09, 2013 12:16 am
Location: Not where a person needs to be...

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

Postby RAD-82 » Tue May 05, 2015 9:07 pm

Yeah, max_group would be able to produce the same effect that I'm doing with max_lvl in this event.

I don't really see why max_group even exists when max_lvl is capable of doing the same thing when limiting options. I'm guessing it was programmed into the game before the idea of max_lvl was added.
Image
Junkyard has FTL mods, mostly ships and a few other things.

Who is online

Users browsing this forum: No registered users and 14 guests