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

[Scenario issues] Escape #2269

Open
muerteFR opened this issue Dec 23, 2024 · 29 comments
Open

[Scenario issues] Escape #2269

muerteFR opened this issue Dec 23, 2024 · 29 comments

Comments

@muerteFR
Copy link
Contributor

muerteFR commented Dec 23, 2024

Tested on the FR version with the release of 04Nov2024 and on the most up-to-date scenario version dated 12/19/2024 (on Daid's repo).
I'm starting a proofreading of the fr translation of Escape and

a. NO RESOLVED as has already been the case for several years (2021 first test for me), EE crashes on this scenario.
This was the case from the start of the game by scanning a buoy. I am on w10 HP prodesk Intel core i5-4.
This is the only scenario to do this always without me knowing why whatever the version of EE.
It's random but it happens often and it can be at any time during the game even if it often happens when the ship is still in the junk yard.

b. RESOLVED The "Transfer to Repulse" button on the Engineering console no longer appears on the Engineering+ and Damage Control consoles. After another test, this time, in easy mode, the button appears in 3 places. It seems random.
Edit: After another test, It seems that the button is not displayed if we subsequently select these 2 Engineer+ and Damage control consoles. If they are selected before the button appears, then the button appears.

c. RESOLVED LATER the “Nil” message systematically appears when starting the game.

Nil

d. CLOSED I don't know if this is normal but the name "Boris Junk Yard" appearing on the area in GM doesn't appear in the science or relay console. Even having scanned the 3 buoys.

e. RESOLVED The menu of transactions with a freighter is strangely done. The question “Do you have cargo you might sell?” » is located at the same level as the purchase buttons for goods sold by this ship. “Buy one %s for %i reputation”.

f. RESOLVED A "Cruiser" ship is integrated into this scenario, in addition to the default ships and the Repulse. But it's a duplicate because this "Cruiser" already exists under the name Karnack MK2. I don't know why this ship is integrated and if it is now useful to have it as a duplicate in the DB. On the other hand, Scrag which is an MP52 Hornet is not available in the DB.

Karnack2 feat Cruiser

g. CLOSED I don't know if it's intended, normal, but we can give orders to independent cargo ships (defend a WP, dock at a nearby station, report status, help us) as if they were combat ships.

h. RESOLVED LATER Certain recurring texts (similar between scenarios) of the comms and which exist in the scenario translation files are unused because they come from specific files: comms_ship, comms_station...
But only part comes from these files and the other part comes from the scenario translation files without really knowing why. This exists in other scenarios.

i. RESOLVED The entries in the DB concerning the stations are useless because they are now present by default.

j. RESOLVED Query: Would it be possible to differentiate the 2 occurrences of " %s: %i" in the scenario? (line 1793 and line 1802) because one is used for the number of Goods that our ship has and the other for the profit that a sale to a station would bring.
This would allow us to add an x3 for example for the quantity and a 123 rép. for profit. This makes the menu more understandable. It's the same in 11 of your scenarios.

k. RESOLVED During a test, when I talk to Johnny to repair the engines, instead of the requested goods in the sentence "Piece of cake, but I'll need %s." I have a Nil : "Piece of cake, but I'll need nil."

l. CLOSED I don't know if this is normal but during a test in normal difficulty and Murphy-easy mode, the 1st Scrag ship was targeted and destroyed by a missile fired by a Kraylor ship barely 3 minutes after the start of the game. (Edit : second test. Eliminated after 1mn30) and third test in easy difficulty and Murphy. after 2mn30s and under 2mn (fourth test) see picture. It doesn't happen all the time but very often and there's absolutely nothing we can do. The difficulty is very high, if not impossible. On hard (and even Normal) difficulty, this is unachievable. Before I found the difficulty difficult, but now it seems impossible without cheating with the GM. Scrag is targeted in just minutes. Finally, suffocation doesn't have time to be scary. We get eliminated first.

2mn30

Waiting for additional tests m. In normal difficulty and Murphy-easy mode, after 8 minutes, still no message or countdown concerning the lack of air. (Currently being verified, I'm not sure air is used in normal difficulty).

Waiting for additional tests n. Another intermittent bug: When wanting to repair the second (rear) shield at Amir's sister's station (Coulomb) in exchange for a goods (warp), the shield was not repaired, it remained at 30% (tested in easy difficulty/murphy). However, everything went normally, except that the shield remained at 30%. The next test, it worked.

o. CLOSED For information purposes (I don't know if this is intended but it really seems like a lot?), in easy difficulty/murphy, after 3 minutes here is the traffic (first picture) then later in the game after around 30 minutes (2nd picture).

mode easy

mode easy2

p. RESOLVED I have the message "Reached maximum repair on warp drive" displayed in Engineer&+ even though the Repulse does not have warp drive ??
warp

q. RESOLVED After passing under the banner of the Human Navy, going to the menu (while docked at a neutral Feynman/independent station) "Buy, sell, trade", it generates this error. Whereas I have Luxury aboard but the station doesn't have any (doesn't sell or buy them. It sells Nanites and Software). I tried on 3 different neutral stations. Even having discarded luxury, it still does it on some stations but it does not do it on all stations.

luxury

@muerteFR muerteFR changed the title [Escape Scenario issue] Random bug/freeze and crash of my game [Scenario issues] Escape Dec 23, 2024
@muerteFR
Copy link
Contributor Author

After numerous tests, I have finished testing this scenario for my translations.

@Xansta
Copy link
Contributor

Xansta commented Jan 1, 2025

Regarding item c where nil appears when starting the scenario. In previous releases of Empty Epsilon, using this function...

_VERSION

...would show the version of Lua being used. I think this has been disabled in recent releases. When I've been revising scenarios, I've started adding something like...

	if _VERSION ~= nil then
		print("Lua version:",_VERSION)
	end

...to replace the previous one line indication of the Lua version on the off chance that the _VERSION functionality is restored in a future release. If it gives out a nil, then nothing appears on the console. I have not yet added this particular revision to the Escape scenario yet.

@Xansta
Copy link
Contributor

Xansta commented Jan 10, 2025

Regarding item b where the transfer button only appears if there is a player at that console (engineering, engineering+, damage control): I removed the requirement that a player has to be at the console for the console to get the button. This change is on my repository, but not on the main EE repository.

@Xansta
Copy link
Contributor

Xansta commented Jan 10, 2025

Regarding item d there the zone label "Boris Junk Yard" sometimes does not appear. I just tested it and it appears for me on Relay, Science and the GM screen. However, I have had problems with zone labels in the past - sometimes they would appear, other times they would not, and other times they would show up outside the zone distorted or huge. Unless it can be consistently recreated, I am not going to try to address this because it is beyond the control of the Lua script.

@Xansta
Copy link
Contributor

Xansta commented Jan 11, 2025

Regarding item e where the ship comms button to ask what cargo a freighter is carrying appears alongside of the buttons asking to buy the cargo the freighter has available. The scenario has been updated to only present the question about what cargo is being carrier if the freighter is farther that 5 units away. The comms function already only presented the buttons about purchasing cargo if the freighter is less that 5 units away. The updated Escape scenario is on my repository, not on Daid's repository.

@Xansta
Copy link
Contributor

Xansta commented Jan 11, 2025

Regarding item f part 1 where the Cruiser appears in the science database as essentially a clone of the Karnack MK2: Like the automobile makers of today's era that market largely identical cars under different names, the Cruiser was another Karnack MK2 that the Repulse Shipyards released for public consumption. The public outcry against these marketing shenanigans, once they were discovered, prompted Repulse Shipyards to shut down the media outlets that were inserting this information into ships' databases. I have removed the entry from the ship database. Repulse shipyards will still have a model ship out there with the Cruiser name, but less information will be available for it (the DB button will not work, nor will information be available by manually searching the database). The Repulse shipyards marketing department likes this strategy because they feel it will generate more sales for those customers that are intrigued by a "mystery machine."

Regarding item f part 2 where the database does not contain information on the Scrag: Like other player ships in Empty Epsilon, there is no entry in the science database about this ship. Daid made the decision to avoid publishing details on player ships. I believe the reason goes along the line of preserving the player's power fantasy. Most player ships have significantly stronger shields and hull than non player ships making them stand up longer in a fight. If the ship statistics were available in the science database, it might ruin the power fantasy. Scrag is the player ship that the players start with at the beginning of the Escape scenario. It is a damaged clone the MP52 Hornet which is one of the fighter type ships a player can use. Going along with Daid's philosophy, in this instance, of not publishing details on player ships, I did not add an entry into the science database for Scrag. The details on the Scrag are not available in the science database either while the players are on it nor after they transfer to the Repulse.

The updated Escape scenario is on my repository. It's not on the primary repository yet.

@Xansta
Copy link
Contributor

Xansta commented Jan 11, 2025

Regarding item g where independent ships take orders: In the Escape scenario, the players start on a Human Navy ship in Boris' Junkyard. It proves to be not viable for escape and the players have to transfer to another ship. This "other" ship is an Independent ship. It's also in bad shape, but with some hard work on the part of the Engineering department will suffice for the players to accomplish their mission of escape. While the players are on an Independent ship, other ships of the same faction, namely independent freighters, behave as the friends that they are. As such, the things you can do with friendly ships are legitimate when the players are aboard the Independent Repulse. This is normal behavior on the part of the friendly Independent freighters.

The "defend a waypoint" order in the context of a ship without guns simply means to go to that location and circle. You will find that friendly freighters in other scenarios behave the same way. You don't see it as often because most other scenarios mostly have Independent freighters instead of Human Navy freighters. I can understand this choice by script writers because I notice that when there are friendly freighters with automation to go from place to place, they communicate their intents in the player's ship logs. The ship logs can fill up quickly with these friendly freighter messages. I've asked @daid about this before and he said he thought it was a mistake to have the friendly ships put their messages in the player ship log. It makes more sense for friendly combat ships when they respond to a player's directive to assist or defend a waypoint or dock. I think there was possibly a plan to make these automatic responses configurable (as in let something in Lua determine when a ship put this kind of response in the ship log), but it has not yet been implemented.

There will be no changes in the Escape scenario to try to make Independent freighters less responsive to player requests for action. Being aboard a damaged Independent ship is hard enough as it is. Giving orders to Independent ships could be advantageous.

@Xansta
Copy link
Contributor

Xansta commented Jan 11, 2025

Regarding item h where recurring text strings and the reasoning behind their use in translation is questioned: By default ships and stations use comms_ship.lua and comms_station.lua as the code that governs how comms will work for those entity types. When I first started writing scenarios, I wanted to change how comms were handled inside my scenario. There were some choices:

  • Modify comms_ship.lua and/or comms_station.lua. This would change the defaults for everyone. Being inexperienced, I did not choose this option.
  • Create another file like comms_station.lua or comms_ship.lua, and use the setCommsScript() function to direct the object in the scenario to use the newly created file instead of the default file. At the time, I was unsure whether actions taken in the external comms script file would be reflected in the main scenario file. I was also unsure how this paradigm would handle multiple player ships. Further, I did not like having a different file with scenario logic in it. In my mind, it made it harder to figure out what was going on and I wanted it to be as easy as possible to read a scenario to see what it was doing and why. I did not choose this option.
  • Create a function within the scenario that handles ship and station communication. This is the option I chose because it stayed within the scenario. All I had to do was direct the object in the scenario to use the internal function rather than the default with setCommsFunction() on the object.

Because I was inexperienced, my internal functions strongly resembled the functions in the external files comms_ship.lua and comms_station.lua initially. Over time, I added more and more functionality to my internal comms functions. These get copied from scenario to scenario. I have recently created a comms utility to reduce the amount of copying and pasting of comms functions between scenarios. I have not converted all of my scenario scripts to use this comms utility.

As for the why, the logic goes like this:
When a station or ship is created, if the default behavior is not changed with setCommsFunction() or setCommsScript() then the default behavior of the two files comms_station.lua and comms_ship.lua will be used. If the script writer uses setCommsScript() or setCommsFunction() on the object created, then the comms behavior will follow the script or the function identified.

If this is not clear, please provide specific examples where an object does or does not use translation as expected. For the Escape scenario, most of the junkyard ships are using the default communications behavior. Other ships use the internal ship comms function via setCommsFunction(). Which objects (if any) are not translating as you expect?

This issue relates to the Escape scenario. I'll address this as best I can as it relates to the Escape scenario. For other scenarios, the issue should be created for the scenario individually.

@Xansta
Copy link
Contributor

Xansta commented Jan 11, 2025

Regarding item i related to the code that would add information to the science database about stations: I've taken out the code that would add that information. There was already a check that prevented that code from being executed if there was already a science database entry for stations. At the time that Escape was written, there was no such science database entry. The updated scenario is on my repository, but it is not in the main EE repository yet.

@muerteFR
Copy link
Contributor Author

Which objects (if any) are not translating as you expect?

I don't remember in which case this happened, but I realized it by modifying a translation in the script but which did not change in the game. And by modifying the same translation (identically) in one of the comms_ship files or other, there, the modification was clearly visible in the game.
I brought up this case at the same time as I was testing Escape because in my mind, texts present in certain scenarios are not used (so I considered them as useless duplicates, while remembering that I know nothing about code) and can cause confusion because we think we are modifying/translating this text but in fact it has no effect.
It is also to provide you with information that I thought would be useful for the general revision work that you are doing to simplify and lighten your scenarios with the comms_scenario_utility.lua utility.

Thank you in any case for your clear and interesting explanations. :-)

@Xansta
Copy link
Contributor

Xansta commented Jan 11, 2025

Regarding item j where a question was added about translation contexts for goods processing: I changed the translation contexts so that they are more specific. The updated Escape scenario is on my repository, it's not on the main EE repository yet.

@Xansta
Copy link
Contributor

Xansta commented Jan 11, 2025

Regarding item k where a nil appeared when asking for repairs: This situation only occurs in hard difficulty when attempting to make permanent impulse engine repairs. I have updated the Escape scenario file with a fix. It's on my repository, but not on the main EE repository yet.

@Xansta
Copy link
Contributor

Xansta commented Jan 11, 2025

Regarding item l (L) where Kraylor destroy the human navy ship before they can do anything: Yes, random factors can cause this scenario to rapidly kill the player ship. There is code specifically added to address this situation that you describe:

for kpidx, kpobj in ipairs(kraylorPatrolList) do
	if kpobj ~= nil and kpobj:isValid() then
		if kpobj.target ~= nil and kpobj.target:isValid() then
			if distance(kpobj, kpobj.target) < 1000 then
				kpobj.target = randomStation(enemyStationList)
				ktx, kty = kpobj.target:getPosition()
				kpobj:orderFlyTowards(ktx, kty)
			end
		else
			kpobj.target = randomStation(enemyStationList)
			ktx, kty = kpobj.target:getPosition()
			kpobj:orderFlyTowards(ktx, kty)
		end
		if junkZone:isInside(kpobj) then
			ktx, kty = kpobj.target:getPosition()					
			kpobj:orderFlyTowardsBlind(ktx, kty)
		end
		kgr[kpobj.groupID] = true
	end
end

Notice that if the Kraylor patrol object (kpobj) is in the junkZone (also known as Boris' Junkyard), its orders are changed to orderFlyTowardsBlind. This is done to protect the players somewhat from random attacks by patrols against them. It's not foolproof, but it should work in many situations. I noticed that the player ship was getting attacked by Kraylor ships when I was testing so I added this code. In other words, it does not happen all the time. You just got "lucky."

The stations are placed at random. The patrol routes are determined at random. There is a one minute delay before the Kraylor patrols start spawning. Afterwards, this code is executed every 5 - 15 seconds.

This scenario has many very linear aspects to it: event A is followed by event B is followed by event C, etc. In order to give it some replayability, I made sure that there were some very dangerous random elements including patrols that might destroy the player ship. I have not added a mode where there is no danger. Some aspects of the scenario can be solved by the actions the players take. Other aspects are out of their control and can easily cause an untimely demise.

I don't intend to dilute the difficulty any further.

@Xansta
Copy link
Contributor

Xansta commented Jan 11, 2025

This entry contains spoilers for the Escape scenario. Do not read if you wish to solve this scenario without any extraneous hints or answers.

Regarding item m questioning why there is no suffocation warning or timer: There is no suffocation danger in easy mode:

if difficulty >= 1 then
	plotSuffocate = checkForSuffocationOnFighter
end

The numeric values of difficulty (which is labeled as Murphy in the initial config) are as follows:
.5 = easy
1 = normal
2 = hard
So, suffocation only applies to normal or hard difficulty.

Further, the suffocation countdown only starts after the Repulse type ship in the junkyard has been scanned. So, if you just sit there doing nothing waiting for the suffocation countdown timer to start, you'll be waiting for a long time. Suffocation works like it's supposed to.

@Xansta
Copy link
Contributor

Xansta commented Jan 11, 2025

Regarding item n related to the second shield being repaired: When repairing the shields, Amir's sister only makes it possible for the onboard repair crew to fully repair the shields, the fix does not instantly repair the shield generator. This is true of the initial fix and the follow up fix. So, I have to ask whether or not your engineer moved repair crew to the second shield area when you ran your test?

@Xansta
Copy link
Contributor

Xansta commented Jan 11, 2025

More spoilers for the Escape scenario are here. Do not read this entry if you intend to solve the scenario without external hints or answers.

Regarding item o where concern was expressed about the number of Kraylor ships patrolling the area: Yes, there supposed to be lots of Kraylor ships flying around. The player is deep in Kraylor territory. Once they are aboard the Independent ship, the Kraylor leave them alone. As soon as they get their communications array set up to contact the Human Navy, all those Kraylor that were formerly neutral to Independent will be enemy to the Human Navy players and will not want them to escape the area to deliver the intelligence that is the crux of their mission. The longer the mission runs, the more Kraylor patrol craft will be present.

@Xansta
Copy link
Contributor

Xansta commented Jan 11, 2025

Regarding item p where a message is received about a warp drive when none is present: Normally that won't appear.

I only added these "reached maximum..." messages because I heard that some engineers were not paying attention to the changing percentages on ship systems and thought the scenario was broken when the percentages stopped moving higher to fully repaired. Looking at the code, all the systems get set to a random damage amount between -.9 and -.1 (which translates in game to -90% to -10%). The warp drive message is set to trigger when the warp drive reaches -.1. So, either, the random number generator happened to pick -.1 for the warp drive or the ship had auto repair enabled and it reached that value automatically. Regardless, I changed the message threshold to zero to avoid this message in the future. Why not remove it entirely? Some players or GMs will add a warp drive to a ship just because they dislike jump drives and I still want FTL capability to be damaged in the scenario.

The updated scenario is on my repository, but not on the main EE repository yet.

@Xansta
Copy link
Contributor

Xansta commented Jan 11, 2025

Regarding item q where an error occurs attempt to index a number value luxury: This only occurs if the station happens to trade, there are trade goods on the player ship, and there is a related trade good on the player ship.

In this case the script writer (me) mixed up the way goods are tracked on a station compared with the way goods are tracked on a player ship. On a station, for a good, there is a cost value as well as a quantity value associated to a good. On a player ship, there is only a quantity and since that's the only value, it's not even labeled as quantity, it's just associated to the good. The code was written assuming there was a quantity label for the player ship good like there is for a station good. This was wrong and when this circumstance occurs, the error is generated. The scenario has been updated and is on my repository. It's not on the main EE repository yet.

@muerteFR
Copy link
Contributor Author

muerteFR commented Jan 13, 2025

Regarding item n related to the second shield being repaired: When repairing the shields, Amir's sister only makes it possible for the onboard repair crew to fully repair the shields, the fix does not instantly repair the shield generator. This is true of the initial fix and the follow up fix. So, I have to ask whether or not your engineer moved repair crew to the second shield area when you ran your test?

I can't remember. I think I did, but maybe I'm wrong. I'll try again when I have some time.

@muerteFR
Copy link
Contributor Author

Further, the suffocation countdown only starts after the Repulse type ship in the junkyard has been scanned. So, if you just sit there doing nothing waiting for the suffocation countdown timer to start, you'll be waiting for a long time. Suffocation works like it's supposed to.

From memory I scanned the Repulse, it's the first thing I do every time, but I've done so many tests on this scenario that maybe I got dizzy and didn't do it.
I'll try again when I have time.

@muerteFR
Copy link
Contributor Author

Notice that if the Kraylor patrol object (kpobj) is in the junkZone (also known as Boris' Junkyard), its orders are changed to orderFlyTowardsBlind. This is done to protect the players somewhat from random attacks by patrols against them. It's not foolproof, but it should work in many situations. I noticed that the player ship was getting attacked by Kraylor ships when I was testing so I added this code. In other words, it does not happen all the time. You just got "lucky."

The stations are placed at random. The patrol routes are determined at random. There is a one minute delay before the Kraylor patrols start spawning. Afterwards, this code is executed every 5 - 15 seconds.

This scenario has many very linear aspects to it: event A is followed by event B is followed by event C, etc. In order to give it some replayability, I made sure that there were some very dangerous random elements including patrols that might destroy the player ship. I have not added a mode where there is no danger. Some aspects of the scenario can be solved by the actions the players take. Other aspects are out of their control and can easily cause an untimely demise.

I don't intend to dilute the difficulty any further.

I suspected your answer, having been talking to you about it for quite some time (few years) now. :-)
I won't bother you anymore with the difficulty of this scenario.
I understand the script approach.
As you say, I was very unlucky because it happened to me very often. On average, my ship is destroyed in less than 2 minutes. It's far too little to have a chance of doing anything without knowing the scenario through and through.
As I said, I was never afraid of asphixiation (which I find a shame) because Scrag was destroyed long before.
The only experience I had was mine (this scenario being already too hard for an inexperienced crew of teenagers), therefore, I would really like experienced crews to tell/reassure me that they managed to escape of the Junk in easy mode without having made 10 attempts first, spoiling a good part of the scenario.
I'll try again without cheating with the GM and knowing the scenario through and through to see if I can do it.
I love this really exciting and different scenario, which is why I'm very frustrated that I can't come up with it or play it myself. Too bad for me.
The topic is closed.

In any case, I'm glad I was able to help you resolve several issues in this scenario. 👍

@muerteFR
Copy link
Contributor Author

This entry contains spoilers for the Escape scenario. Do not read if you wish to solve this scenario without any extraneous hints or answers.

Regarding item m questioning why there is no suffocation warning or timer: There is no suffocation danger in easy mode:

if difficulty >= 1 then
plotSuffocate = checkForSuffocationOnFighter
end
The numeric values of difficulty (which is labeled as Murphy in the initial config) are as follows: .5 = easy 1 = normal 2 = hard So, suffocation only applies to normal or hard difficulty.

Further, the suffocation countdown only starts after the Repulse type ship in the junkyard has been scanned. So, if you just sit there doing nothing waiting for the suffocation countdown timer to start, you'll be waiting for a long time. Suffocation works like it's supposed to.

I have just tested this point again with your updated lua file and the messages and timer still do not appear after 8 minutes in difficulty/normal and murphy/easy setting. However, I did scan the Repulse twice about 1 minute from the start of the game.
Nothing appears in the engineering or science consoles.
I don't know how long it takes for this message to appear.
Note: I was not attacked during these 8 minutes. There was a lot of traffic as usual but not near the junkyard. On the other hand, the game crashed (item a)(the 2 client windows but not the GM console) just after my ship was destroyed. about 9mn.

Image

@muerteFR
Copy link
Contributor Author

Tested 1 more time on normal difficulty and still no message after 10 minutes despite having double scanned the Repulse. (attacked at 5mn, 7mn and 9mn which I eliminated with the GM)

@muerteFR
Copy link
Contributor Author

muerteFR commented Jan 16, 2025

r. I also encountered 2 errors.

  • The 1st I did not note it (because I thought of reproducing it but without success) By questioning an independent station which offered trade exchange in its menu

goodsReport = goodsReport .. _("willBuyTrade-comms", "Goods or components station will buy: price in reputation\n") line 1798
But I had nothing to exchange. No button for trade.

  • A second error (line 1911 see picture) has appeared with an independent station which does not display the possibility of being able to trade in the menu ("Goods or components station will buy: price in reputation" not appear) but which still displays the button (Trade luxury for %s) (because I have a luxury product on board ) When I click on this button, nothing happens and I can return to this menu again with the same configuration. See 2nd photo)

Image

Image

@Xansta
Copy link
Contributor

Xansta commented Jan 16, 2025

It's all about terminology.

The first scenario configuration parameter:
Image
tells the scenario how many enemies or how powerful the enemies are. Yes, there's an easy, normal, and hard just like the Murphy setting, and yes, the hard setting makes it more difficult, but I don't consider this "difficulty." I would say this is just an aspect of difficulty specifically pertinent to the strength of the enemy ships spawned.

The second scenario configuration parameter:
Image
tells the scenario what value to assign the variable "difficulty" (easy = .5, normal = 1, hard = 2). Among other things, this determines when or if suffocation applies. If the difficulty (aka Murphy) is set to easy, it does not matter what you set the first, or Enemies, parameter, there will not be any suffocation.

So, the configurations allow you to set nuances of difficulty. One aspect, Enemies, governs the strength and number of the enemies spawned. The other aspect, Murphy (identified as the variable difficulty in the code), governs the following:

  • Whether or not you get the suffocation timer and the length of the suffocation timer (easy: no timer, normal: 5 minutes, hard: 3 minutes)
  • Whether or not you have to provide goods for an impulse engine fix or a jump engine fix (hard: yes, otherwise: no).
  • The likelihood of a station relay officer discussing gossip with you.
  • The likelihood of a station to have a particular weapon type available for restock.
  • The shield level of the Repulse at the time of transfer from Scrag (easy: fully charged, normal: 50%, hard: 20%).
  • How often the station the players escaped from sends out a ship to harass the players (easy: every 190 seconds, normal: every 180 seconds, hard: every 160 seconds)
  • How long before Boris sics another junkyard dog ship on the player after one is destroyed (easy: 110 seconds, normal: 100 seconds, hard: 80 seconds).
  • What kind of junkyard dog ship pursues the player (easy: Ktlitan Drone, normal: Ktlitan Fighter, hard: Fighter).
  • How many Kraylor ships attempt to intercept the players once they identify as Human Navy again in the Repulse.

@Xansta
Copy link
Contributor

Xansta commented Jan 17, 2025

Regarding item r, first bullet where you're looking at the goods a station will buy. You expected to see a button where you could sell your goods to the station for whatever they are paying for the good, yet you say you have nothing to exchange. The scenario will not check to see if you have a particular good before telling you that the station buys a particular good. The scenario needs to have some way to communicate to you what the station will buy before you have the thing you might sell.

Allow me to explain further. Let's say station A sells dilithium, buys optic and will trade for luxury. This means:

  • They have dilithium on the station to sell.
  • They either have no optic on the station or they are unwilling to sell or trade for it, otherwise it would be listed amongst the goods for sale. They want optic
  • They want luxury. They don't want it enough to buy it, but they would be willing to trade anything they have in stock for it. In this example, that means they are willing to trade their optic for luxury.

Player X has luxury, tritanium, and autodoc. The only thing that matches anything on the station is luxury. So, player X docks with station A, clicks Buy, Sell, Trade and is presented with a report on what the station will do and what the player can do.

The first part of the report identifies what the station has that they can sell. The station may or may not also be willing to trade for these items. This part of the report includes the name of the good, how many there are on the station for sale, and how much reputation it costs the player to buy one. In our example, this list would contain dilithium, it's quantity and it's cost in reputation.

local goodsReport = string.format(_("forSaleTrade-comms", "Station %s:\nGoods or components available for sale: quantity, cost in reputation\n"),comms_target:getCallSign())
for good, goodData in pairs(ctd.goods) do
	goodsReport = goodsReport .. string.format(_("forSaleTrade-comms", "     %s: %i, %i\n"),good,goodData["quantity"],goodData["cost"])
end

The second part of the report tells the player what the station wants to buy. Most if not all stations are not interested in buying anything from the player. So, usually, this second part of the report is empty. However, since our example station wants to buy optic, this part of the report would include the name of the good (optic) and the price the station will pay for one of them. Goods transactions occur one at a time, so there's no need for quantity here. The scenario could check here to see if the player has any optic and only show that the station will buy optic if there's optic on the player ship to sell to the station. However, I don't think there is anywhere else that this information is provided, so the scenario tells the player about the station's wish to buy optic regardless of the presence or absence of optic on the player ship so that the player knows they can get reputation by selling optic to the station in the future.

if ctd.buy ~= nil then
	goodsReport = goodsReport .. _("willBuyTrade-comms", "Goods or components station will buy: price in reputation\n")
	for good, price in pairs(ctd.buy) do
		goodsReport = goodsReport .. string.format(_("willBuyTrade-comms", "     %s: %i\n"),good,price)
	end
end

The third part of the report reminds the player of what they have on their ship. In our example, the list would include luxury, tritanium, and autodoc with a quantity beside each of them.

goodsReport = goodsReport .. string.format(_("onBoardTrade-comms", "Current cargo aboard %s:\n"),comms_source:getCallSign())
local cargoHoldEmpty = true
local player_good_count = 0
if comms_source.goods ~= nil then
	for good, goodQuantity in pairs(comms_source.goods) do
		player_good_count = player_good_count + 1
		goodsReport = goodsReport .. string.format(_("onBoardTrade-comms", "     %s: %i\n"),good,goodQuantity)
	end
end
if player_good_count < 1 then
	goodsReport = goodsReport .. _("onBoardTrade-comms", "     Empty\n")
end

There is nothing in this report that indicates that the station wants luxury and would be willing to trade for it. The only indication that the player gets about trade possibilities is through the buttons that are presented after this report.

I guess I need to know what "which offered trade exchange in its menu" means to you. "Trade exchange" does not mean buy or sell to me, it means exchange one good for another good: no money is involved (money in this context consists of reputation points). As described above, "trade" never appears in the report prior to the buttons. So, the statements "which offered trade exchange in its menu" and "no button for trade" are contradictory.

@Xansta
Copy link
Contributor

Xansta commented Jan 17, 2025

Regarding item r and the error from line 1911: I can't read the error message. When I try clicking the image, my web browser gives me an error "This private-user-images.githubusercontent.com page can’t be found" I think maybe the first picture where I can't read the error message goes with the second bullet and the second picture with the red x and the red dot goes with the first bullet item under r, but I can't be sure. Clarification would be nice.

@muerteFR
Copy link
Contributor Author

Regarding item r and the error from line 1911: I can't read the error message. When I try clicking the image, my web browser gives me an error "This private-user-images.githubusercontent.com page can’t be found" I think maybe the first picture where I can't read the error message goes with the second bullet and the second picture with the red x and the red dot goes with the first bullet item under r, but I can't be sure. Clarification would be nice.

The 2 images go with the 2nd problem.
As I said, I didn't think to take a screenshot for the error appearing for the 1st problem, they all concern the 2nd problem with line 1911 error.

An error appears with an independent station which does not display the possibility of being able to exchange in the menu ("The station good or components will buy: price in reputation" does not appear) (red cross).
However, a button (Exchange luxury for %s) (because I have a luxury product on board) is available. (red dot)
When I click on this button, nothing happens, a "?" appears" in the window and an error appears in the GM and I can return to this menu again with the same configuration.

Image

Image

Image

@Xansta
Copy link
Contributor

Xansta commented Jan 17, 2025

Continuation of item r:
I am unable to get the blank line you describe. I fixed the error on line 1911 and I found another error that I fixed while testing. Try out the latest version on my repository and let me know if anything changes for this test case for you.

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

No branches or pull requests

2 participants