Help with new enemy ships?

Discuss and distribute tools and methods for modding. Moderator - Grognak
Post Reply
The Swarm Lord
Posts: 58
Joined: Mon Jul 08, 2013 11:24 pm

Help with new enemy ships?

Post by The Swarm Lord »

I am currently trying to get some of my custom enemy ships to appear in the game via events. Unfortunately, everything I tried ended in crash whenever I press the "Jump" Button. Can anybody help me?
Heres my code
EDIT: update autoblueprintsv
AutoBlueprints.xml

Code: Select all

<blueprintList name="SHIPS_STARWARS_PIRATE">
<name>SW_PIRATE_PATROL</name>
</blueprintList>
(this is only for the one pirate ship)

Sector_data.xml (Just the modded part)

Code: Select all

<sectorDescription name="STANDARD_SPACE" minSector="0" unique="false">
	<nameList>
		<name>Federation Space</name>
	</nameList>
	<trackList>
		<track>civilian</track>
		<track>cosmos</track>
		<track>milkyway</track>
	</trackList>
	<startEvent>START_BEACON</startEvent>
	<event name="SWPIRATE1" min="2" max="4"/>
	<event name="STORE" min="1" max="2"/>
	<event name="ITEMS" min="1" max="2"/>
	<event name="NEUTRAL2" min="2" max="4"/>
	<event name="NOTHING" min="1" max="2"/>
	<event name="DISTRESS_BEACON" min="1" max="2"/>
	<event name="HOSTILE2" min="4" max="6"/>
	<event name="NEBULA" min="0" max="4"/>
	<event name="QUESTS" min="1" max="1"/>
	<event name="HOSTILE1" min="2" max="2"/>
	<event name="HOSTILE_BOARDING" min="0" max="0"/>
</sectorDescription>
event_ships.xml

Code: Select all

<ship name="SW_PIRATE_PATROL" auto_blueprint="SHIPS_STARWARS_PIRATE">
	<surrender min="3" max="4">
		<text>They hail your ship saying, "Ok, we're sorry! Just take this and let us be!"</text>
		<choice hidden="true">
			<text>Let them live.</text>
			<event>
				<ship hostile="false"/>
				<text>The pirates' ship slowly drifts to a nearby dock, after beaming over some scrap. </text>
				<autoReward level="MED">standard</autoReward>
			</event>
		</choice>
		<choice>
			<text>These pirates should die so they can't cause any more trouble.</text>
			<event/>
		</choice>
	</surrender>
	<destroyed>
		<text>The patrol ship explodes, giving quite a bit of scrap. Suddenly, your ship picks up several warp signatures. A pirate fleet moves in! You gather as much materials as possible and prepare to jump.</text>
		<autoReward level="LOW">standard</autoReward>
	</destroyed>
	<deadCrew>
		<text>With the pirates killed, you loot their ship.</text>
		<autoReward level="LOW">standard</autoReward>
	</deadCrew>
</ship>
events.xml

Code: Select all

<eventlist name="SWPIRATE1">
<event load="piratepatrol"/>
</eventlist>

<event name="piratepatrol">
<ship load="STARWARS_PIRATE_PATROL" hostile="false"/>
<text>A you notice a pirate patrol ship approach your vessel.They power up weapons</text>
<choice hidden="true">
<text>Prepare to engage</text>
<event>
<ship hostile="true"/>
<text> You prepare to engage the enemy</text>
</event>
</choice>
</event>
Last edited by The Swarm Lord on Sun Jul 14, 2013 6:33 pm, edited 1 time in total.
mr silencer
Posts: 53
Joined: Sun Jul 14, 2013 3:34 am

Re: Help with new enemy ships?

Post by mr silencer »

i dont know how these things work but if you can put it in the mod forum place ill try installing, but i dont know if you can do that. as i said, i dont know how thoose things work

P.S. sorry for bad grammer im too lazy to fix it right now
Signature loading...
User avatar
kartoFlane
Posts: 1488
Joined: Mon Jan 14, 2013 10:20 pm

Re: Help with new enemy ships?

Post by kartoFlane »

Code: Select all

<blueprintList name="SHIPS_STARWARS_PIRATE">
    <name>SW_PIRATE_PATROL</name>
</blueprintList>
Blueprint lists such as this work by referencing a shipBlueprint object of that name, not an event object.

So what you're doing here is - you're asking the game to load a ship with blueprint name "SW_PIRATE_PATROL", but it's not declared anywhere in the autoBlueprints.xml file. When the game tries to retrieve the object associated with this name, it finds nothing, and crashes.
Superluminal2 - a ship editor for FTL
mr silencer
Posts: 53
Joined: Sun Jul 14, 2013 3:34 am

Re: Help with new enemy ships?

Post by mr silencer »

yeah as i said i have no idea how to make mods and stuff, sorry.
When you trouble shoot the problem out I have a request that i think is a good idea, do you mind going to mods, not working mods the other one and a have a good suggestion for a mod. it should be 2 or 3 down from the moderator posts, its called (IDEA) sry for taking a post spot ( zombie idea) could you read through it and tell me if its possible. you dont have to but it would help :D
Signature loading...
The Swarm Lord
Posts: 58
Joined: Mon Jul 08, 2013 11:24 pm

Re: Help with new enemy ships?

Post by The Swarm Lord »

kartoFlane wrote:

Code: Select all

<blueprintList name="SHIPS_STARWARS_PIRATE">
    <name>SW_PIRATE_PATROL</name>
</blueprintList>
Blueprint lists such as this work by referencing a shipBlueprint object of that name, not an event object.

So what you're doing here is - you're asking the game to load a ship with blueprint name "SW_PIRATE_PATROL", but it's not declared anywhere in the autoBlueprints.xml file. When the game tries to retrieve the object associated with this name, it finds nothing, and crashes.
Oops. Well, for the SW_PIRATE_PATROL, the ship IS in the autoBlueprints file. Shoulda put it in first...
Post Reply