Creating a Ship, Invisible in the game.

Thinking about improving the Artwork in Vega Strike, or making your own Mod? Submit your question and ideas in this forum.

Moderator: pyramid

Post Reply
KleiZwei
Mercenary
Mercenary
Posts: 102
Joined: Wed Apr 30, 2003 5:16 pm
Location: The Restaurant at the end of the Universe

Creating a Ship, Invisible in the game.

Post by KleiZwei »

I've modelled it (and for my very first model ever i think it turned out well)
I've put it in ../units/moonpuncher
it's in xmesh format ( is there an actuall xml file i should be looking for)

when I load the game up, my ship is invisible or not there at all, it's got no weapons, no hud... and other ships just fly into me....
hellcatv
Developer
Developer
Posts: 3980
Joined: Fri Jan 03, 2003 4:53 am
Location: Stanford, CA
Contact:

Post by hellcatv »

you need to make a directory called moonpuncher
then call it moonpuncher/moonpuncher.xmesh

check the links section (above) to get to teh wiki--whcih has howtos on how to put ships in game

basically you'll need to make a file called moonpuncher/moonpuncher
that's an xunit file

has
<unit>
...
</unit>

and so forth

read the readmes
Vega Strike Lead Developer
http://vegastrike.sourceforge.net/
peteyg
Elite
Elite
Posts: 1465
Joined: Thu Jan 02, 2003 12:01 pm
Location: Seattle, WA
Contact:

Post by peteyg »

If there's a serious error in your xunit file, that could be the cause of your troubles too. Rename it to moonpuncher.xml and run it through Internet Explorer or the latest Mozilla, and it ought to give you the location of any big huge errors.
KleiZwei
Mercenary
Mercenary
Posts: 102
Joined: Wed Apr 30, 2003 5:16 pm
Location: The Restaurant at the end of the Universe

Post by KleiZwei »

well here's what IE shows me when i load up the xml.

Code: Select all

<!--  XUnit exported from Wings 3D 0.98.09 
  --> 
- <!--  filename="moonpuncher.xunit" RENAME THIS FILE TO:"c:/Steven/ship models/moonpuncher" 
  --> 
- <!-- 
 Edit this file after exporting to fit the stats of your ship
Look at the other ships in vegastrike (./vs/units/shipname) for examples
for more info see http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/vegastrike/data/units/description.xunit
Also please delete unused tags from this file to save space ;-) 

  --> 
- <Unit scale="1.00000">
  <Meshfile file="moonpuncher_moonpuncher.xmesh" /> 
  <Mount weapon="Laser" size="Light Medium Heavy" x="0.340608" y="-0.170265" z="2.03805" /> 
  <Mount weapon="Laser" size="Light Medium Heavy" x="-0.267919" y="-0.188499" z="2.04123" /> 
  <Mount weapon="Laser" size="Light Medium Heavy" x="0.144669" y="-0.402217" z="1.92611" /> 
  <Mount weapon="Laser" size="Light Medium Heavy" x="-0.103331" y="-0.402217" z="1.92611" /> 
  <Light file="supernova.bmp" x="3.76355e-2" y="5.64049e-3" z="-2.85653" size="1" /> 
- <!-- 
 BEGIN TEMPLATES the following entries are templates (mostly from wayfarer)
NONE of this values are created dynamically by the script
edit it to fit the stats of your ship

  --> 
- <!--  <ShieldMesh file="name of xmesh to load instead of sphere as shield" /> 
  --> 
- <!--  <RapidMesh file="name of xmesh (not drawn) to load and use for collisions instead of the model meshfiles" /> 
  --> 
- <!--  <BspMesh file="name of xmesh to use for beam and bolt collisions" /> 
  --> 
- <Thrust>
  <Engine Afterburner="117007" Forward="22523" Retro="27935" Left="22231" Right="22231" Top="22231" Bottom="22231" /> 
  <Maneuver yaw="289943" pitch="239988" roll="399637" /> 
  </Thrust>
  <Computer yaw="60.400002" pitch="50.600006" roll="80.400002" afterburner="85" maxspeed="300" /> 
  <cockpit file="moonpuncher-hud.png" x="0" y="0" z="0" /> 
- <Defense HudImage="moonpuncher-hud.spr">
  <Armor front="250" right="225" left="225" back="240" /> 
  <Shields front="150.000000" back="150.000000" recharge="30.000000" /> 
  <Hull strength="200.000000" /> 
  </Defense>
  <Sound /> 
  <Stats mass="1096" momentofinertia="1096" fuel="40000000" /> 
- <Energy>
  <Reactor recharge="60" limit="400" /> 
  </Energy>
  <Jump missing="1" delay="2" jumpenergy="150" /> 
- <!--  add a description of your ship here 
  --> 
  <description /> 
- <!-- <CockpitDamage damage="float damage between 0 and 1 of cockpit component" />

  --> 
- <Hold volume="125">
- <Category file="Natural_Products/Natural_Resources">
  <import price=".8" pricestddev=".2" quantity="0" quantitystddev="5" /> 
  </Category>
- <Category file="Fuels/Crude">
  <import price="0.8" pricestddev=".2" quantity="0" quantitystddev="2" /> 
  </Category>
- <Category file="Compressed_Gasses">
  <import price=".7" pricestddev=".2" quantity="0" quantitystddev="2" /> 
  </Category>
- <Category file="Entertainment">
  <import price="1" pricestddev=".1" quantity="0" quantitystddev="1" /> 
  </Category>
  </Hold>
- <!-- <Upgrade file="file to upgrade this unit with" /> 

  --> 
- <!--  END   TEMPLATES 
  --> 
  </Unit>
i don't see anything about errors...
hellcatv
Developer
Developer
Posts: 3980
Joined: Fri Jan 03, 2003 4:53 am
Location: Stanford, CA
Contact:

Post by hellcatv »

that looks fine
do you have a mesh by the name listed in teh file?
is that mesh in the same folder as the xunnit

which would be in
units/moonpuncher/
folder
Vega Strike Lead Developer
http://vegastrike.sourceforge.net/
peteyg
Elite
Elite
Posts: 1465
Joined: Thu Jan 02, 2003 12:01 pm
Location: Seattle, WA
Contact:

Post by peteyg »

Yes, it looks to me like you had your object in Wings3d named 'moonpuncher', and you also had your file named 'moonpuncher'

when pontiac's wings3d plugin exports, your meshfile gets named filename_objectname.xmesh, and that's what your xunit file points to.

so yeah, make sure that your unit is pointing to the right mesh!
KleiZwei
Mercenary
Mercenary
Posts: 102
Joined: Wed Apr 30, 2003 5:16 pm
Location: The Restaurant at the end of the Universe

Post by KleiZwei »

damnit, i thought I changed that, I must of forgot to save changes or something... (feels a little dumb at the moment... I'll see if that works)
KleiZwei
Mercenary
Mercenary
Posts: 102
Joined: Wed Apr 30, 2003 5:16 pm
Location: The Restaurant at the end of the Universe

Post by KleiZwei »

It still doesn't work,
I've changed the xunit files so now it says

Code: Select all

<Meshfile file="moonpuncher.xmesh"/>
the contents of .../units/moonpuncher/ are
moonpuncher.xunit
moonpuncher.xmesh
moonpuncher.blank
moonpuncher-hud.png
moonpuncher-hud.spr
moonpuncher.png

am I maybe missing something?
peteyg
Elite
Elite
Posts: 1465
Joined: Thu Jan 02, 2003 12:01 pm
Location: Seattle, WA
Contact:

Post by peteyg »

ah-ha! remove the .xunit extension from your unit file, so your xunit file is simply named 'moonpuncher'.
pontiac
Elite
Elite
Posts: 1454
Joined: Sun Jan 12, 2003 6:24 pm
Location: Far out in the uncharted backwaters of the unfashionable end of the western spiral arm of the Galaxy
Contact:

plugin changes

Post by pontiac »

see this thread

Pontiac
KleiZwei
Mercenary
Mercenary
Posts: 102
Joined: Wed Apr 30, 2003 5:16 pm
Location: The Restaurant at the end of the Universe

Post by KleiZwei »

In windows, or dos...
how exactly do I remove the extension?

also I went back and did the UV mapping, I hadn't done that before, damn my ship looks cool now.
pontiac
Elite
Elite
Posts: 1454
Joined: Sun Jan 12, 2003 6:24 pm
Location: Far out in the uncharted backwaters of the unfashionable end of the western spiral arm of the Galaxy
Contact:

Post by pontiac »

DOS:
ren xyz.xunit xyz

Windows:
right mouse button on file -> rename
You must have turned on the extensions in the explorer settings
(i think it's in options-view-[]hide file extensions)

Pontiac
KleiZwei
Mercenary
Mercenary
Posts: 102
Joined: Wed Apr 30, 2003 5:16 pm
Location: The Restaurant at the end of the Universe

Post by KleiZwei »

hurray it wo..... hey wait whats tha... NOOOOOOOO NOT A HOLE!!!!
hey thank my ship works now (mostly) just got two holes to fix and then i can re-export the file
KleiZwei
Mercenary
Mercenary
Posts: 102
Joined: Wed Apr 30, 2003 5:16 pm
Location: The Restaurant at the end of the Universe

Post by KleiZwei »

ok my model works and I'll see what I can do about posting a pic, or a link to one at least, just one thing though, when i press F6 for the chasecam if I rotate the camera to view the front and back it begins to cut away but the sides I can view fine...

Image
pontiac
Elite
Elite
Posts: 1454
Joined: Sun Jan 12, 2003 6:24 pm
Location: Far out in the uncharted backwaters of the unfashionable end of the western spiral arm of the Galaxy
Contact:

Post by pontiac »

This often happens when you (the camera position) are to close to the model.

Same happens in Wings3D with a close view of the model(just triy it.
I don't know why, but the orthogonal view intensifies this behaviour (at least in wings).


Pontiac
KleiZwei
Mercenary
Mercenary
Posts: 102
Joined: Wed Apr 30, 2003 5:16 pm
Location: The Restaurant at the end of the Universe

Post by KleiZwei »

ok, so is there away to move the camera away from the ship, or should i just scale the ship down?
pontiac
Elite
Elite
Posts: 1454
Joined: Sun Jan 12, 2003 6:24 pm
Location: Far out in the uncharted backwaters of the unfashionable end of the western spiral arm of the Galaxy
Contact:

Post by pontiac »

I don't know the exact keys, but i think F11 and F12 should zoom in/out.

Also scaling down the ship wouldn't help, because the camera auomatically (please correct me) scale down too ;-)


Pontiac
KleiZwei
Mercenary
Mercenary
Posts: 102
Joined: Wed Apr 30, 2003 5:16 pm
Location: The Restaurant at the end of the Universe

Post by KleiZwei »

you should code it so you can set the cameras distance in the xunit/xmesh files...
Post Reply