Advertisement
Guest User

Untitled

a guest
Mar 28th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. G.AddData({
  2. name:'Bee mod',
  3. author:'Shadowclaimer',
  4. desc:'A basic mod that adds Honeycomb and Bees.',
  5. engineVersion:1,
  6. manifest:'modManifest.js',
  7. requires:['Default dataset*'],
  8. //sheets:{'spicySheet':'img/spicyModIconSheet.png'},//custom stylesheet (note : broken in IE and Edge for the time being)
  9. func:function()
  10. {
  11.     //Test mod to add honeycomb.bees/honey/mead
  12.    
  13.     //First we add the new resources (honeycomb, bees, and honey)
  14.     new G.Res({
  15.         name:'honeycomb',
  16.         desc:'[honeycomb]s are extremely sweet treats, but well guarded by wild [bees].',
  17.         icon:[28,6]//icon:[0,0,'spicySheet'],
  18.         turnToByContext:{'eat':{'health':0.01,'happiness':0.03},'decay':{'spoiled food':0.5}},//this basically translates to : "when eaten, generate some health and happiness; when rotting, turn into either nothing or some spoiled food"
  19.         partOf:'food',
  20.         category:'food',
  21.     });
  22.     new G.Res({
  23.         name:'bees',
  24.         desc:'[bees] are stinging insects, bee-ware!',
  25.         icon:[28,6]//icon:[0,1,'spicySheet'],
  26.         partOf:'misc materials',
  27.         category:'misc',
  28.     });
  29.     new G.Res({
  30.         name:'honey',
  31.         desc:'Little bees will produce the sweetest honey when well taken care of.',
  32.         icon:[28,6]//icon:[1,0,'spicySheet'],
  33.         turnToByContext:{'eat':{'health':0.03,'happiness':0.1},'decay':{'honey':0.95,'spoiled food':0.05}},//that last part makes hot sauce effectively have a 95% chance of simply not rotting (in effect, it decays into itself)
  34.         partOf:'food',
  35.         category:'food',
  36.     });
  37.    
  38.     //Then we augment the base data to incorporate our new resources :
  39.         //adding honeycomb and bees as something that can be gathered from grass
  40.     G.getDict('grass').res['gather']['honeycomb']=5;
  41.         //adding a new mode to artisans so they can make honeycomb from wild bees
  42.     G.getDict('artisan').modes['honeycomb']={name:'Make honeycomb',desc:'Use wild bees to gather honeycomb.',req:{'beekeeping':true},use:{'knapped tools':1}};
  43.         //adding a new effect to artisans that handles the actual honeycomb creation and is only active when 'make honeycomb' is active.
  44.     //G.getDict('artisan').effects.push({type:'convert',from:{'hot pepper':3,'bees':3},into:{'hot sauce':1},every:3,mode:'hot sauce'});
  45.     G.getDict('artisan').effects.push({type:'convert',from:{'bees':1},into:{'honeycomb':3},every:3,mode:'honeycomb'});
  46.     //beekeeping makes gatherers find bees
  47.     G.getDict('gatherer').effects.push{{type:'gather',context:'gather',what:{'bees':1},amount:1,max:1,req:{'beekeeping':true}},};
  48.     //Then we add a new technology which is required by the artisans to gain access to the "hot sauce" mode :
  49.     new G.Tech({
  50.         name:'beekeeping',
  51.         desc:'@[gatherer]s can find bees@[artisan]s can now produce [honeycomb] from [bees]//With a lot of work, wild bees can be tamed to generate honeycomb for our use.',
  52.         icon:[28,6]//icon:[0,1,'spicySheet'],
  53.         cost:{'insight':10},
  54.         req:{'cooking':true},
  55.     });
  56.    
  57.     //Finally, we add a trait that amplifies the benefits of consuming hot sauce; it will take on average 20 years to appear once the conditions (knowing the "Hot sauce preparing" tech) is fulfilled.
  58.     //new G.Trait({
  59.     //  name:'hot sauce madness',
  60.     //  desc:'@your people appreciate [hot sauce] twice as much and will be twice as happy from consuming it.',
  61.     //  icon:[1,1,'spicySheet'],
  62.     //  chance:20,
  63.     //  req:{'hot sauce preparing':true},
  64.     //  effects:[
  65.     //      {type:'function',func:function(){G.getDict('hot sauce').turnToByContext['eat']['happiness']=0.2;}},//this is a custom function executed when we gain the trait
  66.     //  ],
  67.     //});
  68.    
  69.     //There are many other ways of adding and changing content; refer to /data.js, the default dataset, if you want to see how everything is done in the base game. Good luck!
  70. }
  71. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement