Bridge Commander Central

BC Forums => BC Modding => Topic started by: Jernej on April 30, 2008, 12:24:00 PM

Title: Hardpoints editor with model preview.. work in progress!
Post by: Jernej on April 30, 2008, 12:24:00 PM
(http://mathpudding.com/temp/nif_loader.jpg)
 
Hopefully this is a start of a nice little new hardpoint editor with ship rendering support, so you guys can stop guessing coordinates and end up releasing ships with torpedo tubes inside the engineering hull and other similar mishaps.. with a bit help of NifSkope and good old hex editor i made this model loader in a day, it supports most of bridge commander models already, and supporting special chunks in nif files won't be a problem. i will add a texture loader later today, and hopefully i can also add some sort of python hardpoint importer and exporter to complete it.
 
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: Bones on April 30, 2008, 12:45:45 PM
It was never really necessary to guess the coordinates thanks to Model Property Editor - the only existing tool with model viewer and hardpoint edition/creation tools ;)

Nice work so far, keep it up :D
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: Starforce2 on April 30, 2008, 12:49:30 PM
it would be nice to have an mpe without all the crash bugs left in it...like if you accedently hit delete property without one selected, or rid of that annoying "you must enter a number" prompt when you are trying to delete one to enter somethign new. It's a little late in the game for such a tool, should have been done long time ago and would have been much more worthwhile than say..BCMI..but better late then never.
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: Jernej on April 30, 2008, 01:01:08 PM
Model Property Editor

 
I thought that damn thing was built to crash on every 3 clicks?
 
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: Sandtrooper on April 30, 2008, 01:55:41 PM
MPE's other nasty bug was if you resized the vertical boxes after you loaded the HP the model would go white...hope this doesn't do that...
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: Bones on April 30, 2008, 02:15:53 PM
Yup if want to make something very quick with mpe it always crashes, especially when creating new HP
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: Jernej on April 30, 2008, 04:54:29 PM
(http://mathpudding.com/temp/nif_loader_tex.jpg)
 
It now loads all models in kb/m (minus 3 "specials"), i still have to fix some rendering issues (node translation, rotation & scale) before i go after hardpoint editing.
 
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: Starforce2 on April 30, 2008, 06:37:42 PM
if you need a tester let me know. Be warned...I nitpick.
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: Picard_1 on April 30, 2008, 10:44:05 PM
It would be nice if someone could incorporate a group edit of ship stats so you
don't have to edit your phaser arrays individually.
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: blaXXer on May 01, 2008, 07:14:30 AM
Yay, this may finally be a tool that even I can use ;)
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: El on May 01, 2008, 07:33:43 AM
if you need a tester let me know. Be warned...I nitpick.

Ditto.

The major pain with the MPE was subsystem positioning and setting up fed phaser arrays...
However, being able to set up non-elyptical arcs would be excellent, so we can actually 'draw' a phaser array placement over the physical texture would be superb.

Also being able to actually show a nonafx blinker in operation rather than just a representation with xyz lines.

BTW, I'm even more picky than Starforce ;)
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: tiqhud on May 01, 2008, 08:00:51 AM
Yep elmi- and St2- know their stuff, I will test if you wish, we Are a group of nitpickers.
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: MLeo on May 01, 2008, 08:27:27 AM
if you need a tester let me know. Be warned...I nitpick.

Ditto.

The major pain with the MPE was subsystem positioning and setting up fed phaser arrays...
However, being able to set up non-elyptical arcs would be excellent, so we can actually 'draw' a phaser array placement over the physical texture would be superb.
I just wonder if that is possible from the BC side of things.
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: El on May 01, 2008, 10:34:40 AM
Hmm, would it be better to use the BC engine to render the whole thing I wonder?

Edit: is this something that could be built on BC Core?
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: MLeo on May 01, 2008, 10:55:30 AM
Hmm, would it be better to use the BC engine to render the whole thing I wonder?

Edit: is this something that could be built on BC Core?
Something I've always wanted to do (but never got off the ground, maybe in the future) was to create a special "mission" (think QuickBattle, that is also a mission) but where you could hp a model. But also include other things, such as FoundationTech stuff (or rather, additional plugins). But as I said, I never got that off the ground.
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: Starforce2 on May 01, 2008, 10:59:23 AM
Yay, this may finally be a tool that even I can use ;)

No comment :P

another nice idea would be to have the crosshairs on all properties to display the size of the property (like with hull, or shield generator) because weapons don't show it. I've found some ships with the phaserbank properties set so large that anytime you make a hot on the saucer it damages all of them (while this may be realistic for tos, we've seen ships fire with heavy hull damage in later times)
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: Jernej on May 01, 2008, 01:34:55 PM
Elminster: sure it is possible, but when you consider all the python scripting needed to do it i guess you'll have a pretty headache, it is much easier and convinient to create an external program for editing hardpoints.
 
I now got the model loader to work just as good as BC itself, it doesn't handle the eye candy such as reflections and glow maps, but it renders all ships from KB/M properly, and i think that's as good as it has to be.. if it supports all those different ships i'm sure it supports all of it, but if it does't work with a ship that you have, give me a shout, here's the model viewer you can download to check it out:
 
http://mathpudding.com/temp/nifloader.rar
 
Load a .nif model, mouse drag = rotate, scroll wheel = zoom, hold control to zoom with greater factor.
 
The only thing it doesn't support at the moment are TGA textures which are RLE compressed, i only seen like 3 ships use them, i'll try to solve that later, and some ships have uv maps flipped for some reason, but i am clueless what causes that.
 
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: Sandtrooper on May 01, 2008, 01:48:57 PM
Looks nice....loads the "better" (IMO) BoP model nice...


At least it recognizes the scale too, a good thing
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: Dawg81 on May 01, 2008, 03:44:45 PM
I was messing around with the viewer checking it out and by chance i was viewing khalibans connie and i zoomed her in and it took me inside of here and this is what she looked like
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: Jernej on May 01, 2008, 04:02:42 PM
I was messing around with the viewer checking it out and by chance i was viewing khalibans connie and i zoomed her in and it took me inside of here and this is what she looked like

 
I don't get it.. what does that mean?
 
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: Nebula on May 01, 2008, 04:10:50 PM
he was wondering if you should be able to see the textures from the inside... if it was some sort of gfx glich
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: El on May 01, 2008, 04:36:10 PM
MPE does something similar, does it matter?

This is great work. Adding glows and the ability to see nanofx blinkers would be very handy (to aid with blinker placement).
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: tiqhud on May 01, 2008, 06:34:07 PM
MPE does something similar, does it matter?

This is great work. Adding glows and the ability to see nanofx blinkers would be very handy (to aid with blinker placement).

 It don't matter if MPE can do it , and then this do it.
BCSMC does like BCMP, only more and safer.
Indeed, but I for one really like the thing about the phaser placements.
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: Jernej on May 02, 2008, 02:34:39 AM
MPE BCSMC BCMP

 
Sorry.. i got lost at "MPE", care to explain what all those acronyms stand for? i'm not exactly knowledgeable with all these tools you use..
 
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: Nebula on May 02, 2008, 02:36:49 AM
MPE = model property editor; thats basically what you are making....

BCSMC is just a tool to add ships into BC same with BCMP
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: FekLeyr Targ on May 02, 2008, 07:34:14 AM
I've also tested it myself and I'm impressed.
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: tiqhud on May 02, 2008, 07:42:56 AM
[quote author=Jernej 
 
Sorry.. i got lost at "MPE", care to explain what all those acronyms stand for? i'm not exactly knowledgeable with all these tools you use..
 
[/quote]

Sorry,  MPE [model property editor], BCSMC  [bridge commander ship menu creator], BCMP [you know if forgot]

I been using BCSMC for so long no I forgor , BCSMC is far superior than BCMP, you could really mess-up you install if you pushed the wrong button in BCMP.

Oh some more you might hear SDK [softeare developement kit] , TDE [tactial display editor], BCMI [bridge commander mod installer] 
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: El on May 02, 2008, 07:49:34 AM
Actually that's a good point, if you can integrate the Tactical Display elements too, we'd no longer need to use the buggy TDE, and your program can be a one stop shop.
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: Jernej on May 02, 2008, 10:57:00 AM
I'm going to need one good hardpointer that also knows python to which i can talk on msn, there's so many parameters in hardpoint files and i need someone that knows this stuff well, to explain it all to me.
 
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: MLeo on May 02, 2008, 12:02:15 PM
What do you want to know?
That would be more usefull?

Or rather, what do you want to do with that knowledge?
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: Jernej on May 02, 2008, 12:48:06 PM
What do you want to know?
That would be more usefull?

Or rather, what do you want to do with that knowledge?

 
Well who else is going to explain me how arcs, federation phaser strips and tactical display parameters work? it can take me a long time to figure it all out by myself..
 
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: MLeo on May 02, 2008, 01:23:41 PM
Good thing I asked then, since I was thinking that you were asking how to import/read the py files without BC or how to output the new data.
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: El on May 02, 2008, 01:32:46 PM
It might be a good idea for you to have a look at both the MPE and TDE with a ship and HP loaded and see what sort of values your dealing with, get a feel for them.

Just thought it would be easier than trying to describe it via MSN or posts.
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: Picard_1 on May 02, 2008, 08:15:38 PM
Quote
I've found some ships with the phaserbank properties set so large that anytime you make a hot on the saucer it damages all of them (while this may be realistic for tos, we've seen ships fire with heavy hull damage in later times

TOS and TMP ships seemed capable of dishing out phasers and torpedoes with heavy damage, but I remember the Enterprise D had all power severed to the forward phasers in "Yesterday's Enterprise." Geordi was also yapping about power cuff links being damaged or down. Instead of having damage done to the phaser hp itself, maybe a script could be created for having to damage power systems in order to cut power to weapons.

I thought the EPS power grid in STTNG A Final Unity worked well. The more damage you took the the EPS, the less power you had available to weapons, shields, sensors, and other ship systems.
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: Starforce2 on May 02, 2008, 08:23:35 PM
Quote
I've found some ships with the phaserbank properties set so large that anytime you make a hot on the saucer it damages all of them (while this may be realistic for tos, we've seen ships fire with heavy hull damage in later times

TOS and TMP ships seemed capable of dishing out phasers and torpedoes with heavy damage, but I remember the Enterprise D had all power severed to the forward phasers in "Yesterday's Enterprise." Geordi was also yapping about power cuff links being damaged or down. Instead of having damage done to the phaser hp itself, maybe a script could be created for having to damage power systems in order to cut power to weapons.

I thought the EPS power grid in STTNG A Final Unity worked well. The more damage you took the the EPS, the less power you had available to weapons, shields, sensors, and other ship systems.

Well, that's not really an issue with the hp editor, but with the game. Lets make sure this thread stays about the editor and not a "modding ideas thread"

Don't forget also that when making a new property such as a phaserbank, it cannot begin with a number, and there can't be any funny characters in it, only letters. Numbers can be used just not at the begnning.
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: Jernej on May 03, 2008, 08:20:43 AM
off-topic: The excalibur in kb/m has phaser grid which you can destroy to cut off power to phasers..
 
Speaking of what damage to phasers is canon / realistic / fun: you guys need to realise that canon is non-consistient, realistic is not fun, and what is fun doesn't have to follow the movies or tv series.
 
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: El on May 03, 2008, 08:38:22 AM
Speaking of what damage to phasers is canon / realistic / fun: you guys need to realise that canon is non-consistient, realistic is not fun, and what is fun doesn't have to follow the movies or tv series.
QFT!

Seriously, if you need any HP specific info though, let me know.
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: Picard_1 on May 04, 2008, 01:12:15 AM
Quote
Speaking of what damage to phasers is canon / realistic / fun: you guys need to realise that canon is non-consistient, realistic is not fun, and what is fun doesn't have to follow the movies or tv series.

Everyone has their own ideas about how things should be in the Star Trek universe, but canon material is a good reference guide. It also serves a basis for ship stats.
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: Shadowknight1 on May 04, 2008, 03:24:16 AM
I tried this out, nifty little viewer, but with Khaliban's 1701-A, after my little retexture, parts of the hull texture don't show up.
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: El on May 04, 2008, 06:39:20 AM
Yes, I noticed that, it doesn't like some of the tga's and others it loads fine, it seems to be random from what I can tell though.
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: MLeo on May 04, 2008, 07:11:56 AM
They are mostlikely the RLE encoded (yes, that's encoded twice) tga's.

@Jernej: Have you checked out the TGA loading examples at this site?
http://nehe.gamedev.net yes, they are in opengl, but the texture loading is basicly api free, you just replace the actual 3d api calls.
Here are the relevant articles:
http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=24
http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=33 (especially this one)

Also, why not use a library for texture loading?
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: SMBW on May 04, 2008, 07:25:03 AM
Well who else is going to explain me how arcs, federation phaser strips and tactical display parameters work? it can take me a long time to figure it all out by myself..

You might be able to find some helpful information in the modelpropertyeditor readme from sdk

SDK download:
http://bridgecommander.filefront.com/file/Bridge_Commander_SDK;2455 (http://bridgecommander.filefront.com/file/Bridge_Commander_SDK;2455)
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: Jernej on May 04, 2008, 08:49:05 AM
If you read my post you would see i wrote clearly that it doesn't load compressed tga-s, it even tells that in the debug log in the program. and i know what RLE is and how it works, i just couldn't be bothered to work on it when i had more important things to do, such as getting the model object hierarchy rendered correctly...
 
Quote
@Jernej: Have you checked out the TGA loading examples at this site?
http://nehe.gamedev.net yes, they are in opengl, but the texture loading is basicly api free, you just replace the actual 3d api calls.
Here are the relevant articles:

 
I am using opengl, directx can go to hell, and i already wrote my tga loader, it just doesn't support rle yet.
 
Quote
Also, why not use a library for texture loading?

 
I haven't seen any image loading library which supported NIF images, did you?
 
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: MLeo on May 04, 2008, 10:41:55 AM
I haven't seen any image loading library which supported NIF images, did you?
No, but why do everything else, except that one specific corner case, yourself, again?
I can see the reason why you want to do your own MPE kind of program, to fix problems with it.
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: El on May 04, 2008, 11:01:01 AM
If you read my post you would see i wrote clearly that it doesn't load compressed tga-s, it even tells that in the debug log in the program. and i know what RLE is and how it works, i just couldn't be bothered to work on it when i had more important things to do, such as getting the model object hierarchy rendered correctly...
 
Quote
@Jernej: Have you checked out the TGA loading examples at this site?
http://nehe.gamedev.net yes, they are in opengl, but the texture loading is basicly api free, you just replace the actual 3d api calls.
Here are the relevant articles:

 
I am using opengl, directx can go to hell, and i already wrote my tga loader, it just doesn't support rle yet.
 
Quote
Also, why not use a library for texture loading?

 
I haven't seen any image loading library which supported NIF images, did you?
 

People are trying to help you here, please try and be less confrontational.

The reason everyone is offering these suggestions and critiques is because they want this program to be the best it can be.
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: Jernej on May 04, 2008, 11:44:19 AM
@MLeo:
 
Because it takes me only 10 minutes to make it work.. and i don't want to drag 800KB of libraries with the program, and i am perfectly capable of programming this on my own...

@Elminster
 
Well, they got it wrong, i don't need programming help, i need hardpoint info, if i wanted programming help i would ask people to write me a python script parser...
 
For all the nitpickers.. here is a version which loads rle compressed TGAs.. (which i added in 10 minutes):
http://mathpudding.com/temp/nifloader.rar
 
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: El on May 04, 2008, 12:54:45 PM
Jernej, your attitude is not helping.
Please tone it down.

Edit: Please let us know what HP info you require and I'll see if I can provide.
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: Jernej on May 04, 2008, 01:15:21 PM
Jernej, your attitude is not helping.
Please tone it down.

Edit: Please let us know what HP info you require and I'll see if I can provide.

 
I apologize if my attitude is offending, but i have a nasty habit of being very open about my thoughts, so please don't tell me how to code the program, rather please stay on topic and describe what features you would like to see and if you can find a ship model that won't load properly.
 
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: Mark on May 04, 2008, 03:28:29 PM
Welcome to the forums Jernej, the work you are doing here looks very promising. You are however being rather impolite to members of the community who are trying to offer assistance and as such I am going to repeat my vice administrator's request that you "tone it down" a bit.

While I can understand that you may not feel you need their assistance, they still deserve a level of respect and politeness that I am sure you yourself would expect to recieve if the tables were turned.

As a new member of the forum I would ask you to have a browse of the site rules (http://bc-central.net/forums/index.php?topic=1244.0), please note that we expect all guests of the site to respect staff members such as Elminster, and that any response to a request made by a member of staff should be sent via the PM system in order to minimize the disruption to any thread.

Since you may not have realised this before I am happy to ignore your previous post, however in future I will expect you to follow the rules.

I look forward to seeing more on this project, I would not be suprised to see a nomination for you at next months MotM awards.
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: Jernej on May 04, 2008, 05:37:11 PM
I want to apologize for my behavour, i realise now i was offered sincere help, but i declined it in a wrong way, i want to explain that i am not exactly new to modding or making modding tools in general, in last 8 years i have built everything from gta city map editors, mod installers, texture conversion tools, so i have a fair bit of experience with the way games work, and how to handle game file formats, if i didn't have the experience i couldn't write a STBC model loader in just one evening.. so i want to let you know, that the programming related help was appreciated, but it was off-topic and not really needed, and i found it a little rude since i don't like people interfering in the programming part unless i myself ask for help in that area (which i didn't).
 
So let me repeat: your help regarding programming was nice but not needed, i admit i was being rude and overreacted, it just happened.. again, i apologize for that.
 
Hopefully we can now stay on topic, which is, if someone can explain what the hardpoint parameters mean (such as, for example SetMaxCharge, SetMinFiringCharge, SetNormalDischargeRate, SetRechargeRate, what units are those in, etc.. ).
 
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: Sandtrooper on May 04, 2008, 08:30:21 PM
...which is, if someone can explain what the hardpoint parameters mean (such as, for example SetMaxCharge, SetMinFiringCharge, SetNormalDischargeRate, SetRechargeRate, what units are those in, etc.. ).

I'm gunna explain this as a Disruptor Cannon property, phasers are a bit different when it comes to the terms.
Note I'm a bit rusty at this since I'm trying to get out of the profession

SetMaxCharge is how many numbers (or shots) the weapon can hold, say I wanted 5 shots..

I then set "SetNormalDischargeRate" to 1 so it shoots 1 full shot

SetMinFiringCharge is something I still don't get...

SetRechargeRate is what it pretty much what the name says, you set this too high, the in-game seconds will recharge the gun up to 5 in about 3 seconds real-life. Set this to a low number if you have a uber gun, and you want it to have a slow reload/recharge.

Again, I'm rusty...
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: Picard_1 on May 04, 2008, 08:41:59 PM
Quote
Hopefully we can now stay on topic, which is, if someone can explain what the hardpoint parameters mean (such as, for example SetMaxCharge, SetMinFiringCharge, SetNormalDischargeRate, SetRechargeRate, what units are those in, etc.. ).

I believe that is covered in the documentation for the Model Property Editor included with the BCSDK. Like Elminster said, the best way to learn them is to get a feel for how things work by using MPE to edit ship hardpoints. I'll try to explain what the few parameters you pointed out mean off the top of my head. I'm not sure what they are equivalent to in game units (probably in seconds judging from the feel). Most of these are self explanatory.

SetMaxCharge = The maximum amount of charge the weapon has i.e., phaser, disruptor

SetMinFiringCharge = Minimum charge needed before the weapon can fire

SetNormalDischargeRate = how fast the weapon discharges

SetRechargeRate = how fast the weapon replenishes its charge
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: Voyager16 on May 04, 2008, 10:41:11 PM
oeh nice mate! This looks really great! Keep it up :)
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: Jernej on May 24, 2008, 09:42:10 PM
I given up on this, i'll make something else instead.
 
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: DJ Curtis on May 24, 2008, 10:42:53 PM
too bad.  any particular reason?
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: FekLeyr Targ on May 25, 2008, 03:11:13 PM
I agree with DJ Curtis.
But would you eventually be willing to release the source code so someone else can continue?
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: Jernej on May 26, 2008, 12:21:27 PM
It's programmed in delphi 7, anyone interested?
 
Edit: i'm cancelling it because it is too much effort for me to make a proper python parser to load existing hardpoints, but the model and texture loader are great, so i'm going to use those for something else.
 
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: MLeo on May 26, 2008, 01:42:17 PM
It's programmed in delphi 7, anyone interested?
 
Edit: i'm cancelling it because it is too much effort for me to make a proper python parser to load existing hardpoints, but the model and texture loader are great, so i'm going to use those for something else.
 
Just put it up, I doubt a lot of people can read it.



Also, about the Python parser, I'm fairly sure Delphi can be extended with C, meaning that you can link with the CPython library (I suggest you use 1.5.2, since that's the version of Python BC uses).
Here is such an example: http://rvelthuis.de/articles/articles-cobjs.html
If you want, I can help you with the "magic" it would require for loading App.py correctly.
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: Jernej on May 26, 2008, 04:05:10 PM
Nah, the thing i am working on now is far beyond what a simple hardpoint editor would do, sure i could use the python libs, but the complexity and lack of documentation on integration are a big no-go, so i'm going to make something else with this.
 
Here is the nif loader & renderer source code in current form:
 
http://mathpudding.com/temp/simple_bc_nif_loader.rar
 
It compiles in delphi 4 and 7 without any trouble, no guarantee on readability of the code or anything, if you use it.. you're on your own, but feel free to bug me on msn about it..
 
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: MLeo on May 26, 2008, 05:46:40 PM
You do know that Python is a complete, also as as in Turing Complete, programming language? Be right it can do anything. :P

Short of just a modeller, you would need a Python interpretter if you are going to load a ship through it's ship plugin, since there are absolutely _NO_ guarantees that any plugin could possibly follow any standard. :P


These help a lot:
http://docs.python.org/ext/ext.html
http://docs.python.org/api/api.html

I've also attached the same documention (but in HTML form that I wget-ed recently), but for 1.5.2. I've actually used the same manual, but for 2.3 (it's too large to attach with the currently attached file), to extend and embed Python once. :P
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: Jernej on May 26, 2008, 06:47:41 PM
I wasn't talking about completeness of python language and and syntax.. more about integration into other programs, but this has passed now, i'm working on something else, i will probably be able to show you progress on the new stuff pretty soon.
 
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: LJ on May 27, 2008, 04:57:03 PM
Sorry for the late comment (had exams recently lol).  The screenshots look really nice dude!  AFIK you are the first developer to write a NIF importer on these forums!  Congrats :-)

I can code Delphi and would really like to have a look at your file parser if you are still considering opening the source. :-)

All the best

-LJ
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: MLeo on May 27, 2008, 05:10:16 PM
Sorry for the late comment (had exams recently lol).  The screenshots look really nice dude!  AFIK you are the first developer to write a NIF importer on these forums!  Congrats :-)

I can code Delphi and would really like to have a look at your file parser if you are still considering opening the source. :-)

All the best

-LJ
Look at the previous page. ;)
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: Jernej on May 27, 2008, 05:28:26 PM
Sorry for the late comment (had exams recently lol).  The screenshots look really nice dude!  AFIK you are the first developer to write a NIF importer on these forums!  Congrats :-)

I can code Delphi and would really like to have a look at your file parser if you are still considering opening the source. :-)

All the best

-LJ

 
The source was posted in one of my previous posts.
 
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: Barihawk on May 27, 2008, 05:29:55 PM

Hopefully this is a start of a nice little new hardpoint editor with ship rendering support, so you guys can stop guessing coordinates and end up releasing ships with torpedo tubes inside the engineering hull and other similar mishaps.. with a bit help of NifSkope and good old hex editor i made this model loader in a day, it supports most of bridge commander models already, and supporting special chunks in nif files won't be a problem. i will add a texture loader later today, and hopefully i can also add some sort of python hardpoint importer and exporter to complete it.
 

Big stretch, but I don't suppose you could find a way to make a hardpoint editor (hell, even just a viewer) for models in Star Trek: Legacy? That would make simple for a lot of us, as we've been having to guess on hardpoints for over two years now.
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: Jernej on May 27, 2008, 05:48:58 PM
Big stretch, but I don't suppose you could find a way to make a hardpoint editor (hell, even just a viewer) for models in Star Trek: Legacy? That would make simple for a lot of us, as we've been having to guess on hardpoints for over two years now.

 
I thought people gave up on modding that.. so called "game".. but if the model format is documented i could just write a model loader so you could see the ship in 3d and grab coords of its surface, that's not much work..
 
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: Barihawk on May 27, 2008, 05:51:33 PM
That's all we need.

And hey, we have four total conversions still going strong, and we've made huge progress in the realms of AI, weapon sprites, combat behaviors and interfaces.

So if you feel like making one, we'd be very grateful.

EDIT: reread your statement. Is there a way to make a hardpoint editor? The hardpoints are the main reason we need the program. Mad Doc gave each ship great hardpoints at their disposal, but absolutely no tool to tell us which ones they are.
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: LJ on May 27, 2008, 07:06:07 PM
The source was posted in one of my previous posts.

Cheers  :mrgreen:  Very nice code dude.
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: Jernej on May 30, 2008, 07:25:13 PM
A small preview of what i am turning the "was supposed to be a hardpoint editor" into:
 
(http://mathpudding.com/temp/the_meeting.jpg)
 

 
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: FekLeyr Targ on May 31, 2008, 03:26:11 PM
Is it supposed to be some sort of scale comparitor?
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: Darkthunder on May 31, 2008, 06:38:27 PM
A suggestion would be to get in contact with Nanobyte. He's working on his own game engine, which will be used for the "Star Trek: Excalibur" project, among other things. More compatent programmers, i'm sure are always welcome. You can either pm him here, or on the NanoFX homepage.

http://www.nanofx.org
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: Jernej on May 31, 2008, 08:19:12 PM
A suggestion would be to get in contact with Nanobyte. He's working on his own game engine, which will be used for the "Star Trek: Excalibur" project, among other things. More compatent programmers, i'm sure are always welcome. You can either pm him here, or on the NanoFX homepage.

http://www.nanofx.org

 
I'm aware of that and already talked to some people working on his project, this project is completely different, i'm purely into high-fps "loads of ships blow up" kind of game (imagine sacrifice of angels with each ship one player), where nanofx is into nice next gen graphics and story (Excalibur), plus my programming work is done completely different to theirs, while i assume they use C# (.net), i'm doing things my way (Delphi x86).
 
Quote from: FekLeyr Targ
Is it supposed to be some sort of scale comparitor?

 
Err.. no.. it's a game engine..
 
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: Barihawk on May 31, 2008, 08:22:10 PM
So I guess the MPE for Legacy is out the window at this point?
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: Jernej on May 31, 2008, 08:26:11 PM
So I guess the MPE for Legacy is out the window at this point?

 
Depends on the complexity of the model format.. i never even got a look at legacy files, i don't own a copy of the game either, so it is a bit hard for me to gain any info on the game.. i'll try downloading some ship mods and look around, if it isn't too complex i might be able to do something, but no promises..
 
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: Barihawk on May 31, 2008, 08:40:48 PM
Anything would be better than what we have, which is nothing... :(
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: Jernej on June 01, 2008, 11:15:39 AM
Anything would be better than what we have, which is nothing... :(

 
The data structure looks insane.. what do you use to import & export models aniway?
 
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: Voyager16 on June 01, 2008, 11:53:50 AM
Ahh yes, an model viewer for Legacy, sure would make things lots easier.
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: Barihawk on June 01, 2008, 11:56:10 AM
Anything would be better than what we have, which is nothing... :(

 
The data structure looks insane.. what do you use to import & export models aniway?
 

Milkshape with some wacky plugin by Moonraker.
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: MLeo on June 01, 2008, 02:30:41 PM
It tought it was just "plain" SOD and other Armada data structures?
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: Jernej on June 01, 2008, 07:49:06 PM
Legacy format looks freaking weird, i could try contacting the author of the exporter if he can give me some cluse, but it definetly looks like a lot more work (a week?) than BC's nif (few hours) was.
 
Some new progress, about graphics: please excuse the aggressive distance visibility culling and badly textured planet (and the complete lack of stars.. ) :)
 

 
I will try making a new topic about the game later.
 
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: JimmyB76 on June 01, 2008, 08:22:56 PM
i wish BC could have camera angles like that...
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: Aeries on June 01, 2008, 08:25:31 PM
that's totally cool stuff...
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: Barihawk on June 01, 2008, 08:37:12 PM
The author is Moonraker at these forums. He might have his email listed. I am not on good terms with him, however, so I can't necessarily arrange a meeting.

A cookie for your effort so far, however.
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: limey BSc. on June 01, 2008, 08:43:08 PM
The Danube seemed to have far too much of an impact on the Galaxies, but it could have just been the angle. Awesome work though!
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: Shadowknight1 on June 01, 2008, 10:06:11 PM
Woo!  Lovely camera angles, especially the closeup on the runabout!
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: Jernej on June 02, 2008, 02:23:30 PM
The Danube seemed to have far too much of an impact on the Galaxies, but it could have just been the angle. Awesome work though!

 
The engine power and ship mass is currently same for all ships, regardless of size, so it looks kind of weird during collisions, i will sort this out later when it will have a actual hardpoints system for ships.
 
Thanks for commenting on the camera system, i hope that the camera will be improved and better than what we saw in previous games so far, currently i only have the fixed camera with zoom and mouse rotation control, and the "tactical camera" - which is very popular in bridge commander and always shows your ship and points at the target ship (so you can see both ships maneuvers at the same time), i will add a tactical ovewview (kinda like Map in bridge commander), and leading camera, which will be third person "from behind" but will point at the direction the ship is moving towards.
 
I am asking now, if any of you people would work with me on the game if i made this a open source project, i would need people familiar with networking and fancy opengl volumetric rendering and shaders (think proper nebulas..). the project is done in delphi 7 for those who need to know.
 
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: FekLeyr Targ on June 02, 2008, 03:31:30 PM
But afterall, I like it. Especially those collision. Looks funny when you've collided those Galaxys out of their lines.
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: Kirk on June 02, 2008, 05:37:44 PM
I agree, the second collision between the akira and galaxies was spectacular.
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: Jernej on July 03, 2008, 04:49:33 PM
So, i'll make this a opensource project if a few people sign up to support the project, you can donate models, ships, art, and code.
 
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: FekLeyr Targ on July 04, 2008, 05:09:52 AM
I'm willing to donate my whaleprobe model when I've fixed the textures problem.
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: Jernej on September 16, 2008, 06:43:34 PM
Some progress of BC hardpoint data loading, phaser arcs are loaded and displayed as they appear ingame:
 
(http://mathpudding.com/temp/hpchecker.jpg)
(http://mathpudding.com/temp/phaserfail.jpg)
 
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: Kirk on September 16, 2008, 06:48:11 PM
:D :D :D
You're still doing this! I love you! Keep up the good work!
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: JimmyB76 on September 16, 2008, 06:59:11 PM
oh sweeeeet!  im so glad to hear this project is still coming along! :D

youll be getting a whole boatload of cookies for this one no doubt!  lol
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: Aeries on September 16, 2008, 07:40:13 PM
:D YAY!
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: tiqhud on September 16, 2008, 08:15:49 PM
Indeed [get cookies for this] MPE has a few hiden bug, and some not hidden.
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: MarkyD on September 17, 2008, 05:13:04 AM
very cool man...   love to see this finished  8)
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: SMBW on September 17, 2008, 01:23:37 PM
Looks fantastic!
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: Jernej on September 25, 2008, 01:47:55 PM
Here is some update, it visualises pulse weapons now as well, i'm trying to make it able to export the data back to a python script.
 
(http://mathpudding.com/temp/newstuffeditor.jpg)
 
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: JimmyB76 on September 25, 2008, 01:56:08 PM
niiiiiiice!!!   :D  :dance
cookie-worthy without question!!
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: tiqhud on September 25, 2008, 02:07:07 PM
LOOKing Good :D
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: MarkyD on September 25, 2008, 02:27:28 PM
excellent work mate  :)
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: Aeries on September 25, 2008, 10:28:12 PM
AHH! *squeals*!

I wonder if this'll be done when I get to hard pointing the Mithra!?

...ah hell, who am I kidding... Excalibur will be out WAAAYYYYY before the Mithra. *Seven years later*

Seriously, though. This looks freaking awesome! I cookie you for a great job so far!
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: moed on September 26, 2008, 12:44:17 AM
Man, this is awesome.

I've tried to use MPE before and honestly, it's too buggy for my taste.

Cookie time...

Great work!
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: Jernej on September 26, 2008, 03:11:46 PM
This unfortunately cannot replace the MPE without investing a lot more work hours that i don't have right now (having a job takes a lot of time), but i hope to give you a release which has at least some kind of editeability to let you place phasers properly when used in conjunction with the MPE (so you can check and set values of arcs and see how it'll look, then copypaste values back to MPE to save .py script).
 
EDIT: since hardpoints are just python scripts.. why didn't anyone make a universal one which like.. loads the hardoint data from a ini or xml file which is easier to edit?
 
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: Jernej on November 17, 2008, 01:59:14 PM
Playing a bit with fixing hardpoints for kb/m, it can do some fancy editing, but not yet enough (cannot set phaser matrix rotation yet):
 
(http://mathpudding.com/temp/kbm/pics/na1.jpg)
 
The actual editor (yes, it looks butt-ugly):
 
(http://mathpudding.com/temp/kbm/pics/mirandy.jpg)
 
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: tiqhud on November 17, 2008, 02:04:45 PM
can you make the orange, that you are using for the phasers a-bit more transperent, might help if there are some-ones overlapping.
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: Jernej on November 17, 2008, 03:22:12 PM
The orange is not precise actual coverage, but it is still very good, actual coverage shape is more like a section of a sphere, i am yet to make the rendering of phaser coverage precise enough (it is a complex system).
 
You can imagine the orange coverage like this: if you are watching towards the phaser origin point and you see it thru the orange thing the phaser can target you.
 
i can change the color of the thing, but the actual color doesn't matter much, because you can choose the scale for the phaser weirdness display and it is optional.
 
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: cordanilus on November 17, 2008, 04:47:40 PM
Wow, this is definitely going to be one handy tool once you're done. :D Looking forward to it.
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: Starforce2 on November 17, 2008, 10:19:45 PM
indeed, that does look cool.
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: Technerd89 on November 18, 2008, 02:10:23 AM
with this i might even *gasp* learn to hardpoint. looks good.
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: Jernej on November 19, 2008, 05:40:02 PM
I released the editor together with my little game here for those who wish to test it:
http://bc-central.net/forums/index.php/topic,4712.0.html
 
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: Starforce2 on November 24, 2008, 11:58:30 PM
with this i might even *gasp* learn to hardpoint. looks good.

the MPE aint that hard to use..it's just an issue with crash bugs and lack of options...
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: Jernej on November 25, 2008, 03:01:51 PM
I've worked on improving the .py parser, obviously i made some very big flaws on how i process for example phaser colors.. i can continue hacking it until it would work, but if someone, anyone could help me hack app.py to dump it's hardpoint structures to kind of XML, ini, etc.. then this would be much easier, since doing reverse to generate back .py from xml or ini is much simplier.
 
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: Aeries on November 25, 2008, 03:04:20 PM
this is going to be really cool. I wonder if it'll be done when I've gotten to hard pointing the Mithra... that'd be so awesome! :D
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: MLeo on November 25, 2008, 03:50:40 PM
I've worked on improving the .py parser, obviously i made some very big flaws on how i process for example phaser colors.. i can continue hacking it until it would work, but if someone, anyone could help me hack app.py to dump it's hardpoint structures to kind of XML, ini, etc.. then this would be much easier, since doing reverse to generate back .py from xml or ini is much simplier.

The easiest way is to just load up a Python instance, create a Mock instance that only returns (new) mock instances (that can also log the paths) (easy to do) for Appc. And then go through all classes.

Every hardpoint related ty[e has a <<Type>>Property class and a <<Type>> class.
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: Jernej on November 25, 2008, 04:09:02 PM
There's around 30 objects that would have to be "mockified" that way, i think MPE's app.py would be more suited to hacking tho - it is smaller, but i could really do with some help with this.. i found out i'm not much of a python person, it's syntax seems like someone crossed C++ with perl and turned on strict identitation in pawn compiler :S
 
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: MLeo on November 25, 2008, 04:44:49 PM
There's around 30 objects that would have to be "mockified" that way, i think MPE's app.py would be more suited to hacking tho - it is smaller, but i could really do with some help with this.. i found out i'm not much of a python person, it's syntax seems like someone crossed C++ with perl and turned on strict identitation in pawn compiler :S
 
I think those are the same.

But the mock I propose can be fitted anywhere.

Part of the mock would be this (from memory, so not complete):
Code: [Select]
class Mock:
  def __init__(self, name):
    self.__name = name
  def __call__(self, *args, **kwargs):
    return Mock("%s(%s, %s)"%(self.__name, str(args), str(kwargs)))
  def __getattr__(self, name):
    return Mock("%s::%s" % (self.__name, name))
  def __str__(self):
    return "Mock(%s)"%self.__name
  def __repr__(self):
    return self.__str__()
Then, before you import App you do this:
Code: [Select]
import sys
sys.modules["Appc"] = Mock("Appc")



Oddly enough, perhaps, I think Pythons syntax is hardly anything like C++ or Perl (and I've programmed in both).
And I find the "indendation is scoping" quite readable. You have to agree that the mess people can make if you don't enforce indendation can be a crime, assuming you are working with more than 1 person at the same time, or if other people than yourself need to read the code.



The idea for the mock is to load up the hardpoint, then, assuming you print out everything, you can parse the result in some more friendly format.



[EDIT]

So you get something like this as output:

Code: [Select]
App::HullProperty_Create
App::HullProperty_Create("Hull")
App::HullProperty_Create("Hull")::SetMaxCondition
App::HullProperty_Create("Hull")::SetMaxCondition(9000.0)
.......

Ok, so only printing on __call__ would suffice I think. :P
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: limey BSc. on November 25, 2008, 05:01:04 PM
You have to agree that the mess people can make if you don't enforce indendation can be a crime, assuming you are working with more than 1 person at the same time, or if other people than yourself need to read the code.

Too true!! My programming lecturer can't seem to lay out a program properly at all! Makes it so much harder to read then it should be!
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: Jernej on November 25, 2008, 05:07:24 PM
MLeo: can you use that and dump a phaser? a PhaserProperty_Create one? i need to see how it dumps the colors and coords.
 
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: MLeo on November 25, 2008, 05:44:28 PM
@Limey98: It's not just for teaching. In everyday work this also helps.
Actually, any codestyle will help. Well, any that doesn't put everything on one line and doesn't require that everything is named with either $ or _ (which you can do in Java :P).

@Jernej: You can, I think this Mock class will help more in this case:
Code: [Select]
class Mock:
  def __init__(self, name):
    self.__name = name
  def __getattr__(self, name):
    return Mock("%s.%s"%(self.__name, name))
  def __call__(self, *args, **kwargs):
    n = Mock("%s(%s, %s)"%(self.__name, str(args), str(kwargs)))
    print n
  def __str__(self):
    return "Mock(%s)"%self.__name
  def __repr__(self):
    return self.__str__()

I'm afraid it isn't perfect. So you will have to expand on this (one usefull thing to do, create a specific App.TGPoint3 mock, and a specific App.ColorA mock, that remembers setXYZ and setRBGA respectively). It's currently too late for me to do this, and I ought to have been working on other things as well. :(
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: Jernej on November 25, 2008, 06:05:08 PM
MLeo: thanks for helping out, but that's hardly any better than parsing the actual original py script :(
 
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: MLeo on November 25, 2008, 06:13:35 PM
Like I said, it's only a start due to lack of time.

It can be refined. ;)

For example, there are no keyword arguments used.

So the __call__ can become this:
Code: [Select]
def __call__(self, *args):
  n = Mock("%s%s"%(self.__name, str(args)))
  print n
  return n

Then there is the fact that every method that starts with "Set" needs to record information:
Code: [Select]
def __getattr__(self, name):
  if name[:3] == "Set":
    return RecordingMock("%s.%s"%(self.__name, name), self)
  return Mock("%s.%s"%(self.__name, name)

The mock in itself is just the start.

What kind of format would you like to see?
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: Jernej on November 25, 2008, 06:53:53 PM
Something like this ini or sort of XML would be "ideal":
 
Code: [Select]
[RearPhaser1]
parent=Phaser
name=Rear Phaser 1
apply=1
MaxCondition=1000.000000
Critical=0
Targetable=1
Primary=1
Position=0.401015, -2.242150, -0.120000
Position2D=76.000000, 69.000000
RepairComplexity=7.000000
DisabledPercentage=0.750000
Radius=0.050000
Dumbfire=1
WeaponID=1
Groups=2
DamageRadiusFactor=0.150000
IconNum=363
IconPositionX=97.000000
IconPositionY=101.000000
IconAboveShip=1
FireSound="FedBurst"
MaxCharge=1.000000
MaxDamage=1200.000000
MaxDamageDistance=100.000000
MinFiringCharge=1.000000
NormalDischargeRate=200.000000
RechargeRate=0.400000
IndicatorIconNum=511
IndicatorIconPositionX=91.000000
IndicatorIconPositionY=96.000000
OrientationForward=-0.707107, -0.707107, 0.000000
OrientationUp=-0.374702, 0.000000, 0.927145
Width=0.140000
Length=0.001000
ArcWidthAngles=-1.221731, 0.261799
ArcHeightAngles=0.000000, 1.570796
PhaserTextureStart=0
PhaserTextureEnd=7
PhaserWidth=0.300000
OuterShellColor=1.000000, 1.000000, 0.501961, 1.000000
InnerShellColor=1.000000, 1.000000, 0.501961, 1.000000
OuterCoreColor=1.000000, 1.000000, 0.501961, 1.000000
InnerCoreColor=1.000000, 1.000000, 0.501961, 1.000000
NumSides=6
MainRadius=0.070000
TaperRadius=0.010000
CoreScale=0.350000
TaperRatio=0.250000
TaperMinLength=5.000000
TaperMaxLength=30.000000
LengthTextureTilePerUnit=0.500000
PerimeterTile=1.000000
TextureSpeed=2.000000
TextureName="data/phaserspecs3.tga"

 
I obviously have a lot to learn about python, i guess i know what i'll be doing the rest of this weekend now.
 
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: Jernej on November 26, 2008, 03:55:20 AM
I found some python XML serializers, how would these work with BC structures?
 
http://code.activestate.com/recipes/440595/
http://www.strangegizmo.com/products/pyxslt/
 
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: MLeo on November 26, 2008, 01:40:52 PM
The first one would be the easiest.

If you create a mock that records everything then it's easy for the first.
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: Jernej on November 29, 2008, 01:29:09 PM
I hacked my parser further, coming to this very nice output, i believe this is as good as near-perfect:
 
Code: [Select]
[VentralPhaser]
parent=Phaser
name=Ventral Phaser
apply=1
MaxCondition=1000.000000
Critical=0
Targetable=1
Primary=1
MatrixPosition=0.000000, 0.120000, -0.129000
SystemPosition=0.000000, 0.120000, -0.129000
Position2D=64, 53
RepairComplexity=7.000000
DisabledPercentage=0.750000
Radius=0.050000
Dumbfire=0
WeaponID=1
Groups=1
DamageRadiusFactor=0.150000
IconNum=363
IconPositionX=65
IconPositionY=74
IconAboveShip=0
FireSound="Sovereign Phaser"
MaxCharge=1.000000
MaxDamage=2200.000000
MaxDamageDistance=70.000000
MinFiringCharge=1.000000
NormalDischargeRate=200.000000
RechargeRate=0.400000
IndicatorIconNum=511
IndicatorIconPositionX=59
IndicatorIconPositionY=69
MatrixForward=0.000000, 0.000000, -1.000000
MatrixUp=0.000000, -1.000000, 0.000000
Width=0.340000
Length=0.360000
ArcWidthAngles=-0.698132, 0.698132
ArcHeightAngles=-0.698132, 0.698132
TextureStart=0
TextureEnd=7
BeamWidth=0.300000
OuterShellColor=1.000000, 0.501961, 0.000000, 1.000000
InnerShellColor=1.000000, 0.501961, 0.247059, 1.000000
OuterCoreColor=1.000000, 1.000000, 0.000000, 1.000000
InnerCoreColor=1.000000, 1.000000, 0.501961, 1.000000
NumSides=6
MainRadius=0.070000
TaperRadius=0.010000
CoreScale=0.350000
TaperRatio=0.250000
TaperMinLength=5.000000
TaperMaxLength=30.000000
LengthTextureTilePerUnit=0.500000
PerimeterTile=1.000000
TextureSpeed=2.000000
TextureName="data/phaserspecs3.tga"
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: Starforce2 on December 14, 2008, 02:24:30 AM
I also notice during hping some more complicated vessels, in this case converting the C9A battlecruiser to the E7 hardpoint I would find a feature to reoder the list of systems usefull, this would allow me to clump all the enwly added beam weapons with the ones further up the list, all the pulse weapons of the same type together, ect. Keep that in mind for the new hp editor. Also, when the MPE goes into template mode, showing all the systems on the hp, rather than just the ones you have added (meaning they are deactivated but not physicly removed from the HP file) they should be in a different color text. IE green for active, red for inactive. This would make accedental deletion of a used system less likely.
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: Jernej on December 15, 2008, 05:05:29 PM
I have completed the ini converter to generate a .py script again, it works good on smaller ships so far, but i havent tested any larger scripts yet.
 
You could easily create tools which used ini to manipulate, edit, reorder the hardpoints, and then convert it back to .py..
 
EDIT: actually my editor already does grouping when showing systems, i will show it soon when i make another release, or you can check the version released in other thread with the engine remake thread, that one already has that.
 
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: Starforce2 on December 15, 2008, 06:34:34 PM
you may also want to incorporate a failsafe against this:
http://bc-central.net/forums/index.php/topic,4831.0.html

If you are to the stage where it allows you to specify an icon for the damage, that is must be a valid icon ID number or it will default to a standard one (such as a fwd arc) or something.
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: Jernej on December 16, 2008, 05:09:27 PM
I am not sure what that means, the IconNum param?
 
Also, is there a sort of list of these IconNum types?
 
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: Starforce2 on December 16, 2008, 07:30:06 PM
well, they are all listed clearly in mark allens tactical display. Every charge arc, ever targeted arc, and every damage iocn has an ID number and it is shown there.
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: tiqhud on December 17, 2008, 08:34:27 AM
well, they are all listed clearly in mark allens tactical display. Every charge arc, ever targeted arc, and every damage iocn has an ID number and it is shown there.
Very handy little tool for that, and easy to use.
Title: Re: Hardpoints editor with model preview.. work in progress!
Post by: Starforce2 on December 24, 2008, 12:55:07 AM
there is yet another annoying MPE feature that I am reminded of hardpoint these 100m ships...When you zoom in, and then try to rotate the ship, it rotates on an imaginary point in space (the center of the ship when it first is loaded by the mpe) causing the ship to swing wildly off screen. The pivot point should remain the 0,0,0 of the mesh, regardless of where you've rotated, zoomed or slid the model to on the viewer since you loaded it.

Property sizes should be viewable on all properties not just those that aren't weapons. You could add the ability for such size to be displayed the traditional way (the size of the crosshairs of each system) or in a cooler fashiong, a colored sphere. Spheres could be default color or changed to a different color (a red ball on a red ship will be hard to see) if needed.