The last two days I've been knee-deep in scri...
February 12, 2006 by Adam in NWN2
The last two days I've been knee-deep in scripts, doing some fairly wacky things. As of this morning, I think the hard parts are over and all my crazy experiments actually ended up working.
You can now buy and sell cargo just like anything else from a store. The hard part was making it so that the prices of different goods varied from store to store (since there's no SetPrice function). I ended up creating template items on the dockmaster that was copied over to fill the store with correctly priced items in the proper quantity.
The second tricky part was creating a ship's hold where players can put their cargo, as well as other miscellaneous goodies they might pick up on their adventure. I ended up creating a store for each ship they own, and carefully adjusting the markup so everything costs a single gold piece (which is refunded after every transaction). The only gotcha is that you can't currently store zero-cost items, though there isn't much that costs nothing in the game.
I have tons of things to do yet. I'd like to auto-unload and auto-load cargo, have surpluses and shortages that disrupt the normal pricing structure, simple crew management and experience, ship upgrades, repairs, and so on. I need to put in limits, so you can't stuff thousands of tons of cargo into a tiny ship. I'm also emphasizing multiplayer and thinking about persistent world support. I think I can also spawn in meeting places where players can gather on their ship to make plans in private.
Then there's the actual ship-to-ship combat, which is bound to be quite tricky. I'm trying hard to emphasize fun over realism. Keeping track of weapon placement and reload times , and incorporating that into AI routines, would probably make my head explode. I'm slowly narrowing things down to a simpler system that while not necessarily realistic, would hopefully be fun.
So, there's lots of things going on. I'm pretty happy about progress, though there's a long way to go yet.
|