politics


Added some code for Proposals and Votes and for the Trade system. Also loosely added the concept of a ’service’ for the trade window. Haven’t thought up all the specifics regarding Context generation and all, but basically a service would work similar to WoW’s enchanting in trades. Only the target is typically the other player, possibly an item of theirs, and possibly an auxillary point of information. Services could be anything from buff enchants to armor repairs to transportation to item crafting. Some services are ‘hard binding’… basically you place them up there with a target/context, and if both parties hit accept the service is automatically triggered, assuring that the servicing party makes good on their deal. Soft binding services are ones where the player has to do something manually, typically over time. Soft bindings create ‘contracts’ (viewable on a contracts tab of inventory, have no mass), which detail the contract. Possible types of contract:

  • Employ - Effect transfers money per time unit from servicee to servicer, useful for things like guide me to here, taxi service, henchmen.
  • Split - Half now, half on completion. Useful for fetching quests, mob deals, etc.
  • Contract - Pay full on completion. Typically requires trust or power inbalance between parties

These would be tabs/radio buttons for trades in addition to normal ‘trade’. They would still likely include a servicee trade for each ‘payment’ (Employ gives this much per X, gold, arrows, whatever; Split would have two panes for now and later). Both parties would gain a contract on acceptance of the contract.

On opening of a concurrent contract, there will be possibly option buttons: “Conclude” and “Break”. Conclude would be an option for the servicee to say that they rendered the service and to finish payment or that they’re done paying the person via Employ. Break would be an option for both parties, typically when unhappy with the contract. Payment is not rendered on a break. The initiator of the break however gets an +1 to their ‘broken contracts’ which is visible to all as a percentage of honoured/broken and as totals.

Through a little careful flexible coding, I think services, proposals, and deeds (debts, land ownership, etc) can make a healthy political/economic game.

Just some quick thoughts on paper.


class Proposal
{
   protected $id;
   protected $name;
   protected $description;
   protected $creator; // character
   protected $onsuccess; // script
   protected $onfail; // script
   protected $oncancel; // script
   protected $faction; // faction
   protected $yesvotes;
   protected $novotes;
   protected $votepool; // number or null
   protected $type; // base ruleset for proposal, int
   protected $flags; // proposal options for rules
   protected $parent; // counterproposal to
   protected $created; // date
   protected $expires; // date
   protected $status;
}

class ProposalVote
{
   protected $id;
   protected $proposal;
   protected $created;
   protected $creator;
   protected $value;
   protected $comment;
}

Flow chart pseudo for a promotion proposal:

  • Click “promote” (script to promote with parameters prepared)
  • Check permissions in faction to do this
  • $proposal = $faction->proposals[’promote’][rank] contains nothing or a default proposal for creating that proposal at that rank
  • $proposal->type might be ‘instantaneous’ in which case, script is immediately ran
  • Otherwise, $proposal->Create() after filling in unique info creates the proposal
  • Based on type, events (expire, max votes filled, supermajority reached, etc) can cause a proposal to close with a ’success’, ‘fail’ or ‘cancel’ result.
  • If a script is attached to the appropriate handle for the proposal result, it is executed.
  • Proposal status is set to ‘closed’