zabing12 has some ideas.

Discuss and distribute tools and methods for modding. Moderator - Grognak
User avatar
NarnKar
Posts: 778
Joined: Thu Jun 19, 2014 4:24 pm

Re: zabing12 has some ideas.

Postby NarnKar » Sat Aug 09, 2014 4:46 pm

Put your custom events in data>events.xml.append
And then zip up the data directory, then rename the .zip to .ftl so SMM can recognize it.
zabing12
Posts: 63
Joined: Fri Jul 18, 2014 5:35 pm

Re: zabing12 has some ideas.

Postby zabing12 » Sat Aug 09, 2014 7:39 pm

That easy? huh.
I tried that whole testing mod thing, but it is buggy as hell.
User avatar
NarnKar
Posts: 778
Joined: Thu Jun 19, 2014 4:24 pm

Re: zabing12 has some ideas.

Postby NarnKar » Sat Aug 09, 2014 9:49 pm

Really? The MTE works just fine for me. Are you sure you're using the Custom Content patch for your events?
zabing12
Posts: 63
Joined: Fri Jul 18, 2014 5:35 pm

Re: zabing12 has some ideas.

Postby zabing12 » Sat Aug 09, 2014 10:30 pm

Yea, but if I try to load my events, it just destroys my ship. plus a bunch of other things.




So, I was messing around, and I found THIS: http://mtheall.com/~mtheall/spaceship.html

What if the drones hull were random? It's just a thought, but I had looked at it and said "Cool."
User avatar
NarnKar
Posts: 778
Joined: Thu Jun 19, 2014 4:24 pm

Re: zabing12 has some ideas.

Postby NarnKar » Sun Aug 10, 2014 9:09 pm

Really? Destroys your ship?
That's...unusual, to say the least. Are you sure it's not an error in your custom event? Because an event is not supposed to do hull damage unless you specify <damage> in the event itself...that's super weird!

As for randomly generated drones: I'm afraid there's no way to currently add a procedural sprite generator into FTL's hardcode. You have to add all the sprites in yourself, and then make each one correspond to a specific drone...a way to implement your idea would be to take each sprite on that sheet, add a blueprint that says that's an alternate beam drone, and then copy the data for the beam drone's data.
zabing12
Posts: 63
Joined: Fri Jul 18, 2014 5:35 pm

Re: zabing12 has some ideas.

Postby zabing12 » Sun Aug 10, 2014 9:23 pm

So, I load my event, chose "load custom event" and my ship loses all of it's oxygen, goes down to one hul, and kills my crew.

My event has nothing to do with damage though.

could I have a template code for the drones? And how to make them.
User avatar
NarnKar
Posts: 778
Joined: Thu Jun 19, 2014 4:24 pm

Re: zabing12 has some ideas.

Postby NarnKar » Sun Aug 10, 2014 10:15 pm

Wow, you're right, that is weird. Huh.
You know what...I think what it might be is...well, this is just a guess, but some syntax error in your event causes it to be read incorrectly, and FTL (or the MTE) panics and kills everyone instead of crashing.
This is likely because FTL doesn't want to crash, reload, and get stuck with the buggy event again, crash, reload again, and get caught in a loop. Instead, it makes sure to near-wreck your ship and kill all your crew so you can't play anymore...something like that? Again, just a guess.

Okay, maybe you should make your own sector, and set your own events to have a very high "minimum occurrence rate". And then get your sector to load first, or stick it into the starting sector. IDK.




Here's a sample Drone blueprint. You can look at the full resources yourself by unpacking the FTL resources with FTLDat Unpacker...make sure to patch to Vanilla beforehand, or there'll be CE blueprints in there too. Unless you want that :P

Code: Select all

<droneBlueprint name="COMBAT_BEAM">
   <type>COMBAT</type>
   <tip>tip_combat</tip>
   <title>Anti-Ship Beam Drone I</title>
   <short>Beam I</short>
   <desc>Combat drone that repeatedly attacks with a small beam weapon</desc>
   <power>2</power>
   <cooldown>1000</cooldown> <!--- Doesn't effect combat drone -->
   <dodge>0</dodge>
   <speed>15</speed> <!--- Change this to increase/decrease firing speed -->
   <cost>50</cost>
   <bp>3</bp>
   <droneImage>drone_beam</droneImage>
   <weaponBlueprint>DRONE_BEAM</weaponBlueprint>
   <rarity>3</rarity>
   <iconImage>beam</iconImage>
</droneBlueprint>

You'll notice that the Drone blueprint calls a weapon DRONE_BEAM; here's that code.

Code: Select all

<weaponBlueprint name="DRONE_BEAM">
   <type>BEAM</type>
   <tip>tip_beams</tip>
   <title>Drone Beam</title>
   <short>Drone Beam</short>
   <desc>'Baby's first beam'; Extremely cheap and weak beam weapon.</desc>
   <damage>1</damage>
   <sp>0</sp>
   <fireChance>1</fireChance>
   <breachChance>0</breachChance>
   <speed>3</speed>
   <rarity>0</rarity>
   <image>beam_contact</image>
   <length>20</length>
   <launchSounds>
      <sound>beam1</sound>
      <sound>beam1_2</sound>
   </launchSounds>
   <weaponArt>beam_1</weaponArt>
</weaponBlueprint>

It works much the same way as an actual weapon, but you can't obtain it in-game (<rarity> is set to 0). The weaponArt tag is still there, but that's only for debug purposes--if you don't specify weapon art, it'll panic and stick a basic laser there...which shouldn't matter much, since the weapon isn't shown on the drone. But still, it's good practice. Aside from that, the DRONE_BEAM still needs launch sounds, length, impact images,...the only difference between a Drone's weapon and a regular weapon is that the drone's weapon doesn't need a weapon animation, but they both still need firing and impact animations and sounds and stuff like that.
zabing12
Posts: 63
Joined: Fri Jul 18, 2014 5:35 pm

Re: zabing12 has some ideas.

Postby zabing12 » Sun Aug 10, 2014 10:47 pm

Make it just like a weapon? same files, everything, the only difference being no weapon animation?
User avatar
NarnKar
Posts: 778
Joined: Thu Jun 19, 2014 4:24 pm

Re: zabing12 has some ideas.

Postby NarnKar » Sun Aug 10, 2014 10:52 pm

The drone's weapon is just like a weapon, but with no animation. Still needs a projectile and impacts, like I said.

The drone itself, though, needs its own additional code, and the drone code will call a weapon.
zabing12
Posts: 63
Joined: Fri Jul 18, 2014 5:35 pm

Re: zabing12 has some ideas.

Postby zabing12 » Sun Aug 10, 2014 11:09 pm

http://www.mediafire.com/download/fdb8r ... /drone.zip

like that? Going to change everything, just wanted to make sure.