General Design Documentation
Program Flow
System Start Up
Read config.yml
tier1QuotaTimer=1 // In Days, effectively a multiplier against 86400 seconds
tier2QuotaTimer=2
tier3QuotaTimer=7
tier1QuotaCount=5
tier2QuotaCount=2
tier3QuotaCount=1
tier1QuotaReward=1
tier2QuotaReward=4
tier3QuotaReward=8
tier1QuotaBonus=200 // In currency
tier2QuotaBonus=400
tier3QuotaBonus=1600
tier1QuotaPenalty=3 //Chunks that are vulnerable to being purchased
tier1QuotaPenalty=2
tier3QuotaPenalty=1
nonQuotaModifer=.5
basePurchaseCost=30
conquestModifier=1.5 // How much to purchase someone elses at-risk chunks
forceSpend=true //The King randomly appends to a player's existing holdings
// No one owns the water, it's God's Water man.. Littering and... Littering and...
allowOceanBiome=false // Can players or the king claim OceanBiome chunks?
allowLakeBiome=true // Players can claim Lake biome chunks
htmlDir=/var/www/minecraft/ttkrank.html
Read values.yml
select X number of quota items for each tier as defined in the config.yml
hook into inventory checks some where to check tribute chests for contents. Use Chest Shop as a reference. Sign should have PlayerName then Tribute on sign.
This has to catch Buildcraft\RedPower pipe events also.
Dupe Chunkloader code from Additional Pipes to get the Tribute Chest to act like a chunk loader block.
if contents is found in values.yml then
if quota item pay user and delete item for inventory, award quota reward
if this is the first quota to be fullfilled award quota bonus
else pay user (Value* nonQuotaModifer) the listed value and delete item.
end if
Extend the Residence Mod with autoclaim ability as in Factions and a claim count based on the QuotaReward.
Extend the Residence Mod with ability to expand residence via RadiusClaim and SquareClaim
ensure there is a delay in the loop to prevent dropping the client
align Residence mod to Chunk aligned, whole chunk.
Write all transactions to kingBillboard (sqllite or mysql) tracking user transactions
Parsse kingBoard to produce a Daily, Weekly, Monthly, and All Time ranking. Model after CS:HLSX output to html
We can either extend Factions Mod but they lack per-player perms needed to get BuildCraft and such working properly or Extend Residence mod.
Looks like extending Residence to gain appending\expanding a residence is more ideal.
A player can go negative on their Holdings. Residence chunks owned = Holding. CurrentHoldings= unspent chunk claims. If current holding is negative (by not fullfilling the quota)
then a rival player can through the normal purchase mechanic buy up held chunks until the at-risk owner's CurrentHoldings=0.
Scenario
Allan has 60 chunks and currentHoldings=6. Allan buys 6 more chunks for a total of 66. Allan misses a tier1 quota and is now at currentHoldings=-3. Bob is next to him and with autoclaim
tries to claim some of Allan's land. Bob can claim 3 of allan's 66 chunks so long as they are adjacent to Bob's current holdings. As Bob purchases those 3 chunks Allan is credited 3 chunks to his CurrentHoldings
bringing him to 0 again.
Comments