Crowley9 Posted July 10, 2017 Share Posted July 10, 2017 (edited) I tried out Daily Vendor Restock, available here: http://www.nexusmods.com/newvegas/mods/44569/? This did not work for me, so I dug into the mod file (which is why I am posting here and not mod troubleshooting). This script seems to be the heart of the mod: scn merchantResupplyScriptint dayofweekbegin gamemodeset dayofweek to getdayofweek + 1if dayofweek == 8set dayofweek to 0endifif ( gamehour < 23.8 )SetNumericGameSetting imerchantrespawnday2 dayofweekendifend I can see it is supposed to simply change the game setting iMerchantRespawnDay2 to current day of week + 1. However, this script seems to be somehow fundamentally broken since I can't save and compile it. I can see some minor problems. The "if dayofweek == 8" part should be changed to 7, since the game tracks weekdays 0-6. And I think "if ( gamehour < 23.8 )" would probably be better served by something like "if (gamehour == 23)". However, I don't see what actually is broken about this script. Edited July 10, 2017 by Crowley9 Link to comment Share on other sites More sharing options...
dubiousintent Posted July 10, 2017 Share Posted July 10, 2017 Just the obvious: See "SetNumericGameSetting". The second parameter (dayofweek) is supposed to be a "float". Instead it's initialized as an "integer". See also the comment about "GameDaysPassed" and "GameHour" on the "Global variables for In-Game Time" page before you make that proposed change. -Dubious- Link to comment Share on other sites More sharing options...
Crowley9 Posted July 10, 2017 Author Share Posted July 10, 2017 Here's my altered script, which still doesn't compile: scn merchantResupplyScriptfloat dayofweekBegin GameMode set dayofweek to ( GetDayOfWeek + 1 ) if ( dayofweek == 7 ) set dayofweek to 0 endif if ( gamehour == 23 ) SetNumericGameSetting iMerchantRespawnDay2 dayofweek endifEnd Link to comment Share on other sites More sharing options...
DoctaSax Posted July 10, 2017 Share Posted July 10, 2017 dayofweek doesn't have to be a float in order to be accepted by that function. It'll accept an int just as fine. In order to get the script to compile, try marking the setting's name as an actual string with quotation marks:SetNumericGameSetting "iMerchantRespawnDay2" dayofweek If that doesn't work, install the Geck Powerup maintained by hlp, and check if it gives you an error message. Link to comment Share on other sites More sharing options...
Crowley9 Posted July 11, 2017 Author Share Posted July 11, 2017 Ah, my problem was that I was running GECK without NVSE included, and thus SetNumericGameSetting was an invalid function. Link to comment Share on other sites More sharing options...
Recommended Posts