Starting time
Moderator: Forum Moderators
Starting time
Hi,
I would like to have a random starting time each game.
Right now fractions with daylight seem to be slightly better ?
regards, Malicor
I would like to have a random starting time each game.
Right now fractions with daylight seem to be slightly better ?
regards, Malicor
*Shrug*. This is one of those things that would be bad for campaign scenarios, but good for MP games.
For I am Turin Turambar - Master of Doom, by doom mastered. On permanent Wesbreak. Will not respond to private messages. Sorry!
And I hate stupid people.
The World of Orbivm
And I hate stupid people.
The World of Orbivm
-
- Retired Developer
- Posts: 1086
- Joined: September 16th, 2005, 5:44 am
- Location: Hamburg, Germany
Have a look at this
http://www.wesnoth.org/forum/viewtopic.php?t=8104
http://www.wesnoth.org/forum/viewtopic.php?t=8104
Smart persons learn out of their mistakes, wise persons learn out of others mistakes!
-
- Posts: 837
- Joined: April 14th, 2005, 4:17 am
Yes, but having a random starting time-of-day would make that not work. That was my point.ILikeProgramming wrote:For campaigns, can't you just rorder the time-of-day macros so another one is first?
For I am Turin Turambar - Master of Doom, by doom mastered. On permanent Wesbreak. Will not respond to private messages. Sorry!
And I hate stupid people.
The World of Orbivm
And I hate stupid people.
The World of Orbivm
Try this:JW wrote:That would be awesome!! On a huge map think how cool that would be in an epic campaign!!Disto wrote: You can make 24 turn days if you want.
Now THAT'S an idea I'd like to use in my own creations!
Code: Select all
{DAWN}
{DAWN}
{DAWN}
{MORNING}
{MORNING}
{MORNING}
{AFTERNOON}
{AFTERNOON}
{AFTERNOON}
{DUSK}
{DUSK}
{DUSK}
{FIRST_WATCH}
{FIRST_WATCH}
{FIRST_WATCH}
{SECOND_WATCH}
{SECOND_WATCH}
{SECOND_WATCH}
Code: Select all
{DAWN}
{MORNING}
{AFTERNOON}
{DUSK}
{FIRST_WATCH}
{SECOND_WATCH}
[time] tags are read in sequence, and you can duplicate them, add different times of day, reorder them etc, to create different effects: see Under the Burning Suns for totally different times of day, or To the Harbour of Tirigaz from Son of the Black Eye for a scenario that takes place during a single night (but has 24 turns).
I've added a feature request at https://gna.org/bugs/index.php?func=det ... em_id=4799 about this.
I've added a feature request at https://gna.org/bugs/index.php?func=det ... em_id=4799 about this.
This quote is not attributable to Antoine de Saint-Exupéry.
You would have to make some changes to WML to make it work. Time of day as it is presented to the player is something of an illusion. The game has no internal knowledge of time of day, nor is it aware of any typical time of day sequence.
The same system that makes time of day so flexible and easy to implement also makes it hard to do something like this. You need to change basic WML since time of day exists only in WML tags.
To allow random time of day start time and preserve the current system of defining times of day, you would need to either define time of day in a prestart event or allow [if] and [random] to exist under [scenario]. They were added to [story] to fulfill a need there, so I'm guessing it's not impossible.
Another way to go is to allow direct access to the internal time of day list (assuming one is created) by allowing the list to be rotated by a literal or random amount. In that case, the game becomes aware of the time of day. This could also allow you to use the time of day in a variable, which could be nice.
I don't know what kind of coding task it would be, so maybe I should stop talking out my rear. You could also use my start time randomizer. It works 100% for castles where the leader is surrounded, and it requires a small tweak for castles where the leader is free to roam around. (and it probably won't work on small maps where the leaders can fight within the first 6 turns)
The same system that makes time of day so flexible and easy to implement also makes it hard to do something like this. You need to change basic WML since time of day exists only in WML tags.
To allow random time of day start time and preserve the current system of defining times of day, you would need to either define time of day in a prestart event or allow [if] and [random] to exist under [scenario]. They were added to [story] to fulfill a need there, so I'm guessing it's not impossible.
Another way to go is to allow direct access to the internal time of day list (assuming one is created) by allowing the list to be rotated by a literal or random amount. In that case, the game becomes aware of the time of day. This could also allow you to use the time of day in a variable, which could be nice.
I don't know what kind of coding task it would be, so maybe I should stop talking out my rear. You could also use my start time randomizer. It works 100% for castles where the leader is surrounded, and it requires a small tweak for castles where the leader is free to roam around. (and it probably won't work on small maps where the leaders can fight within the first 6 turns)
Hope springs eternal.
Wesnoth acronym guide.
Wesnoth acronym guide.