NUTS!!! Let's go NUTS!!!

Discuss, get help with, or post new graphics for TTDPatch and OpenTTD, using the NewGRF system, here. Graphics for plain TTD also acceptable here.

Moderator: Graphics Moderators

User avatar
V453000 :)
President
President
Posts: 947
Joined: 01 Feb 2011 11:22
Location: Beer

Re: NUTS!!! Let's go NUTS!!!

Post by V453000 :) » 28 Apr 2019 06:50

Which one would you prefer?
Attachments
nuts-engines-at-ends.png
nuts-engines-at-ends.png (3.53 KiB) Viewed 1810 times
ImageImageImage

User avatar
jfs
Director
Director
Posts: 577
Joined: 08 Jan 2003 23:09
Location: Denmark

Re: NUTS!!! Let's go NUTS!!!

Post by jfs » 28 Apr 2019 07:14

First looks wrong, strongly prefer second.

User avatar
nirasa
Engineer
Engineer
Posts: 43
Joined: 03 Sep 2015 07:11
Location: Czech republic

Re: NUTS!!! Let's go NUTS!!!

Post by nirasa » 28 Apr 2019 12:43

En: the second train looks better.
Cz: druhý vlak vypadá lépe.

User avatar
eekee
Engineer
Engineer
Posts: 89
Joined: 23 Jun 2005 19:45
Location: Cyberspace

Re: NUTS!!! Let's go NUTS!!!

Post by eekee » 28 Apr 2019 15:30

V453000 :) wrote:That's a great message, thank you for it, it made my day. I'll try to reply to all the things:
I'm glad! :D

I did write a lot! I had to skip replying to a few bits myself.
V453000 :) wrote:
eekee wrote:
V453000 :) wrote:Also NUTS signals are now gone and replaced by BRIX signals as they are IMO superior in every way. The parameters controlling signals are now more interesting, too.
Woot! :D I had been wishing I could have BRIX signals with original terrain. Now, I can! :D
You could have always done, that. In fact I do. BRIX has parameter settings, you can disable everything except signals and you'll get that. The only problem comes when a railtype defines its own custom signals, just like NUTS does now. Anyway, both options are there now, however if you get used to BRIX signals and want to use them everywhere, consider setting BRIX as a static newGRF with only signals turned on. There's an example how to set up a static grf here, ask if you need help. :) https://dev.openttdcoop.org/projects/rawr/wiki
I shall have to try that!
V453000 :) wrote:
eekee wrote: I'm sad existing games don't update, tho. It's clearly using the old GRF; old options and everything.
I'm not entirely sure what do you mean by that... honestly I did not check backwards compatibility and how it behaves with the parameters.
I mean, when I download an update from Bananas, existing saved games continue to use the old version. Only new games get the update.
V453000 :) wrote:
eekee wrote:
V453000 :) wrote:I believe one of the generally big problems of NUTS is its unintuitiveness and hacks that are used to achieve the gameplay balance it has. To a person who is new to NUTS (even if experienced with OpenTTD), a lot of things do not seem obvious.

The fact that wagons and engines can't be attached to anything, (mainly passenger) wagons change capacities and loading speeds, are difficult problems to fix at this point. I would even say impossible without sacrificing some important parts of the set.
I've not found it worse than any other train GRF I've ever used, except original. (I haven't played a vast range of GRFs.) In fact, I find NUTS better because it has standard length wagons. This makes it possible to calculate train parameters ahead of time. With other sets, I just have to build a train as a test, and see how it is. TBH, it is easier to do this with NUTS too. (I'm grateful TTD lets you sell vehicles for the price you paid for them if they're new enough.)

The color-coded engine classes also help.
I guess that's true to some degree, but it really depends on the set. Some of them are quite simple from what remember, some of the more realism-based ones tend to get a bit crazier. Anyway, it's an annoying limitation and should be as simple as possible.
The sets I tried were more realistic.

Greater simplicity and flexibility would certainly be nice. :)
V453000 :) wrote:I did not do much changes, it's just a consistent rule:
An engine can attach the same engine again, or its dedicated wagons (all wagons of the railtype for freight locomotives, only express for express locomotives). The exception is Chameleon as it doesn't have its own railtype, yet it is its own class with dedicated wagons.
Originally Superstrong class could not attach express wagons. I guess I did this mainly to give them more feeling of freight only. I could keep this rule, for now I allow them to attach express wagons.
The other exception is wetrail ships, those currently can only attach wetrail wagons, but not another engine. The reason for it is that I didn't want to make another version of the wagons that look like powered, though I guess I could just make the extra engines draw as extra wagons, to allow autoreplace even if your trains have multiple engines.
Wetrail is a whole other planet! :D Tugs pulling log rafts are natural enough, but long ships which bend around corners look stranger than the slugs! :D

Writing that, I found myself imagining an alien scenario: Flat terrain which all looks like water, cities look like they're floating, and the only rail you can use is wetrails. I suppose road and other rails could be very expensive to build... But all this would be a whole other collection of GRFs!
V453000 :) wrote:
eekee wrote:
V453000 :) wrote:However, even the most experienced NUTS players usually don't know which engine is efficient for which playstyle.
All engines are usable in any shape or form, but they are usually designed to be used in some specific manner and they excel there.
Today I have added more information to the purchase menu which is trying to point the player in the right direction if they need help.
Yay! I think I got an okay understanding in the end, as good as my understanding of any GRF, (so much ?( lol,) but more help in this area is always welcome.
Yes sir. The info in the purchase menu still isn't too detailed, I don't want to present it as if it is the only possible method to use the engine. It's just an efficiency hint. :)

eekee wrote:
V453000 :) wrote:Another thing missing in the purchase menu was the minimum curve lengths required to let the train run at full speed. This is difficult to explain as the player needs to be aware of the convention according to which the curve lengths are defined, but it's better than nothing and people who play with NUTS are fairly likely to know them anyway I believe. https://wiki.openttdcoop.org/Max_Curve_Speed

purchasemenu-info.png
Thanks! :D Although, with a lot of faster engines, one just has to accept that almost any curve will slow the train, because that's how TTD is.
Actually, vast majority of NUTS vehicles does have some upper limit, have a look at the purchase menu in 0.8.1 :) Basically only the top tier engines in the Fast class do require full-length curves.
I was thinking of them; specifically Banshee and Reality. :) I've been using Banshee a lot.
V453000 :) wrote:
eekee wrote:
V453000 :) wrote:As I added the support for YETI for passenger trains, it occured to me that it's not that convenient to build mixed networks with freight and express trains, because there are almost no such pairs which would match in max speed. I went over many trains and changed their max speeds so that now there are many combinations of trains for mixed freight + express networks.
Thanks, this is good, but... ;) I used to be bothered by it, but very recently I found you can go to the timetable window, and without actually setting a timetable you can set a maximum speed for each section. Maybe it's new in 1.9. Anyway, it's nicer to buy a train which already fits.
V453000 :) wrote:Madness never ends...
NEVAR! :mrgreen:


I love the art of NUTS too; always have. (I don't think I said so before.) Seeing the pretty trains makes me happy! ^.^' It was interesting to read this thread and see where the lighting and color range was decided. Also to see the exact moment slugs got in! :lol:
That's awesome to read :) I still think there is massive amount of room for improvement on MANY vehicles, and some things are pretty much missing completely, that's never going to be perfect. If I can get a decent pixel editor in my iPad, I might do some improvements when in in the subway.
eekee wrote: On the other hand, the pre-attached wagons bug me a lot. This, much more than the actual restrictions, restricts what kinds of trains I put together. It's also no use in my games. I assume it's meant to facilitate auto-replace? Well, I don't use that because the GUI is cumbersome, it's much quicker to replace whole trains. With my experience and NUTS low costs, it takes very little time to reach the stage of the game where I can afford to do that; I can afford to long before I need to.
I do very much see where you are coming from with this, for example adding two medium-class engines to the front of the train looks just ugly with the wagon in between. As you point out, it indeed is for lossless autoreplace - being able to experiment and autoreplace between vehicle classes to see which one works for you best is really important in my eyes.
Thinking about possible solutions:
A. keep it as it is
B. make all engines have proper 1-tile graphics so they wouldn't need the extra wagon - I feel like this removes variety a bit too much. Doing it only for the top tier engines would be acceptable but I still don't like it too much.
C. do hacky flipping magic so if you add the second medium engine to the end of the train, the locomotive would be at the end and the wagon in the middle of the train
D. do ultra-hacky magic so if you add 3 engines to a single train, all of them show in the front. This is a possible solution but quite wtf.
E. just remove the extra wagons - lossy autoreplace when you switch to a full-tile engine, I don't like this
F. draw the first unit as invisible and only draw from the second unit of the train. This is not a horrible idea, but for early steamers which are already smaller than the bounding box this would be super weird.
G. add a parameter for removing extra wagons - should be possible, but switching that parameter in a running game would probably crash it... though I guess that's fine given enough warning. I'd like to avoid this option but at the same time it's not the end of the world to add it...

The problem is "only" in medium and strong rail classes so it's not completely disastrous, but I myself don't build dual-engine medium class either anymore. With C. I would.

I'll probably attempt to do C. The rest is a bit too crazy and adding special behaviour at the end of the train for some vehicles is not too dangerous - chameleons already do this actually.
You've obviously put a lot more thought into it than me!

I double- or, in one game, quad-header medium class because they reach top speed much more quickly than fast class when fully loaded. In some games, I've downgraded fast to medium to take advantage of that. I suppose I could use the timetable speed limit instead... *ponders*

Regarding G, I didn't think about toggling the parameter in a running game. I'd be surprised if it didn't crash it. I have an idea which would make it stable, but I have no idea how much extra work it would be for you. I got the idea from how OpenTTD behaves when you add GRFs to a game which had none. The original vehicles remain in the game, they're just hidden from the purchase list. My idea is for NUTS have duplicates of all the engines with wagons, and the parameter selects whether to hide the wagon-equipped or wagon-free engines.

It could be confusing, so here's a suggested parameter description:
Choose whether to buy short engines with attached wagons. Does not change existing trains in a running game, only whether you can buy wagon-equipped or wagon-free engines.

There could also be a small difference in the names to show which is which after purchase, perhaps a little symbol on the end, WW for "with wagon", WF for "wagon-free".
V453000 :) wrote:Thank you again for your post :)
You're welcome! :)
V453000 :) wrote:BTW: I don't really think the autoreplace GUI is that much of a problem compared to manually replacing all trains on your network :D there's a reason the universal rails were added to NUTS, manually replacing between track types is just so tedious and feels like a stupid job (to me at least).
Since I started using universal rails, I haven't ever had to replace all the trains on my network! :D To be fair, I mostly start my games in the year 3000 so I don't have to think about upgrades. I admit it was a tough and tedious job the few times I have done it.


V453000 :) wrote:Update: would this make you happy? :) Of course the engine can refit to anything so it looks seamless once you do. The capacities and loading speeds are matching as well.
Umm... it will certainly look nicer, especially when trains reverse. What do you mean by "The capacities and loading speeds are matching as well"? If I attach 3rd gen wagons to an engine with a built-in 2nd gen wagon, will the engine's wagon change to match?

Besides, what's going to happen to my many quad-header trains? :mrgreen: (I'm not actually worried about this.)

Oh... I am a little concerned about losing the last engine's now-leading wagon in the mass of actual wagons, or the first engine's trailing wagon. Trying to find the right one could be awfully irritating. You might end up having to draw the extra wagons which look powered.


V453000 :) wrote:Eddi pointed out that in my last screenshot it looks like I didn't have train_width_32_px = 1 set.

I did that and I guess it looks nicer and you can tell better where do wagons end and you can count them better, not to mention that you get the vertical lines which show the full tile lengths.

It basically makes trains in the depot GUI appear exactly as on horizontal diagonals in the world.

Coming in NUTS 0.8.2, thanks Eddi :)
Yay! Trains in the depot look right with this change.



To come to the last post:
V453000 :) wrote:Which one would you prefer?
The second train looks much nicer.
Extreme network builder. screenshot thread

User avatar
V453000 :)
President
President
Posts: 947
Joined: 01 Feb 2011 11:22
Location: Beer

Re: NUTS!!! Let's go NUTS!!!

Post by V453000 :) » 28 Apr 2019 19:29

eekee wrote: I mean, when I download an update from Bananas, existing saved games continue to use the old version. Only new games get the update.
Well, that's how OpenTTD works :) The new version will break backwards compatibility anyway so that can't be done in this case.
eekee wrote: I've downgraded fast to medium to take advantage of that
You could also call it upgrade, really. All of the train classes are meant to have their uses. In your specific network there is probably a single one that is the best by some margin, but overall different situations should demand different trains if you want to be efficient. But then, most of the time you just want to have fun and pick the engine you feel like using as they have significant impact on what your network should
eekee wrote:My idea is for NUTS have duplicates of all the engines with wagons, and the parameter selects whether to hide the wagon-equipped or wagon-free engines
do and look like.

This would actually work I guess, though it's a lot of bloat and split functionality. Lets see how people react to the new way how it's going to work in the next version first. :)
eekee wrote:What do you mean by "The capacities and loading speeds are matching as well"?
This means that the engine behaves as if it was a single wagon of its respective tier. (1-3 = 1st gen, 4-6 = 2nd gen, 7-9 = 3rd gen).
ImageImageImage

User avatar
V453000 :)
President
President
Posts: 947
Joined: 01 Feb 2011 11:22
Location: Beer

Re: NUTS!!! Let's go NUTS!!!

Post by V453000 :) » 30 Apr 2019 20:48

Yay! It's one of those days again.

NUTS Unrealistic Train Set 0.8.2 has been released to the wilderness of bananas,
nuts-082.png
nuts-082.png (11.28 KiB) Viewed 1595 times
New stuff:

- When rail freight trains use multiple engines, they no longer have wagons between them.
-> This means an engine can look like a wagon and vice versa.
->> Visualization added for those cases (only when the trian is stopped in a depot). Yellow means it's the unit you can drag from, gray is just showing it's still the engine/wagon.
->>> The visualization does not draw if there is only 1 engine per train, and does not draw on the first and last units of a train ever.

- If the new multiple engine mechanic works well, I might extend it to some other train classes later.

- Rail fast class is no longer dual headed and works the same way as rail strong and rail medium classes.

- Rules for attaching vehicles simplified, the new rule is: An engine can attach its dedicated wagons, or the same engine.

- Rail superstrong can now attach express wagons for consistency.

- Large ship capacity increased from 45 to 54.

P.S. Even though most people I have asked voted for the 2nd option of drawing dual-headed engines, I kept the first option at least for now. The main reason is that the screenshot I posted was a perfect scenario for option number 2, in other configurations (like 3 or 4 engines at each end) I believe it looks clearly worse.

Because steamers look awkward when flipped, they draw as a brake van/caboose kind of thing when put at the back of the train.



Long story short, I tried to make buying trains simpler and when you add just 1 engine per train that kind of succeeded a little bit. Adding multiple engines was very ugly ever since I added the articulated wagons to rail engines so now you have a nice way to control how your trains can look.
ImageImageImage

User avatar
eekee
Engineer
Engineer
Posts: 89
Joined: 23 Jun 2005 19:45
Location: Cyberspace

Re: NUTS!!! Let's go NUTS!!!

Post by eekee » 01 May 2019 00:03

V453000 :) wrote:
eekee wrote: I mean, when I download an update from Bananas, existing saved games continue to use the old version. Only new games get the update.
Well, that's how OpenTTD works :) The new version will break backwards compatibility anyway so that can't be done in this case.
I'm blind, apparently. There's a huge upgrade button in NewGRF settings. :lol: It is risky to change to 0.8.2, OpenTTD complained of a capacity change. It didn't crash until I cloned a train with a Fast engine. I'm living dangerously here; trying everything. :mrgreen: It did not crash on refitting. Yay!
V453000 :) wrote:
eekee wrote:My idea is for NUTS have duplicates of all the engines with wagons, and the parameter selects whether to hide the wagon-equipped or wagon-free engines
do and look like.

This would actually work I guess, though it's a lot of bloat and split functionality. Lets see how people react to the new way how it's going to work in the next version first. :)
Yeah, that's sensible. If you ever do it, maybe a Python (or whatever) script could handle the duplication work.
V453000 :) wrote:
eekee wrote:What do you mean by "The capacities and loading speeds are matching as well"?
This means that the engine behaves as if it was a single wagon of its respective tier. (1-3 = 1st gen, 4-6 = 2nd gen, 7-9 = 3rd gen).
Oh just that. Thanks.
Extreme network builder. screenshot thread

User avatar
eekee
Engineer
Engineer
Posts: 89
Joined: 23 Jun 2005 19:45
Location: Cyberspace

Re: NUTS!!! Let's go NUTS!!!

Post by eekee » 01 May 2019 00:44

Sorry for double-post; submitted by mistake & then couldn't easily add a quote while editing.
V453000 :) wrote:Yay! It's one of those days again.

NUTS Unrealistic Train Set 0.8.2 has been released to the wilderness of bananas,
Yay!
V453000 :) wrote:->> Visualization added for those cases (only when the trian is stopped in a depot). Yellow means it's the unit you can drag from, gray is just showing it's still the engine/wagon.
Should work nicely.
V453000 :) wrote:- Large ship capacity increased from 45 to 54.
I didn't realize it had such high capacity in the first place. I might have to actually use it.
V453000 :) wrote:Because steamers look awkward when flipped, they draw as a brake van/caboose kind of thing when put at the back of the train.
Makes sense and provides a lot more caboose options. I've seen little steamers run reversed IRL; they look Wrong! I'm not sure that's a rational feeling, but I have it, lol! I've still no idea what to make of the way Victorians ran urban passenger trains with a little steamer in the *middle* of the train. OTTD doesn't exactly support it, anyway.

Hm... another bug with upgrade: looks like I'll have to replace all the double-headed Banshees in my upgraded game because the rear engines aren't flipped. Newly purchased engines flip correctly. Not a terrible problem; I'm glad upgrade works at all!


By the way, gen 1 wagons use the goods graphics for passengers. It's a little creepy. :lol: I'm stuck with it in a game I started at 1750. (It's otherwise working out remarkably well with just the one engine!) Could we please have pax graphics for gen1? The tiny passenger carriages would be cute.
Extreme network builder. screenshot thread

User avatar
V453000 :)
President
President
Posts: 947
Joined: 01 Feb 2011 11:22
Location: Beer

Re: NUTS!!! Let's go NUTS!!!

Post by V453000 :) » 01 May 2019 08:16

eekee wrote: There's a huge upgrade button in NewGRF settings.
Yeah I guess when you have scenario developer tools on only though? Anyway, the grf has minimum compatible version set to 82 for exactly these reasons, changing articulated vehicles is not safe.
eekee wrote:Yeah, that's sensible. If you ever do it, maybe a Python (or whatever) script could handle the duplication work.
It's not the work I'm afraid of, in fact these engines are already in a separate file and duplicating them is really easy. I would just prefer to have one version that works properly instead of two which both have problems but I let you choose which one you like less through parameter.
Maybe in the end I will make all engines 0.5 tiles instead, who knows. I have some problems with doing that so far but never say never.
eekee wrote: I didn't realize it had such high capacity in the first place. I might have to actually use it.
45 was already more than anything else, but with the slow loading and slow speed I don't see why would you use large ships instead of small ones pretty much ever. I think the increase in capacity makes it better balanced.
eekee wrote:gen 1 wagons use the goods graphics for passengers. It's a little creepy.
All of the universal wagons do use weird graphics for passengers, the original reason to this was that you could always recognize that it's an universal wagon not an express one. I'll think about it, I don't consider it a huge priority though, as there are express wagons available at any point.
OH, now it hit me, you have a visual problem when you can't use intercity trains yet so you always get a few flatbed wagons as well. :D Well, priority increased! :D
ImageImageImage

User avatar
eekee
Engineer
Engineer
Posts: 89
Joined: 23 Jun 2005 19:45
Location: Cyberspace

Re: NUTS!!! Let's go NUTS!!!

Post by eekee » 01 May 2019 12:22

V453000 :) wrote:
eekee wrote: There's a huge upgrade button in NewGRF settings.
Yeah I guess when you have scenario developer tools on only though? Anyway, the grf has minimum compatible version set to 82 for exactly these reasons, changing articulated vehicles is not safe.
Yeah. I just finished replacing all my banshees, only to find OTTD complains about the masterminds too, even though nothing visible has changed there. I'm thinking it won't be worth upgrading if I have to replace nearly all my trains. I'm wishing I'd saved the upgrade to version 81 now, I had a chance to upgrade to that before I downloaded 82, but now... Ah, I can do it by moving files around. Or, maybe I'll try regular autoreplace! ... meaning I'll need to change to a different engine and back. *ponders*

Edit: Did the files thing. The YETI dudes! :lol: They're great!
V453000 :) wrote:
eekee wrote:Yeah, that's sensible. If you ever do it, maybe a Python (or whatever) script could handle the duplication work.
It's not the work I'm afraid of, in fact these engines are already in a separate file and duplicating them is really easy. I would just prefer to have one version that works properly instead of two which both have problems but I let you choose which one you like less through parameter.
Maybe in the end I will make all engines 0.5 tiles instead, who knows. I have some problems with doing that so far but never say never.
I've come to the conclusion that there is no perfect solution. Just have fun. :)
V453000 :) wrote:
eekee wrote: I didn't realize it had such high capacity in the first place. I might have to actually use it.
45 was already more than anything else, but with the slow loading and slow speed I don't see why would you use large ships instead of small ones pretty much ever. I think the increase in capacity makes it better balanced.
Ah, I hadn't noticed it's a slow loader, either. Still, slow loading is just another challenge to tackle.
V453000 :) wrote:
eekee wrote:gen 1 wagons use the goods graphics for passengers. It's a little creepy.
All of the universal wagons do use weird graphics for passengers, the original reason to this was that you could always recognize that it's an universal wagon not an express one. I'll think about it, I don't consider it a huge priority though, as there are express wagons available at any point.
OH, now it hit me, you have a visual problem when you can't use intercity trains yet so you always get a few flatbed wagons as well. :D Well, priority increased! :D
Thanks! :D
Extreme network builder. screenshot thread

User avatar
V453000 :)
President
President
Posts: 947
Joined: 01 Feb 2011 11:22
Location: Beer

Re: NUTS!!! Let's go NUTS!!!

Post by V453000 :) » 01 May 2019 19:59

eekee wrote: I've come to the conclusion that there is no perfect solution. Just have fun. :)
Indeed, so far I only see solutions where each has some problems, but trying to find a good solution is the fun part. :P

Making all engines 0.5 tiles does not sound too bad, but for all of the 1 tile engines like dual-headed intercity trains it gets a bit weird. Just a little bit, the first added wagon can immediately look like the end part. That's easy to do so far.
The problem comes with 1-tile trains like the big intercity steamers or rail superstrong class.

Theoretically you could buy a half-tile of those by default but the half-tile would have no capacity, and the first attached unit would automatically fill the train in.

The big benefit of single-unit engines is that they can have Ctrl+Click functionality to flip them - which not only gives control to the player how exactly should their trains look, but also makes it possible to detect flipped vehicles in the code and do more special behaviour if I see that necessary.
The problem there obviously is that many people aren't aware Ctrl+click exists. The typical case of flipping the vehicles at the rear of the train can be done automatically and you can ctrl+click them to make the rear vehicles face forward instead.

One thing I really like about the current implementation is that the things I see in the purchase menu, when I buy them, I get exactly the same. Seeing a full slug in the purchase menu, but after purchase only seeing the first half, sounds weird but I guess once you add a single unit to it it would immediately fix itself.

All in all, I don't know. Maybe it would be better but right now at this moment I obviously don't feel too great about throwing away all the code I did recently. I might feel differently about that later :)
ImageImageImage

User avatar
V453000 :)
President
President
Posts: 947
Joined: 01 Feb 2011 11:22
Location: Beer

Re: NUTS!!! Let's go NUTS!!!

Post by V453000 :) » 03 May 2019 20:55

Today something fairly incredible happened. I have drawn a train in 8bpp for NUTS. This has not happened in a long time and I did not really believe it would.

I've been experimenting many times with rendering trains from 3D, for several of my prototype trainset projects and for NUTS as well. Even though there is huge potential in it, it's also a ton of work. The volume of the task does not have to be a problem by itself, but the fact that I have to do it at a desktop computer is the limiting factor. My PC free time is usually in the evening and I tend to either be tired, do work or play a game.

However, last week I purchased a great application for drawing pixel graphics for my iPad, and I immediately delegated all of my subway commuting time into drawing a train.

The train I chose is Rail Intercity 5 - Diesel Power. The first non-steamer intercity locomotive in NUTS, and also one of very old graphics in there. In fact, somehow it was omitted when I was updating the rail intercity trains 6-9.

You can see the difference in the attached screenshot.


As another simpler thing, I also made a shorter variant of express wagons as eekee requested. They will look like the full-sized wagons except they bend in half. Since I have used the "count how many vehicles of that type are in this train", I realize I can do the same thing for these express wagons, and if the rest of the wagons in the train are universal wagons, the wagons attached to the engine will look like flatbeds, if there is more than half (or at least one, will see which rule to apply) Express wagon in the train, the articulated engine parts will also look like an Express wagon.

I have started writing down some long-term plans of what changes I would like to do to NUTS, I'll post them here soon. :)
Attachments
diesel-power-original.png
(243.42 KiB) Not downloaded yet
diesel-power-redrawn.png
(247.9 KiB) Not downloaded yet
ImageImageImage

User avatar
V453000 :)
President
President
Posts: 947
Joined: 01 Feb 2011 11:22
Location: Beer

Re: NUTS!!! Let's go NUTS!!!

Post by V453000 :) » 04 May 2019 10:47

In the last few weeks I have been doing some rewrites and maintenance for NUTS, and I have gathered some ideas about what to do next. Let me share them with you here...

In general I think NUTS already has all the amount of content it needs, maybe even a bit more than it should. I do not plan to remove things, but at the same time I don't think it is wise to add more on top.

However, the existing things in NUTS could use massive amounts of cleanup, maintenance and improving as some parts are either messy, outdated, unfinished, lower quality or don't follow the philosophy and goal I would like them to.

Attach logic & visualization like rail engines.
I think the system how the new rail engines work and attach is quite good in 0.8.2, and I would like to apply it to all of the freight engines. It gives better control over how you want them to look, and provides better granularity - if the engine part itself is 0.5 tiles (even if you purchase 1 tile), it lets you decide how many engines do you want your train to have.
Another important part is that all freight engines work the same way so you can autoreplace between them easily. Technically it always works as they are all 1 tile long, but if some engines have double strength by default, it might be a massive overkill to replace to those from trains which already have their engines doubled from the rail freight era.
Furthermore, having all freight engines with 1 articulated wagon, it makes a clear difference between Freight and Express trains on the first sight.

I will implement this first as it will break save compatibility, it has the most impact on functionality and I did it very recently so I know exactly how even though it's quite a lot of code.

Layered wagon graphics & code recolouring
This is an experiment I have done multiple times at this point, and dreamed about countless times. In 0.8.2 I have added the gui overlay which makes the layered drawing functional, finally. The idea is that freight wagons would have the following layers:
0. gui overlay (the new icons which show if the drawn wagon is actually an engine part)
1. cargo
2. Company Colour (CC)
3. wagon base

A big important part is that the 1. cargo and 3. wagon base get recolouring by code. This recolouring disables company colour which is why there is a separate layer 2. This does bring a new limitation that cargo will never have company colour but that's rather rare anyway, maybe with some company coloured containers on flatbed wagons but that is not a big sacrifice to make - randomly coloured containers look much better anyway, as can be seen on maglev wagons for example.

This results in an amazing amount of effects:
* Ability to combine wagon sprites much more and use more randoms. For example now some unique sprites like glass or wood products are on a gray wagon so they can't be reused for building materials which are on yellow wagon base. With layers I can draw the cargo and base independently and thus mix any with any.
* Massively improved maintainability. Until FIRS 2.0 was released, all wagons had proper visual support for all cargoes in the game. That means with any industry configuration, every available cargo on that map would have unique appearance. I consider this extremely important to keep (restore) as one of the more awesome features of NUTS. When FIRS 2.0 added many cargoes, I tried to add visual support but I just got exhausted before I did 20% of the job. It's too much work to maintain the current wagon system with all the different wagon classes and generations. With the layering, adding new cargo support means just adding new recolour rules and/or combining wagons into a new set of random switches.
* Significant spritesheet simplification. The amount of images to draw is going to decrease drastically, while adding much more variety at the same time. This means that it will be much easier to improve how the wagons look. Especially some generations of wagons could use a lot of improvements but I can't imagine doing them in the current system.

Accessing the code of all wagons will be a lot of work as it's one of the longest parts of NUTS source. It helps that I started separating my files so they are much better maintainable. Most of it I will probably rewrite from scratch anyway. The rest is just about drawing alpha over a lot of the wagon graphics, which is a great subway task to do every day for a little bit, and be done eventually.

Improving and/or reworking existing graphics
When spritesheets are simplified and cleaned up, I'd like to revisit at least the worst looking wagons and engines, improving the graphical quality of NUTS. Some vehicles I am quite ashamed of, and with a clean workflow it's not that much work to improve them compared to the benefit it would give.

Removing massively unfinished graphics
There is for example the rail MEOW wagon generation which does not have all wagon sprites, most of them are just duplicates from rail freight. These wagons do not behave anyhow differently either so keeping them is a bit pointless. The MEOW Monorail I would like to keep as the engines look quite different and kind of require the wagons to tile with them properly.

General details and improvements
Like cleaner purchase menu, using better colours there (the red colour is just way too red), adding proper track icons to PURR construction menu, and similar small things.
I have been ignoring a lot details which have no impact on functionality and it would be nice to fix that. Lower priority still.

More small balancing tweaks
There's a bunch of engines which could still use being looked at from the gameplay side, for example chameleon trains don't have correct capacity per engine, and more small details. The general scope of the set and the overall specifics of each train class should remain the same.
ImageImageImage

User avatar
nirasa
Engineer
Engineer
Posts: 43
Joined: 03 Sep 2015 07:11
Location: Czech republic

Re: NUTS!!! Let's go NUTS!!!

Post by nirasa » 04 May 2019 13:31

En: I'm looking forward to the set.
Cz: Těším se, až bude set venku.
:)

agentw4b
Traffic Manager
Traffic Manager
Posts: 155
Joined: 14 Apr 2017 15:51
Location: Czech Republic

Re: NUTS!!! Let's go NUTS!!!

Post by agentw4b » 06 May 2019 20:38

Please: Add MEOW locomotives to Maglev
Owner and admin of servers:Experimental games 01 (92.63.57.152:3979), Experimental games 02 (92.63.57.152:3879), Experimental games 03 (92.63.57.152:3779), Experimental games 04 (92.63.57.152:3679), Experimental games 05 (92.63.57.152:3579).
My heightmaps: Flat Earth Map and United nations logo
My scenarios: Game Fallout 1,2,3 Map scenario
My gamescripts: City Founder GS

User avatar
V453000 :)
President
President
Posts: 947
Joined: 01 Feb 2011 11:22
Location: Beer

Re: NUTS!!! Let's go NUTS!!!

Post by V453000 :) » 07 May 2019 06:54

Interesting thought. I actually did think about that recently, but didn't find a good enough "excuse" for it... how would they be specific?
ImageImageImage

agentw4b
Traffic Manager
Traffic Manager
Posts: 155
Joined: 14 Apr 2017 15:51
Location: Czech Republic

Re: NUTS!!! Let's go NUTS!!!

Post by agentw4b » 07 May 2019 09:04

V453000 :) wrote:Interesting thought. I actually did think about that recently, but didn't find a good enough "excuse" for it... how would they be specific?
When there is a MEOW for a Monorail, I don't see a reason why it doesn't exist for Maglev, or other types of tracks.
Owner and admin of servers:Experimental games 01 (92.63.57.152:3979), Experimental games 02 (92.63.57.152:3879), Experimental games 03 (92.63.57.152:3779), Experimental games 04 (92.63.57.152:3679), Experimental games 05 (92.63.57.152:3579).
My heightmaps: Flat Earth Map and United nations logo
My scenarios: Game Fallout 1,2,3 Map scenario
My gamescripts: City Founder GS

User avatar
V453000 :)
President
President
Posts: 947
Joined: 01 Feb 2011 11:22
Location: Beer

Re: NUTS!!! Let's go NUTS!!!

Post by V453000 :) » 07 May 2019 09:50

The MEOW trains are generally at home on PURR tracks so the track type is not too important, only for the wagons and possibly inheriting the specifics that maglev engines have (high speed, low capacity, friendliness with short curves).

I'm not saying it's never going to happen. As I said, I was considering it myself... however rail and monorail MEOW already has subtle differences in the fact that the rail engine is at the front, while the monorail one is at both ends - which has impact on how the trains react to the PURR tracks.

So far the only idea I got for maglev would be that the PURR bonuses would be significantly higher (say, 100% instead of 30%), with the base stats obviously accomodating for that. I'd find that sufficient of a reason, though I vaguely remember I tried something like that and it didn't turn out too well.

Another thing that a maglev MEOW could do is react a bit differently to the track types, and maybe even react specifically to clean PURR and maglev itself, which the other types don't do, though I'm not sure whether it would not be better to expand the behaviour that way for the rail/mono types as well instead.
ImageImageImage

User avatar
V453000 :)
President
President
Posts: 947
Joined: 01 Feb 2011 11:22
Location: Beer

Re: NUTS!!! Let's go NUTS!!!

Post by V453000 :) » 15 May 2019 07:40

Recently I have released two versions of NUTS - 0.8.3 and 0.8.4.

In version 0.8.3 I have added the drawing logic I showed earlier to all freight engines, and added special logic for universal wagons to draw as express wagons in case at least one express wagon is in the train. (visible on train 10 for example)

However, the logic was trying to be so "smart" that it iterated through trains and counted various vehicle IDs.

All of the drawing logic however was so intense that it required significant amount of calculations and slowed the game down. With about 700 trains on our server it became unplayable.

To be more specific, for example rail strong 1 checked every single unit in the train consist and read if there is any of IDs that are supposed to draw in a similar way - rail strong 2, 3, medium 1,2,3 etc.

This was made worse by the fact that every single wagon was allowed to look like an engine, and therefore each wagon did the whole calculation as well.

It was time to optimize.

The first step was to make wagons unable to look like an engine. This is only useful in very specific cases and can be prevented by "correct usage" ... you can see for example train 8 has 3 engines, but only 2 draw - because the third item in the train is a wagon. This is a big optimization without much sacrifice.

The second step was to rewrite all of the drawing logic for the engines, and give each engine a simplified version of the logic - but simplification means there has to be a tree of switches for each engine individually.
Such an example tree of switches would look like this, with about 9500 lines of code (this is one of the longest ones I believe). https://github.com/V453000/NUTS/blob/ma ... aphics.nml

There are about 50 freight engines in NUTS that were about to receive this logic, that would mean 50 such files - plus many engines do almost identical logic to check if the vehicle should show powered animation (steam clouds/diesel smoke/electric sparks).

It seemed obvious that there is no other way than generating all this code with a python script, so that's exactly what I did.

The total lines of code of NUTS grew from about 60k to 430k since 0.8.1 which had none of the special drawing logic, but now it is much better maintainable.

While rewriting the drawing logic in a convenient generated way, I felt comfortable adding a bit more fancy variety:
- Longer steam locomotives draw in 0.5 tile steps, and a caboose at the back if there is an engine at the end of the train (train 2)
- Short steam locomotives draw directly behind each other and don't make gaps between them. you get an extra wagon visually, but the capacity remains the same. They also get the caboose. (train 1)
- Modern rail engines draw facing outwards from the train. When there is an engine at the end, dual headed drawing is enabled. (train 3 and 8)
- Monorail and maglev trains use "alternating" drawing - front and end facing engines - I believe they look better and people who voted for option 2 in an earlier post can get what they prefered (trains 4-7 and 9)

I also fixed some small bugs, like monorail and maglev freight engines had accidentally double capacity, or rail medium 3 had zero capacity which made its articulated wagons empty and only look like goods flatbeds as you could not refit them.

If you want to contribute and let me see how many trains can we sustain on the server now, come join #openttdcoop Welcome server, get new nuts, and go nuts :)

V
Attachments
nuts-084.png
nuts-084.png (20.83 KiB) Viewed 602 times
nuts-081.png
nuts-081.png (18.96 KiB) Viewed 602 times
ImageImageImage

User avatar
nirasa
Engineer
Engineer
Posts: 43
Joined: 03 Sep 2015 07:11
Location: Czech republic

Re: NUTS!!! Let's go NUTS!!!

Post by nirasa » 16 May 2019 13:30

En: Very good work!
Cz: Velmi dobrá práce!
:D

Post Reply

Return to “Graphics Development”

Who is online

Users browsing this forum: Google Adsense [Bot] and 8 guests