How to make a new ship spawn with you at new game start

The place to discuss scripting and game modifications for X Rebirth.

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

Post Reply
balogt
Posts: 773
Joined: Thu, 18. Dec 03, 09:00
x3

How to make a new ship spawn with you at new game start

Post by balogt » Tue, 6. Oct 15, 00:00

I have created a modified midar I want as a ship I start with as its unique. similar to the gamestart with a styvok but with this one. I am having trouble getting the ship to spawn off the start. here is what I have done thus far.

made the ship and the macro for it. tested with a build module add that works..hence I could build it and make sure its good to go. I don't want to be able to build it however, just start with it and if I loose it too bad for me.

all are added as a mod in extensions folder

added it to a library\wares list.
added it to the macro file.
using a similar set up like the gian star mod I added it to the gamestarts and md\setupgamestarts files.

still no spawn. I am guessing how I added it to the md\setupgamestarts files somehow is not registering. is there another file somewhere that I have to add the new ship to to be recognized? and in the setup file they name $buildership was used from the gian star mod I kept that but altered the units.size.l etc ship to match mine (including directorys). is that $buildership name important somewhow?

thx for any help anyone can offer
Balog

User avatar
YorrickVander
Posts: 2689
Joined: Tue, 29. Oct 13, 21:59
x4

Post by YorrickVander » Tue, 6. Oct 15, 00:11

Best to post up the actual md file cue or we're guessing what you have in it :) Also add "-skipintro -debug all -logfile debuglog.txt" to staem > X Rebirth > Properties > Launch Options then see the error spew in the documents > egosoft > xxxx > debug.log text file. This is usually much more descriptive for scripting errors than the ingame debug window.
X Rebirth - A Sirius Cybernetics Corporation Product

Split irritate visiting pilot with strange vocal patterns.

User avatar
euclid
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 13289
Joined: Sun, 15. Feb 04, 20:12
x4

Post by euclid » Tue, 6. Oct 15, 01:52

Hi balogt,

Best try to spawn it in your current game but you need the macro name, for example

Code: Select all

<create_ship name="$Ship"
macro="macro.units_size_xl_transporter_1_macro"
zone="player.zone">
 <owner exact="faction.player" overridenpc="true"/>
 <pilot>
 </pilot>
 <defence>
 </defence>
 <engineer>
 </engineer>
 <safepos x="-450m" y="-100m" z="-5000m" />
</create_ship>
If that works then it's easy to do the same for a new game start.

Hope that helps.

Cheers Euclid
"In any special doctrine of nature there can be only as much proper science as there is mathematics therein.”
- Immanuel Kant (1724-1804), Metaphysical Foundations of the Science of Nature, 4:470, 1786

balogt
Posts: 773
Joined: Thu, 18. Dec 03, 09:00
x3

Post by balogt » Tue, 6. Oct 15, 02:14

cool Ill try that

balogt
Posts: 773
Joined: Thu, 18. Dec 03, 09:00
x3

Post by balogt » Tue, 6. Oct 15, 02:16

silly question how does one spawn that in game..are there debug commands that would allow that input?

balogt
Posts: 773
Joined: Thu, 18. Dec 03, 09:00
x3

Post by balogt » Tue, 6. Oct 15, 02:34

got it when imputing the macro into the md\setup file I did not put macro. portion of the line before the unit size part.

"macro.unit.size.l.ions.privateer.macro" works

thx for the help\
Balog

UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader » Tue, 6. Oct 15, 05:08

do you really use . as part of the macro name? even if it works i would change it because . is a syntax element of XRs scripting language to seperate one element of the property Chain from the next - your macro name could turn out to be invalid in some circumstates..
if not stated otherwise everything i post is licensed under WTFPL

Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter ;)

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help ;)

balogt
Posts: 773
Joined: Thu, 18. Dec 03, 09:00
x3

Post by balogt » Thu, 29. Oct 15, 07:51

good to know thanks ill change them.

Post Reply

Return to “X Rebirth - Scripts and Modding”