Real time weather (METAR) on your server missions HOW TO - Page 4 - ED Forums
 


Notices

Reply
 
Thread Tools Display Modes
Old 02-26-2018, 06:46 PM   #31
Johnny_Rico
Senior Member
 
Johnny_Rico's Avatar
 
Join Date: Jul 2017
Posts: 1,269
Default

Quote:
Originally Posted by uscstaylor View Post
Due your instructions are not very clear.
What does this mean

After installing python open a dos window as admin and install requests using pip install requests

What requests?

2nd

Get an API key to grab real time weather from the internet from www.checkwx.com
- register an account and then login and go to www.checkwx.com/apikey
- fill in the details (remember to say non commercial use)
- might take up to 24 hours for him to activate it for you but you can check by going to
- https://www.checkwx.com/user/api once you have it copy paste it somewhere safe
- dont give your key out to anyone else you only get a certain amount of free reads per month
- Our server restarts 4 times per day every 6 hours, so we said we would only use about 200 per month
- when filling in the form


What API key are you talking about?

I really want to use this but need help with this.

UPDATE GOT THE KEY but still need help to install
Sorry for delay in replying was on an enforced "holiday" from here

When you get your API key you need to edit the script and paste it into the following variable
s_api_key_checkwx = 'API STRING GOES HERE'
then save the file
__________________
METAR weather for DCS World missions

Havoc Company Dedicated server info Connect IP: 94.23.215.203
SRS enabled - freqs - Main = 243, A2A = 244, A2G = 245
Johnny_Rico is offline   Reply With Quote
Old 05-30-2018, 10:26 PM   #32
Picchio
Junior Member
 
Join Date: May 2012
Posts: 85
Default

Need some help here... can't get my head around this error I keep getting. Any advice?



C:\Windows\system32>SET DCS_PATH="C:\Program Files\Eagle Dynamics\DCS World OpenBeta\bin"

C:\Windows\system32>SET PRIMARY_AIRPORT=URMO

C:\Windows\system32>SET BACKUP_AIRPORT=URMN

C:\Windows\system32>SET TIME_CONTROL=real

C:\Windows\system32>SET zip="C:\Program Files\7-Zip\7z.exe"

C:\Windows\system32>SET MISSION_PATH="D:\Games\MISSION"

C:\Windows\system32>SET MISSION_NAME=MYMISSION

C:\Windows\system32>SET PYTHON_SCRIPT="C:\Users\Picchio\Desktop\TEST\dcs_weather.py"

C:\Windows\system32>SET TEST=

C:\Windows\system32>SET HOUR= 0

C:\Windows\system32>IF " " == " " SET HOUR=0

C:\Windows\system32>IF 0 GEQ 18 TIME_CONTROL=6
real

C:\Windows\system32>cd /D "D:\Games\MISSION"

D:\Games\MISSION>"C:\Users\Picchio\Desktop\TEST\dcs_weather.py" "D:\Games\MISSION"MYMISSION.miz URMO URMN real
Not enough arguments need more input
usage example
dcs_weather.py "D:\DCS_Missions\Weapons_Training_v2.11.2.miz" UGSB UGSS real

D:\Games\MISSION>ren MYMISSION.miz MYMISSION.zip

D:\Games\MISSION>"C:\Program Files\7-Zip\7z.exe" a -tzip MYMISSION.zip mission -mx9

7-Zip 18.05 (x64) : Copyright (c) 1999-2018 Igor Pavlov : 2018-04-30

Open archive: MYMISSION.zip

WARNINGS:
Headers Error

--
Path = MYMISSION.zip
Type = zip
WARNINGS:
Headers Error
Physical Size = 9504

Scanning the drive:

WARNING: The system cannot find the file specified.
mission

0 files, 0 bytes

Updating archive: MYMISSION.zip

Keep old data in archive: 6 files, 130229 bytes (128 KiB)
Add new data to archive: 0 files, 0 bytes


Files read from disk: 0
Archive size: 9504 bytes (10 KiB)

Scan WARNINGS for files and folders:

mission : The system cannot find the file specified.
----------------
Scan WARNINGS: 1

D:\Games\MISSION>ren MYMISSION.zip MYMISSION.miz

D:\Games\MISSION>cd /D "C:\Program Files\Eagle Dynamics\DCS World OpenBeta\bin"

C:\Program Files\Eagle Dynamics\DCS World OpenBeta\bin>start /D"C:\Program Files\Eagle Dynamics\DCS World OpenBeta\bin" /B dcs.exe

C:\Program Files\Eagle Dynamics\DCS World OpenBeta\bin>pause
Press any key to continue . . .

Last edited by Picchio; 05-30-2018 at 11:00 PM. Reason: Updated
Picchio is offline   Reply With Quote
Old 05-31-2018, 07:12 AM   #33
Johnny_Rico
Senior Member
 
Johnny_Rico's Avatar
 
Join Date: Jul 2017
Posts: 1,269
Default

change
SET MISSION_PATH="D:\Games\MISSION"
to
SET MISSION_PATH=D:\Games\MISSION\
__________________
METAR weather for DCS World missions

Havoc Company Dedicated server info Connect IP: 94.23.215.203
SRS enabled - freqs - Main = 243, A2A = 244, A2G = 245
Johnny_Rico is offline   Reply With Quote
Old 05-31-2018, 07:31 AM   #34
Picchio
Junior Member
 
Join Date: May 2012
Posts: 85
Default

Hi,
Just made the correction; now getting

"WARNING: specified miz file does not exist"

Last edited by Picchio; 05-31-2018 at 07:49 AM.
Picchio is offline   Reply With Quote
Old 05-31-2018, 08:37 AM   #35
Picchio
Junior Member
 
Join Date: May 2012
Posts: 85
Default

Heads-up.
I found a solution. Here's the correction it accepts:


SET MISSION_PATH="D:\Games\MISSION\\"


Everything else is set as you indicated.
Urrà!
Picchio is offline   Reply With Quote
Old 06-12-2018, 10:02 PM   #36
tn_prvteye
Member
 
Join Date: Apr 2008
Posts: 201
Default

Just out of curiosity, could you theoretically use python to randomly change only the mission time and inject it into the MIZ file? Been looking for a way to do this forever.
tn_prvteye is offline   Reply With Quote
Old 06-13-2018, 02:05 PM   #37
Johnny_Rico
Senior Member
 
Johnny_Rico's Avatar
 
Join Date: Jul 2017
Posts: 1,269
Default

This system allows you to use either realtime or presets, I suppose it could be changed to add random as well


I will have a look at this later on tonight when I get time
__________________
METAR weather for DCS World missions

Havoc Company Dedicated server info Connect IP: 94.23.215.203
SRS enabled - freqs - Main = 243, A2A = 244, A2G = 245

Last edited by Johnny_Rico; 06-13-2018 at 02:08 PM.
Johnny_Rico is offline   Reply With Quote
Old 06-13-2018, 02:43 PM   #38
tn_prvteye
Member
 
Join Date: Apr 2008
Posts: 201
Default

Great! Thanks for the help. This one small detail has been driving me crazy for a while.
tn_prvteye is offline   Reply With Quote
Old 06-13-2018, 04:15 PM   #39
Johnny_Rico
Senior Member
 
Johnny_Rico's Avatar
 
Join Date: Jul 2017
Posts: 1,269
Default

is it just time of day you want changed ? randomised i mean
__________________
METAR weather for DCS World missions

Havoc Company Dedicated server info Connect IP: 94.23.215.203
SRS enabled - freqs - Main = 243, A2A = 244, A2G = 245
Johnny_Rico is offline   Reply With Quote
Old 06-13-2018, 06:31 PM   #40
tn_prvteye
Member
 
Join Date: Apr 2008
Posts: 201
Default

Yep.. Randomized weather would be nice, but time of day is what I'm mainly after.

I've got a mission I created (by stealing alot of other's LUA code) that a pretty good random mix of CAS/CAP stuff going on, and having a random mission time would be perfect for it.
tn_prvteye is offline   Reply With Quote
Reply

Tags
daws, dcs server, metar, real time, weather

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT. The time now is 05:18 PM. vBulletin Skin by ForumMonkeys. Powered by vBulletin®.
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.