Code Release

More
21 years 1 month ago #5109 by GrandpaTrout
Replied by GrandpaTrout on topic Code Release

Originally posted by Mehrunes

How is ship purchasing going to be handled? Are you planning to add inventories to stations for dynamic pricing and traffic?

Ship and weapons purchasing was going to be done using the Trade Ship NPC class. It uses the cargo trade screen, but the inventory is custom. This way the ship availiable for purchase can vary by nation or faction or underworld, or however you want to vary them.

No running economy for the first pass. Just fixed price lists for each system. Focusing on getting missions and the cluster up and running.

The traffic scripts need an overhaul for a few reasons:
1. After rebalance we have new ships for factions. And new numbers of ships. So the ship creation scripts need to change.
2. Stations are going to be POG created, so the standard pod spewers will not be running. Some way to dock and vanish/create cargo pods is needed. It could still be the spewer interface, but the C code to do it is gone.

Many of the scripted orders will vanish, but all the movement ones can stay. And Lpoint jumping etc. The code that handles queues at stations was in the traffic scripts, so that will need some replacing.

My basic plan was to reduplicate ShipCreation and the Traffic scripts. And then add a few new Scripted orders for real police patrols, station guards, and pirates.

Getting pods into and out of stations without just making them disapear using Sim.Destroy() is the only snag. I just don't know enough about the models to make them work correctly. Care to have a go?

-Gtrout

Please Log in or Create an account to join the conversation.

More
21 years 1 month ago #5135 by Mehrunes
Replied by Mehrunes on topic Code Release
Oh. I was thinking more alines of a shipyard screen at shipyard type stations (or other cobbled-together shipyards flagged a_shipyard) where the player can buy ships from a list generated based on faction tech levels and whatnot. Limited by the player's credits (obviously) and standing with said faction. The list would be drawn from a file listing all player-purchasable ships containing all pertinent information, including which factions the ship is restricted to (if any) like this...

[10]
url= ini:/sims/ships/player/devastator
info_url= html:/html/encyclopedia/ships/corvettes/Devastator_Heavy_Corvette
availability= 0.3
min_standing= 0.75
base_price= 8100000
full_name= "NSO-2002 Devastator Class Heavy Corvette"

[11]
url= ini:/sims/ships/player/wasp
info_url= html:/html/encyclopedia/ships/fighters/wasp_navy_fighter
availability= 0.8
min_standing= 0.6
base_price= 450000
full_name= "VS-2100A Wasp Class Navy Fighter"
restricted_faction[0]= Navy

Just thinking of recreating traffic scripts or the pod spewer gives me headaches. ^-^

Please Log in or Create an account to join the conversation.

More
21 years 1 month ago #5141 by GrandpaTrout
Replied by GrandpaTrout on topic Code Release

Originally posted by Mehrunes

Oh. I was thinking more alines of a shipyard screen at shipyard type stations (or other cobbled-together shipyards flagged a_shipyard) where the player can buy ships from a list generated based on faction tech levels and whatnot. Limited by the player's credits (obviously) and standing with said faction. The list would be drawn from a file listing all player-purchasable ships containing all pertinent information, including which factions the ship is restricted to (if any) like this...


Hey, that would be a cool screen. Glad to have it.

I am trying to aim the code as much fully dynamic as possible. What if your ship yard picked ships based on the faction of the owning station, and the type of station. You would actually call the ship creation scripts to provide the ships. (fighter, transport, tanker, cap ship). Those scripts already know what kinds of ships each faction uses.

Perhaps a few types of stations could sell ships. Shipyards do commercial stuff. Navy Depots do armed stuff. Maybe repair depots do used commercial. Mining HQ stations can let you pick up mining ships.

And the faction standing ideas are good. Could they be auto caculated based on class of ship?

Hmmm, pricing is still a little tricky to calculate. Just using class would be a good start. We can think about adjustments from there.

-Gtrout

Please Log in or Create an account to join the conversation.

More
21 years 1 month ago #5145 by Mehrunes
Replied by Mehrunes on topic Code Release
As rusty as I am I can't even figure out how to get a ship listbox to display correctly. :D

I suppose the required standing and prices could be calculated from anything, I just put in values to test with. Prices are modified by faction standing at the moment.

How will all of the new ships be stored?

Please Log in or Create an account to join the conversation.

More
21 years 1 month ago #5147 by Flamineo
Replied by Flamineo on topic Code Release

originally posted by Mehrunes
How will all these ships be stored?

Like this ! Sort of. When I've finished fixing it. And identifying and removing read-only properties. Muhahaha.

Sorry, that stuff's been giving me a headache more evenings than not of the past week. I think I'd better get some sleep.

Please Log in or Create an account to join the conversation.

More
21 years 1 month ago #5148 by GrandpaTrout
Replied by GrandpaTrout on topic Code Release

How will all of the new ships be stored?


Stored? Meaning how will you get ships to offer for sale?
Code:
enum eShipType { ST_FreightLight, ST_FreightHeavy, ST_FreightAll, ST_FreightSuperHeavy, ST_FreightCourier, ST_CombatFighter, ST_CombatLight, ST_CombatHeavy, ST_CombatCaptial, ST_CombatAll, ST_Medical, ST_Interface, ST_PassengerLight, ST_PassengerHeavy, ST_PassengerAll, ST_MiningLight, ST_MiningHeavy, ST_MiningAll, ST_TankerLight, ST_TankerHeavy, ST_TankerAll, ST_GeneralPurpose, ST_Flitter, ST_Recovery, ST_DemoShips, ST_Taxi }; // Functions /////////////////////////////////////////////////////////////////// prototype string iShipCreation.GetShip( IeAllegiance faction, eShipType ship_type );

I was going to create an Ini file that mapped from each ST_Type and faction into the actual ships. Then as Shane edits the file to add new ships, they show up auto-magically in game. So you could just use the current ship creation for now, until I get some bits of script working.

Or do you mean - How will the player fleet be stored? I have a strongly modified version of iFleet saving away a bunch of ship properties. Then I hand the ship to Flamineo, and he stores away all the damage and loadout stuff.



-Gtrout

Please Log in or Create an account to join the conversation.