Need help spawning abandoned ship in MD

The place to discuss scripting and game modifications for X³: Terran Conflict and X³: Albion Prelude.

Moderators: Moderators for English X Forum, Scripting / Modding Moderators

Post Reply
hisazul
Posts: 1211
Joined: Sat, 15. Oct 11, 04:12
xr

Need help spawning abandoned ship in MD

Post by hisazul » Sun, 23. Aug 15, 02:25

Before I go any further, MD or for that matter the rest of xml or otherwise coding in this game is alien text to me. So please provide the most retard friendly example :P

Anyway, after many many years I guess I finally had enough of vanilla UFJD sectors "lacking" in loot. I mean it's kind of "endgame" activity, one of them at least. So I strapped together from bits an pieces an additional loot table. But for the love of sanity I can't spawn fighters that are claimable. Even tho they spawn with no pilot they aren't claimable and this is the last bit of tweaking left to do.

What I use atm:

Code: Select all

<do_all min="1" max="2" chance="1">
				<create_ship name="this.tempship" typename="{SS_SH_GONER}" race="unknown" racelogic="0">
                    <position object="this.Position" min="25km" max="75km"/>
                        <!--<equipment loadout="maximum"/>-->
						<cargo>
                          <ware typename="SS_WARE_ENERGY" min="50" max="500"/>
                        </cargo>
                       <hull min="25" max="50"/>
                </create_ship>
				</do_all>
Only thing I found that looked like what I needed was this:
<abandon_ship object="{this.tempship}" name="this.Pilot"/>
<destroy_object object="this.Pilot" explosion="0"/>
<set_capturable object="{this.tempship}" capturable="1"/>
Sadly referencing naming was WAAAAaaaay out of my grasp. So tempship doesn't work at all. In case it matters instead of just one ship I'm going with random.type@someship|someship|etc. Atm it's that way for easier testing.

So if someone could help a brother out I'd be much obliged. Just remember I don't really understand any of this. I literally spent an entire night wondering why none of what I do had an effect before I realized I had to package everything into addon folder... even tho it was all in addon folder to begin with. Also I don't even get the difference between <do_any> and <do_all> q_q


Edit:
Nevermind all that. After thoroughly reading though the rest of the script I found what I needed. With a bit of trial and error I got it finally to do what I wanted.

Code: Select all

<create_ship name="this.tempship" typename="{SS_SH_GONER}" race="neutral" racelogic="1" capturable="1">
At the bottom of the script there seems to be a portion that removes pilots and sets ships as claimable. That may or may not be what gets the job done... but I'm supper happy now with the result. Now I just need to populate my list of ships and check if ships that need to be boarded will end up as claimable too, if they do I may have to add another list to my loot table, tho with this many entries I'll need to tweak chances and forced min/max results. But all that is minor details.
“Logic will get you from A to B. Imagination will take you everywhere.” - Albert Einstein

Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22227
Joined: Sun, 14. Nov 04, 23:26
x4

Post by Cycrow » Sun, 23. Aug 15, 10:47

if you create a ship as Neutral Race (rather than unknown), it should be claimable from the start.

To make an existing ship claimable, you can eject the pilot, this turns it into Neutral Race

hisazul
Posts: 1211
Joined: Sat, 15. Oct 11, 04:12
xr

Post by hisazul » Sun, 23. Aug 15, 13:59

Cycrow wrote:if you create a ship as Neutral Race (rather than unknown), it should be claimable from the start.

To make an existing ship claimable, you can eject the pilot, this turns it into Neutral Race
I tried neutral from the start, I think problem was that I set racelogic to 0 and that prevented it from being claimable.

Since you passed by :P Any way to use <equipment loadout> without getting marines? Do I have to put an if checker? Or negative marines to cargo? It would be a bit cruel to just claim a big ship and then throw a bunch of dudes into empty space and tell em "GL ya gonna need it". Then again they will get cleaned up as soon as you leave...

Anyhoo equipment is a minor thing I just need to decide if I wanna keep cap ships claimable or separate fighters and boardable ships.
“Logic will get you from A to B. Imagination will take you everywhere.” - Albert Einstein

Post Reply

Return to “X³: Terran Conflict / Albion Prelude - Scripts and Modding”