How can ships be added into units.csv? (VS 0.4.3)

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
Nightshadow3002
Trader
Trader
Posts: 19
Joined: Sun Apr 03, 2005 1:04 am
Location: Hamburg, Germany

How can ships be added into units.csv? (VS 0.4.3)

Post by Nightshadow3002 »

In the units folder I found at least three ships I would like to have in the game, but they're not mentioned in the units.vs.

The ships are named "kafka", sartre" and quicksilver".

What do I have to do to get them into "units.vs" and/or get them into the game?

- - Edit: it's units.csv! - -
Last edited by Nightshadow3002 on Fri Apr 22, 2005 5:35 pm, edited 1 time in total.
Enjoy the Night
Nightshadow

All my enemies now Rest in Pieces!
Halleck
Elite
Elite
Posts: 1832
Joined: Sat Jan 15, 2005 10:21 pm
Location: State of Denial
Contact:

Post by Halleck »

units.vs? Never heard of it. Do you mean units.csv?
Nightshadow3002
Trader
Trader
Posts: 19
Joined: Sun Apr 03, 2005 1:04 am
Location: Hamburg, Germany

Post by Nightshadow3002 »

Sorry! :oops:

Yes it's "units.csv"

*dumdidum*
Enjoy the Night
Nightshadow

All my enemies now Rest in Pieces!
ack2000
Bounty Hunter
Bounty Hunter
Posts: 128
Joined: Tue Apr 19, 2005 10:16 pm

Post by ack2000 »

lets start from the begining.
obj or bfxm? I use 3dsmax export to 3ds, wings3d import 3ds, export to obj and then use mesher to convert obj to bfxm.

then when happy with finnal model I user wings to add tags and export to xmesh for the unit file.


unit.cvs

easy way pick a ship you like (centurion) copy its lines and add new line and paste.
modify to fit you ship name and folder that should be in the unit folder.

once you edit unit file you will understand.


note on ships. You may run into problems if your images are not in multiples of 2 ie 128x128 512x512 blah blah
also if your model has to many polygons.

finnal problem you may see is bfxm didnt transfer your images correctly. 2 problems here
1 image is not uv on model: take your image flip 180 then flip horizontially.
odd i know took me a while to find this one out.
2 model is all white (hate this one) if you edit bfxm (notepad or hexeditor your choice) becareful. change the white.bmp to you image name. problems doing this sometimes it doesnt like you to add extra chacaters. like your images jumppop.png but thats to long cause the game to crash you will need to rename it to 5 characters.

Please note I am generally messing with privateer remake of this engine.



so you want to fly your new ship.

I suggest editing a save game This is quickest way. or you can add to the master_part_list and add your ship so it can be purchased at some dealers.

i hope this helpful. I learn allot the hardway and sometime I wish this forum discussed problem/fix more.
Nightshadow3002
Trader
Trader
Posts: 19
Joined: Sun Apr 03, 2005 1:04 am
Location: Hamburg, Germany

Post by Nightshadow3002 »

unit.cvs

easy way pick a ship you like (centurion) copy its lines and add new line and paste.
modify to fit you ship name and folder that should be in the unit folder.

once you edit unit file you will understand.
Thanks for trying to help, ack2000, but to be honest, I understood at least half of what you wrote. :oops: Well, I'm no programmer...

First of all, I do not want to have brandnew ship in the game. The three ships mentioned above are already to find in the units folder, but not in "units.cvs".

I can't understand when I don't know how to modify the pasted lines!

The contents of the unit-files and the unit.csv are too different for me to know how to get another ship into this file.

May be there is a units.cvs file that has this three ships "inside". If it is so, please let me know where to find it.
Enjoy the Night
Nightshadow

All my enemies now Rest in Pieces!
ack2000
Bounty Hunter
Bounty Hunter
Posts: 128
Joined: Tue Apr 19, 2005 10:16 pm

Post by ack2000 »

sorry I will simplfiy (maybe)

I use excel to edit the unit file because it breaks it up into cells. much easier to edit.
Take something like aeon and modify to fit the ship your wanting

below is from unit file the ./aeon is folder location, the .bfxm is the model, aeraburn is thrusters where the animation is placed and photon the loaction on mounting wepons. there is more but that should get you start on modify.

aeon ./aeon Nicander FIXME FIXME INTERCEPTOR WRITEME aeon-hud.spr 1.74716 light_cockpit.cpt 0 0.25 4.5 {aeon.bfxm;;} {aeraburn.bfxm;-0.75;-0.086;-10;8;;;;;}{aeraburn.bfxm;0.75;-0.086;-10;8;;;;;} {Photon;;;light medium autotracking;5.600000;-1.600000;3.200000;;;;;;;;;1;1}{Photon;;;light medium autotracking;-5.600000;-1.600000;3.200000;;;;;;;;;1;1}{Photon;;;light medium autotracking;.5;-1.65;8;;;;;;;;;1;1}{Photon;;;light medium autotracking;-.5;-1.65;8;;;;;;;;;1;1}{Photonswarm;200;100;special-missile autotracking;3.600000;-1.600000;1.200000;;;;;;;;;1;1}{Photonswarm;200;100;special-missile autotracking;-3.600000;-1.600000;1.200000;;;;;;;;;1;1}
Nightshadow3002
Trader
Trader
Posts: 19
Joined: Sun Apr 03, 2005 1:04 am
Location: Hamburg, Germany

Post by Nightshadow3002 »

This is what "units.csv" says about the aeon:

aeon,./aeon,Nicander,FIXME,FIXME,INTERCEPTOR,WRITEME,aeon-hud.spr,1.74716,light_cockpit.cpt,0,0.25,4.5,{aeon.bfxm;;},,,,,,132,132,,11,271,90.5,90.5,90.5,90.5,90.5,90.5,90.5,
90.5,360,360,,,,,,,90,0,1300,500,160,TRUE,1,,90,45,0,30,20000,20000,
20000,90,100,120,18200,10000,10000,10000,10000,10000,10000,300,
270,TRUE,TRUE,300000000,5,180,10,10,,,,,,,0,0,0,1;1;1;1;1;1;1;1;1;1;
1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1,1;1;1;1;1;1;1;1;1;1;1;
1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1,1,1,1,1,1,1,1,1,0,0,,,{mult_turn_balancer;;},,;;;;;;,{aeraburn.bfxm;-0.75;-0.086;-10;8;;;;;}{aeraburn.bfxm;0.75;-0.086;-10;8;;;;;},{Photon;;;light medium autotracking;5.600000;-1.600000;3.200000;;;;;;;;;1;1}{Photon;;;light medium autotracking;-5.600000;-1.600000;3.200000;;;;;;;;;1;1}{Photon;;;light medium autotracking;.5;-1.65;8;;;;;;;;;1;1}{Photon;;;light medium autotracking;-.5;-1.65;8;;;;;;;;;1;1}{Photonswarm;200;100;special-missile autotracking;3.600000;-1.600000;1.200000;;;;;;;;;1;1}{Photonswarm;200;100;special-missile autotracking;-3.600000;-1.600000;1.200000;;;;;;;;;1;1},,,,,explosion_aera.ani,0,0,16,0

I must say it looks much different to the aeon file in the units folder.

So, where do all the"0"s and "1"s come from? ... and the "TRUE"s? ... e.g. there is a "mult_turn_balancer" you didn't even mention. :?:

So modifying the "units.csv" seems to me be not to be that easy!
Enjoy the Night
Nightshadow

All my enemies now Rest in Pieces!
ack2000
Bounty Hunter
Bounty Hunter
Posts: 128
Joined: Tue Apr 19, 2005 10:16 pm

Post by ack2000 »

the reason i didnt mention any of this was trying to keep it simple.
I may be wrong becuase i never changed it but all those ones are placement of hud image.
jackS
Minister of Information
Minister of Information
Posts: 1895
Joined: Fri Jan 31, 2003 9:40 pm
Location: The land of tenure (and diaper changes)

Post by jackS »

ack2000 wrote:the reason i didnt mention any of this was trying to keep it simple.
I may be wrong becuase i never changed it but all those ones are placement of hud image.
no, actually, the long string of 1s is the functionality rating of various subsystems. If you look at the first two rows, all of the fields are named.
Nightshadow3002
Trader
Trader
Posts: 19
Joined: Sun Apr 03, 2005 1:04 am
Location: Hamburg, Germany

Post by Nightshadow3002 »

@ jackS (or anyone who may know :) )

1) The first two lines in what file (unit-file or units.csv)?

2) Is there a reason why the ships kafka, sartre and quicksilver are not included in "units.csv"? :?:
Enjoy the Night
Nightshadow

All my enemies now Rest in Pieces!
jackS
Minister of Information
Minister of Information
Posts: 1895
Joined: Fri Jan 31, 2003 9:40 pm
Location: The land of tenure (and diaper changes)

Post by jackS »

apologies for lack of clarity - first two lines of units.csv

as to why those ships didn't have entries - I didn't get around to coming up with an appropriate set of stats for the ships before the release.
Halleck
Elite
Elite
Posts: 1832
Joined: Sat Jan 15, 2005 10:21 pm
Location: State of Denial
Contact:

Post by Halleck »

You can actually create a second view that makes the first two rows of units.csv always visible when editing the file, which is very handy.

In OpenOffice calc, select cell b3 and hit "freeze". In Excel, as far as i remember, you can drag down that little bit on the top of the vertical scroll bar to create an upper view showing the first two rows, and do your editing in the lower view.
Nightshadow3002
Trader
Trader
Posts: 19
Joined: Sun Apr 03, 2005 1:04 am
Location: Hamburg, Germany

Post by Nightshadow3002 »

I really tried to edit units.csv (using StarOffice) ... and failed (nothing to do with StarOffice :) )!

I wasn't able to find out, which "0" or "1" belongs to what subsystem with the consequence that VS wasn't playable...

Thank Fortune I backed up units.csv, so - after getting it back and throwing the "edited" version into the garbagecan - I'm still able to play.

All I won is "experience". :wink:
Enjoy the Night
Nightshadow

All my enemies now Rest in Pieces!
ace123
Lead Network Developer
Lead Network Developer
Posts: 2560
Joined: Sun Jan 12, 2003 9:13 am
Location: Palo Alto CA
Contact:

Post by ace123 »

When saving the units.csv, make sure that the file format is set to comma separated values AND make sure that the separator/deliminator is comma "," (I think it defaults to something else like tab even after opening a CSV file.)

Another alternative is to get out a text editor (Notepad on windoes, TextEdit on mac, kwrite/emacs/vim/anything on linux). But this forces you to keep track of which column is which,
reaper
Trader
Trader
Posts: 24
Joined: Tue Mar 15, 2005 5:50 pm
Location: Just Past Barnard's Star
Contact:

Post by reaper »

Also, when editing the csv file, there are things like the coordinates of gun mounts, the cockpit, etc. You can look at the units/shipname[\i].blank files to find the coordinates. This is important for the three ships you mention since their coordinates will be different than whatever template ship you use.

the Wiki How tos on how to look at xunit files and loading a ship, etc. are marginally useful and that with a combination of messing around seemed to work for me.
-----------------------

There is something fascinating about science. One gets such wholesale returns of conjecture out of such a trifling investment of fact.

--Mark Twain
GAlex
Mercenary
Mercenary
Posts: 126
Joined: Sun May 01, 2005 10:33 am
Location: Italia

csv editing tool

Post by GAlex »

hello everyone.

i've developed a small tool to help editing csv files.

i'ts lightweight, about 400kB, has a simple, straight and self explanatory GUI, and all that stuff you need, without needing to buy microsoft office, or downloading openoffice (and waiting for it to start).

it's open source free software released under GPL.

i'ts developed in freepascal with the aid of Lazarus IDE/RAD and thus the app can be built for quite all the os's and processors. for more info see www.lazarus.freepascal.org.

attached at this post you can find a zip archive with the source files and a win32 build.

a linux build will follow as soon as i have the time to install and configure my new SuSE 9.3, and install/configure on it freepascal+Lazarus (or will someone do this in shorter times?)

the executables compiled and linked with freepascal are statically linked, so they does not need any external library, running easily out of the box.

try it and sent me comment in this forum or in the other opened in the developer tool section.

thanks to all.

file removod due to buggy build. reposted
Last edited by GAlex on Wed May 04, 2005 8:07 pm, edited 1 time in total.
"Eppur si muove ..."
(Galileo Galilei just after abjuring to the Inquisition)
hellcatv
Developer
Developer
Posts: 3980
Joined: Fri Jan 03, 2003 4:53 am
Location: Stanford, CA
Contact:

Post by hellcatv »

really awesome :-) I got it working in wine--have to configure gcc to build pascal at some point in the future
Vega Strike Lead Developer
http://vegastrike.sourceforge.net/
GAlex
Mercenary
Mercenary
Posts: 126
Joined: Sun May 01, 2005 10:33 am
Location: Italia

gcc and freepascal+lazarus

Post by GAlex »

the previous build was buggy and has been removed.
new build attached to this post.

i don't think you will be able to compile a freepascal+LCL (lazarus component library) project with gcc due to compatibility issues, but if it was possible, i don't think it's the best way, cause you'd have to configure also the compiler and linker paths.

if you have time and will i strongly suggest you to have a look at www.lazarus.freepascal.org, in which you can find all the rpms and srpms you need. it's not so heavy to download if you have broadband (i've only 1280 kbit/s dsl and took me less than 5 minutes).

i was also sure it could run in wine, but ... it's better to have it ELF on linux.

i don't think i will have the time for a linux build this week, 'cause i'm going to spend some days in Tunisia.

i will be back on 16.may, and will then reply all the requests/feedbacks posted meanwile.

see you soon.
You do not have the required permissions to view the files attached to this post.
"Eppur si muove ..."
(Galileo Galilei just after abjuring to the Inquisition)
hellcatv
Developer
Developer
Posts: 3980
Joined: Fri Jan 03, 2003 4:53 am
Location: Stanford, CA
Contact:

Post by hellcatv »

cool--well at least it works in wine until then
Vega Strike Lead Developer
http://vegastrike.sourceforge.net/
GAlex
Mercenary
Mercenary
Posts: 126
Joined: Sun May 01, 2005 10:33 am
Location: Italia

linux build

Post by GAlex »

after a long while, here it is a linux build.

enjoy.
"Eppur si muove ..."
(Galileo Galilei just after abjuring to the Inquisition)
Post Reply