X Tutup
Skip to content

Cargo Run custom risk message#6192

Merged
zonkmachine merged 1 commit intopioneerspacesim:masterfrom
zonkmachine:riskmessage
Nov 3, 2025
Merged

Cargo Run custom risk message#6192
zonkmachine merged 1 commit intopioneerspacesim:masterfrom
zonkmachine:riskmessage

Conversation

@zonkmachine
Copy link
Member

Alternative strings for the 'Will I be in any danger' message.

Spice up the risk messages with occasional per cargo messages. You can have more than one alternative string and it's only considered when there is no risk involved.

Mission
message1

Default risk message
message3

Alternative per cargo risk message
message2

Copy link
Member

@impaktor impaktor left a comment

Choose a reason for hiding this comment

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

Left some string suggestions.

Also, there's plenty of debug prints, but this PR is still set as WIP, so only natural I suppose.

@zonkmachine What additional work remains for it to be ready for merge/review?

},
"EXPLOSIVES_RISK_MESSAGE_1": {
"description": "Answer to question: Will I be in any danger?",
"message": "Well, it's explosives."
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if you could have a second sentence following it, "Not unless you drop it", since player might think there's some random chance their cargo hold will explode (though seasoned players will know that mechanics is not implemented).

With "not unless you drop it" I think the player knows there's no "drop" mechanism, so no actual danger.

Copy link
Member Author

Choose a reason for hiding this comment

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

Looking into.

seasoned players will know that mechanics is not implemented).

It isn't?

Captain, there's a strange noise coming from the cargo hold! 😉

@zonkmachine
Copy link
Member Author

Rebased with suggested changes. I'll look into the rest of the code soon-ish.

@zonkmachine zonkmachine force-pushed the riskmessage branch 3 times, most recently from c3eb1c2 to dac620e Compare October 28, 2025 23:13
@zonkmachine
Copy link
Member Author

Left some string suggestions.

Also, there's plenty of debug prints, but this PR is still set as WIP, so only natural I suppose.

@zonkmachine What additional work remains for it to be ready for merge/review?

I looked it over and removed debug stuff and old commented out code. It works fine. I don't remember why I handle the risk messages in CommodityType.lua. Maybe it should be redone in Cargo Run altogether?

The codedoc part for GetRiskMessage() has been tested and looks fine.

-- Method: GetRiskMessage()
--
-- Returns alternative string for possible danger of the mission. Not all
-- cargo has the same danger involved.
function CommodityType:GetRiskMessage()

@zonkmachine zonkmachine marked this pull request as ready for review October 28, 2025 23:22
@sturnclaw
Copy link
Member

Yes, please move mission-specific code out of core libs... If it's something that will be displayed homogeneously across the UI (e.g. a stolen or volatile cargo flag) that's a worthy inclusion, but a humorous message is IMO not worth promoting to "shared" API.

@zonkmachine zonkmachine marked this pull request as draft October 29, 2025 00:44
@zonkmachine
Copy link
Member Author

OK. Converting to draft and redoing.

@zonkmachine zonkmachine marked this pull request as ready for review October 29, 2025 02:31
@zonkmachine
Copy link
Member Author

Yes, please move mission-specific code out of core libs...

Fixed!

Copy link
Member

@impaktor impaktor left a comment

Choose a reason for hiding this comment

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

Just one suggested change.

Copy link
Member

@sturnclaw sturnclaw left a comment

Choose a reason for hiding this comment

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

Looks good to me! Thanks for working on this!

@zonkmachine
Copy link
Member Author

Thanks for the feedback everyone!

I think I'm done here. I'll wait a bit with merging until things are being pulled back from Transifex, and maybe someone spots something that needs fixing. I tried to come up with other cargo that deserved an alternative risk message but don't have it in me at the moment.

@zonkmachine
Copy link
Member Author

zonkmachine commented Nov 3, 2025

Possible issues here. Testing. Don't merge. Edit: Nope, all fine...

Add some variation to risk message when the risk is low.

Co-authored-by: Axtel Sturnclaw <sturnclaw@protonmail.com>
Co-authored-by: Karl F <karlfogel@gmail.com>
@zonkmachine
Copy link
Member Author

OK, merging.

@zonkmachine zonkmachine merged commit 92a1c11 into pioneerspacesim:master Nov 3, 2025
@zonkmachine zonkmachine deleted the riskmessage branch November 3, 2025 18:11
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.

3 participants

X Tutup