UnitConverter - unable to run

Need help testing contributed art or code or having trouble getting your newest additions into game compatible format? Confused by changes to data formats? Reading through source and wondering what the developers were thinking when they wrote something? Need "how-to" style guidance for messing with VS internals? This is probably the right forum.
Post Reply
parkel
Hunter
Hunter
Posts: 73
Joined: Fri Jun 12, 2009 2:22 pm

UnitConverter - unable to run

Post by parkel »

many would know of unitconverter if they actually read the VSWiki inside out.
i found this program on the forums.

i am unable to run unitconverter using cmd (im using windows xp).
i have python 3.1 (newest version).

in the cmd.. i redirected my location to the unitconverter directory and tried to run it by typing in uc.
didnt work.
i also tried typing in unitconverter.py.

of the 2 above, i had the same message thrown back in my face:
'python' is not recognized as an internal or external command, operable program or batch file.

ultimately, i tried running uc.bat.
>> same message.

i wanna test out a cockpit i found here: http://vegastrike.sourceforge.net/forum ... 3d#p107334

and by following the example of the cockpit found, i wanna try and create my own using wings 3d.

1) anyone has the same problem?
2) i need help. :|
  • Derivative + pArKeL + a bunch of luddites = ?

    :D
loki1950
The Shepherd
Posts: 5841
Joined: Fri May 13, 2005 8:37 pm
Location: Ottawa
Contact:

Re: UnitConverter - unable to run

Post by loki1950 »

Not sure parkel but pyramid wrote it with Python 2.5 so that may be an issue off the top as there where several changes in Python between 2.5 and 2.6 for the transition to 3.0 i have Python 2.5 currently on my Win7 install so i will give it a try later today and let you know also you will need an upto date version of mesher.exe our cmd line mesh converter the one in the svn repo is not very new and does not support some new graphical features of the current engine an other requirement is nvcompress from Nvidia for converting textures to DDS format but for cockpits you might be able to things the old fashion way by just editing units.csv with csv_editor v2 so as i said i will look into UC later today just getting home from work ATM and it's time for some sleep :wink:

Enjoy the Choice :)
my box::HP Envy i5-6400 @2Q70GHzx4 8 Gb ram/1 Tb(Win10 64)/3 Tb Mint 19.2/GTX745 4Gb acer S243HL K222HQL
Q8200/Asus P5QDLX/8 Gb ram/WD 2Tb 2-500 G HD/GF GT640 2Gb Mint 17.3 64 bit Win 10 32 bit acer and Lenovo ideapad 320-15ARB Win 10/Mint 19.2
RedAdder
Bounty Hunter
Bounty Hunter
Posts: 149
Joined: Sat Jan 03, 2009 8:11 pm
Location: Germany, Munich
Contact:

Re: UnitConverter - unable to run

Post by RedAdder »

I think you didn't even get as far as to notice the possible breakage of some old python programs with new versions of python.

Follow the instructions in http://www.python.org/doc/faq/windows/# ... er-windows.

You will notice your error message appears in there and the solution is to set the PATH so that it leads to python31 in addition to the locations it is already pointing to.

This one is also good if you use python programs more frequently:
http://www.voidspace.org.uk/python/arti ... line.shtml
parkel
Hunter
Hunter
Posts: 73
Joined: Fri Jun 12, 2009 2:22 pm

Re: UnitConverter - unable to run

Post by parkel »

@RedAdder
ok.. i successfully configured cmd to be able to recognize the command for python.
but now here's the problem.

it gives me an error: "invalid syntax"

i tried typing in both "uc" alone and "unitconverter.py"
showed me the same message.
tried it with "python" in front as well.

@Loki
i know about the mesher already.
i already made it mesh a couple of files together to make the bfxm file.
but couldnt make it mesh the same couple of files to get the xmesh file.
:shock:

EDIT:
a slightly offtopic and slightly stupid question - i cant open the jpeg/bmp files for the cockpits.
are they compressed?
  • Derivative + pArKeL + a bunch of luddites = ?

    :D
loki1950
The Shepherd
Posts: 5841
Joined: Fri May 13, 2005 8:37 pm
Location: Ottawa
Contact:

Re: UnitConverter - unable to run

Post by loki1950 »

Yes they are the best is to use the Uncompressed ones from the Masters repository http://vegastrike.svn.sourceforge.net/v ... k/masters/ . And re: UC that syntax error is mostly caused be one of the changes that where introduced between versions 2.5 and 3.1

Enjoy the Choice :)
my box::HP Envy i5-6400 @2Q70GHzx4 8 Gb ram/1 Tb(Win10 64)/3 Tb Mint 19.2/GTX745 4Gb acer S243HL K222HQL
Q8200/Asus P5QDLX/8 Gb ram/WD 2Tb 2-500 G HD/GF GT640 2Gb Mint 17.3 64 bit Win 10 32 bit acer and Lenovo ideapad 320-15ARB Win 10/Mint 19.2
parkel
Hunter
Hunter
Posts: 73
Joined: Fri Jun 12, 2009 2:22 pm

Re: UnitConverter - unable to run

Post by parkel »

hmm thx for the quick reply..
i've been on here since about 20 mins ago (my time 9.50pm~)...

and i toyed around with the xmesh file (created it successfully) and im gonna test it now.
i threw in the diffuse.bmp... with hopes it actually creates the cockpit's "shape".

ill keep this thread updated on more stuff i find. :D

EDIT:

i tried and i failed.
here are the few methods i used:

1) copied the xmesh points thingy over to the xmesh file i was going to use for the cockpit.
2) renamed the folder and the cpt file to the same thing as the xmeshes & the bfxms.
3) inside the .cpt, changed the line from light_cockpit.bfxm to cockpit_I_8.bfxm (the file name which i named my bfxm and xmesh)

all 3, after about 1 hr of work.. didnt help.
  • Derivative + pArKeL + a bunch of luddites = ?

    :D
RedAdder
Bounty Hunter
Bounty Hunter
Posts: 149
Joined: Sat Jan 03, 2009 8:11 pm
Location: Germany, Munich
Contact:

Re: UnitConverter - unable to run

Post by RedAdder »

Python 3.1 is incompatible with Python 2.6

Method 1)
If you get the syntax error, if the syntax error comes from python(I can't tell from what you told me), then try installing python 2.6.2. Of course you will then have to mess around with the PATH to make it point at the old python that you newly installed.
Try uninstalling 3.1 first and then installing 2.6. Also, if you have set python 3.1 to be the default handler for .py files, you might need to set that up differently again.

There is also the alternative method 2) : convert the scripts (all .py files) using 2to3
http://docs.python.org/library/2to3.html
You could try that first, but it will change the scripts.
loki1950
The Shepherd
Posts: 5841
Joined: Fri May 13, 2005 8:37 pm
Location: Ottawa
Contact:

Re: UnitConverter - unable to run

Post by loki1950 »

Just tried UC with my Python 2.5 install on Win7 just double-clicked unitconverter and up pops the GUI so it is definitely a Python version issue so the source for it needs some massage to work with later versions so if you are up to the challenge go for it as we as a project will have to keep current :wink:

PS. the engines built-in Python is still not up to date and lots of the data side Python was written for 2.2 and 2.3 where there was another major change in syntax so there is lots of Python rewriting needed.

Enjoy the Choice :)
my box::HP Envy i5-6400 @2Q70GHzx4 8 Gb ram/1 Tb(Win10 64)/3 Tb Mint 19.2/GTX745 4Gb acer S243HL K222HQL
Q8200/Asus P5QDLX/8 Gb ram/WD 2Tb 2-500 G HD/GF GT640 2Gb Mint 17.3 64 bit Win 10 32 bit acer and Lenovo ideapad 320-15ARB Win 10/Mint 19.2
parkel
Hunter
Hunter
Posts: 73
Joined: Fri Jun 12, 2009 2:22 pm

Re: UnitConverter - unable to run

Post by parkel »

WOOT! I SOLVED THE PROBLEM!!!!

the problem here is NOT regarding the .xmesh or .obj or .whatever.
it is the problem of wings3d.

look:
offcenter.png
as you can see from this image, the cockpit is off center.

all you have to do is: click on tools > center > all
to centralize the image on ALL axes.

now, the cockpit is facing the wrong direction.
to set it to face the correct direction, select the entire cockpit and press rotate.
then, rotate the cockpit to face the z-axis. make sure the angle is at 0.00 before u press LMB to set it right.

next.
in game, you cant see the cockpit clearly. it has missing portions all over the place. try inserting the cockpit into the game without this step and u would most probably get what i mean.

ok... in order for you to see ur cockpit... there's an easy method.
DO NOT MOVE YOUR COCKPIT AROUND.
EDIT: you can move ur cockpit. but make sure that the axes converge inside the cockpit.
instead, stretch ur cockpit on the width and length until you see the entire framework in the game.

your cockpit is now visible.

oh.. and dont forget to change the 1st line of ur light_cockpit.cpt from:

Code: Select all

<Cockpit mesh="light_cockpit.bfxm" r=".5" g=".5" b="1">
to

Code: Select all

<Cockpit mesh="name-of-ur-cockpit.bfxm" r=".5" g=".5" b="1">
-------------------

here are the files (.obj, .mtl, .wings and the diffuse.png) for anyone who wants them - compile them urself! :mrgreen:
Cockpit II.zip
-------------------

here are the instructions on how to compile: http://vegastrike.sourceforge.net/wiki/ ... at_to_BFXM

for obj to bfxm: whatever.obj whatever.bfxm obc
for bfxm to xmesh: whatever.bfxm whatever.xmesh bxc


:mrgreen:

EDIT: about the python thingy... i tried it out with python 2.5 and it worked!
i re-PATHed everything and the ui popped up.
thx for everything :D
You do not have the required permissions to view the files attached to this post.
  • Derivative + pArKeL + a bunch of luddites = ?

    :D
parkel
Hunter
Hunter
Posts: 73
Joined: Fri Jun 12, 2009 2:22 pm

Re: UnitConverter - unable to run

Post by parkel »

apparently, i just found out (yea.. i know im slow) that when the sun isnt shining on u... there's no light.
total black inside the cockpit.

anyway to make the cockpit "light up" using wings 3d? :shock:

EDIT: using whatever method possible, i wanna know!!!!!!!!!!! :P
  • Derivative + pArKeL + a bunch of luddites = ?

    :D
Fendorin
Elite Venturer
Elite Venturer
Posts: 725
Joined: Mon Feb 26, 2007 6:01 pm
Location: France, Paris

Re: UnitConverter - unable to run

Post by Fendorin »

hi Parkel

maybe you need a texture in your cockpit with a luma channel/map?

Are you editing your own cockpit into the Game by using Unitconverter? :D
Did you try to editing a ship into the game :?:
Do you want help and contribute more :!:

here you have an exemple of a ship could be ad into game by you :http://www.divshare.com/download/6720508-590 :wink:
and the original topic:http://vegastrike.sourceforge.net/forum ... 36#p109236
Thanks in advance :mrgreen: :mrgreen:
Post Reply