Jump to content

Script to adjust time / date?


ENO

Recommended Posts

Not sure exactly what to search for but "date" didn't come up with anything so I'll run the risk of asking a question that's already been answered...

 

Back in the day I'd set up my missions to run seasonally... I'd go back through every mission and set the general date to the current and then carry on. As the seasons would change for those of us in civil climates (ie: Canada) that actually have a winter- so too would the game environment.

 

As I sit back down and start grinding out some ideas (A River Runs Through It is my really original initial working title- excited yet?) I'm left wondering if anyone has figured out a way to have the mission update the date in real time...

 

But now that I'm thinking about it- I guess that would mean the mission would have to adjust itself when it was initiated. But it adjusts itself when it generates dynamic content...

 

Anyway- you can see where I'm getting myself caught in a loop of ignorance way too tight for me to squeeze out of on my own.

 

Anyone got any input on the subject?

 

Thanks. :book:

"ENO"

Type in anger and you will make the greatest post you will ever regret.

 

"Sweetest's" Military Aviation Art

Link to comment
Share on other sites

I think I've read about this before and the answer is no. I believe this is because the dynamic weather starts with a certain set of variables and then progresses from there.

 

Season/time is also a set variable so the time can progress in real time, but you can't change it mid mission from say 1000 to 1800.

 

You might be able to create a .bat file or something that could delve into the .miz and change the date/time within the lua, but I think if you start manually editing the .miz some weird things can happen too.

 

I'm sure someone will correct me, but like I said I'm pretty sure you can't do what you're asking.

Link to comment
Share on other sites

I'm not sure about the date thing, but if I understood the intializition script feature correct, as there is little to no documentation on all the new features in ME, it should execute before the mission start. The idea is to setup map objects etc. before the mission timer starts.

If there is a possibility to adjust time and date it may be there?

 

Take it with a grain of salt, never actually used an initialization script, yet.

Shagrat

 

- Flying Sims since 1984 -:pilotfly:

Win 10 | i5 10600K@4.1GHz | 64GB | GeForce RTX 3090 - Asus VG34VQL1B  | TrackIR5 | Simshaker & Jetseat | VPForce Rhino Base & VIRPIL T50 CM2 Stick on 200mm curved extension | VIRPIL T50 CM2 Throttle | VPC Rotor TCS Plus/Apache64 Grip | MFG Crosswind Rudder Pedals | WW Top Gun MIP | a hand made AHCP | 2x Elgato StreamDeck (Buttons galore)

Link to comment
Share on other sites

Not unless it was ninja'd into the game.

 

The initialization script serves one major purpose in that it allows for code to be executed before the "scripting condition" for each group may be run. When you click on a group you will see a box that is labeled something like "Condition: [ ] % [100]". The blank condition box is for lua code. Code in that area is performed just after the initialization script.

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...