Advertisement
PastebinHTMLboy

game mod

Jul 16th, 2019
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. G.AddData({
  2. name:'Extra Bits',
  3. author:'ETB',
  4. desc:'Miscellaneous extra\'s, such as flavor Text.',
  5. engineVersion:1,
  6. requires:['Default dataset*'],
  7. sheets:{'extraSheet':'img/sprites.png'},//custom stylesheet (note : broken in IE and Edge for the time being)
  8. func:function()
  9. {  
  10.     new G.Res({
  11.         name:'drunk',
  12.         desc:'[adult,People] can get [drunk,Drunk] when when they consume too much [drink,Alcohol]. They do not [worker,work], but they don\'t [corpse,Die] either.//Mostly.//Can be cured by healers',
  13.         partOf:'population',
  14.         icon:[0,0], // TODO: drunk person sprite
  15.     });
  16.    
  17.    
  18.     new G.Res({
  19.         name:'drink',
  20.         desc:'[drink] is required to keep your [population,people] hydrated, at the rate of half a unit per person every 3 ticks (although babies and children drink less).//Without water, people will resort to drinking [muddy water], which is unhealthy; if that runs out too, your people will simply die off.//Most terrains have some fresh water up for gathering - from ponds, streams and rain; drier locations will have to rely on well digging.//Water turns into [muddy water] over time, if your water storage is insufficient.',
  21.         icon:[0,0,'drinkSheet'],
  22.         turnToByContext:{
  23.             'drinking':{'health':0.01,'happiness':0.3},
  24.             'decay':{'drink':0.95,'spoiled food':0.05},
  25.             },
  26.         partOf:'food',
  27.         category:'food',
  28.     });
  29.     new G.Res({
  30.         name:'honey',
  31.         desc:'A sweet, sticky substance that comes from some [bugs,insects].',
  32.         icon:[0,0], // TODO: honey sprite
  33.         turnToByContext:{
  34.             'drinking':{'health':0.03,'happiness':0.03},
  35.             'decay':{'drink':0.95,'spoiled food':0.05},
  36.             },
  37.         partOf:'food',
  38.         category:'food',
  39.     });
  40.     new G.Res({
  41.         name:'vegetable',
  42.         desc:'.',
  43.         icon:[0,0], // TODO: vegetable sprite
  44.         turnToByContext:{
  45.             'drinking':{'health':0.03,'happiness':0.01},
  46.             'decay':{'drink':0.95,'spoiled food':0.05},
  47.             },
  48.         partOf:'food',
  49.         category:'food',
  50.     });
  51.     new G.Res({
  52.         name:'grain',
  53.         desc:'.',
  54.         icon:[0,0], // TODO: grain sprite
  55.         turnToByContext:{
  56.             'drinking':{'health':0.01,'happiness':0.01},
  57.             'decay':{'drink':0.95,'spoiled food':0.05},
  58.             },
  59.         partOf:'food',
  60.         category:'food',
  61.     });
  62.     new G.Res({
  63.         name:'seed',
  64.         desc:'.',
  65.         icon:[0,0], // TODO: seed sprite
  66.         turnToByContext:{
  67.             'drinking':{'health':0.01,'happiness':0.01},
  68.             'decay':{'drink':0.95,'spoiled food':0.05},
  69.             },
  70.         partOf:'food',
  71.         category:'food',
  72.     });
  73.     new G.Goods({
  74.         name:'hive',
  75.         desc:'[hive,Insect Hives] can be foraged for [honey] and [bugs,insects]s.',
  76.         icon:[0,0], // TODO: hive sprite
  77.         res:{
  78.             'gather':{'honey':3,'bugs':0.5},
  79.         },
  80.         affectedBy:['scarce forageables','deforestation'],
  81.         mult:10,
  82.     });
  83.     /*
  84.     //Then we augment the base data to incorporate our new resources :
  85.         //adding honey as something that can be gathered from berry bushs(rarely) and most trees.
  86.     G.getDict('berry bush').res['gather']['hive']=0.1;
  87.     G.getDict('oak').res['gather']['hive']=1;
  88.     G.getDict('birch').res['gather']['hive']=0.5;
  89.     G.getDict('acacia').res['gather']['hive']=0.5;
  90.     G.getDict('fir tree').res['gather']['hive']=0.5;
  91.     G.getDict('dead tree').res['gather']['hive']=0.3;
  92.     */
  93.    
  94.         //adding ability for hives to be found in select lands
  95.         //since 'goods' is a array with dicts in it, we use the push function
  96.         /*
  97.     G.dict['jungle']
  98.     G.dict['forest']
  99.     G.dict['boreal forest']
  100.     G.dict['shrubland']
  101.     G.dict['prairie']
  102.     G.dict['savanna']
  103.     G.dict['tundra']
  104.         */
  105.        
  106.     G.getDict('jungle').goods.push({type:'hive',amount:3});
  107.     G.getDict('forest').goods.push({type:'hive',amount:3});
  108.     G.getDict('boreal forest').goods.push({type:'hive',amount:1.5});
  109.     G.getDict('shrubland').goods.push({type:'hive',chance:0.4,min:0.3,max:0.6});
  110.     G.getDict('prairie').goods.push({type:'hive',chance:0.2,min:0.1,max:0.3});
  111.     G.getDict('savanna').goods.push({type:'hive',chance:0.3,min:0.1,max:0.3});
  112.     G.getDict('tundra').goods.push({type:'hive',chance:0.08,min:0.1,max:0.3});
  113.        
  114.         //adding new modes to artisans so they can make drink from fruit, herb, or honey
  115.         //modes are just dicts within dicts so this works.
  116.     G.getDict('artisan').modes['beer']={name:'Make alcohol from herb',desc:'Turn 5 [herb]s & 1 [water] into 1 [drink].',req:{'fermentation':true,},use:{'stone tools':1}};
  117.     G.getDict('artisan').modes['wine']={name:'Make alcohol from fruit',desc:'Turn 5 [fruit]s & 1 [water] into 1 [drink].',req:{'fermentation':true,},use:{'stone tools':1}};
  118.     G.getDict('artisan').modes['mead']={name:'Make alcohol from honey',desc:'Turn 5 [honey]s & 1 [water] into 1 [drink].',req:{'fermentation':true,},use:{'stone tools':1}};
  119.         //adding a new effect to artisans that handles the actual hot sauce preparing and is only active when the unit has the mode "hot sauce"
  120.         //since 'effects' and 'effectsOff' are arrays with dicts in it, we use the push function
  121.     G.getDict('artisan').effects.push({type:'convert',from:{'fruit':5,},into:{'drink':1},every:3,mode:'wine'});
  122.     G.getDict('artisan').effects.push({type:'convert',from:{'herb':5,},into:{'drink':1},every:3,mode:'beer'});
  123.     G.getDict('artisan').effects.push({type:'convert',from:{'honey':5,},into:{'drink':1},every:3,mode:'mead'});
  124.         //TODO: add tech to make brewing possible for artisans
  125.    
  126.     /*=====================================================================================
  127.     PROPS
  128.     =======================================================================================*/
  129.    
  130.     var extraLines=[//Add new day lines here comments
  131.         'Waves calmly crash on forgotten shores.',
  132.         'The day is scorching.',
  133.         'Moisture sticks to the skin.',
  134.         'Unknown creatures stir in the sea.',
  135.         'Nothing of note...',
  136.         'A freak snowstorm looms ominously.',
  137.         'Odd insects break the silence of the night.',
  138.         'A sunshower proves refreshing.',
  139.         'Waves push an unknown object onto the shore.',
  140.     ];
  141.    
  142.     /*=====================================================================================
  143.     FUNCTIONS
  144.     =======================================================================================*/
  145.    
  146.     var mergedLines = G.props['new day lines'].concat(extraLines);
  147.     G.props['new day lines'] = mergedLines;
  148.     shuffle(G.props['new day lines']);
  149.    
  150.    
  151.     /*=====================================================================================
  152.     POLICIES
  153.     =======================================================================================*/
  154.     new G.Policy({
  155.         name:'eat herbs',
  156.         desc:'Your people will eat or not eat [herb]s.<br>Your people <i>could start to starve</i>.',
  157.         icon:[6,12,4,6],
  158.         cost:{'influence':1},
  159.         startMode:'on',
  160.         req:{'rules of food':true},
  161.         effects:[
  162.             {type:'make part of',what:['herb'],parent:'food'},
  163.         ],
  164.         effectsOff:[
  165.             {type:'make part of',what:['herb'],parent:''},
  166.         ],
  167.         category:'food',
  168.     });
  169.    
  170.     /*=====================================================================================
  171.     TECH & TRAIT
  172.     =======================================================================================*/
  173.  
  174.     new G.Tech({
  175.         name:'fermentation',
  176.         desc:'@[artisan]s can now create alcoholic [drink]s.',
  177.         icon:[0,0],
  178.         cost:{'insight':10},
  179.         req:{'plant lore':true},
  180.         effects:[
  181.         ],
  182.         chance:3,
  183.     });
  184.  
  185.         new G.Tech({
  186.         name:'animal lore',
  187.         desc:'@[hunters]s & [fishers]s catch more game, leading to more [meat] and [seafood]<>The knowledge of how animals live and behave means more effective hunting.',
  188.         icon:[0,0],
  189.         cost:{'insight':5},
  190.         req:{'oral tradition':true},
  191.         effects:[
  192.         ],
  193.     });
  194.  
  195. }
  196. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement