Page 5 of 6

Re: zabing12 has some ideas.

Posted: Sat Aug 09, 2014 4:46 pm
by NarnKar
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.

Re: zabing12 has some ideas.

Posted: Sat Aug 09, 2014 7:39 pm
by zabing12
That easy? huh.
I tried that whole testing mod thing, but it is buggy as hell.

Re: zabing12 has some ideas.

Posted: Sat Aug 09, 2014 9:49 pm
by NarnKar
Really? The MTE works just fine for me. Are you sure you're using the Custom Content patch for your events?

Re: zabing12 has some ideas.

Posted: Sat Aug 09, 2014 10:30 pm
by zabing12
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."

Re: zabing12 has some ideas.

Posted: Sun Aug 10, 2014 9:09 pm
by NarnKar
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.

Re: zabing12 has some ideas.

Posted: Sun Aug 10, 2014 9:23 pm
by zabing12
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.

Re: zabing12 has some ideas.

Posted: Sun Aug 10, 2014 10:15 pm
by NarnKar
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.

Re: zabing12 has some ideas.

Posted: Sun Aug 10, 2014 10:47 pm
by zabing12
Make it just like a weapon? same files, everything, the only difference being no weapon animation?

Re: zabing12 has some ideas.

Posted: Sun Aug 10, 2014 10:52 pm
by NarnKar
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.

Re: zabing12 has some ideas.

Posted: Sun Aug 10, 2014 11:09 pm
by zabing12
http://www.mediafire.com/download/fdb8r ... /drone.zip

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