Click here to read the previous dev blog (#8) - Commander Mode
Welcome to the ninth experimental plugin development blog, where I showcase features being developed for our very secret gamemode, CampaignWar (CW), .
In this blog, I cover the market system. Its main strength is that we have coded it from scratch, allowing us to add features and mechanics that off-the-shelf plugins lack. It combines elements of the /ah and contracts systems found on Nations.
Market
The Market lists every Market Order that is active. Orders are tied to the town they are created in. The implication of that depends on the order’s type, of which there are four: Sell, Buy, Auction and Cargo.
Buy and Sell Orders
Let’s begin with Buy and Sell orders. Sell orders are straightforward: they allow you to sell an item for a price, just like /ah listings on Nations.
A Buy order is the opposite of a Sell order: it allows you to buy items from others for a price. For example, if I needed 64 diamonds for $500, I could make a Buy order to attract people who could sell them to me.
People completing Buy orders can sell me the items directly from their craft:
Auction Orders
Isn't it rather curious how /ah stands for “auction house”, yet few plugins allow you to actually create auctions? Let's change that.
An Auction order is the same as a Sell order, except prospective buyers need to bid money on the item. The highest bidder wins the item when the auction ends. The seller can set a minimum bid, which all bids need to be above.
Market Storage
Your Market Storage holds items that you are due to collect. You have a separate Market Storage for each town.
Here’s what that means for completing each type of order:
- Sell and Auction: You can buy the item from the seller anywhere, but it’ll stay in the market storage of the seller’s town until you travel there and collect it.
- This allows you to buy items from anywhere and leave collecting them for later.
- Buy: You need to sell the item to the buyer while inside their town. The item will then be transferred to the buyer’s market storage in that town until they collect it.
If I enter a town with a craft, I can transfer the items held in the town’s Market Storage to my craft in one click:
Improved Search
The search function has been improved to be smoother and more user-friendly. This also extends to chest shop searches.
Tariffs
Ever wanted to start a trade war to protect domestic industrial lobbyists? No? Well, now you can anyway.
A tariff is a tax paid on buying items from foreign nations. It is paid by the buyer and goes to the nation bank. You can set tariffs on specific items from specific nations.
Here, my nation has set a 20% tariff on Acacia Boats from the nation of “Blue”. I therefore need to pay 20% more than I would normally. This extra amount is collected by my nation.
Player Deliveries
Deliveries are like cargo contracts from Nations, which pay you money for transporting items between towns. The main difference is that you can create your own! For example, if you need items moved to another town, you can create a delivery order to pay people to do this for you.
It is important to note that you can’t “steal” items from delivery contracts. This is because you deliver cosmetic representations of the items, not the items themselves. If someone fails to complete your delivery contract, the items are simply returned to your Market Storage in the originating town.
Server Deliveries
Server deliveries are an improved version of the server-generated cargo contracts on Nations. The key difference is that there are different types:
- Bulk: These delivery contracts require a Movecraft vehicle to complete.
- Normal: These delivery contracts have few enough items that you do not require a Movecraft vehicle to complete them.
Moreover, they can be Land or Maritime:
- Land: The items need to be delivered between two landlocked provinces. You might want to use a Train or Truck to complete these.
- Maritime: The items need to be delivered between two coastal provinces. You might want to use a naval vessel to complete these.
Ignore the number of items - it’s a WIP..
Conclusion
This is a showcase of the plugin’s core functionality. There are still parts under development or being theorycrafted - for example, having server-run “trade outposts” where orders would be placed and completed. Let me know if you have any suggestions or concerns in the replies!
Last edited: 1 day ago