KiCHo666 Posted July 16, 2014 Share Posted July 16, 2014 (edited) Hello once again!I've retextured the motorcycle for Mojave Travel mod:http://puu.sh/acAuf/0bb9a9472e.jpg I'm happy with the way it looks like, especially since I've added the glow map. NOW the question!Is there a way to make glow work only at night?I know about "gamehour" and "swaptexture" GECK commands, but how to make a sctipt so it puts Emit Multi for MaterialControler to default value?Emit Multi is currently at 10, so I would like that script puts it at 1 when it's daytime and back to 10 when it's night time.Help would be appreciated! :smile: Edited July 16, 2014 by KiCHo666 Link to comment Share on other sites More sharing options...
jazzisparis Posted July 16, 2014 Share Posted July 16, 2014 (edited) Create separate NIF files for day and night, and use SetModelPathEX (NVSE 4.2b2+) instead of swapping textures: if (GameHour > 19) || (GameHour < 5) if bNight == 0 set bNight to 1 SetModelPathEX "path to night NIF" BikeEditorID BikeRef.Disable BikeRef.Enable 0 endif elseif bNight set bNight to 0 SetModelPathEX "path to day NIF" BikeEditorID BikeRef.Disable BikeRef.Enable 0 endif Edited July 16, 2014 by jazzisparis Link to comment Share on other sites More sharing options...
KiCHo666 Posted July 16, 2014 Author Share Posted July 16, 2014 Thank you!!Few questions since I'm scripting noob.That bike is actually an activator that uses bike model to activate it. MTMojaveTravelActivator is the activator.So how can I make Bike reference?ref rBikebegin GameModeset rBike to MTMojaveTravelActivator....Like that?Also, what is bNight?The compiler said it's unknown command.Little more help? :D Link to comment Share on other sites More sharing options...
JJ2198 Posted July 16, 2014 Share Posted July 16, 2014 I think it's just supposed to be a variable (forgot to include it in script?). Though it seems unnecessary, having it as just if this do this else do this should be fine no need for an extra condition. Link to comment Share on other sites More sharing options...
KiCHo666 Posted July 16, 2014 Author Share Posted July 16, 2014 After I've done some thinking, having two model just for light switch is kinda resourse waste, i couldn't find a better word.The future of this mod is to include different skins to choose from, so having two models for each skin is not an optimal solution.Would prefer if we could have one nif model and just switch the texture when needed.The problem is, of course, the script. Link to comment Share on other sites More sharing options...
JJ2198 Posted July 16, 2014 Share Posted July 16, 2014 Use SetTexturePath instead of SetModelPath, might work. Link to comment Share on other sites More sharing options...
jazzisparis Posted July 16, 2014 Share Posted July 16, 2014 (edited) I assume MTMojaveTravelActivator uses a script? Open its script and add the following code inside a GameMode block: short bNight ; Add this with the rest of the script's variables. if bNight != ((GameHour > 19) || (GameHour < 5)) set bNight to (bNight == 0) if bNight SetModelPathEX "path to night NIF" MTMojaveTravelActivator else SetModelPathEX "path to day NIF" MTMojaveTravelActivator endif Disable Enable 0 endif how to make a sctipt so it puts Emit Multi for MaterialControler to default value? Emit Multi is currently at 10, so I would like that script puts it at 1 when it's daytime and back to 10 when it's night time. (...) After I've done some thinking, having two model just for light switch is kinda resourse waste, i couldn't find a better word.The future of this mod is to include different skins to choose from, so having two models for each skin is not an optimal solution. Would prefer if we could have one nif model and just switch the texture when needed. You can't directly modify properties inside a NIF file via script. We currently don't have that capability (and likely never will). Creating two versions (day and night) of each model seems the best, easiest solution to me. Texturing isn't my forte, but you can also increase luminosity by increasing the brightness of the alpha channel of the normal maps. Edited July 16, 2014 by jazzisparis Link to comment Share on other sites More sharing options...
Gribbleshnibit8 Posted July 16, 2014 Share Posted July 16, 2014 If you feel really adventurous you can add an animation to the model that will hide and show the part with the glow map. Showing or hiding a non-glow part opposite. Link to comment Share on other sites More sharing options...
KiCHo666 Posted July 17, 2014 Author Share Posted July 17, 2014 Yes, it uses a script and thanks, but it still doesn't work. :/.....Begin GameMode short bNight if bNight != ((GameHour > 19) || (GameHour < 5)) set bNight to (bNight == 0) if bNight SetModelPathEX "vehicles\UniqueMotorcycle\UniqueMotorcycleNight.nif" MTMojaveTravelActivator else SetModelPathEX "vehicles\UniqueMotorcycle\UniqueMotorcycle.nif" MTMojaveTravelActivator endif Disable Enable 0endif...When I try to save it, it says that MTMojaveTravelActivator is unknown variable, if I remove quotes then it saves, but no changes in game. Link to comment Share on other sites More sharing options...
jazzisparis Posted July 17, 2014 Share Posted July 17, 2014 It appears SetModelPathEX only accepts variables as parameters. Try this: short bNight ref rActivator ; The above should be added immediately after the first line in the script, not inside the GameMode block. if bNight != ((GameHour > 19) || (GameHour < 5)) set bNight to (bNight == 0) set rActivator to MTMojaveTravelActivator if bNight SetModelPathEX "vehicles\UniqueMotorcycle\UniqueMotorcycleNight.nif" rActivator else SetModelPathEX "vehicles\UniqueMotorcycle\UniqueMotorcycle.nif" rActivator endif Disable Enable 0 endif Link to comment Share on other sites More sharing options...
Recommended Posts