FortressCraft Evolved

FortressCraft Evolved

评价数不足
Portable Black Holes
   
奖励
收藏
已收藏
取消收藏
文件大小
发表于
更新日期
236.515 KB
2020 年 7 月 5 日 下午 2:57
2020 年 12 月 20 日 上午 9:49
10 项改动说明 ( 查看 )

订阅以下载
Portable Black Holes

描述
This mod adds Portable Black Holes!
They increase pick up range only when placed in suit inventory, normal inventory disables them.

Default (no mod) item pick up range is 5 blocks.
MK1 changes item pick up range to 15 blocks.
MK2 changes item pick up range to 24 blocks.
MK3 changes item pick up range to 48 blocks.
MK4 changes item pick up range to 64 blocks.

The pick up range is like sphere (ball) around the player.

Crafting Recipes: (Craft at "C")
MK1 = 50x Copper Wires, 50x Charged Lithium Coils
MK2 = MK1, 40x Low Grade Steel Bars, 10x Alloyed Machine Blocks
MK3 = MK2, 24x Chromium Bars, 24x Molybdenum Bars
MK4 = MK3, 24x Chromed Machine Blocks, 24x Magnetic Machine Bl., 10x Hiemal Machine Bl.

Mod requested by: Last Dragon Lord



Mod ID: 2155569547
热门讨论 查看全部(1)
0
2020 年 12 月 20 日 上午 1:44
Hidden Black Holes
Wariat117
5 条留言
Wariat117  [作者] 2020 年 12 月 20 日 上午 1:34 
... I have forgot that in 3D it's sphere not circle ;d
So this whole multiplying (magnitudes) method works properly
Wariat117  [作者] 2020 年 12 月 19 日 上午 11:02 
I have managed to understand code of picking up mechanic ;d

1. mag range = range at which your character notices items to pick up
2. collect range = range at which your character actually picks up those items
3. mag strenght = does nothing if "mag range = collect range", but if those 2 are different, then strength is multiplied by "1 - (distance to item / mag range)" and then applied to item as "velocity", then other code uses this velocity to "suck" item closer to player


well, in case of this mod mag range is always the same as collect range, that's why items are picked up instantly instead of being pulled towards you
Wariat117  [作者] 2020 年 12 月 19 日 上午 11:02 
"distance to item" is calculated as "magnitude*magnitude", because of that the picking up range isn't perfect circle.

magnitude = square root of( (x*x) + (y*y) + (z*z) )
shortly
magnitude*magnitude = (x*x) + (y*y) + (z*z)

At furthest point (64 blocks into single direction) magnitude is (64*64) + (0*0) + (0*0) = 4096
That's why the "mag range" and "collect range" are 4096, to reach item 64 blocks away

But let's say distance to item is X=63 Y=1 Z=11
magnitude is (63*63) + (2*2) + (11*11) = 4094
it's inside of the 64 blocks pulling range (4096)
it's 76 blocks away (63+11+2=76), but the game will pick up this item





pretty weird system if you ask me
Wariat117  [作者] 2020 年 7 月 6 日 上午 12:00 
well, it says "increases range to" not "increases range by"
which literally means that more than 1 won't change anything (if it was "increase by" then it would mean that they stack)

I have tried to use the "WIP" thingie in the past, but it's pain in the butt to remember to remove it later ;-; and it just stays there for months until someone asks "is it swill work in progress?" (I guess that this "use with care" is related to WIP, or you mean it as permanent addition to description?)
LDL 2020 年 7 月 5 日 下午 10:38 
to make mk1- items be like, copper wire, and charged coils, x50,
to make mk2- mk1 and 40 low grade steal and 10 alloy cubes
to make mk3- m2, 24 chromo and moly bars
to make mk4- mk3 24 choro and moly cubes and 10 cyro cubes

(add text, only need one, use with care) WIP