Star Sonata
http://forum.starsonata.com/

How I managed to fix engine displacement on my Isvasa t22
http://forum.starsonata.com/viewtopic.php?f=17&t=61687
Page 1 of 2

Author:  Charliem [ Tue Mar 22, 2016 12:55 am ]
Post subject:  How I managed to fix engine displacement on my Isvasa t22

So Im not the most versed player, but I happen to know a little programming. And with that knowledge I managed fix a visual glitch that I bet more people are having issues with. Heres what happened:

I got my t22 sniper (after too much grind) and as Im trying gear for it, checking its hull, I notice its engine is slightly off. I dont mind it at first, imagining its like an afterburner, but I cant shake it right?

So I look around in the gamefiles, and I find the .obj files models for the ships. I was thinking the info would be in here, under an added line (something that would make the basic .obj file custom but whatever) and I find nothing.

So I start looking around, and searching for stuff, asking people, and I get tipped on looking for .xml info, as xml is a type that is comonly used to alter exe files at runtime (similar to .ini files, note "initiate").

Anyway, inside a file called ships.xml, located in the game folder:

C:\Users\Charlie\AppData\Roaming\Star Sonata 2\Content\Default\game_data

every ship has an xml entry, an some basic values associated. I see right away that the absentis, has more info in its "scope" of info.

it looks something like this:

<ship index="145">
<default>
<model>Absentis.obj</model>
<texture>Absconditus.png</texture>
<enginemounts>
<mount0>0,-2.8,-25.5</mount0>
</enginemounts>
</default>
<combat />
<travel />
</ship>


(dont mind spacing being different here than the xml file in the folder, its just there to make the code readable. If you mess around with spacing, it will read it exactly the same way, so its just there to be more understandable).

as you can probably tell, it starts off by naming the absentis as ship nr 145. Most likely in some list of ships. Next is the model, which is just a txt file with vertice locations. Thats the .obj file i mentioned earlier. (just read up on .obj file if you want, its a basic 3d modelling format, just a list of points around a center).

After that is the location of the texture file, it uses the same texture as the abscon, so I guess the shader (draving onscreen) changes its color, using the indexing value, not that its relevant.

The next line of code is the important one. It says </enginemounts>, which (im guessing) starts a segment in the code, that holds information about well, the engine mounts. The next line is <mount0>0,-2.8,-25.5</mount0>, which is like it says, mount 0, and 3 numbers. These numbers are the ones we are looking for here. The line after just indicates end of mount info, </enginemounts>. This line could just as easily be written:
<enginemounts> <mount0>0,-2.8,-25.5</mount0> </enginemounts>

Still reading?

This is where it gets useful:

I found that the Isvasa, further down the file, <!--Isvasa--> indexed at 343, lacks that information altogether. So I tried adding the line above ^ And get this information where the old was:

<ship index="343">
<!--Isvasa-->
<default>
<model>HF2.obj</model>
<texture>FR1.jpg</texture>
<enginemounts>
<mount0>0,-2.8,-25.5</mount0>
</enginemounts>
</default>
</ship>

again spacing, and indentation isnt important. Its just different "blocks" of information, with an identifier for the exe.

Either way, I just fiddle around with the 3 numbers, and finally wind up with the numbers: 0,2,-12

Placing the engine exactly where it should be!

BEFORE
Image


and after
Image



So to make a long story short: you can, with a little effort, fix the engine placement by modifying the values in the xml files under game_data in the game folder.


If there is interest for it, and perhaps a list of bugged models, I can go over them and even make a custom xml file to download.


So what do you give me? :D

Author:  jack the ripper [ Tue Mar 22, 2016 11:52 pm ]
Post subject:  Re: How I managed to fix engine displacement on my Isvasa t2

The displacement is intentional afaik

Author:  DarkSteel [ Wed Mar 23, 2016 3:22 am ]
Post subject:  Re: How I managed to fix engine displacement on my Isvasa t2

Doubt it. His version looks much better

Author:  carterstrain [ Wed Mar 23, 2016 5:15 am ]
Post subject:  Re: How I managed to fix engine displacement on my Isvasa t2

heylo wrote:
Doubt it. His version looks much better


To you. Remember that Jeff considered ships that were as flat as a piece of paper to be perfectly natural dimensions.

Also remember that the devs actually came out and said they were too busy doing "important stuff" and for the playerbase to fix any engine placement "problems" they found. The only engine positional issues that were corrected were all done by players and only added because the devs didn't have to do anything at all except add them to the patcher.

I'll be more willing to bet that the original engine placement was intentionally left there because the dev that did the code couldn't care less and wanted to drink more of that cold beer while watching the football game.

Author:  DarkSteel [ Wed Mar 23, 2016 7:11 am ]
Post subject:  Re: How I managed to fix engine displacement on my Isvasa t2

carterstrain wrote:
heylo wrote:
Doubt it. His version looks much better


To you. Remember that Jeff considered ships that were as flat as a piece of paper to be perfectly natural dimensions.

Also remember that the devs actually came out and said they were too busy doing "important stuff" and for the playerbase to fix any engine placement "problems" they found. The only engine positional issues that were corrected were all done by players and only added because the devs didn't have to do anything at all except add them to the patcher.

I'll be more willing to bet that the original engine placement was intentionally left there because the dev that did the code couldn't care less and wanted to drink more of that cold beer while watching the football game.


Your view on devs is so bad it's actually pretty lolworthy

Author:  Charliem [ Wed Mar 23, 2016 7:15 am ]
Post subject:  Re: How I managed to fix engine displacement on my Isvasa t2

ofc its a bug, the point is it can be fixed with a little effort.

Its nothing tho, have a look at this:

Image
my Elebsentis will start as quarterback for the sonata raiders next season.



Image
and here he is ingame.


Im pretty sure there is a ton of improvements that could be done, even as a basic modder, just look at this:

Image
the model has about 8x the polygon count, and is running without a hitch.

Author:  redalert150 [ Wed Mar 23, 2016 7:27 am ]
Post subject:  Re: How I managed to fix engine displacement on my Isvasa t2

:shock: Absentis looks amazing

Author:  DarkSteel [ Wed Mar 23, 2016 8:38 am ]
Post subject:  Re: How I managed to fix engine displacement on my Isvasa t2

Charlie for graphic designer! :D

Author:  Godsteel [ Wed Mar 23, 2016 8:45 am ]
Post subject:  Re: How I managed to fix engine displacement on my Isvasa t2

Charliem wrote:
So to make a long story short: you can, with a little effort, fix the engine placement by modifying the values in the xml files under game_data in the game folder.

Well, it's kinda common knowledge I think? At least, at start of the C2 there were tons of fixes like these, posted by players ^^

Author:  carterstrain [ Wed Mar 23, 2016 3:36 pm ]
Post subject:  Re: How I managed to fix engine displacement on my Isvasa t2

heylo wrote:
Your view on devs is so bad it's actually pretty lolworthy


My opinion on certain devs is very high. The vast majority? Closer to pond scum.


heylo wrote:
Charlie for graphic designer! :D


The Irrlicht engine SS uses can handle about 300k polygons until it stops rendering stuff.

Author:  Charliem [ Wed Mar 23, 2016 4:13 pm ]
Post subject:  Re: How I managed to fix engine displacement on my Isvasa t2

Quote:
The Irrlicht engine SS uses can handle about 300k polygons until it stops rendering stuff.


I wonder if this is still true. Things like these are usually somehow hardware related. Like in my own experience making a (basic) obj-file reader, parsing/loading is bottlenecked by the format being in txt format, not making use of every character for storing and loading information .(|'=?"¤*~)

I think there is room for higher poly counts now, than before is what im saying. The pax ships are already high poly btw

Author:  carterstrain [ Wed Mar 23, 2016 4:54 pm ]
Post subject:  Re: How I managed to fix engine displacement on my Isvasa t2

I don't doubt SS can support singular objects of higher poly counts. I think SS takes into account all objects on screen, before deciding to quit. Having one ship at 280k polys is fine, but if a second ship is 30k polys, SS would probably die on you. Texture quality is probably what "Ultra High Quality" means. You can increase the textures, but since the objects have really low poly counts, the game still looks like something from 2002.

Author:  Godsteel [ Wed Mar 23, 2016 6:00 pm ]
Post subject:  Re: How I managed to fix engine displacement on my Isvasa t2

Charliem wrote:
Quote:
The Irrlicht engine SS uses can handle about 300k polygons until it stops rendering stuff.


I wonder if this is still true. Things like these are usually somehow hardware related. Like in my own experience making a (basic) obj-file reader, parsing/loading is bottlenecked by the format being in txt format, not making use of every character for storing and loading information .(|'=?"¤*~)

I think there is room for higher poly counts now, than before is what im saying. The pax ships are already high poly btw

How is it bottleneck if you only load object once on start up?

Author:  Charliem [ Wed Mar 23, 2016 6:45 pm ]
Post subject:  Re: How I managed to fix engine displacement on my Isvasa t2

Im able to load single model files up to 6-7mb just fine. But that is huuge for a static model. Im pretty sure you could make a model-pack with higher res ships, without encountering problems.

I wonder if the engine makes use of gpu programming properly, loading all models onto the graphics card etc.

Quote:
How is it bottleneck if you only load object once on start up?


in my experience it just takes too long and the program hangs. Like every process has to wait for models to load and crashes. Maybe its just a sign of poor programming practice.

Author:  DarkSteel [ Wed Mar 23, 2016 6:47 pm ]
Post subject:  Re: How I managed to fix engine displacement on my Isvasa t2

If we were 2D we wouldnt have this problem :roll:

Page 1 of 2 All times are UTC - 5 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/