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

News event Commodity #2753

Merged
merged 3 commits into from
Feb 28, 2014
Merged

Conversation

impaktor
Copy link
Member

NEWS EVENTS

2014-02-12-113820_955x513_scrot

What is a NewsEventCommodity?

The effect is a BBS message informing of some news happening in the region, affecting some commodity in some system, e.g. "Drought in system {system}" which will set Grain stock to 0, and multiply Grain price by some factor. Another example is a system flooded with drugs, reducing price of Narcotics, and flooding the stock exchange, (provided Narcotics are legal in the system).

I see my self doing more of these NewsEvents in the future which is why I call this one NewsEventCommodity, since other news events would not affect the commodity market (could be a race or competition, or scavenger hunt, etc), but that's for another day.

How it works:

It creates a news event for some system, max 20-50 ly radius from the players current position when arriving from hyperspace. The news will expire at some time dependent on the distance to the system (of the event) from where the player was when it was spawned, plus some randomness. Each news will get one post on every BBS, wherever the player goes, except for the system affected by the event which will be silent.

A news post will be timestamped with some random timepoint from when the player was in hyperspace. If the event took place in, say, Confederate faction, it will say that the news is from "The Confederate Chronicle" etc.

I decided against the news message explicitly stating which commodity is affected, since then it will be far too unnatural, scripted, and boring. This way the player will have to think for themselves and try their luck in speculating the market.

When you land in the system with one (or more) active news events, you will see some generic grateful message in you HUD/Comms, if you borough the cargo in need (provided it hasn't expired). If the system has an abundance of a commodity (like drugs flooding the market) no message is show.

How often will there be a NewsEvent?

My thinking was that News should be comparatively rare, and I've caped the maximum to 3 news items at any given time, though I think the probability for just the one should be low enough so that the cap is never reached. For testing I played around with this a bit. I also think there should be a news drought for 12 months when you start a new game. Point is, once you get into the habit of delivering packages, and you think you've seen all the game has to offer, this will (have some chance to) pop up, as a nice surprise.

However, there are a lot of flavours so it could be made not-so-rare, and the boost in market price just lowered a bit instead to compensate.

Testing and reviewing

The first commit e4564a1 has all the debug printouts, each line starting with one, or several dashes. In this commit there will be one news created each time the player hyperjump (i.e. probability = 1), but capped to 3.

I think getting the flavours for each news right is very important since this will be a lot to translate, so these should not change once merged. I know there are probably grammar and spelling mistakes (I've red these so many times I'm now blind to any mistakes). I'm very pleased with some of the flavors but some/many could be improved perhaps?

b9d1ec2 is just a cleanup, with probability set as I suggested above.

Further details

A new sevent has some probability of being created every time the player enters a system (I wanted the probability of spawning a newsevent to be independent of number of stations in the system).

Removed as news expires when player lands on a station.

Handling of illegal goods

The script cant deal with black market prices. All flavours have the same chance of being picked. If the flavour is regarding slaves, for instance, it will randomly go through all systems available at the selected distance until it finds a system where slaves are legal, or until we run out of systems to try. If the latter, if will try another flavour (two more times) and repeat.

I've found it will usually find some system where any commodity i legal, except slaves, which are only legal in Red faction systems, which is why I gave an extra boost in price for a slaves event.

What it doesn't do (yet)

There are a few things not implemented:

  1. These news events might go on the Station View Lobby, instead of the BBS. I don't know exactly how to place messages on the Lobby, but I suppose it would be nice if they had a headline as now, and when clicked pop up the more detailed news report. @nozmajner had some ideas here
  2. If 1. is implemented, I think it should be fair to have a news message in the lobby informing that the event is over. "Conflict in system X has returned to normal, peace treaty signed, ", "first harvest in system X after drought", "police in system X regains control over drug-lords" etc.
  3. If 2. is implemented the message in the system affected should/could be different from other systems. It will probably not be unusual to arrive too late to a system. Then the message should be the same as in 2., but in a version not mentioning "in system X", or just a few generic "all things returned to normal" messages.
  4. I started by over-thinking the news items at first, like: should a mining colony have drought? etc. The simple solution is in place: everything is system wide. Let's just say something happened somewhere which has caused the system stock to reach an equilibrium of 0 or , depending on if demand is extra high or extra low.
  5. It does not take into account what the system exports or imports in the usual sense.
  6. Perhaps a player could get too rich if they got lucky with the expiration time of the news. Then this date could be halved each time the player landed, but I don't think that's an issue with current settings.
  7. Another thing is having multiple commodities affected by one event. Drought causing grain shortage will also makes fruit and veg expensive? I think this would be over-thinking the issue. Which is why I left it out for now.

I'd like to implement 1-3 above, but I thought it best to stop for now, to see if this is something that can be merged into the game.

@lwho
Copy link
Contributor

lwho commented Feb 12, 2014

Hey, nice, this adds a little bit of atmosphere to the game.

I wonder if it would be a good thing, if you could also create a mission from the news item, just to track it as something you're intending to do (a self-selected mission so to call).

Something like "Investigate the events in the GJ 1028 system.", "Look if you can make some money in GJ 1028."

The deadline should be the approximate duration of the effect. The mission would have no client (or yourself if that's technically easier), no earning, no effect on reputation if the mission succeeds/fails. It would just be to track it together with your other missions. The mission would be successful as soon as you enter the system or failed when the effect vanishes before. How about something like "Oh no, others made a fortune in the GJ 1028 system; and you were not there." as a failure message ;)

@bszlrd
Copy link
Contributor

bszlrd commented Feb 12, 2014

@lwho: I was thinking about something similar. A notebook in the InfoView where you can put data by hand (and maybe even with shortcuts - shift+click for example), like prices and stuff. Something like Deus Ex had.
Not that I have the skills to code it, but one can play with ideas nevertheless. :) /derailment

@impaktor
Copy link
Member Author

@lwho
I also thought about having it as a mission initially, but then I reached the decision that it's too different.

The ideal thing would be to have a button on the news window: "save to notebook", which would just place the news in some notebook, as @nozmajner put it. You would be able to remove it manually, and once expired the message would change, or change colour or something.

Something I think is more prioritized would be to get the News message to the station lobby instead of the BBS, so it really pops out when you dock, instead of being lost in all the jumble on the BBS.

Then it would be good if one could just call some function addLobbyNotice() or something, to place it in a scrollable list, as seen in the link mentioned above.

BTW, thanks for the news icon nozmajner.

@fluffyfreak
Copy link
Contributor

This pull request, I see all of the discussion about future work and think it's great, but if we merge this PR then will it work as-is?

Is it complete, self contained and everything else is just stuff you'd like to do to it in the future? Or do you want to keep working on this PR to add those things first?

@impaktor
Copy link
Member Author

@fluffyfreak Everything in this one works, and is self contained, and ready to merge. I was just rambling about what I'd like to do in the future with this.

However, due to to large mass of text (23 flavours), it would be good if someone would like to proofread it.

@impaktor
Copy link
Member Author

Actually I had a half removed debug-printout, from e4564a1 but I fixed, so now there should be no bugs (that I'm aware of).

@impaktor
Copy link
Member Author

I intend to merge this in the comming days if there are no objections.

@fluffyfreak
Copy link
Contributor

None from me, I was going to merge it myself the other day but I haven't had chance to actually check it out for testing yet. Merge it now if you like :)

@impaktor
Copy link
Member Author

I'll give @nozmajner a chance to give some feedback, since he has read through some/all? flavours.

@bszlrd
Copy link
Contributor

bszlrd commented Feb 26, 2014

I've read trough it, I think they are fine. There are a few typos, like a stray space at the end of one sentence I foolishly corrected in my copy, somewhere at the beginning. Also at flavor 6, there's a missing u in Q(u)ibble. And I'd put a - in under(-)staffing, at flavor 22.
And the Rekall Inc bothers me a bit, but I can't come up with any alternative yet. Prekall maybe, just to avoid the direct use of the word, but I'm not sure.
I'd upload the fixed file, but I started to translate the file already. :)
It will be a bit hard to translate, but that's because of how Hungarian language works, so don't mind that at all. :)

@lwho
Copy link
Contributor

lwho commented Feb 26, 2014

@nozmajner
You can directly comment code changes in Github by selecting the "Files changed" tab above and then clicking this little plus icon which appears left of the line you want to comment.

Makes review comments both easier to write and easier to read (win-win) ;)

@impaktor
Copy link
Member Author

Thanks @nozmajner, I found the trailing space as well. I'll look through this one more time.

@impaktor impaktor merged commit bca1f59 into pioneerspacesim:master Feb 28, 2014
@impaktor impaktor deleted the NewsEventCommodity branch February 28, 2014 07:13
@robn
Copy link
Member

robn commented Mar 3, 2014

For future reference, if you merge something with a new language resource you must let me or @johnbartholomew know so we can create the resource in Transifex. I'll make it more clear in the wiki topic.

Current build is broken for non-English. It'll be back on track tomorrow (can't do more than two builds in a day because of the date-based version string).

@impaktor
Copy link
Member Author

impaktor commented Mar 3, 2014

OK, thanks. I was keeping an eye on transflex to see when it would appear, and was about to ask.

@impaktor
Copy link
Member Author

impaktor commented Mar 7, 2014

BTW, I see that the module shows up as "uncategorized" on https://www.transifex.com/projects/p/pioneer/language/it/

I don't know if that means anything. @robn?

@impaktor impaktor mentioned this pull request Dec 6, 2020
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants