Thanks in advance.
Stop or stall the IG clock ... on purpose
#1
Posté 24 janvier 2011 - 05:35
Thanks in advance.
#2
Posté 24 janvier 2011 - 07:19
Try Baaleos
#3
Posté 25 janvier 2011 - 04:28
#4
Posté 25 janvier 2011 - 06:19
#5
Posté 25 janvier 2011 - 06:35
#6
Posté 25 janvier 2011 - 06:37
#7
Posté 25 janvier 2011 - 06:44
#8
Posté 25 janvier 2011 - 07:22
void main()
{
int daysPassed = GetLocalInt(OBJECT_SELF,"DAYS_PASSED");
int previousDay = GetLocalInt(OBJECT_SELF,"PREVIOUS_DAY");
int currentDay = GetCalendarDay();
if(currentDay != previousDay)
{
SetLocalInt(OBJECT_SELF,"PREVIOUS_DAY",currentDay);
if(daysPassed > 5)
{
SetLocalInt(OBJECT_SELF,"DAYS_PASSED",0);
//start a conversation there, but on whom???
}
else
{
SetLocalInt(OBJECT_SELF,"DAYS_PASSED",daysPassed+1);
}
}
}
I wroted it here, so I don't garantee it will work.
Modifié par ShaDoOoW, 25 janvier 2011 - 07:23 .
#9
Posté 25 janvier 2011 - 01:29
Eg - If you have a command delayed by for instance, 500 seconds, and tell nwn to go to the next Day via SetCalendarDay, it will advance the DelayCommand Timer forward as well, potentially making the delayed command fire early.
#10
Posté 25 janvier 2011 - 04:39
Baaleos wrote...
Note - Altering the time via SetHour etc can also screw up DelayCommand scripts.
Eg - If you have a command delayed by for instance, 500 seconds, and tell nwn to go to the next Day via SetCalendarDay, it will advance the DelayCommand Timer forward as well, potentially making the delayed command fire early.
Exactly. I was just hoping I'd missed a way not to affect delays is all. I think I'll just go with my Plan B which is making a DM wand to set lighting and skyboxes in areas on the fly from a preset list. Thanks though.
#11
Posté 26 janvier 2011 - 06:55
Go in the toolset module properties advanced tab set the day month year starting hour to 1
this means every time mod reloaded it starts back at one, you will need a DB to store your module world time and then set it. down side is as shadow spoke if your db vaue is 0 and mod starts at one it will skip that zero hour and start at 1 wich isn't a big issue so players gain an hour sometimes if mod resets/reloads.
If ya give me a bit more detail IE another post you said single player mod not multiplayer the logic works just about the same for both, the issue being multiplayer PW adds the more variable factor, sigle player not so much
#12
Posté 26 janvier 2011 - 08:04
He's not asking how to make time persistent, he's asking how to prolong daylight/nighttime while the mod is running. The issue is that bioware's time setting always sets it forward, causing durations to run out, breaking immersion and causing other unwanted effects.Greyfort wrote...
if you want control over the clock and callander
Go in the toolset module properties advanced tab set the day month year starting hour to 1
this means every time mod reloaded it starts back at one, you will need a DB to store your module world time and then set it. down side is as shadow spoke if your db vaue is 0 and mod starts at one it will skip that zero hour and start at 1 wich isn't a big issue so players gain an hour sometimes if mod resets/reloads.
If ya give me a bit more detail IE another post you said single player mod not multiplayer the logic works just about the same for both, the issue being multiplayer PW adds the more variable factor, sigle player not so much
Funky
#13
Posté 26 janvier 2011 - 08:29
once again we have to use programing to create what we want within the limits of the toolset 90% of the things we think of are possible we just have to try.
so please Let me know i will try to help.
#14
Posté 26 janvier 2011 - 09:26
Funky
Modifié par FunkySwerve, 26 janvier 2011 - 09:26 .
#15
Posté 26 janvier 2011 - 11:20
Is there a way I can stop or pause the IG clock so DMs can have prolonged daylight or night times, but not screw up spell durations?
Blue Totoro :
I'm trying to make a conversation-starting script that starts once every 7 days and when the conversation ends, I can hopefully get a script that skips directly forward to morning. Apparently that last bit is possible, so if I can get that looping script, that will be grand. Maybe I could exploit the month system and say that if the day of any month at all is 7, 14, 21, or 28, it goes off?
kalbaern :
Exactly. I was just hoping I'd missed a way not to affect delays is all. I think I'll just go with my Plan B which is making a DM wand to set lighting and skyboxes in areas on the fly from a preset list. Thanks though.
//---------------------------------------
npc conversation:
advance every 7 days, and set effects accordingly note( effect day/night.)
keep integrity of spells (little harder but possible)
1)Single Player module: Being a single play module allows us to do alot with toolset because we are oly having to keep that one players issues persistant and matching what npc is trying to do...set year1,month1,day0,hour0
if year important set a year through scripting
advance 7 days get current day add 7 gives you next day 7
advance hour to 23 making it night time depending on how many RT minuets =1 game hour the wait for 0 hour small if 1 min=1gt hour this is enough time to is what spell effect set on pc save them to db then do all other things you want with code maybe a cut sceen to let time go by....and now its 0 hour you can set the hour from 1-23 and not worry about the higher number issue allowing you to set the hour to what you want wich would give the day night effect if not. you can use a variable set in areas and based on database will set the effect of day night in area when pc enters.
Note: The issue with the delay command still a problem...Yet... since single player mod you can have those scripts fired after you adjust everything calander wise, then its hard coded to check calander which has already ben changed and no issue that is how i got around it.
In doing this we ask ourselfs Logicly can we do this correctlty. we can we just have to know what we want to do and script accordingly.
DM prolonged Night: Once again it seems strange to have it lets say hour 16dusk dawn6 and we want to prolong the night, we cant realy make the IGCalander/Clock stop so Emulation as stated in your post will work so it will look like night when clock says daytime but that ware the DB var comes in and regaurdless of the clock time you use a variable to stop time...This is ware the persistance comes in it emulates it and although calander is off you can get it back to your persistant time after the DM event ...side effect player spell duration expired, otther module delays fired.. but this can be over come by earlier statement.
We just have to try our ideas and see how they work. Thats the enjoyment i get from programing with the aurora toolset. I offer my help if you would like, whats the worst that can happen we cant do it right.
I still think we arnt just limmeted to a function although a function would be most practicle and easy. Like the issue im haveing with item properties, we have a linux function but not a windows function so I'm trying to work around that. I see and feel its possible Just have to keep trying.
i will work on something from the information above, was just asking for a bit more detail so I might be able to better do it. I can work with what was stated I guess the exact changes are not important, especialy if ya dont want to give away in forums. if thats the case send me a pm. I'm a Old Programer and free source with honor and credit is all any Good programer can ask for after all we all program here for no money just good code and fun play.
God bless
#16
Posté 27 janvier 2011 - 12:56
It's not 'a problem', it's the only problem. Setting time ahead is trivially easy. Fixing durations is the hard part, and there are no hooks to 'have those scripts fired' - the duration of all temporary effects in the mod is affected, no matter what applied them and when. This is the case whether the mod is single player or not (his isn't, note the reference to DMs) - multiplayer/singleplayer has nothing to do with this.Greyfort wrote...
Note: The issue with the delay command still a problem...Yet... since single player mod you can have those scripts fired after you adjust everything calander wise, then its hard coded to check calander which has already ben changed and no issue that is how i got around it.
One option would be to scan all creatures in the mod and all their items, using nwnx_structs to check durations of temporary effects and itemprops, and reapply them with the same duration plus the amount you're setting time ahead. Compared to simply adjusting day/night appearance, that's an absurd amount of zots to invest for a difference players are unlikely to even notice.
I admire the spirit in which you're posting - the notion that anything can be accomplished with enough determination and cleverness. Unfortunately, doing so is sometimes just not worth the cost.
Funky





Retour en haut







