Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remade PRINT and MESSAGE commands #930

Merged
merged 19 commits into from Jan 18, 2021
Merged

Conversation

AdamPlenty
Copy link
Contributor

@AdamPlenty AdamPlenty commented Jan 10, 2021

Commands send a chat message from a specific creature/player. Also accepts 'None' to have no icon.

QUICK_MESSAGE([message_ID], "[message text]", [creature/playername])

DISPLAY_MESSAGE([string number], [creature/playername])

PRINT allows you to specify whom (player or creature) the message is from. MESSAGE allows you to specify how long the message is displayed for.
Copy link
Member

@Loobinex Loobinex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've been playing around with it, and I do really see value of what's now your PRINT command. I would rename it to QUICK_MESSAGE, leaving the possibility open for a future MESSAGE that takes the string from the pot/dat files.

There is an issue though if you first have a chat message (press enter and type something) and after that get this PRINT message, the texts overlap. If they come in the other order, all is well. See:
image

What you have now as the MESSAGE command I would simply remove. These texts are now used for technical, not ingame messages and I think it would be best to keep it that way, and not allow mapmakers to mess with that. Beyond that, I'm not seeing any real value to this command anyway compared to what PRINT now offers.

In saying that, could you add an option to not display an icon next to the PRINT message? When using something like ALL_PLAYERS or NONE as the [creature] param?

src/gui_msgs.c Outdated Show resolved Hide resolved
src/lvl_script.c Outdated Show resolved Hide resolved
@AdamPlenty
Copy link
Contributor Author

There is an issue though if you first have a chat message (press enter and type something) and after that get this PRINT message, the texts overlap. If they come in the other order, all is well. See:
image

I've no idea what could be causing that......

@Loobinex
Copy link
Member

There is an issue though if you first have a chat message (press enter and type something) and after that get this PRINT message, the texts overlap. If they come in the other order, all is well. See:
image

I've no idea what could be causing that......

My guess would be that there's a counter for the number of messages, and that having new messages updates the counter for each message. But that your print command does not update the counter/positions of the other messages.

@AdamPlenty
Copy link
Contributor Author

There is an issue though if you first have a chat message (press enter and type something) and after that get this PRINT message, the texts overlap. If they come in the other order, all is well. See:
image

I've no idea what could be causing that......

My guess would be that there's a counter for the number of messages, and that having new messages updates the counter for each message. But that your print command does not update the counter/positions of the other messages.

I just displayed two messages simultaneously, and I had no problem; one appeared below the other as expected.

@Loobinex
Copy link
Member

I think it's fine like this and ready for merge.

I did notice that the messages can be too long to fit the screen. I don't think there is a solution for that, but if you do have an idea let me know and I postpone merging. If not, also let me know and I'll merge.

@Loobinex Loobinex merged commit 5000a9d into dkfans:master Jan 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants