Jump to content

Recommended Posts

Posted (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 merchantResupplyScript
int dayofweek

begin gamemode
set dayofweek to getdayofweek + 1
if dayofweek == 8
set dayofweek to 0
endif

if ( gamehour < 23.8 )
SetNumericGameSetting imerchantrespawnday2 dayofweek
endif


end

 

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 by Crowley9
Posted

Here's my altered script, which still doesn't compile:

 

 

scn merchantResupplyScript
float dayofweek

Begin GameMode
set dayofweek to ( GetDayOfWeek + 1 )
if ( dayofweek == 7 )
set dayofweek to 0
endif

if ( gamehour == 23 )
SetNumericGameSetting iMerchantRespawnDay2 dayofweek
endif


End

 

Posted

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...