jpcsupplies / Economy_mod

Basic Economy System for Space Engineers
13 stars 12 forks source link

[suggestion] Engine upgrades (shipyard?..) #157

Open jpcsupplies opened 7 years ago

jpcsupplies commented 7 years ago

Adjustable speed limits.

NPC markets (or plugin in general) have facilities to do one or more of the following ideas:

  1. Install engine "upgrades" (for a cost) which allow the player to increase max speed and/or turning rate
  2. Have an arbitrary maximum speed set by either size of ship and/or number of thrusters
  3. Set speed limits near certain facilities.
  4. As a proof of concept plugin - have an adjustable speed mod that economy can talk with/can talk with economy
  5. if the attribute cannot be set as a per-ship/player attribute it could work as a sphere of influence around given stations

Some of these could work as a separate stand alone plugin or as a plugin talking to economy, or be built into economy itself.

Option 2 could for example make larger ships have a slower speed limit even if they have more engines than say a compact ship with lots of engines. This could be used as a crude lag control; and prompt players to attempts more efficient sized designs - as compact ships with extra engines/power would move faster than heavy capital ships. This would also have the effect of making larger ships easier to land on planets.. and small ships less survivable.. (oh look a shooting star...)

Option 1 could for example allow assigning a class to small ships fighter (fast / agile) or transport (fast not very agile) or tow tug (not very fast but more powerful agility) or simply as a "stage 1/2/3" upgrade to the engines/gyros in each category on that ship large or small grid.

Option 3 could for example work like a marina, where there is lots of small ships or structures ships are limited to a lower top speed to reduce chances of accidental collisions. (speed limit sphere)

Option 5 could for example work in reverse of option 3 - allow ships to travel faster in certain territories; or in the map as a whole - as some sort of economic aspect.. eg a speed tax or something unusual.

Option 4 could for example create a global file which either the speed mod checks periodically or which economy checks periodically (eg TextReader reader = MyAPIGateway.Utilities.ReadFileInGlobalStorage("speedscale.txt")) that tells the speed mod what speed to set for a player or (eg TextWriter writer = MyAPIGateway.Utilities.WriteFileInGlobalStorage("transaction.txt")) that tells economy to deduct X dollars from Y player because they bought a speed upgrade.

Technical notes on ship attributes of interest here:

Speed: (as a representation of max metres a second) MyDefinitionManager.Static.EnvironmentDefinition.LargeShipMaxSpeed = ####f; MyDefinitionManager.Static.EnvironmentDefinition.SmallShipMaxSpeed = ####f;

Agility: (as a representation of max degrees a second i think - this allows things to rotate faster, (rotors) or change direction faster (gyros ability to turn the ship)) MyDefinitionManager.Static.EnvironmentDefinition.SmallShipMaxAngularSpeed =###f MyDefinitionManager.Static.EnvironmentDefinition.LargeShipMaxAngularSpeed =###f

Note: I used to mod the above angular settings in my speed mod to allow rotors to not explode up to about 600m/s (not sure how effective now with server side prediction and other crazy stuff but used to work well)

These might also have some use too - eg upgraded sensors, less fog or red fox when taking damage, or more fog at high speed (muahahaha) etc: EnableFog bool FogNear int FogFar int FogMultiplier dec FogBacklightMultiplier int FogColor x="1" y="1" z="1"

jpcsupplies commented 7 years ago

Discussions with screaming angel, leads me to believe although an interesting idea, the MOD api is simply not able to support this, as speed changes are only set on map load globally and cannot be tweaking on a grid basis. Might be worth raising the idea with Keen however as a grid attribute feature.