News:

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

Chat history?

Started by jamespetts, September 28, 2013, 11:11:29 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jamespetts

May I ask - where can I find the parameter that determines how much chat history is saved in network games? I should like to be able to increase the parameter in Experimental, as this is useful for the very long games that we have.
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.

Dwachs

The chat messages also appear in the log, there you can filter them out if you like. Iirc, that is what Timothy did.
Parsley, sage, rosemary, and maggikraut.

jamespetts

I was thinking more of how to make the in-game listing of chat messages cover a longer period of history for the convenience of players: it would be useful to see a longer chat history in very long games, at least of the last 25 years or so.
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.

Ters

There can't be much chatting going on if 25 game years of in-game chat log is a convenience. Or is there a search function I'm not aware of?

jamespetts

There often is not a great deal of chatting going on, actually: people are often not online at the same time, so there are brief conversations when people are simultaneously online, followed by a smattering of one off remarks. These remarks are often things that it would be useful for other players to have a history of, as they are usually closely related to the game.

Where in the code is the parameter that controls how much of this is retained?
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.

prissi

The graphic engine cannot display any chat which has more than 2730 lines (i.e. 32768ßscreenheigh pixels). Hence only the last 2500 lines are saved. Look for this number.

Fabio

Could we save them all but show in game only last 2500? the complete history could be exported as .txt

jamespetts

Thank you very much for that - that is helpful. May I ask - if I were merely to increase the number, would it potentially result in crashes when the message window was opened, or would it truncate cleanly?
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.

prissi

The slider may do wierd thing, but checking for this should not be too difficult. I once wanted to fix this too, but then 2500 was already a lot of text and you are the first to complain.

EDIT: in void message_t::rdwr( loadsave_t *file ) there are only 2000 messages saved. You need to remove "if(++msg_count == 2000) break;" and instead "min( 2000u, " only "msg_count = min( 32760u, list.get_count() );"


jamespetts

Thank you very much - that is very helpful.

Edit: Should I remove all of the following code:


FOR(slist_tpl<node*>, const i, list) {
                if (!(i->type & local_flag)) {
                    if (++msg_count == 2000) break;
                }
            }


as the whole loop is redundant without the " if (++msg_count == 2000) break;" line?
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.

prissi

Obviously this counts the local messages. I.e. you have to replace it by
"if (++msg_count == 2000) break;" by "msg_count++;"

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.