How to fix setCharacterVisible behavior on mods?

Your forum for all discussions around Modding.
CptTractor
Posts: 18
Joined: Tue Oct 19, 2021 2:13 pm

How to fix setCharacterVisible behavior on mods?

Post by CptTractor »

Found a model that looks great but had some issues I'mtrying to iron out. Upon entering the tractor the character/farmer model is visible in first person view- this isn't the default behavior so how can I set it back so it's invisible in first person but shows up again in third and when it's in use by AI?

In Giants Editor you can immediately see the farmer model and I see that most mods including the vanilla vehicles don't even have a farmer object, yet for those vehicles the farmer appears in 3rd person view and when a worker is hired. I assume this is managed by setCharacterVisibility calls in the vanilla game, but I can't guess where that gets referenced in the available xml. In GE under the common player_root branch, this mod has a subbranch with blue cube labeled "Farmer" with the 3d objects and texture references that make the farmer.

Hiring AI you can see the model if the visibility checkbox in GE for the "Farmer" object is set to true. If I remove the checkbox for visibility of the farmer model I no longer see the farmer model in either first or third person also there is no farmer model visible when a worker is hired on that vehicle. I have disabled all 3rd party specializations in modDesc.xml in an attempt to eliminate the possibility of third party scripts causing the behavior. How does this work and where is this explained in the documentation?
s8080t
Posts: 712
Joined: Wed Nov 20, 2019 9:26 pm

Re: How to fix setCharacterVisible behavior on mods?

Post by s8080t »

Hi,

which mod are you talking about precisely? Link please? :) I'm not aware of a bring-your-own-farmer kind of feature, would be interesting to investigate.

Usually the farmer's position in a vehicle is described by transform groups (points) for back/butt, foot and hands in the vehicle's I3D. The model is then loaded from the base game files.

I had the effect that the model was visible in first person view when I played with the some distance(?) values of the indoor camera (don't rember the details right now) - so maybe compare the mod's indoorCam XML with a base game vehicle.
Languages: DE/EN
Plattform: PC
Meine Mods
Grünlandsuchti
IT-Spezialexperte
OpenSource-Verfechter
CptTractor
Posts: 18
Joined: Tue Oct 19, 2021 2:13 pm

Re: How to fix setCharacterVisible behavior on mods?

Post by CptTractor »

The mod is a Massey Ferguson 7626 for FS2015, I don't recommend downloading it, it's on World of Mods. Are we allowed to post links? These sites seem sketchy regardless.

I started over with the original files and went through the steps to customize the indoor and outdoor camera index. I did not change the cameras position in GE and hardly touched the farmer model. So far I'm not able to reproduce this issue with the farmer being visible in 1st person, though the model is an object viewable in GE along with a passenger. Previously I messed with the farmer model because both the chair and the farmer were sunken into the floor of cabin. That's not happening this time either. It was most likely something to do with the model or any one of the 5-6 cameras.

The tractor has a lot of issues so I was hoping to learn something from it but I'm not sure that's possible. I thought I could reduce the clipping of the tires and improve the steering. The steering is somehow set up without ackerman steering so that adding the normal <ackerman steering...> line removes the front wheels and steering wheel. The game then immediately crashes if you try to do anything in the tractor. Otherwise it loads without error.

I've been trying to find working mods in the meantime. I believe I've put in around 40 hours this week searching through hundreds and I've not found one that simply works without hours of troubleshooting or customizing so that it's not a 5 ton utility tractor with 2,000 HP / 115 km/h or sounds like a whistle.
Post Reply