Quantcast

Jump to content

» «
Photo

Inst Objects Ordering for Original IPLs

5 replies to this topic
LINK/2012
  • LINK/2012

    LIVIN' IN CODE

  • Feroci
  • Joined: 30 Jan 2011
  • Brazil
  • Best Tool 2014 [Mod Loader]
    Contribution Award [Mods]

#1

Posted 14 December 2013 - 04:45 PM Edited by LINK/2012, 14 December 2013 - 04:57 PM.

I'm doing something related to IPLs and I have to rebuild the IPL, but without knowing the original ordering of stuff (don't ask why!) and while doing so with original game files (I'm trying with data/maps/vegasS.IPL), it doesn't work!

 

Here's some files I ended up with (just inst section):

[works] Rebuilt without ordering changes: http://pastebin.com/Ryt6QBA1

[dontw] Rebuilt with major ordering changes: http://pastebin.com/bxrnaJax

 

 

I did an comparator in C++ to make sure the original file and the rebuilt file has absolutely the same content (well, almost for the floats), here's it if anyone interested to test out (yeah the code is crap, but you know, just testing): http://pastebin.com/GzeWPqpe

 

I really want to know why it doesn't work, anyone know? Does the inst objects order in the data folder must match with the streamed IPL order? Really, what?

 

* By doesn't work I mean the game crashes on loading


LINK/2012
  • LINK/2012

    LIVIN' IN CODE

  • Feroci
  • Joined: 30 Jan 2011
  • Brazil
  • Best Tool 2014 [Mod Loader]
    Contribution Award [Mods]

#2

Posted 14 December 2013 - 04:51 PM

Oh, wrong section, sorry guys, asking moderation to move it right now ;)


ZAZ
  • ZAZ

    Kernlochbohrer

  • Feroci
  • Joined: 10 Jan 2005
  • European-Union

#3

Posted 15 December 2013 - 10:25 PM

The stream.ipl files contain a lot of object placements with link numbers to corresponding LOD objects of ipl files of map folder

About LOD:
LOD models are the low level of detail versions of the original models. This is what you see loaded far away. As you get closer to the LOD model, it should change to the original model if it has one.

The LOD don't need(have) a collisionsmodel because the LOD will be disabled if you come into the range of the stock model
But then the LODs must be linked correct by the their stock model, otherwise the game crashes
This must be done in IPL files
Objects which should link to a corresponding LOD object must have the line number of the corresponding LOD object
 
LOD objects must have -1 at the end
 
Only objects which should link to a corresponding LOD object must not have -1 at the end

example, 3 objects which links to their corresponding LOD object
mynice_home links to LODice_home at line 3, mynice_garage to LODice_garage at line 4 ad so on


inst
5001, mynice_home, 0, 190.6, -1425.8, 19.4, 0, 0, 0, 1, 3
5002, mynice_garage, 0, 190.6, -1425.8, 19.4, 0, 0, 0, 1, 4
5003, mynice_shop, 0, 190.6, -1425.8, 19.4, 0, 0, 0, 1, 5
5004, LODice_home, 0, 190.6, -1425.8, 19.4, 0, 0, 0, 1, -1
5005, LODice_garage, 0, 190.6, -1425.8, 19.4, 0, 0, 0, 1, -1
5006, LODice_shop, 0, 190.6, -1425.8, 19.4, 0, 0, 0, 1, -1
end




LOD placement can't be done in stream.ipl's but must be done in the ipl files of map folder
so you'll find a lot of object placement lines in stream.ipl's which have a link number at lineend to link to a corresponding LOD object
and in the ipl files of map folder are mostly placement lines of LOD objects

  • LINK/2012 and TheThingy like this

LINK/2012
  • LINK/2012

    LIVIN' IN CODE

  • Feroci
  • Joined: 30 Jan 2011
  • Brazil
  • Best Tool 2014 [Mod Loader]
    Contribution Award [Mods]

#4

Posted 16 December 2013 - 12:09 AM

Oh, thanks ZAZ :)


fastman92
  • fastman92

    фастман92 | ف

  • Members
  • Joined: 28 Jul 2009
  • None
  • Contribution Award [Mods]

#5

Posted 28 December 2013 - 10:48 AM Edited by fastman92, 28 December 2013 - 10:54 AM.

LOD objects must have -1 at the end


Are you sure about it? Some day i'd like to give it a try and put 3 object versions and see if game works:
HQ object, max distance under 300.0
Lower quality object, max distance 600.0
Lowest quality object, max distance 1000.0

Then i assume game will perhaps check if camera is close enough for HQ object, otherwise it will check if camera is close enough for lower quality object, otherwise it will try lowest quality object.

ZAZ
  • ZAZ

    Kernlochbohrer

  • Feroci
  • Joined: 10 Jan 2005
  • European-Union

#6

Posted 31 December 2013 - 06:44 AM

 

LOD objects must have -1 at the end


Are you sure about it? Some day i'd like to give it a try and put 3 object versions and see if game works:
HQ object, max distance under 300.0
Lower quality object, max distance 600.0
Lowest quality object, max distance 1000.0

Then i assume game will perhaps check if camera is close enough for HQ object, otherwise it will check if camera is close enough for lower quality object, otherwise it will try lowest quality object.

 

yes, i'm shure, the last param is only for linking

as described above, it's because of the col files, LODs don't have collision files and can't be placed in stream-ipl and must be linked from a stockmodel

there are also some LOD objects which have col files, just a col file with a zero model, they can be placed like the normal objects

 

About check by camera: i often moved with freecam far away from player and then there where only the LQ objects available, i assume the HQ are checked by player position





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users