Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Completed Contracts Disappear before Player can Collect them? #32

Closed
cwattyeso opened this issue Sep 4, 2022 · 15 comments
Closed

Completed Contracts Disappear before Player can Collect them? #32

cwattyeso opened this issue Sep 4, 2022 · 15 comments
Labels
bug Something isn't working

Comments

@cwattyeso
Copy link

I’m currently noticing an issue with Contracts in the game, not sure if this is Giants Vanilla Behaviour or something Better Contracts is causing, or something Better Contracts could fix.

In Single Player and Multiplayer if a player is doing contracts and they go from ‘Active’ to ‘Completed’ on the missions screen, but the player doesn’t immediately go and Collect the Payment and return any borrowed equipment, there seems to be an issue where if the player saves and exits the game, or logs out in Multiplayer, that when they load the game again the Completed Contracts have vanished and the player has not received any payment or reward for them.

For example if I have Four Ploughing Contracts Active and I work through them in some order, but before I can complete all four contracts I have to exit the game, when I load the game next time the Completed Contracts have disappeared and I have not been paid for them and only Active Contracts are still there. There is also the issue where if I borrowed the equipment offered for one of these contracts that too is then removed and gone, meaning I have no equipment to use for the remaining active contracts.

Where this issue also becomes frustrating is harvesting contracts where players are trying to collect Straw after harvesting. When the Completed Contract Disappears so does the Straw on the field. Also trailers of the left over or excess crop disappear too and the player loses that too.

Is there anyway to stop Completed Contracts disappearing until the player manually goes and collects them, to ensure firstly payments are received and that whatever other work they are doing can be completed?

@Mmtrx
Copy link
Owner

Mmtrx commented Sep 6, 2022

Hi,
could you provide a savegame (zip of he corresponding savegame folder) with the completed/ not yet paid contracts? And a log.txt file of the game with the active/ completed contracts.

Does this always happen, i.e. can you reproduce the error?

@cwattyeso
Copy link
Author

Yes this always happens and the error can be reproduced. Like I say anytime you have completed contracts on the missions screen and exit from the game or log out in dedicated multiplayer, when you load the game or log in again, all the completed contracts have disappeared or been erased and no payment has been received for them.

Here is a log file from a save I tested with today, where at the time of saving and exiting I had several Active Contracts not yet started and 15 Contracts at the completed stage.

log.txt

Here is the save file from this point too, where there should be 15 completed contracts ready to collect on the contract screen:

savegame19.zip

Here is the screenshot of the screen just before I exited the game:

fsScreen_2022_09_07_10_53_13

I bet when I load the game and continue the save all the completed contracts will be gone.

@Mmtrx Mmtrx added the bug Something isn't working label Sep 7, 2022
@Mmtrx
Copy link
Owner

Mmtrx commented Sep 7, 2022

Thanks, that is good documentation! Helps me to investigate the bug. Will be back, when I find anything..

@Mmtrx
Copy link
Owner

Mmtrx commented Sep 7, 2022

Hm, I could not reproduce that on my test map Elmcreek. I saved with 17 completed/ not collected contracts, and they were all still there after loading the savegame. Your savegame files also look ok: I can see your 15 complete (status="2") contracts in missions.xml:

<?xml version="1.0" encoding="utf-8" standalone="no"?>
<missions maxSupplyTransportContracts="8">
    <mission type="fertilize" activeId="3" reward="32332" status="2" success="true" farmId="1" stealingCost="0.000000">
        <field id="18" sprayFactor="0.500000" spraySet="false" plowFactor="1.000000" state="2" vehicleGroup="6" vehicleUseCost="4398.979980" spawnedVehicles="false" growthState="4" limeFactor="1.000000" weedFactor="0.500000" stubbleFactor="0.000000" fruitTypeName="SORGHUM"/>
    </mission>
    <mission type="plow" activeId="7" reward="51038" status="2" success="true" farmId="1" stealingCost="0.000000">
        <field id="35" sprayFactor="0.000000" spraySet="true" plowFactor="0.000000" state="3" vehicleGroup="5" vehicleUseCost="4860.839844" spawnedVehicles="false" limeFactor="1.000000" weedFactor="1.000000" stubbleFactor="0.000000"/>
    </mission>
    <mission type="plow" activeId="8" reward="18506" status="2" success="true" farmId="1" stealingCost="0.000000">
        <field id="38" sprayFactor="0.000000" spraySet="true" plowFactor="0.000000" state="3" vehicleGroup="1" vehicleUseCost="1762.560059" spawnedVehicles="false" limeFactor="1.000000" weedFactor="1.000000" stubbleFactor="0.000000"/>
    </mission>
    <mission type="plow" activeId="9" reward="98619" status="2" success="true" farmId="1" stealingCost="0.000000">
        <field id="46" sprayFactor="0.000000" spraySet="false" plowFactor="0.000000" state="3" vehicleGroup="3" vehicleUseCost="9392.320313" spawnedVehicles="false" limeFactor="0.000000" weedFactor="1.000000" stubbleFactor="0.000000"/>
    </mission>
    <mission type="plow" activeId="10" reward="16044" status="2" success="true" farmId="1" stealingCost="0.000000">
        <field id="47" sprayFactor="0.000000" spraySet="false" plowFactor="0.000000" state="3" vehicleGroup="7" vehicleUseCost="1528.000000" spawnedVehicles="false" limeFactor="0.000000" weedFactor="1.000000" stubbleFactor="0.000000"/>
    </mission>
    <mission type="plow" activeId="11" reward="33629" status="2" success="true" farmId="1" stealingCost="0.000000">
        <field id="49" sprayFactor="0.000000" spraySet="false" plowFactor="0.000000" state="3" vehicleGroup="4" vehicleUseCost="3202.800049" spawnedVehicles="false" limeFactor="0.000000" weedFactor="1.000000" stubbleFactor="0.000000"/>
    </mission>

Have you seen that error also on a different map?
Are those completed contracts gone immediately after start of the savegame?

Could you also post a log of the newly started game (with the lost contracts), maybe we can see error messages when game tries to load the completed contracts.

@cwattyeso
Copy link
Author

Okay I've done some research and have spoken to Giants about this issue also. Prior to the latest patch 1.7.1.0 I was experiencing this issue on every map I played. The completed Contracts would disappear on game exit and upon reloading the game would be replaced with new contracts so for example the Completed Ploughing/Cultivating Contracts would now appear as Sowing/Planting Contracts to accept.

Since Tuesday latest game update, this behaviour seems to be fixed in Single Player, Giants more or less confirmed to me that there was a small tweak made in Patch 1.7.1.0 but didn't feel it warranted being included in the Patch Notes. I have been able to successful load and reload a couple of saves in single player and not seen completed contracts disappear.

However I have not tested yet what happens if I were to forward time, and pass from one month to a brand new month and whether that would cause the Completed Contracts to be removed and new contracts spawned.

In Multiplayer the problem still seems to be present, however it seems to be connected to the server doing a restart. If you have Completed Contracts on a Server Save and the server for example does it's daily auto-restart to refresh everything, clear any errors and free up server memory, then when the server has started back up the Completed Contracts have gone. So there still seems to be something of an issue within the Multiplayer System when it comes to saving and reloading saves after the server has shutdown and restarted.

I guess I'll just have to make all players on the my servers aware that they are not to leave contracts completed but should collect them as soon as possible after completition has occurred. As any completed contracts will get purged by a server restarted.

@Mmtrx
Copy link
Owner

Mmtrx commented Sep 9, 2022

There is a new release v1.2.4.1. Although I doubt that above problem was caused by this mod, you could try to upgrade to this. Also, setting the (now somewhat superfluous) lazyNPC option to false (in the /modSettings config xml file), turns off any messing with the normal games NPC field work.

@cwattyeso
Copy link
Author

@Mmtrx I've downloaded the new release, and will give it a try today firstly on my Dedicated Server and then over the next two or three days on my current single players saves from my let's play series.

The only thing I can possibly see being a problem is the modsettings config file. Whilst this is fine for single player as it's located on the clients machine in their modsettings folder, for Servers and Server Admins we have no access to file system of the server and therefore can never open or edit any files in the modsettings folder. For settings to be editable and changeable on a server the config file needs to be read and stored somewhere the players do have access to, the most common being the save folder as players can download the save folder as a zip, edit any files they need and then reupload the zip. Mods like Autodrive and Courseplay now put their configs in the save game folder as this enables server players to be able to access them and make changes to the configs.

@cwattyeso
Copy link
Author

Okay so first test on Multiplayer Server with the new Version and I'm seeing some script errors in the console whilst playing:

2022-09-10

I'm also noticing that Contracts reach 100% in game but don't move to completed:

2022-09-10 (1)

@Mmtrx
Copy link
Owner

Mmtrx commented Sep 10, 2022

Thank You for Testing. I have not tested my Mod with Precision Farming, probably an incompatibility yet. I will investigative asap.

Some Server Providers (Nitrado) do allow Access to other Directorys like modSettings. I will try to Change Location of Config file to SaveGame Directory in one of the next updates.

@cwattyeso
Copy link
Author

Here is a copy of the log from my PC (Client with some errors)
log.txt

Here is a sample of log from the server with errors (sadly I see no way to export whole log from server):
Server Log Errors.txt

@Mmtrx
Copy link
Owner

Mmtrx commented Sep 10, 2022

Thanks, that helped. Found a small problem with syncing of contracts w/o borrowed equip. Pls download 1.2.4.1 again.

Maybe the client error log messages about FillLevelListener were a consequence of this. But that could also well be a Giants bug.

2022-09-10 12:49 Error: Running LUA method 'packetReceived'.
dataS/scripts/objects/FillLevelListener.lua(82) : attempt to index field 'baseTranslation' (a nil value)
2022-09-10 12:49 Warning (script): Function 'streamWriteFloat32' called with invalid number of arguments. 1 instead of 2.

Change of the config file location needs to wait for next release..

@cwattyeso
Copy link
Author

The FillLevelListener thing was weird because when that appeared in the log, in game we could not not empty or unload any trailers or harvesters.

I did a quick test of restarting the server with the Better Contracts mod disabled and everything worked fine without the mod installed. I was about to upload and reactivate 1.2.4.0 on the server again, as we didn't have any issues with that except the completed contracts disappearing if there was a server restart before players collected them. I'll download and test 1.2.4.1 again and will test that later. I'm taking a short break from Farm Sim now as have been playing/streaming for 6 hours today and I need a change.

@Mmtrx
Copy link
Owner

Mmtrx commented Sep 10, 2022

Puh - glad you didn't download immediately. Because I made a little mistake that prevented the whole mod from loading. Just repaired now..

@Cassy-Blair
Copy link

This is a Giants problem, which also exists without Better Contracts. You must complete completed quests before saving and before exiting the game. After reloading the game, the NPC will process its fields very quickly and the reward will be lost

@Mmtrx
Copy link
Owner

Mmtrx commented Oct 31, 2022

Think this can be closed now.

@Mmtrx Mmtrx closed this as completed Oct 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants