• Welcome to SC4 Devotion Forum Archives.

Prop height in reader

Started by rjaap, March 04, 2011, 02:57:19 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

rjaap

Hi there!

I want to lower the position of some props to -3m. I cannot do it in the lot editor or pim-x because they don't allow you to go below zero meters.
It should be possible to do it in the reader however but I am a bit confused  in how to accomplish this.

I have to change the 5th rep of the LotConfigPropertyLotObjectData of the prop in the exemplar.
Using the the windows calculator I converted -3 (decimal) into hex:


But now the prop is about 256 m high instead of -3m.
Any ideas what I am doing wrong here or is it just not possible to lower props below zero?


Lowkee33

It's not possible to make props below zero in this fashion.  However, you can use Cogeo's Model Tweaker to lower the entire model.  This will instantly effect all occurrences of the model in-game though.   You could copy/paste the S3Ds of the model and change their Instance to something like 0x00130###.  If you should do this, you would also have to copy/paste the prop exemplar, and change it's ID and RKT to match the new model.  Also, set "IsGroundModel" to false.  Shadows don't work when the model is below ground (I guess there is a mirror below the ground, or perhaps two suns)

MandelSoft

Try FFFD0000 instead of your current value. See if that works
Lurk mode: ACTIVE

rjaap

#3
Thanks mrtnrln! That did the trick! Oddly enough the loteditor now tells me the propheight is 3m but the prop is visibly below ground level.

@ Lowkee: I have tried the model tweaker but as I run Vista it keeps crashing on me. Also I might want to release the lots I am working on but using the model tweaker it would require a rerelease of the props I am using (I did not make them myself) so I was looking for another way to lower the prop heigth below ground level. I will keep the shadow issue in mind, I had not realised it could be a problem.

Thanks for the quick replies guys!

Edit: I clearly made a mistake in converting negative decimals into hex values. Does anyone have some information on how to do this because apparently the windows calculator is no good.

RippleJet

Quote from: rjaap on March 04, 2011, 03:30:02 PM
Edit: I clearly made a mistake in converting negative decimals into hex values. Does anyone have some information on how to do this because apparently the windows calculator is no good.

The windows calculator is still my favourite (even if I liked the one in XP more than the one in Vista and Win7).

However, for this property (reps 3-9), you need to remember that
you must multiply your decimal value by 0x10000 (or 65,536) before converting it to HEX.
Otherwise it would be impossible to move the prop less than 1 metre...

Thus, -3 × 65536 = -196608, and that converted to a DWORD HEX is what Maarten told you. ;)

rjaap

Thanks for clearing that up, that explains a lot! I have been busting my brains over this tonight but I just couldn't figure it out  :bomb:

rjaap

Ok, I have done some experimenting with this.

It is possible to set the prop height to negative values in the reader (e.g. below ground level)
However, whenever you make changes to the lot in either the loteditor or via the loteditor in pim-x and save the lot, the height of the prop that was below ground level is reset to ground level (height = 0).

So it's best to be a bit careful using negative values in the reader with regard to prop positioning. Probably the best thing to do is use props that have been rendered with an offset.

Lowkee33

I have also found that props that I move horizontally off of the lot in Reader will still display on the very edge of the lot in-game.  Don't know if this relates to your question though.   

rjaap

#8
Yes it does. It looks like the lot editor (maxis or pim-x) does a check on prop positions when a lot is opened. I just entered some negative values for x and y placement for a prop in the reader and opened the lot. The prop should have been moved to a position outside the 1x1 tile, but it was placed right on the edge. I saved the lot and checked in the reader. Both x and y values had changed to 0x00000A3D which is 0,0399 cm from the axis origin (if I have my hex to decimal conversion right this time). For negative z positions the mechanism is somewhat different but with the same result. A prop which has a negative placement on the z axis is shown to be below ground level in the lot editor. But when the lot is saved the position of the prop is returned to ground level.

I haven't experimented with extreme positive values yet but I guess it will be the same.
Negative z positions do display in game though, but I haven't checked negative x and y positions yet.

RippleJet

Quote from: rjaap on March 04, 2011, 05:11:03 PM
I haven't experimented with extreme positive values yet but I guess it will be the same.

Yes, I did some experimenting myself quite a while ago, and the same applies to moving a prop (the centre of it) off the lot in any of the four directions (+X, -X, +Z, -Z).