View Single Post
Old 08-13-14, 12:26 AM   #11341
TheBeast
The Old Man
 
Join Date: Jan 2010
Location: Lynnwood, WA
Posts: 1,533
Downloads: 876
Uploads: 23


Can we Script Minimum Days in Base?

Hi, tried to PM but you have exceeded your messages quota.

I have been away for a long time, almost 2 years.
One of the first things I encountered after updating MODS was entering bunker 1 day before a mission started so upon exiting bunker, 13 days of mission time had already been wasted.
I obviously edited my data\CFG\UPC.cfg changing value for MinimumDaysInBaseGE=14 to 1 so I could at least have a chance to complete the mission.

This got me thinking. The value for MinimumDaysInBaseGE=XX may be a variable that could be scripted.
If this is possible, We can set default to one(1) and I could script time for each piece of equipment being changed/added.
i.e.
SET MinimumDaysInBaseGE=%MinimumDaysInBaseGE%+XX
for each piece of equipment being changed or added.

The variable would be set/updated every time you hit the accept button located on bottom right of upgrades menu.

Not sure how to or if we even want to handle torpedo loading because dragging torpedo doesn't use button to execute scripts. The default of one(1) day would be enough to cover torpedo loading and refueling.

Maybe even have a UI Menu option to give like 1, 2, 5 or 10 days of shore leave to crew that is only available when near base or friendly port. Like when the Refit option appears.

I do know that if the variable is set before entering bunker it will be saved to save game or when entering bunker but not sure about the shore leave part.
And if some one makes equipment changes in bunker we may have to update Entering Bunker and or latest save game file when exiting Upgrades Menu.
%UserProfile%\Documents\SH5\data\cfg\SaveGames\<La stSave>\CareerTrack.upc
PatrolStartDateTime=YYYY-MM-DD HH:MM:SS

The %UserProfile% is a default OS variable that is set when a User logs onto the computer. Not sure how to access this variable from game but game know where to put save files.

What do you think?

Regards!
TheBeast
__________________
Fear me! I am, TheBeastBelow

SHIV-MediaFire | SHV-MediaFire

Last edited by TheBeast; 08-14-14 at 05:28 PM.
TheBeast is offline   Reply With Quote