I'm making a mod but I don't know if this code will work:
this code should add a quest in the rock homeworld, you will fight a rock cruiser and you should get scrap, 3 missiles and a crew member called captain stinger
I'm asking this because I'm just taking code from here and there and I modify some part
<event name="QUEST_INTRUDERS" unique="true">
<text>A Strongly Damage Rock Ship hails you: "Please, Help us! A Strong rock ship betrayed us and took our captain as a hostage! We will reward you if you for your help."</text>
<choice hidden="true">
<text>Help them, we can't let this captain die!</text>
<event>
<text>"oh! Thank god, here is the coordinates, Good luck" They jump away before you can say anything.</text>
<quest event="QUEST_INTRUDERS"/>
</event>
</choice>
<choice hidden="true">
<text>A strong rock ship? we can't risk our live!</text>
<event>
<text>We fully understand, if you found someone strong, tell them to meet us here.</text>
</event>
</choice>
</event>
<event name="QUEST_INTRUDERS">
<text>as soon as you enter the given coodinates, you see the rock ship you are looking for fighting a weaponless rock cruiser, are you sure you want to fight it?</text>
<choice hidden="true">
<text>we can't turn back, come at me, bro!</text>
<event>
<text>the ship let the cruiser go aways and attack</text>
<ship load="ROCK_UNLOCK2" hostile="true"/>
<destroyed>
<text>The Rock ship's hull breaks apart. You deliver the Captain and he offer to join the federation</text>
<autoReward level="HIGH">scrap_only</autoReward>
<item_modify>
<item type="missile" min="-3" max="-3"/>
</item_modify>
<crewMember amount="1" class="rock">Captain Stinger</crewMember>
<choice hidden="true">
<text>Continue...</text>
</choice>
</destroyed>
</event>
</choice>
<choice hidden="true">
<text>We can't do that, we need to go away!</text>
<event>
<text>you look at the weaponless ship, they destroy it in no time and they jump aways, you failed</text>
</event>
</choice>
</event>
</choice>
</event>
Now, I'm no expert on the subject, but I'd imagine the best way to find out if it works or not would be to actually test it yourself.
If it works, you'll see for yourself. If not, you'll be able to see how it fails. Asking other people to test it for you is unlikely to be particularly effective, and you won't learn quite as much from it either.
You also might want to spend a bit more time on your text. It could use a bit more editing if you plan to release the event publically.
You're loading the ROCK_UNLOCK2 ship. That ship already has events tired to it being destroyed. If you want to alter that, or create your own, look at events_ships.xml and look up ROCK_UNLOCK2. Than just keep QUEST_INTRUDERS simple, something like...
<event name="QUEST_INTRUDERS">
<text>as soon as you enter the given coodinates, you see the rock ship you are looking for fighting a weaponless rock cruiser, are you sure you want to fight it?</text>
<ship load="ROCK_UNLOCK2" hostile="false"/>
<choice>
<text>We can't turn back, come at me, bro!</text>
<ship load="ROCK_UNLOCK2" hostile="true"/>
</choice>
<choice>
<text>Leave the ship alone.</text>
<event/>
</choice>
</event>
I did this at work, so like Vanguard says, you're going to want to test this. Alter the starting sector events, and include this one with a min of like 12 or something. This way you can test your event without having to get to the rock homeworld.
Try updating STANDARD_SPACE in sector_data.xml like this. Any other events loaded are filled in with the Neutral list. So you will still have some other events, but most of them should be yours. Make sure your quest isn't marked as unique. If the game crashes at any point, there is likely an issue in the syntax of your event.
Hard to determine what the issue is without seeing exactly what you're doing. I'm planning to work on some FTL stuff later tonight (at work now), and I'll throw together an event like this, test it, and post the event for you.
Sometimes what I do is start really simple and build up the event. It's been mentioned before, but these files are really touchy at times. So maybe try and make an event that simply gives you the text you want to see, with no choices. Make sure that works, than go back and add one choice, test, etc. This way, if/when it breaks, you will know what you added last that is causing the problem.