PDA

View Full Version : Day/Night transitions?


ironheart
06-15-2009, 09:20 PM
Just a question. I was playing KOTOR the other day and it occurred to me that on every planet you go to it's day time all the time no matter how long you spend running around on it and i was just wondering if it's possible to change that? Is the sky box(I think that's what it's called?) something that's set in stone or would it be possible to make, I dunno, a script or something to make it change periodically? Or would that be crazy ridiculous impossible? Never modded much before but I'd like to start and if this is possible it's something I want to take a stab at.

Pikmin
06-15-2009, 09:24 PM
the skybox can't be changed during the game, it's a texture.

ironheart
06-15-2009, 09:26 PM
darn. Well so much for that idea.

Darth Novotnus
06-16-2009, 08:12 AM
Well, you can make two different modules, with different skyboxes, but they'll not change periodically. You can only make some things happening in a "day" module, and other - in a "night" module, but that's whole lots of work...

Alpharaider47
06-18-2009, 03:48 PM
would it at all be possible to make the texture a gif? then you could have it change at least. Dunno if it would work or not. Maybe there is a way to change it so that when you enter a building it is day, but when you leave it has changed to night time?

TriggerGod
06-18-2009, 03:50 PM
would it at all be possible to make the texture a gif?
no, the game will only accept its default .tpc files or .tga files (which is the ones we make, and put into the override folder).

Demongo
06-18-2009, 03:50 PM
I know that you can make animated skyboxes.
If you played Bos:SR the Battle of Malachor is like that.
But the file should be very,very large.

ironheart
06-18-2009, 09:02 PM
So maybe not impossible just really, really, really difficult then. Hmm.

VarsityPuppet
06-18-2009, 11:13 PM
you couldn't use txis to make the sky animated? Er... on second thought, that'd be one huge texture file.

logan23
06-18-2009, 11:58 PM
Hey,

If you want the planet to show night in certain scenes of the game and change to day time later- this could be accomplished by creating 2 exact Modules except the skybox would be changed to show the new time of day. This would work for modules which do not reflect the sun intensity like on Onderon.

Light maps could be give more yellow light to show day time and change the light map hue to a blue for night.

I have not tested this out, but hypothetically this should work- don't know how real it will look while walking around in the module.

To trigger the night or day module version you could use a bed/rest/sleep or you can decide to have some food in a cantina. After you select to take a nap, a script will fire to replace the day module with night module.

Logan

Robespierre
06-19-2009, 02:52 AM
Hey,

If you want the planet to show night in certain scenes of the game and change to day time later- this could be accomplished by creating 2 exact Modules except the skybox would be changed to show the new time of day. This would work for modules which do not reflect the sun intensity like on Onderon.

Light maps could be give more yellow light to show day time and change the light map hue to a blue for night.

I have not tested this out, but hypothetically this should work- don't know how real it will look while walking around in the module.

To trigger the night or day module version you could use a bed/rest/sleep or you can decide to have some food in a cantina. After you select to take a nap, a script will fire to replace the day module with night module.

Logan

The only issue with the two different modules is that certain variables wouldn't work any more. It would be a massive effort to create two totally separate versions of the same module, where changes in one effected the other in exactly the same way.

You'd probably be better just emptying out the night module of quests and creating a totally new set of side-quests for it. It wouldn't be that hard, since you could move the majority of people out since they would all be sleeping.

Alpharaider47
06-20-2009, 12:31 AM
well if that lighting thing worked you could possibly make it go from day to dusk...

logan23
06-20-2009, 12:50 AM
Hey,

The only issue with the two different modules is that certain variables wouldn't work any more. It would be a massive effort to create two totally separate versions of the same module, where changes in one effected the other in exactly the same way.

This can be solved easily by using global data pads which the triggers or NPC will check if the PC has in his/her inventory.

I agree that this would still take some work especially if you have different NPCs at night and day time. I would only see this useful if your WIP is an entire planet alone which would them make sense to put a lot of work time into the mod.

Logan

Doc Valentine
06-20-2009, 05:48 AM
The truth is, Kotor isn't really made to support day-to-night transitions like the ones you speak of, most of the day/night transition fields in the .are files of your modules are just null leftover structs from NWN which used a skybox that did its own transitions. To do a true day to night transition, you would need multiple models of the same module (which would cost you megabytes, given how big the module you are preforming this on is) and you would have to essentially "warp" the player to the next module once a certain amount of time has passed. It's doable, and not incredibly hard to script... but the product just wouldn't be worth it, it certainly wouldn't be stable. Imagine you are running from one npc to the next during a side quest, when you get warped to then night module suddenly.

Not trying to kill your passion or anything, just saying that its a lot of work for something that wouldn't be all that spectacular in practice.

VarsityPuppet
06-20-2009, 10:09 AM
Yeah, I was browsing the script functions in KscriptEditor and I noticed those functions. I assumed they were from Nwn, but how exactly was it implemented in that game?