FAQFAQ    Board RulesBoard Rules    SearchSearch    LotteryLottery    RouletteRoulette    UsergroupsUsergroups
     RegisterRegister  ProfileProfile    Log in to check your private messagesLog in to check your private messages    Shop    Log inLog in 
View posts since last visitView your postsView unanswered posts

Mafia Freeride-Expansion Country+city
Goto page Previous  1, 2, 3
 
Post new topic   Reply to topic    Mafiascene.com Forum Index -> Mafia Mods
View previous topic :: View next topic  
Author Message
ASM.

Mafiascene Veteran Modder
Mafiascene Veteran Modder


Joined: 10 Jan 2014
Posts: 80

185 Bank Notes
Items

PostPosted: Thu Jan 19, 2017 1:25 am    Post subject: Mafia Freeride-Expansion Country+city Reply with quote

Duelist wrote:

Interesting, could this be also the reason for not being able to create breakable glass (no shattered glass effect) like in original missions (through xtobb with 24 mat flag)? I won't be much of help here but I took a look at klz's. It looks like vanilla freeride file contains links to not existing objects from other missions like barkulisa2.Line01 from mission 15. It has actually 3 times more links and gridDataOffset than my mod. Order doesn't look like anything special... primary sector, some alley in central island, some place in hoboken. Although, it looks like it's mostly scene.4ds objects first. Some dopravni, phbox, alarm, lamp links are grouped together. Struct cells have more values.

I think I found the culprit. It's the value preceding the link name in the name table. It's either 1, 2 or 3. I guess it's some kind of flag value but the heuristic MWE uses to determine what numeric value to write is to check the frame type of the referenced object: If it is a mesh, it writes 1, otherwise 2. ex04 is a mesh object so MWE writes 1 but the value actually needs to be 2 it seems. And yes, it looks like that's also the reason why glass doesn't work (assuming you're referring to the issue of the game not generating any glass particles after destruction).

You should be able to rectify the issue by manually updating the value with a hex editor. Note that you won't have to repeat the process after every save unless you remove all primitives referencing the link and add a new primitive with that link again later. Also note that this probably won't work for face col data since the link value apparently must be 1 in that case for the collision detection to work.

Duelist wrote:

I have fixed it. Apparently I have left one configuration. Objects order have to be changed: Box01 (1 scale) first, then Box239 (1.1 scale) and it has to be set as child object of Box01. Then set it's scale in MWE to 1.1. What I noticed is that the game resets 4ds scale of every cache object to 1. It's best to observe it using 9halda2.4ds, 9koza2.4ds or chajda02.4ds. If you set their 4ds scale as 2nd scale in MWE they will display properly both in game and editor.

Maybe this oddity is the reason why MWE doesn't get the scaling right for some cache instances. Thinking

Duelist wrote:

That sign doesn't fit the game setting imo. There's a guy called Daniel Vávra who was Mafia chief developer. Danny might be informal form of Daniel in english (althoug I'm not sure). Maybe someone wanted to make fun of him or some sort of developer joke (after all it says "Only for tough gays(?)" hard to read last 2 letters). And when they found it, it was disabled. They did it throguh exe so it could affect whole game at once without having to search for it.

Hm I think you have a point here. I always read it as "Only for tough guys" but after closer inspectation of the texture I have to admit it could very well be "gays". In that case the publisher or the developers themselves maybe thought it's a bit inappropriate or simply wouldn't fit the theme of the game (like you said). After all it's well possible that many players wouldn't know who Danial Vavra is and what he looks like and those players would possibly not recognize it as a tongue-in-cheek easter egg.

Duelist wrote:

Doesn't change anything. Now that I'm thinking about it... ASM are you using WideScreenFix.asi? If not, could You try that hoboken thing one more time with increased view distance to 600 using it. Maybe those missing gateposts are related somehow to my hardware. And it wasn't the source of disappearance of some of them but it amplified the issue instead.

No, I'm running a mostly vanilla game with some ASIs (Patcher and MSE to be precise). I will check Hoboken tomorrow, without any ASIs this time. Just for the record, I take it you mean the test with the gateposts at the Hoboken construction site disappearing after saving the cache.bin in MWE?

Last edited by ASM. on Thu Jan 19, 2017 12:23 pm; edited 1 time in total
Back to top
View user's profile Send private message
Duelist

Junior Member
Junior Member


Joined: 06 Nov 2016
Posts: 26

46 Bank Notes
Items

PostPosted: Thu Jan 19, 2017 12:09 pm    Post subject: Re: Mafia Freeride-Expansion Country+city Reply with quote

ASM. wrote:

I think I found the culprit. It's the value coming before the link name in the name table. It's either 1, 2 or 3. I guess it's some kind of flag value but the heuristic MWE uses to determine what numeric value to write is to check the frame type of the referenced object. If it is a mesh, it writes 1, otherwise 2. ex04 is a mesh object so MWE writes 1, but the value actually needs to be 2 it seems. And yes, it looks like that's also the reason why glass doesn't work (assuming you're referring to the issue of the game not generating any glass particles after destruction).

WOW Shocked That's simply amazing... Yes, that's what I meant by shattered glass. And it works now, IT WORKS Thanks Thumbs up (left) Thumbs up (left) This deserves new editor version if You ask me Sticking out tongue

ASM. wrote:

Maybe this oddity is the reason why MWE doesn't get the scaling right for some cache instances. Thinking

Most likely, take for example @bouda04 in hoboken (at 458, -5, 356 coordinates). 1st MWE scale is set to close to 1, 2nd scale is set to 1.5;1;1. Your editor displays 1st scale so it looks like it's too small but game multiples them both and get proper scaling in game. Its 4ds scale is 1, so if you switch scales it will display properly both in editor and game Smile

ASM. wrote:

No, I'm running a mostly vanilla game with some ASIs (Patcher and MSE to be precise). I will check Hoboken tomorrow, without any ASIs this time. Just for the record, I take it you mean the test with the gateposts at the Hoboken construction site disappearing after saving the cache.bin in MWE?

Yes, the gateposts, but with WideScreenFix.asi and increased draw distance in its .ini file to 600 (all other options can be disabled). That's when even on vanilla freeride with cache saved using MWE they were disappearing in hoboken.

But there's something new. I have fixed my remaining cache objects scaling and merged files together, I have copied them on unmodified (by MWE) cache just like before but now I changed their parent from that mountain to road in front of motel (but that's probably not important). I also changed rendering hints from one of my previous screenshots to DDU values. Cache is still not modified by MWE, all was done in hex. Now, no matter where I spawn I don't see any single @drplot3 model. I have to leave their rendering groups to make them appear. But I can't leave rendering group of my imported objects becouse it has giant DDU values so its @drplot3 never appear. If I change rendering hints back to the previous values I'm back to not seeing only countryside ones. Is it possible that there's some model display limit where game can't display so many instances of the same model at once?
Back to top
View user's profile Send private message
ASM.

Mafiascene Veteran Modder
Mafiascene Veteran Modder


Joined: 10 Jan 2014
Posts: 80

185 Bank Notes
Items

PostPosted: Thu Jan 19, 2017 1:22 pm    Post subject: Re: Mafia Freeride-Expansion Country+city Reply with quote

Duelist wrote:

WOW Shocked That's simply amazing... Yes, that's what I meant by shattered glass. And it works now, IT WORKS Thanks Thumbs up (left) Thumbs up (left)

Nice!

Duelist wrote:

This deserves new editor version if You ask me Sticking out tongue

The question is how to compute the correct value then. Maybe the value hints at the used collision primitive, like 1 - face cols, 2 - OBB, Sphere, etc. and 3 - both. Thinking

Duelist wrote:

Most likely, take for example @bouda04 in hoboken (at 458, -5, 356 coordinates). 1st MWE scale is set to close to 1, 2nd scale is set to 1.5;1;1. Your editor displays 1st scale so it looks like it's too small but game multiples them both and get proper scaling in game. Its 4ds scale is 1, so if you switch scales it will display properly both in editor and game Smile

From what I remember, multiplying 1st and 2nd scale fixed scaling for some instances, but messed it up for others.

Duelist wrote:

Yes, the gateposts, but with WideScreenFix.asi and increased draw distance in its .ini file to 600 (all other options can be disabled). That's when even on vanilla freeride with cache saved using MWE they were disappearing in hoboken.

Ah ok, with WideScreenFix.asi then. I missed the 'using it' in your post.

Duelist wrote:

Is it possible that there's some model display limit where game can't display so many instances of the same model at once?

Maybe, but that doesn't align with the Salieri's Bar issue I'd say as there're only three instances of it around in total. Also, the game renders all three of them eventually after taking the right route through the city. On the other hand it's of course also possible that the issues with the label and the gateposts are unrelated.
Back to top
View user's profile Send private message
Duelist

Junior Member
Junior Member


Joined: 06 Nov 2016
Posts: 26

46 Bank Notes
Items

PostPosted: Thu Jan 19, 2017 2:50 pm    Post subject: Re: Mafia Freeride-Expansion Country+city Reply with quote

ASM. wrote:

The question is how to compute the correct value then. Maybe the value hints at the used collision primitive, like 1 - face cols, 2 - OBB, Sphere, etc. and 3 - both. Thinking

Maybe it could be left for modder to decide if he want's to use advanced features like this:



It wouldn't be possible to check if Face is selected, but make it selectable for other types. Checking it would set flag 2. Still, it would have to be tested what flag 3 does.

ASM. wrote:

From what I remember, multiplying 1st and 2nd scale fixed scaling for some instances, but messed it up for others.

That's becouse your editor already scales models according to their 4ds scale and displays them as 1;1;1 scale objects. If it tried multiply scale by model 4ds scale again (if different from 1) it would break it. But game actually multiples them together. You can check it by setting one instance of same model scale to 5 - 1st scale, 1 - 2nd scale, and second instance of the same model to 3 - 1st scale, 2 - 2nd scale. Second model will be bigger.

ASM. wrote:

Maybe, but that doesn't align with the Salieri's Bar issue I'd say as there're only three instances of it around in total. Also, the game renders all three of them eventually after taking the right route through the city. On the other hand it's of course also possible that the issues with the label and the gateposts are unrelated.

Ah yes, I forgot about it Sticking out tongue It also looks like there's actually 896 4smrk01.i3d objects (681 @drplot3.i3d) and I think that they are displaying but I have to check it.
Back to top
View user's profile Send private message
ASM.

Mafiascene Veteran Modder
Mafiascene Veteran Modder


Joined: 10 Jan 2014
Posts: 80

185 Bank Notes
Items

PostPosted: Fri Jan 20, 2017 1:13 pm    Post subject: Mafia Freeride-Expansion Country+city Reply with quote

I redid the Hoboken test. This time I took the UDD cache.bin, saved it in MWE and drove to the construction site. Guess what, the gateposts were missing, so it looks like it's related to the cache base block order and size somehow. I didn't modify the scene2.bin by the way so the actual view distance was not touched.

I also tested with the widescreen ASI (alongside with a vanilla cache.bin rewritten with MWE) and got missing gateposts when I set the view distance to 600. Everything was fine after either disabling the option to increase the view distance or decreasing the view distance to 250 (which is the freeride's default if I'm not mistaken). I guess the mod patches the cache base block sizes under the hood according to the configured view distance.

Duelist wrote:

Maybe it could be left for modder to decide if he want's to use advanced features like this:

<snip>

It wouldn't be possible to check if Face is selected, but make it selectable for other types. Checking it would set flag 2. Still, it would have to be tested what flag 3 does.

I think writing 01 for face cols and 02 for primitives (and maybe 03 if both are present) should capture the cases we currently know about. Apart from that one could look into a few KLZs again and check whether other patterns emerge.
Back to top
View user's profile Send private message
Duelist

Junior Member
Junior Member


Joined: 06 Nov 2016
Posts: 26

46 Bank Notes
Items

PostPosted: Fri Jan 20, 2017 3:38 pm    Post subject: Mafia Freeride-Expansion Country+city Reply with quote

Yes, when I thought about it today I agree that Your idea is a lot better.

It looks like I have found a way to fix my missing gateposts... It might be hard to believe so I'm attaching part of my cache file so You could reproduce it on vanilla freeride, what is even weirder, it appears to fix those gateposts missing due to widescreenfix.asi...

https://ufile.io/2e9201 this file contains few objects from countryside, mostly gateposts + few others assigned to vanilla freeride object with DDU rendering hints values.

Disable widescreenfix for now.

Copy it at the end of vanilla cache and correct manualy cache size. Now, wherever you spawn you won't see any @drplot3 gateposts. Without moving from spawn, turn camera left in hoboken, right in down town and you would have to go left from little italy.

Now using MWE go to -62, 24, 3109 and delete that one single @drplot3. Note that before deleting it file size was 1 061 KB (vanilla cache edited with hex) and after it grew bigger to 1 064 KB (saved with MWE). Which is strange I think considering it should be actually one object less information and only order change of remaining bases. Now if you spawn, all @drplot3 models will be visible (even in countryside) this is where it fixes my issue. But if you go to hoboken construction site it will still miss gateposts if using widescreenfix.

Now the widescreenfix part. Enable it and set distance to 600. Open cache.bin with hex editor, find Object69kkkkk and move that whole base with its objects to the end of the file. Now if you go to hoboken construction site all gateposts will be visible!

I hope that this will help solve the issue with MWE. I think that file size might have something to do with it.

EDIT: I forgot to add that after deleting that one @drplot3 I could insert as many of them as I want and all of them displayed right from spawn near motel.
EDIT2: Added the bold part.
EDIT3: Tested it a bit more, looks like that file growth and disappearing gateposts while using widescreenfix/DDU are not related. Vanilla cache file size doesn't change when it's being saved by MWE. It does only after I paste my additional objects. Which is still strange as its file size should decrease with deletion of any object, not increase.
EDIT4: I have compared files:



Left - vanilla cache + my countryside objects pasted in hex then saved with MWE + Object69kkkkk base moved at the end of the file with hex. Right - vanilla cache saved with MWE then pasted my countryside objects in hex at the end of the file.

It looks like MWE copied Object69kkkkk objects into Base118 What? That's why file size increased.

EDIT5:
Ok, I think it did this becouse Object69kkkkk is child object of Base118. This issue was definitely not related to missing gateposts Sticking out tongue
Back to top
View user's profile Send private message
Duelist

Junior Member
Junior Member


Joined: 06 Nov 2016
Posts: 26

46 Bank Notes
Items

PostPosted: Mon Jan 23, 2017 8:22 pm    Post subject: Mafia Freeride-Expansion Country+city Reply with quote

Vanilla cache.bin bases are ordered in reverse to the order of links in vanilla tree.klz.

cache.bin __________ tree.klz

base02 ____________ LLObject84
base01 ____________ base69
base249 ___________ base66
... ________________ ...
base66 ____________ base249
base69 ____________ base01
LLObject84 _________ base02

Most of cache.bin bases have their tree.klz link. Bases that do not: all zaplata*, Cylinder06, dvere1, Object169, hqin, Loft05, Loft06, 9plotbox, Object0133, Object0222, Box44, Mesh07, Object010, Box220, Box120, autMesh08, Box02, Object166, base258, base255.
Back to top
View user's profile Send private message
Duelist

Junior Member
Junior Member


Joined: 06 Nov 2016
Posts: 26

46 Bank Notes
Items

PostPosted: Fri Mar 31, 2017 2:43 pm    Post subject: Mafia Freeride-Expansion Country+city Reply with quote

I have found a way to sort cache objects by X and Y. At first I did it every 500 units but it gave me 50 cache groups which was a bit too much (Sticking out tongue), so I tried every 1000 next and I liked the result. After sorting both gateposts issues were back but I found what fixes them.






I have created back sides of Hospital and that big Chinatown building:






I'm also moving telephone poles from fields to road sides, editing countryside wcols to widen the roads, moving some fences, fixing random modeling errors and addressing this issue:



I've made it up to top of the map already:






It's not the newest version but yeah Smile There's still no cache objects so it's empty and not that interesting to watch. The tunel is 3 times longer than countryside original one and has its own, new sector. My plan is to loop it back to Hoboken with some small village along the way. I have some draft idea how the new locations would look like. But I'm not sure about creating it.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Mafiascene.com Forum Index -> Mafia Mods All times are GMT
Goto page Previous  1, 2, 3
Page 3 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

Generation Time: 0.034 | Queries: 18