RealismusModding / FS17_seasons

Farming Simulator 17 seasons mod
https://www.realismusmodding.com/mods/seasons
75 stars 55 forks source link

[WF] Create an overlay to display weather forecast and season #12

Closed theSeb1979 closed 7 years ago

theSeb1979 commented 8 years ago

This should be an overlay which is displayed on the screen. Possibly above the vehicle hud, or below the time hud. If it's below the time hud, then it will conflict with the Livestock manager mod.

But, looking at livestock manager, it adds itself into g_currentMission, so we can check for its presence and move the hud down, if necessary.

akuenzi commented 8 years ago

Then you make the changes in explorer then you fill in summary submit commit to master then click sync and it will pull changes from github as well as pushing your changes.

Thanks for that ian898 -- I just attempted to do something, by moving the huds to their own directory. Hopefully that doesn't screw anything up you're working on. Just checked the front page, and it worked! Thanks for the explanation -- this is old hat to you guys, but brand new stuff to me.

Also just uploaded a 'credits' file. Not sure what the right way to do it is, but wanted to make sure we credit Gary for his work, and anyone else that may help along the way. It's one way to help remember later.

ian898 commented 8 years ago

@akuenzi I have written the hud in a separate mod so I could just add all resources and tweak it without syncing then once i am happy I will add it all to into correct places of seasons I am not an expert on using the overlay class Xentro give me some pointers on the Livestock Manager Hud a few days ago which I have now implemented here that I have implemented I know it can still be improved but I will settle for working at this minute in time. Believe me I have been coding lua for about 3 weeks the only other languages I know are javascript, php and batch so your not the only one in over your head but like Xentro told me few days ago we all have to start somewhere I accepted Seb's invitation to collaborate to be apart of this team to further my skills as well being apart of this mod that has so much potential. :D

ian898 commented 8 years ago

fsscreen_2016_11_10_19_25_21 - copy

akuenzi commented 8 years ago

Here's another update from Gary (which I just synced to the master copy): capture They look simply awesome, in my opinion. :) On showing the snowflakes in white, Gary replied, "Snow Hud I already tried the Flakes in white, but it Just Didn't look right, I took a Screen shot in FS17 and made a masked out the Current weather and placed my new Snow icon in. If it's white then the alpha Gradients on the edges Don't Blend together too much, making it Very Rough around the Edges, The way I have it now Looks Clean and Nicely Blended with the Current HUD setup."

All of that is over my head, but I'm not an artist, and would simply take it at his word.

EDIT: Argh! I thought they were uploaded to the master. I'll give it another try. Okay... they should be there now. :)

@joskuijpers

we should ask a white set as well so we can try different things.

I'm assuming Gary's comments on the 'white' color on the snow icon would also apply to doing this for the season icons. I'm just guessing -- I'd requested the season icons also in white, but he provided them in color, so it might be related to the same reason above. What do you think -- should I ask for them in white anyway?

@ian898 Excellent work! It really looks nice with everything in there... though I doubt we'll ever see snow with a high of 22 and a low of 12... unless we're talking in Fahrenheit. :stuck_out_tongue:

ian898 commented 8 years ago

fsscreen_2016_11_10_20_03_11 - copy

akuenzi commented 8 years ago

@ian898 Nice! Well... what does everyone think?

ian898 commented 8 years ago

I am a bit uncertain both sets are good, My personal opinion we should set it up so the user can choose.

akuenzi commented 8 years ago

The only icon I wonder about (to my non-artist eyes), is the Autumn icon. It looks awesome by itself, but definitely a bit different when it's embedded as you show above. Wouldn't have a clue what it might need, though... and it might also be just fine.

Pardon my ignorance, but are these threads completely open to the public? If so, maybe I'll just send Gary a link, and he can see how it looks, and he might have additional suggestions.

ian898 commented 8 years ago

Yes anybody can see these threads. :)

I know what you mean but i think it all depends on your screen size also.

garyh2012 commented 8 years ago

The attached image From @ian898 looks funny Because your Scaling them Down alot, if you need smaller Images, i can make them, they will look much more Crisp and Clear if we make them Almost to the Sizes You Require Them and again thankyou all for the Invite to help..

ian898 commented 8 years ago

I think we should really be thanking you, Yes they are very small in game I would say try 32x32 maybe 64 but in this case I think 32 would be fitting but your the true artist not me lol.

garyh2012 commented 8 years ago

No problem, i will get to work on them ASAP, ill try 64 x 64 which is 4x smaller than the Originals, these should fit well.. ill recreate them as a vector First so when i scale down i wont loose any details it will just take me alittle longer.

Are you wanting the Coloured Versions for the Seasonal icon, or the Greyscale Ones ?

reallogger commented 8 years ago

We cant differentiate between heavyness of rain (only the length). So what woul the icons do? What we CAN do is show some number that indicates the mm of water that will fall. (Length of rain)

@joskuijpers Know we can't differentiate between "heavyness", but a partly sunny+rain icon could show exactly this. A day where it will be partly clouded, but rain can be experienced. An icon with a cloud and one blue line instead of three might indicate a day mostly clouded with a chance of showers.

garyh2012 commented 8 years ago

An icon with a cloud and one blue line instead of three might indicate a day mostly clouded with a chance of showers.

Would be Easy Enough to Make if you require One, also would any One have any Objections to Me making some type of Logo for Mod ? or to use in any WIP topics?

Edited to Make it Clearer to understand, its been along day

akuenzi commented 8 years ago

also would any have any Objects to Me making some type of Logo for Mod ?

Gary -- that would be awesome! When all this got started, I was just trying to help someone in a post on FS-UK make a tiny script to accomplish an objective. In order to package it together, the mod demands an icon, of course, so I threw that ugly green one together (which I'm sure you saw in a post above). If you have time, by all means -- have at it. Even a two year old could improve on what I did. Never let an accountant touch something related to artwork! :stuck_out_tongue_closed_eyes:

garyh2012 commented 8 years ago

Not 100 Finished Just need some thoughts, Shall i continue in this style, or Would you like it More towards the FS 17 Logo Styles ? wipseason

theSeb1979 commented 8 years ago

Looks awesome. I quite like it, but I'll let others comment too. The hud looks absolutely amazing too. Some great stuff here.

ian898 commented 8 years ago

I agree with Seb this is all coming together nicely and Gary that looks amazing, but I am having a few issues as I said before I am new to Lua and I know I can get more out of the overlay class I just need to know how to implement it I have been searching for documentation but doesn't seem to be anything around. Ideally I wand to use something like this.

This is what Xentro said to me about Livestock Manager Hud but here I am not sure how to implement it.

This is the way you should be loading your hud element and you feed your position and size into the getNormalizedScreenValues() function.

local x, y = getNormalizedScreenValues(x, y); local width, height = getNormalizedScreenValues(width, height); self.overlay = Overlay:new(self, name, filename, x, y, width, height);

This is however only step 1, next is the rendering part which you do like this self.overlay:render();

and lasty we want to clean up after us in the delete function with this self.overlay:delete();

I think I am just going to push changes and If anyone else knows how to do the above they can have at it and then I can also learn from my mistakes here.

Edit: Actually I might be on to something just looking through a few new mods and I think I might be getting somewhere lol

garyh2012 commented 8 years ago

After Looking at the Huds you guys have put together, it got me thinking of a Simplified Version, im no scripter and Dont know how Hard it would be to implement this as an Addition, so we can toggle between your Hud and the Simplified Version which i have a quick Photoshop Job..

simplified hud

Here i just tacked onto the left of the Original Hud making it Look Very Natural, Like it was always part of the game..

joskuijpers commented 8 years ago

I actually think that is pretty nice:)

Ian, if you have concrete questions you can ask me.

On Nov 11, 2016, at 9:39 AM, garyh2012 notifications@github.com wrote:

After Looking at the Huds you guys have put together, it got me thinking of a Simplified Version, im no scripter and Dont know how Hard it would be to implement this as an Addition, so we can toggle between your Hud and the Simplified Version which i have a quick Photoshop Job..

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

ian898 commented 8 years ago

@joskuijpers I will sync up so you can see the original code I used for sample its ok if everyone was using screen resolution of 1920x1080 but use anything else and placement is screwed so I have been messing around with g_screenAspectRatio, g_uiScale ect to get screen size to basically place it on the screen but if think i am just grasping at straws tbh

ian898 commented 8 years ago

Its up there now, excuse my code its shocking compared with yours and Sebs haha

joskuijpers commented 8 years ago

All right I'll take a look but I dont have a computer till at least 3 hours from now (and it doesnt run FS yet).

What you might do best is use branches. Make your own 'branch' and work in that, then you never have merging ('sync') problems. Then I can update your branch with the latest code from the others when you want me to (when you have no chanes on your side anymore). That way you can also not accidentally break stuff ;) Is that a good idea?

On Nov 11, 2016, at 12:10 PM, ian898 notifications@github.com wrote:

Its up there now, excuse my code its shocking haha

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

joskuijpers commented 8 years ago

I looked at your code and it doesn't look bad at all ;) I don't know the APIs yet so I'll do that later today.

My resource for 'good code' is de SoilMod, it is on github as well. They also display something, take a look at that ;)

On Nov 11, 2016, at 12:10 PM, ian898 notifications@github.com wrote:

Its up there now, excuse my code its shocking haha

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

ian898 commented 8 years ago

I did think about creating a branch but the I just created it in another mod which has lots of console commands for shifting positions in game once I am happy with layout I have a console command to out put the renderOverlay strings. which I just pop in the latest code so nothing gets broken.

But I will use branches for bigger parts of code in the future thats not a problem.

ian898 commented 8 years ago

After taking a look a the soil mod overlay I have used something similar to it, Its just the initial placement of the hud itself I am struggling with.

theSeb1979 commented 8 years ago

Looks good and I like the idea of the small hud. I just hope you didn't lose my bug fixes in weatherforecast..lua :)

ian898 commented 8 years ago

I synced github 3 minutes before updating lol, so the only way anything would get lost is anythin that was submitted in those 3 minutes lol. I like the idea of the smaller hud I am just banging my head on a wall with the bigger one first lol

Edit: You had me worried then and got me checking, but you alright everything synced perfectly.

ian898 commented 8 years ago

So I think I have fixed placement.

ian898 commented 8 years ago

We should also see if we can move the the income/expenses text down when hud is active forgot to mention that before.

garyh2012 commented 7 years ago

season

As requested !! 📟