How to give a custom weapon to a custom enemy ship?

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

Re: How to give a custom weapon to a custom enemy ship?

Post by R4V3-0N »

Proud American Engi wrote:
kartoFlane wrote:Well, like I said, you simply do it the same way you do it for player ships, so...

Code: Select all

<weaponList count="2" missiles="#">
  <weapon name="WEAPON_1" />
  <weapon name="WEAPON_2" />
</weaponList>
It may or may not work like that anymore -- as I said, I've tested this before the AE update.
I cant XML edit so I always use superluminal...
Well this guy tought you how to XML edit it in. Didn;t you say "Teach me" earlier?
R4V3-0N, a dreamer.
User avatar
kartoFlane
Posts: 1488
Joined: Mon Jan 14, 2013 10:20 pm

Re: How to give a custom weapon to a custom enemy ship?

Post by kartoFlane »

Oh well, it's a good point nonetheless, it made me notice that I didn't add that option to the editor...

Anyway, xml is all text, really. You can open .xml files with basic Notepad and make the changes you need, and save the file.
Superluminal2 - a ship editor for FTL
Abs
Posts: 82
Joined: Tue Aug 05, 2014 10:01 am

Re: How to give a custom weapon to a custom enemy ship?

Post by Abs »

kartoFlane wrote:Well, like I said, you simply do it the same way you do it for player ships, so...

Code: Select all

<weaponList count="2" missiles="#">
  <weapon name="WEAPON_1" />
  <weapon name="WEAPON_2" />
</weaponList>
It may or may not work like that anymore -- as I said, I've tested this before the AE update.
Well, I finally got to the point where I can try this, and here are my results:

Working:

Code: Select all

<blueprintList name="KLINGON_WEAPONS">
	<name>K_DISRUPTORS</name>
</blueprintList>

<shipBlueprint ....>
	<weaponList missiles="20" count="2" load="KLINGON_WEAPONS" />
</shipBlueprint>
Not working:

Code: Select all

<shipBlueprint ....>
	<weaponList missiles="20" count="2" />
		<weapon name="K_DISRUPTORS" />
		<weapon name="K_DISRUPTORS" />
	</weaponList>
</shipBlueprint>
Abs
Image
Click to go to the mod's facebook page for the latest updates!
User avatar
RAD-82
Posts: 795
Joined: Sat Nov 09, 2013 12:16 am

Re: How to give a custom weapon to a custom enemy ship?

Post by RAD-82 »

Abs wrote:Not working:

Code: Select all

<shipBlueprint ....>
	<weaponList missiles="20" count="2" />
		<weapon name="K_DISRUPTORS" />
		<weapon name="K_DISRUPTORS" />
	</weaponList>
</shipBlueprint>
That's not working because you have an error in there; an extra slash closing the weaponList before the weapons are loaded. This method does work when error-free. It is what the default Rebel Rigger that the games uses does.

Code: Select all

<!---- Crash protection default ship blueprint. DO NOT REMOVE -->
<shipBlueprint name="DEFAULT" layout="rebel_squat" img="rebel_squat">
	<class>Rebel Rigger</class>
	<systemList>
		<pilot power="1" room="0"/>
		<oxygen power="1" room="2"/>
		<shields power="2" room="4"/>
		<engines power="2" room="7"/>
		<weapons power="3" room="6"/>
		<drones power="4" room="1"/>
	</systemList>
	<droneList count="2" drones="4">
		<drone name="DEFENSE_1"/>
		<drone name="DEFENSE_1"/>
	</droneList>
	<weaponList count="2" missiles="10">
		<weapon name="LASER_HEAVY_1"/>
		<weapon name="LASER_BURST_1"/>
	</weaponList>
	<health amount="10"/>	
	<maxPower amount ="15"/>
	<crewCount amount = "3" class="human"/>
</ship>
</ship>? Well, the game does have some errors that it is capable of overlooking. :lol:
Image
Junkyard has FTL mods, mostly ships and a few other things.
Abs
Posts: 82
Joined: Tue Aug 05, 2014 10:01 am

Re: How to give a custom weapon to a custom enemy ship?

Post by Abs »

Sunuvabeach. You're probably right! That extra slash indicates that it's a solo tag, and the game won't look for the actual closing tag. That explains why it kept on loading a Rebel Rigger. It's a good thing I posted my code, so that I could have the errors of my ways shown to me. :D Thanks RAD-82!

Abs
Image
Click to go to the mod's facebook page for the latest updates!
Post Reply