yumi-modding / FS17_ContractorMod

7 stars 4 forks source link

Strange Stutter on Characters #80

Open overchord opened 3 years ago

overchord commented 3 years ago

Hi I have used this mod extensively back in FS17, and was looking at using it for some recording with FS19 now - it's a really great idea and tool for stories with characters, so thank you for creating it!

However in the FS19 version I am encountering a persistent issue where characters stutter/jitter/dance when viewing them from a different contractor (e.g. you are looking at one of the other contractors)

I have uploaded an example as I am now reaching the end of my own testing: https://youtu.be/_O5FMigDW5M

I have tested this on Both FelsBrunn base map and a number of modded maps with the same result each time. I have stripped it back so I only have ContractorMod in the game, and it still happens as well. I tried disconnecting my controller completely to ensure it wasn't some kind of interference just as you change characters Log is clean on loads where this occur, and I'm not seeing anything in the console either, so really hitting a wall on what this issue might be related to Graphics drivers are up to date, and I've tested lower graphics settings than what I would normally run with, and no change it seems. So I am hoping there might be a known issue that you can point me to, but if any other info is needed please, let me know! I'm really keen to use the mod for some recording, but it might be a bit challenging if everyone is shaking :)

yumi-modding commented 3 years ago

Hello,

Thanks for reporting this issue. I'm aware of it but I didn't find exactly in what situation it happens since I can see it but not all the time or with all the characters. From my understanding, it could be the positioning of the character that should tune. When developing the mod, at the beginning he was feet inside the ground. Then he could be floating or worse, falling down. I will have a look a the code again and see if I have more success this time .

overchord commented 3 years ago

Hi Thanks for responding so quickly. Just to confirm that it is also intermittent for me - so it's not all the characters, and it's not always happening. It does however seem that once it has started with a character, then it continues for the rest of the session no matter what. E.g. I tried putting the affected character into a vehicle and back out again to see if it would somehow reset the position, but stuttering remains. From doing a lot of testing with this, it seems to me that the stutter seems most commonly related to the first one or two contractors - but that is a bit anecdotal - I haven't done a systematic test of this.

overchord commented 3 years ago

Also, if you want anyone to test changes, please just give me a shout - happy to help if I can.

yumi-modding commented 3 years ago

Hello Could you please give a try with this file https://github.com/yumi-modding/FS17_ContractorMod/blob/yumi-modding-patch-1/FS19_ContractorMod.zip It will be seen as mod version 1.0.0.10. I quickly tested it. If you could try on existing savegame and on new savegame, that could help. Thanks

overchord commented 3 years ago

Thanks for getting back! I have now had a go at testing. I should note that I have changed PC in the meantime, so to double check I first fired up the savegame with the 1.0.0.9 version - and verified that the stutter was still there - and it was.

2020-10-13 22:48 Error: Running LUA method 'update'.
2020-10-13 22:48 E:/FS19_modfolders/Testing/FS19_ContractorMod/scripts/ContractorMod.lua:459: attempt to index global 'ContractorModWorker' (a nil value)
2020-10-13 22:48 Warning (script): 'setXMLInt': Argument 2 has wrong type. Expected: Int. Actual: Nil 
2020-10-13 22:48   ..\..\..\src\base\scripting\lua\LuaScriptSystem.cpp (882): expectedType == Value::VoidType || expectedType == Value::ClassType
2020-10-13 22:48 LUA call stack:
2020-10-13 22:48   =E:/FS19_modfolders/Testing/FS19_ContractorMod/scripts/ContractorMod.lua (1295) : setXMLInt
2020-10-13 22:48   =E:/FS19_modfolders/Testing/FS19_ContractorMod/scripts/ContractorMod.lua (1344) : onSaveCareerSavegame
2020-10-13 22:48   dataS/scripts/utils/Utils.lua (404) : newFunc
2020-10-13 22:48   =[C] (4294967295)
2020-10-13 22:48   dataS/scripts/missions/SavegameController.lua (274) : saveWriteSavegameFinish
2020-10-13 22:48 Error: Running LUA method 'onSaveComplete'.
2020-10-13 22:48 E:/FS19_modfolders/Testing/FS19_ContractorMod/scripts/ContractorMod.lua:1299: 'for' limit must be a number
2020-10-13 22:50 Application exit request forced.

So it looks to me like something is going wrong on writing or updating the xml file - basically clearing it out rather than inserting default values, or retaining existing values.

Hope this is of use - and let me know if you want me to retest at any point.

yumi-modding commented 3 years ago

Oups sorry. I'll do clean test and send you a new zip. Only 1 line of code was supposed to be changed. I've juste made a new zip but Alex is still shaking when starting a new game.... I let you know if I find something else.

yumi-modding commented 3 years ago

@overchord Could you please test with the same link https://github.com/yumi-modding/FS17_ContractorMod/blob/yumi-modding-patch-1/FS19_ContractorMod.zip. Actually it seems to work better (first version I proposed had code error that I fixed)

overchord commented 3 years ago

Hey - sorry just saw your message- but will get on it and report back!

overchord commented 3 years ago

Right first impressions - The stutter is gone! I have tried loading my old character config, as well as the default one, and not seeing any stutter. I will use it some more over the next couple of days and report back if I see anything - but seems that it works now.

There is another difference from the FS17 version, which I think has been reported already, but I noticed that the position of the characters do not align with the view when you change. I am trying to use if for characters in a roleplay series, so it makes it a bit difficult since you can't line up characters to look at the person you then take the view from (the end up facing away in different angles). But that is an unrelated issue, and while it makes it a bit more challenging to use, it is certainly no where near as much of an issue as the stuttering! Thank you so much for working on this, I am really please to be able to start using the mod in earnest again :-)

yumi-modding commented 3 years ago

Hello Yes rotation also had been mentioned already and the fix might be around the same piece of code. I will also try to make some test.

overchord commented 3 years ago

HI - I am so sorry to report this, but the jitter is back....Really confused. I used the mod for a few hours today with everything running smooth, but on loading the savegame this evening, the jitter is back - big time - on two separate characters. I uploaded a short clip to demonstrate (It also shows the alignment issue which looks to be 180 degrees off ):

https://youtu.be/Yk5PgYnOuOo

I did install one additional mod (Tajfun log winch), but there are no issues in log at all, nor in console that I saw, so I am completely stumped now. I don't know if this helps/makes sense for you, but thought I would report back at least.

yumi-modding commented 3 years ago

Hello, Maybe I should report similar code to the save game loading related part. I'll check and share a new zip if it seems fine.

overchord commented 3 years ago

ok, that sounds great - happy to test again. I don't know if it was because some characters were in a vehicle on load that the stutter started again?

overchord commented 3 years ago

Hey - just a note to say that although I did experience the stutter again, the new version is a lot more stable. It seems to me that as long as I save with characters out of vehicles, there's no stutter in the next session. I'm getting to grips with the orientation - it generally seems that characters are oriented 180 degrees opposite to their view when you switch to another worker. So this version feels a lot better to work with, and I have only encountered the stutter when loading with characters in a vehicle.

yumi-modding commented 3 years ago

Hello @overchord, Could you please test this new zip https://github.com/yumi-modding/FS17_ContractorMod/blob/yumi-modding-patch-1/FS19_ContractorMod.zip I hope it will finally fix the isuse

overchord commented 3 years ago

Hey @yumi-modding sorry for slow reply - Jsut seen the message and will download at test and let you know tomorrow!

overchord commented 3 years ago

Hi @yumi-modding - I did a quick test tonight. First observation was that everything looked really stable. Orientations looked good, no stutter. I loaded up on a standard new farmer on Ravenport with four contractors (disabled any other mod). Contracotr #1 and #2 in vehicles, leaving the tw others on the ground. I then tabbed through contractors, but when tabbing got back to #1 in a vehicle, the view messed up. The map display now puts that character right in the middle of the map, below the surface (assuming this might be position 0,0,0?). Console at this point displays: Error Running LUA method 'update' [modfolderpath]/FS19_ContractorMod/scripts/ContractorMod.lua:1499: attempt to index field 'player' (a nil value) Error Running LUA method 'update' [modfolderpath]/FS19_ContractorMod/scripts/ContractorMod.lua:885: attempt to compare number with nil

Not sure if I am reading it correctly, but it seems like the player character is being included, but doesn't have a position?

yumi-modding commented 3 years ago

Hello

Yes I got this also after further testing. I'll check. Thanks for the feedback

yumi-modding commented 3 years ago

New zip update to fix the error FS19_ContractorMod/scripts/ContractorMod.lua:1499: attempt to index field 'player' (a nil value) https://github.com/yumi-modding/FS17_ContractorMod/blob/yumi-modding-patch-1/FS19_ContractorMod.zip

NonoTwingo commented 3 years ago

Hello guys ! First of all, thank you for your efforts in developping mods for FS19!

I downloaded the update you gate just above! No stutter at the first try however the player camera does not match where the character is looking at. As if he would get eyes in his head. Any thoughts? Thx !

yumi-modding commented 3 years ago

Hello @NonoTwingo Yes I thought this was fixed but it seems now it's ko again. On this particular issue I tried to make some quick fix without really testing it (you can notice how often I'm sorry of a new problem in these comments). I'll try to check the code

overchord commented 3 years ago

Hi really sorry I didn't get back to you sooner @yumi-modding - been really busy on the work side - but it look like @NonoTwingo got this one tested. Do you want me to check as well - or are you already working on changes?