News:

Simutrans Tools
Know our tools that can help you to create add-ons, install and customize Simutrans.

More graphical symbols!

Started by Ranran, September 29, 2018, 12:46:57 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

prissi

zlib shoudl be used for experiment as well, and bz2. So in principle same libraries (the only change is the threading model). But Standard is usually compiler for 32bit, so there may be a missing 32bit develop version. So you have to set the target to 64 bit in the project file, if you use MSVC.

Ranran

Thank you for your advice. However, I can not solve the problem.  :-[
I regret to inform you, I declare the goods category symbol patch virtually abandoned.
Anyone who wants to complete this patch can take over. Sorry for my lack of skills.

Thank you. (´・ω・`)

EDIT:
Correspondence to extended other than the category 0 individual icon may have been completed.

jamespetts

I am sorry that you have not been able to fix the problems with this. Do I understand correctly that the problem was that you were unable to compile Simutrans-Standard and therefore test your new code with this?

These changes would still be useful for Extended even if they cannot be incorporated into Standard.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Ranran

#38
QuoteDo I understand correctly that the problem was that you were unable to compile Simutrans-Standard and therefore test your new code with this?
Yes. I thought that the cause was a difference such as the library version, but I could not identify the cause. (I added some missing libraries.) (´・ω・`)

I think that the problem may be solved when the difference with the standard gets smaller, so I may try again in a few years.
If you are interested in implementing this, it will help if you implement it.

(´・ω・`)少なくとも数年先までらんらんがstandard用のパッチを作ることはないので、もしこの機能に興味がある人はstandard用のパッチを作ってみて?




Since I thought that the goods category symbol could be useful in the formation picture, I went ahead with this work.
(The above image will be included in the formation picture patch.)

I completed the implementation this to the depot window and goods list. You can test this.
https://github.com/Ranran-the-JuicyPork/simutrans-extended/tree/goods-category-symbols

Special goods can use a shared symbol.
The symbol for special goods can be prepared by the pakset author, but the sample for testing uses a brown pile that you are familiar with.

Put symbol.GoodsCategories.pak in the pakset folder to display the symbols.  :idea: You can download it from this post.

The sample symbol images and dat are here:
https://github.com/Ranran-the-JuicyPork/simutrans-pak128.britain/tree/master/gui/gui64

jamespetts

Can I ask: is this intended to be applied over the couple constraint branch or on its own?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Ranran

#40
It is intended to be implemented alone before the couple constraint branch.
Even alone brings improvement to the depot window and goods list.
Use this feature to place a new goods category symbol in the formation picture.

jamespetts

Thank you very much for your work on this. I have now had a chance to test this.

One anomaly that I notice is that, in the depot window, for special goods, in the lower part of the depot window, the type of special goods will be displayed with the capacity (e.g. "7 head livestock"), whereas in the new upper display, we get "7 head Special Freight", which is not correct (and does not make sense). Really, in this upper display, each type of special freight should be separated.

However, apart from that, this is a happy advance and does make things clearer. Thank you for your work on this.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Ranran

#42
Quote from: jamespetts on June 08, 2019, 02:19:38 PMOne anomaly that I notice is that, in the depot window, for special goods, in the lower part of the depot window, the type of special goods will be displayed with the capacity (e.g. "7 head livestock"), whereas in the new upper display, we get "7 head Special Freight", which is not correct (and does not make sense). Really, in this upper display, each type of special freight should be separated.
This is not due to my change, but is a conventional specification.


However, the point is true.
Is it necessary to display the indication of "Special Freight"?
The point is that Autos and livestock appear to be in the same category in the Goods list.




My suggestion is to change goods_desc_t::get_catg_name() to return "Autos" or "livestock" instead of "Special Freight", for example.



jamespetts

Thank you very much for this: I have now incorporated the graphical symbols patch: my apologies for the delay so far. This is a good addition.

As to the "special freight" designation in the goods list, I suspect that the original reasoning behind this is that it is possible to sort things by category in the goods list, and "special freight" is a sort of miscellaneous category, so it is helpful to explain this to the player when sorting by category.

I should be grateful for people's views on the question of whether they would find things easier with the modification as Ranran suggests, or whether it is preferable to retain the current display in the goods list.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Matthew

Quote from: jamespetts on June 16, 2019, 12:25:41 PM
Thank you very much for this: I have now incorporated the graphical symbols patch: my apologies for the delay so far. This is a good addition.

As to the "special freight" designation in the goods list, I suspect that the original reasoning behind this is that it is possible to sort things by category in the goods list, and "special freight" is a sort of miscellaneous category, so it is helpful to explain this to the player when sorting by category.

I should be grateful for people's views on the question of whether they would find things easier with the modification as Ranran suggests, or whether it is preferable to retain the current display in the goods list.

Thank you for adding the patch, James, and Ranran for making it.

As far as I can see, "Special Freight" is only an internal category that is irrelevant to players. So Ranran's modification seems to be a good idea.
(Signature being tested) If you enjoy playing Simutrans, then you might also enjoy watching Japan Railway Journal
Available in English and simplified Chinese
如果您喜欢玩Simutrans的话,那么说不定就想看《日本铁路之旅》(英语也有简体中文字幕)。

ACarlotti

I think the only place where this might not make sense in the code is in gui/factory_edit.cc lines 240 and 254.

buf.append( translator::translate("Produktion") );
buf.append("\n");
for (uint i = 0; i < fac_desc->get_product_count(); i++) {
buf.append(" - ");
buf.append( translator::translate(fac_desc->get_product(i)->get_output_type()->get_name()) );
buf.append( " (" );
buf.append( translator::translate(fac_desc->get_product(i)->get_output_type()->get_catg_name()) );
buf.append( ")\n" );
}
buf.append("\n");

This should probably be edited to remove the duplicate name for Special Freight.

There are also a few places where there are some checks for catg 0 which are now redundant. (Search for get_catg_name and you can find them all.)

Ranran

#46
Thank you for pointing it out.
I corrected the redundancy.
https://github.com/Ranran-the-JuicyPork/simutrans-extended/tree/goods-category-symbols (new URL is in the post below)

I will fix convoi_detail_t.cc with another patch. (Because I am already working in convoy formation picture patch.)

ACarlotti

Just a small Git comment: since the previous work has been merged into James' master, I think it would produce cleaner Git history (and potentially easier merges) if you had based this commit on top of the latest master.


jamespetts

Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Ranran

#50
Hi, forum.

Yeah, as you imagined, I want to add a new symbol. (´・ω・`)
This is a new 3 minutes instant patch based on this patch.


As you know, you can upgrade your vehicle in Simutrans-Extended. ;)
Railroad geeks know in advance from historical facts that the vehicle has a particular upgrade, but normal people own the vehicle and know it only after the upgrade targets appear.  :::)
Hints will be given when displaying "All" vehicles, but it can be difficult to get an answer as to which vehicle it will be upgraded from.

Normally, it should display what the car to be upgrade is upgraded from. Currently it is not possible to know in advance which vehicles in convoy will be upgraded.  ::-\
But I didn't know how to do it. (´・ω・`)
I can not show the relationship between them, but I thought that I could add more hints.  :lightbulb:

Check this out  :arrow:


This patch indicates to players the presence of an upgrade prior to purchase.
Please note that the purple bar currently displayed is the upgrade target. The new icon shows the underlying vehicle.
Pink indicates that it is currently available, and Gray indicates that it can be upgrade in the future.
(The possibilities for the future may be wrong if pakset does not have the correct vehicle - a name is described in upgrade [n] but pakset does not have that vehicle.)


code is here
https://github.com/Ranran-the-JuicyPork/simutrans-extended/tree/upgradable-symbol



I have not worked on it yet, but this symbol could still be added elsewhere.

Please let me know what you guys think about this.  :lightbulb:

Thank you. :)

(´・ω・`)らんらん♪


EDIT:  You need the attached pak file to display symbols.
EDIT2:  Help text on symbols has been added.
EDIT3: This patch has forked to a new patch.
       Please check here and here.
EDIT4:
The expression "Upgrade is not available yet" is not correct.  It will also be gray if the time of appearance is over. It will help if you can tell the correct expression.  :-[
We also have the option of preparing a dark blue one.

Phystam

Ja, showing simbol for upgradable vehicles looks really good. Acutually our Pak256-Ex does not support livery scheme but upgrade for changing colors.
The feature will help you to decide change colors and functions of vehicles.

Ranran

Thank you for your thoughts.

Quote256-Ex does not support livery scheme but upgrade for changing colors
If this is done just to simply change the color variation, it should be noted that upgrade could easily break the game balance as I described here.
The current specification is designed on the assumption that "upgrade" is completely irreversible.
The vehicle's history is reset when you perform the upgrade. In other words, upgraded vehicle is completely :star: new vehicle. You can change a used vehicle to a new one at any time.  ;)
Upgrade costs (e.g. color change costs) may restore the value of the vehicle far from that cost.
If you sell a new car, the entire amount will be returned.

Vladki

This might be interesting to Ves and his pak128.sweden. He made a couchette car upgradeable to seats and vice versa. What should then be the right way to do this? Some sort of cargo holds like on ships?