Magnificent Ornk nikki. Posted August 10, 2004 Share Posted August 10, 2004 I have a problem. The plot of my scenario (which is coming on well btw) demands that the game is dark. Basically, the sun has been shrouded so that the baddie can get his minions up onto the surface. Now, in order to achieve this, I used: set_ticks_forward(-1) as is done in Babysitting. This worked, in that it was always evening. However, I soon found a problem. Should the player use a special ability, they would never be able to use it again. This was bad, but workable. I could say that the evil magic blocking the sun stops their skills recharging. Then, though, another problem emerged. My scenario needed the party to have a special item to finish it. Since this item was only obtainable after baddies attacked a fort ON DAY 3, it couldn't be finished. Oops. So, using a timer in the scenario Start_state, I tried to get a variable to count up to 5000, where it would set_ticks_forward(5000) (a day), and reset the timer. At first, the thing skipped a day each turn, and then nothing at all. I've also tried using two SDFs to act as a counter, setting the clock forward after both equalled a certain number. No luck. It's vital that the action takes place in the dark, so any ideas? If not, I'll have to scrap the thing, something I'm not overly keen about. Link to comment Share on other sites More sharing options...
Easygoing Eyebeast Morgan Posted August 10, 2004 Share Posted August 10, 2004 Might want to post the script - I would imagine there's something wrong with your coding. Link to comment Share on other sites More sharing options...
Magnificent Ornk Kelandon Posted August 10, 2004 Share Posted August 10, 2004 You could tick off the box that it's taking place in the caves, which are dark, and put surface terrain anyway. I think this would accomplish the same thing, although I haven't tried it. Link to comment Share on other sites More sharing options...
Garrulous Glaahk Isaac Posted August 10, 2004 Share Posted August 10, 2004 Outdoors, you'd get the wrong kind of walls. Also, the background sounds would be wrong. Link to comment Share on other sites More sharing options...
Ineffable Wingbolt Dahak Posted August 10, 2004 Share Posted August 10, 2004 The caves aren't dark. They have perpetual lighting. True, it isn't as bright as the surface, but by no means is it dark. Link to comment Share on other sites More sharing options...
Magnificent Ornk Kelandon Posted August 10, 2004 Share Posted August 10, 2004 Er, dark in the sense of night dark, not dark in the sense of making town dark so you need to cast the Light spell in order to see more than a square away dark. It's annoying that we can't mess with outdoor terrain details nearly as much as we can with town details. I hadn't noticed that (because I've hardly touched outdoor terrains yet). Link to comment Share on other sites More sharing options...
Well-Actually War Trall Fort Posted August 10, 2004 Share Posted August 10, 2004 The outdoors are very rigid compared to Towns, I'm afraid. What you are proposing seems like a good idea, but there is probably some error in your implementation. You should also realize the problem this would cause with monsters scripts before you get too wrapped up in this. Link to comment Share on other sites More sharing options...
Easygoing Eyebeast *i Posted August 10, 2004 Share Posted August 10, 2004 The abilities I am not sure. But you could track time artificially using flags by just incrementing them all the time. Three flags will allow you to track for 3125 days, ample time to finish the scenario. Link to comment Share on other sites More sharing options...
Ineffable Wingbolt Dahak Posted August 10, 2004 Share Posted August 10, 2004 ... How do 3 flags give you 3125 days? Link to comment Share on other sites More sharing options...
Magnificent Ornk Kelandon Posted August 10, 2004 Share Posted August 10, 2004 I was thinking you could use flags as digits in a base-256 system (ie increment a flag until it got to 255, then increment the other flag by one and reset the first flag to 0), which would get you something like 64 million ticks with two flags. How *i came up with 3125, I don't know, though. EDIT: Ach, too many zeros. Keep's right: 2^16 is about 64 thousand, not million. Link to comment Share on other sites More sharing options...
Well-Actually War Trall Fort Posted August 10, 2004 Share Posted August 10, 2004 64 million with 2 flags??? More like around 65000. But 3 flags gives you around 16 million (the average amount of colors a modern monitor can display), and that divided by 5000 yields about 3300 days, I think. Link to comment Share on other sites More sharing options...
Easygoing Eyebeast *i Posted August 11, 2004 Share Posted August 11, 2004 Duh, for some reason I used 250 as the value for a flag. Either way, you get over 3000 days. Link to comment Share on other sites More sharing options...
Magnificent Ornk nikki. Posted August 12, 2004 Author Share Posted August 12, 2004 Quote: Originally written by Garrison:The outdoors are very rigid compared to Towns, I'm afraid. What you are proposing seems like a good idea, but there is probably some error in your implementation. You should also realize the problem this would cause with monsters scripts before you get too wrapped up in this. Errr... problems with monster scripts? What do you mean? And I tried the SDF trick, but no luck. Does (set_ticks_forward(-1)) cease all ticks, effectively stopping the timer? The way I implemented the sdf counter was to use (inc_flag(0,1,1)) in the scenario files start_state. Then, I stuck in a if(get_flag(0,1) == 255) { inc_flag(0,2,1); } Finally, I used a (if(get_flag(0,1) == 1) && if(get_flag(0,2) == 250) { set_ticks_forward(5000) (i.e. a day). But no cigar. I'd love to post the script, but it's not on this computer, so I can't. If all else fails though, it looks like I'll have to adapt the plot so the darkness is more like that in LotR: The Return of the King film, in that day exists, it's just slightly darker. It's all I can do. Link to comment Share on other sites More sharing options...
Well-Actually War Trall Fort Posted August 12, 2004 Share Posted August 12, 2004 Don't forget that many things like traps and monster scripts rely on the ticks to time their events. You'll need to refer all of these scripts to the SDFs you plan to use. A time consuming task, but if you need to do it for you scenario, go ahead. Link to comment Share on other sites More sharing options...
Recommended Posts