/* + Another fine product of Dwarven Development. + Foodchck: non-pipelines starvation checker. It should work for all + version of KSU empire. One thing to note, MAXPEOPLE has been made + a constant so if you are playing a game with a wierd limit on people + in a sector you can change it easily. + Usage: /pipe dump SECTS >> FILE dump data a + /cms foodchck + Requirements: MAKERVERS EXEC or you can hand edit the GLOBALVs */ MAXPEOPLE=999 'GLOBALV SELECT EMPIRE STACK GAME ETU CBRATE UWBRATE FRATE BFRATE' pull GAME;pull ETU;pull CBRATE;pull UWBRATE;pull FRATE;pull BFRATE comma=',' 'execio * diskr dump data a (FINIS' parse pull line;parse pull line;parse pull line say ' 'right(x,3)','left(y,3) right('civ',4) right('uw',4), right('mil',4) right('cvb',4) right('uwb',4) right('food',5), right('need',5) do queued() parse pull x y des . . . . . . . . . . . . civ mil uw food . if y='sectors' then leave civbabies=civ*CBRATE*ETU/1000 if (civ+civbabies>MAXPEOPLE) then civbabies=MAXPEOPLE-civ uwbabies=uw*UWBRATE*ETU/1000 if (uw+uwbabies>MAXPEOPLE) then uwbabies=MAXPEOPLE-uw adult_food=(civ+mil+uw)/1000*FRATE*ETU babyfood=civbabies*BFRATE/1000 slavebabyfood=uwbabies*BFRATE/1000 need=adult_food+babyfood+slavebabyfood if (need-food>1) then do say '1de1'x||right(x,3)','left(y,3) right(civ,4) right(uw,4) right(mil,4) format(civbabies,4,0) format(uwbabies,4,0), format(food,5,0) format(need,3,2) '1de8'x format(need-food,3,2) '1de1'x end end do queued() say line end exit Error: do queued() parse pull junk end return