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

[Request] Code support for having alternate restrictions on Outfits and Ships #120

Open
Zitchas opened this issue Nov 1, 2024 · 1 comment

Comments

@Zitchas
Copy link
Member

Zitchas commented Nov 1, 2024

Problem Description

Right now, if an outfit needs a license to purchase, it needs that license to purchase it everywhere. Likewise, if it costs X to buy it in one place, it will cost X to buy it everywhere else too.

The problem is, this isn't how the economy works, nor is it how restricted goods work. Depending on context, prices can vary a lot from region to region; and something that requires licenses or military approval to buy in one place may be available no-questions-asked-so-long-as-you-have-cash in another. Currently, the only way to do this is to create an entirely new outfit for the other place, which doubles up on a lot of stuff and is quite inefficient.

Doubling up on things also causes a variety of problems:

  • If the item is updated, now it needs to be updated in several places.
  • If a mission tests for the presence of the thing, now it needs to check for several things.
  • Can't be used for trade, since the cheaper one will always be cheaper no matter where it is, and the more expensive one will always be more expensive no matter where it is.

Related Issue Links

endless-sky#6404 (this one handles the price/cost aspect of the above request, at least for outfits)
endless-sky#6474
endless-sky#6314 (tangental, related to legality of things)
endless-sky#3579 (An issue by Tadrix requesting variable prices many years ago)

Desired Solution

Have a way to specify that a specific outfit, ship, outfitter, or shipyard has modifiers or replacements for the item's normal requirements.

Two routes come to mind: One is adding data to the sales file

shipyard "Lionheart Advanced"
	modifier
		clear license
		cost 1.25
		license "Warship License"
	"Aerie"
	"Corvette"
	"Bactrian"
		cost 0.5

This would remove all license requires, and then give them all the requirement to have the "Warship License" and multiply their price by 1.25. Further down, the Bactrian has "cost 0.5" which would then modify the cost by half.

Alternative Approaches

The second route would be adding this to the ship file, where a ship could be given multiple prices and/or license requirements, with conditions attached. Anywhere the conditions apply, the alternate values are used.


Personally, I prefer the sales route, since the whole purpose of the sales file is to control where and how things are sold. Having some of that offloaded into the ships file forces someone adding a ship to methodically list every circumstance that it might be for sale under, and what things to change (if any). Also, the sales file is already typically modified by events, whereas the ship files generally aren't. So better integration with current systems.

Additional Context

This system would be extremely useful in both building the lore of the game, setting up the environment the player operates in, and allowing greater degrees of change between areas. Right off the bat, two major improvements would be in demonstrating changes between the Republic and Free Worlds; as well as between the Republic and Pirates.

@xobes
Copy link

xobes commented Nov 7, 2024

shipyard "Lionheart Advanced"
	modifier
		clear license
		cost 1.25
		license "Warship License"
	"Aerie"
	"Corvette"
	"Bactrian"
		cost 0.5

This would remove all license requires, and then give them all the requirement to have the "Warship License" and multiply their price by 1.25. Further down, the Bactrian has "cost 0.5" which would then modify the cost by half.

The Bactrian example is missing the "modifier" moniker.

base + multiplier * (jumps + 1) * (10 * (# of passengers) + (tons of cargo))

I think that "the economy" is probably more closely linked to the physical location (e.g. a given shipyard is going to have modifications of certain types) rather than the ship. So, I'm also on the "sales route" as well.

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