# Setting up PI

**URL:** <https://forums.eveonline.com/t/setting-up-pi/276112>\
**Category:** Missions\
**Created:** [October 26, 2020, 4:03pm UTC](https://forums.eveonline.com/t/setting-up-pi/276112 "2020-10-26T16:03:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Maxdamage](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/maxdamage/32/402281_2.png) [@Maxdamage](https://forums.eveonline.com/u/Maxdamage)\
**Post date:** [October 26, 2020, 4:03pm UTC](https://forums.eveonline.com/t/setting-up-pi/276112/1 "2020-10-26T16:03:55Z")

</div>

Good day all,

Need some advice here.

I have 3 chars that can run 5 planets each. I need a supply chain to produce one of the below P4’s.  
I’m looking for someone experienced in this to give me an exact setup I can use to properly streamline this.

I’ve seen a few tools online, but nothing that will show me exactly what to do with each planet/character.

I’ve avoided P4 as long as possible. 🙂 But our corp has a need and it’s time to get on the wagon…

Broadcast Node  
Organic Mortar Applicator  
Wetware Mainframe  
Recursive Computing Module  
Integrity Response Drones

---

<div class="post-metadata">

**Author:** ![you\_are\_evil](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/you_are_evil/32/246754_2.png) [@you\_are\_evil](https://forums.eveonline.com/u/you_are_evil)\
**Post date:** [October 26, 2020, 4:16pm UTC](https://forums.eveonline.com/t/setting-up-pi/276112/2 "2020-10-26T16:16:23Z")

</div>

> **[A4E - PI profitability](https://www.adam4eve.eu/pi_rank.php?customs=10&p=4&hub=60003760&market=3&type=factory&sell=sell&max=2&buy=sell&avg=0)**

> **[Alysii's PI Scheme](https://hanns.io/pi/)**

sample T4 chain.

> **[A4E - Nano-Factory - PI chain](https://www.adam4eve.eu/pi_chain.php?pi1=&hub=60003760&pi2=&sell=sell&pi3=&buy=sell&pi4=2869&avg=0)**

do your math.

PS: with 3x3 alts \* 5 Planets i managed to build T4 by myself. with only 3 alts noway. Only with buy stuff.

some crazy excel sheets (multilanguage ftw) 😜

 ![image](https://global.discourse-cdn.com/eveonline/original/3X/7/3/73dfe9084cb840fcb7cbf2cf86589196db9dc918.png)

 ![image](https://global.discourse-cdn.com/eveonline/original/3X/5/5/55497e846c866d190b73f6a2305cb266c1032844.png)

EveSDE SQL Query to get material sum

 ![image](https://global.discourse-cdn.com/eveonline/original/3X/f/e/feb4e45e34e619d242a363d76822054c3f18267b.png)

```
declare @TypeName as nvarchar(200) = 'Wetware Mainframe';

with MaterialList AS
(
SELECT map.typeID as TopTypeID, map.quantity as QuantityOut, map1.typeID, map1.schematicID, map1.quantity as QuantityIn, map.isInput, 1 AS MaterialLevel
FROM 
planetSchematicsTypeMap map
INNER JOIN planetSchematicsTypeMap map1 ON map.schematicID = map1.schematicID AND map1.isInput = 1
WHERE 
map.typeID = 2876 and map.isInput = 0
--2876
UNION ALL

SELECT smap.typeID as TopTypeID, smap.quantity as QuantityOut, smap1.typeID, smap1.schematicID, ml.QuantityIn / smap.quantity * smap1.quantity as QuantityIn, smap.isInput, ml.MaterialLevel +1 AS MaterialLevel
FROM 
planetSchematicsTypeMap smap
INNER JOIN MaterialList ml ON smap.typeID = ml.typeID AND smap.isInput = 0
INNER JOIN planetSchematicsTypeMap smap1 ON smap.schematicID = smap1.schematicID AND smap1.isInput = 1
)

select ml.typeID, t.typeName as ItemIn, sum(ml.QuantityIn) as QuantityIn, sum(ml.QuantityIn) / 24000 as Scale

from MaterialList ml 
LEFT JOIN invTypes t ON ml.typeID = t.typeID

where ml.MaterialLevel = 4
group by ml.typeID, t.typeName
order by ItemIn

GO

#material chain
declare @TypeName as nvarchar(200) = 'Wetware Mainframe';

with MaterialList AS
(
SELECT map.typeID as TypeIDOut, map.quantity as QuantityOut, map.quantity as ProductionQuantity, map1.typeID TypeIDIn, map1.schematicID, map1.quantity as QuantityIn, map.isInput, 1 AS MaterialLevel
, ROW_NUMBER() OVER (
	ORDER BY map1.typeID
   ) RowNr
FROM 
planetSchematicsTypeMap map
INNER JOIN planetSchematicsTypeMap map1 ON map.schematicID = map1.schematicID AND map1.isInput = 1
WHERE 
map.typeID = 2876 and map.isInput = 0
--2876
UNION ALL

SELECT smap.typeID as TypeIDOut, ml.QuantityIn as QuantityOut, smap.quantity as ProductionQuantity, smap1.typeID TypeIDIn, smap1.schematicID, ml.QuantityIn / smap.quantity * smap1.quantity as QuantityIn, smap.isInput, ml.MaterialLevel +1 AS MaterialLevel
, 10 * ml.RowNr + ROW_NUMBER() OVER (
	ORDER BY MaterialLevel, smap1.typeID
   ) RowNr

FROM 
planetSchematicsTypeMap smap
INNER JOIN MaterialList ml ON smap.typeID = ml.TypeIDIn AND smap.isInput = 0
INNER JOIN planetSchematicsTypeMap smap1 ON smap.schematicID = smap1.schematicID AND smap1.isInput = 1
)

select t2.typeName as ItemOut, ml.*, t.typeName as ItemIn from MaterialList 
ml 
LEFT JOIN invTypes t ON ml.TypeIDIn = t.typeID
LEFT JOIN invTypes t2 ON ml.TypeIDOut = t2.typeID

order by ml.MaterialLevel, ItemOut, ml.TypeIDIn

GO

```

 ![image](https://global.discourse-cdn.com/eveonline/original/3X/f/6/f6123b67cf5cd4886ee56222c2d5f4421107adcb.png)

---

<div class="post-metadata">

**Author:** ![system1](https://global.discourse-cdn.com/eveonline/original/3X/4/1/41ec4921cbaca7a6f9ea556e7cc20018461eae5e.png) [@system1](https://forums.eveonline.com/u/system1)\
**Post date:** [January 24, 2021, 4:16pm UTC](https://forums.eveonline.com/t/setting-up-pi/276112/3 "2021-01-24T16:16:26Z")

</div>

Closed on January 24, 2021, 4:16pm UTC

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
