The Quest To Spew

More
18 years 7 months ago #13789 by mdvalley
Replied by mdvalley on topic The Quest To Spew
img30.imageshack.us/my.php?image=4pods4pn.jpg

Four pods hot out the oven.

img406.imageshack.us/my.php?image=6pods5wd.jpg

Six pods, now. Just pick up with the wingman commands.

img406.imageshack.us/my.php?image=80pods1rv.jpg

You'd be surprised how many pods you can buy if you don't get a tug or wingman.

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

More
18 years 7 months ago #13790 by Joco
Replied by Joco on topic The Quest To Spew
Good to see the science of pod spewing and consuming moving forward again after my inital rough efforts. [8D]

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

More
18 years 7 months ago #13791 by mdvalley
Replied by mdvalley on topic The Quest To Spew
In light of the whole selling bug, I have embarked on a total rewrite of my spew code into a new package (tSpewerOps). I have already plotted out how it will work in Notepad and I’m halfway through writing it all out. Basically, it will use five ship and station attributes to keep track of what it is doing. Here’s what the player needs to do:

A ship with a DT_CargoFreightOnly port (the one that lets it dock to the spewer) must be docked to the station. It must be of the “Player� faction.

You can only offer pods for sale that are attached to this ship.

You cannot buy more pods than there are ports free on the ship. You CAN buy pods for used slots, provided that a sell order is in progress on the pods on that port. You can even sell 10, buy 5, sell 10, and buy 15 in quick succession without breaking the code.

The locking dock is initiated when the sell button is pressed, or the buy button if it is a valid buy. It is released when all bought pods are attached and all sold pods are detached. You do not need to wait for sold pods to dock to the spewer.

The variables:

Ship bool property md_epic_shipinit: The initialized flag. This, with the other four, are created when the buy or sell button is pressed, and destroyed when the ship undocks. The initialization functions checks for this to see if it is already initialized. Its value is meaningless.

Ship int property md_epic_freeports: The number of cargo ports available on the ship. A port is defined as available if it has no pod docked to it and there is no pod being spewn with it as the destination.

Ship int property md_epic_futurefree: The number of cargo ports that will be available when all current transactions are complete. Selling raises this number, buying lowers it. You cannot buy if it would make this number below 0.

Station int property md_epic_podstogo: The number of pods remaining to be transferred. A bought pod counts until it is docked to the ship. A sold pod counts until it undocks from the ship. When it reaches 0, the dock lock is released.

Station int property md_epic_spewerslotsfree: The number of spewer slots not in use. A spot is in use if a bought pod is being spewn, until it undocks, or if a sold pod is en-route, until the sim is destroyed.

Known Issues:

Using the wingman commands to pick up a non-spewn pod can cause a spewn pod not to dock to the ship. Disabling those commands while the spewer is active can be written in.

An undock-redock will make the code think that all spewer slots are free, even if there are sold pods docking to them. I’m tossing around ideas in my head on how to fix that. Probably by making a different trigger to killing md_epic_spewerslotsfree.

I didn’t write this with megafreighters in mind; I don’t know what would happen if you tried one.

Not really an issue, but undocking the ship uninitializes everything; so don’t play with the lock.

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

More
18 years 7 months ago #13792 by Oren
Replied by Oren on topic The Quest To Spew
wait i need to know something not very important:). when i buy cargo pods they appear out of nowhere near me,i mean that i dont see them coming out of the station, when i sell cargo pods to stations they just vanish from the snrv. so is it the way it should be? i took a look of the pictures here and i see the pods do come out of the station.

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

More
18 years 7 months ago #13794 by GrandpaTrout
Replied by GrandpaTrout on topic The Quest To Spew
Hi Oren, Epic does not use the cargo pod spewer. The pods appear and vanish instantly. This was easier to write, works with the standard traffic scripts and supports stations that do not have a pod spewer. But, it is not as fun as real pods. Mdvally has written the first MOD for Epic! And he now makes the cargo pods appear from the station as they should. We will add this feature to the next release.

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

More
18 years 7 months ago #13795 by mdvalley
Replied by mdvalley on topic The Quest To Spew
The files as I sent them to GrandpaTrout will have pods emerge from the spewer and sit there, and sold pods travel to the spewer. But, as I wrote before, the sell code has a bug where pods sometimes dock to the universal ports instead of the spewer. You still get rid of the pods and you still get your money, so it isn’t game-breaking. But it can be a bit hard to save when there's no port to dock at :)

The only way I see to stop that requires the player to dock the ship to the spewer to use it, and a whole mess of code, which I am currently writing (and have yet to test). I got through the hardest part, which is anticipating every possible series of buttons the player may use and still get everything the way it should.

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