围攻
评价数不足
Magnet
   
奖励
收藏
已收藏
取消收藏
文件大小
发表于
更新日期
3.598 MB
2024 年 4 月 10 日 上午 5:47
3 月 5 日 下午 11:14
3 项改动说明 ( 查看 )

订阅以下载
Magnet

描述
This mod adds magnetic system to Besiege and two magnetic blocks specified by custom module.
The magnetic system are independent from vanilla Besiege system and other mods that utilize magnetic system.
Let's check Sample Machine!

Blocks
This mod adds a permanent magnet and an electromagnet.
They follow Coulomb's law.
They are monopole because players can create bipole magnets with various shapes from two monopole magnets. If you want to use realistic magnets, make a pair of N and S pole with the same magnetic charge value.

Magnet
The block Magnet is a monopole, permanent magnet.
It has some parameters described bellow:
  • Type of pole (North / South)
  • Magnetic charge

Electromagnet
The block Electromagnet is a monopole electromagnet.
Players can change the magnetic property of it at runtime by pressing keys.
It has some parameters described bellow:
  • Magnetic charge
  • Hold to magnetize (True / False)

Gaussmeter
The block Gaussmeter detects the ambient magnetic flux density and emulates a key when the N/S threshold is exceeded.
The usage of it follows the actual gaussmeter. If you are having trouble, check out the sample videos!
It has some parameters described bellow:
  • Activate by key (True / False)
  • Threshold

Configuration
If you want to configure some parameters, please edit configuration file.
Besiege\Besiege_Data\Mods\Data\Magnet_ac980b9d-19dd-4de6-aca5-97219154ce48\config.xml
  • Comlomb's constant
  • Maximum Manhattan distance between two magnets to which Coulomb's law applies
  • Minimum Euclid distance between two magnets used for Coulomb's law (to avoid too strong force)

Skin Creation
When skin creators want to create skins of these blocks, they have to create some folders in the skin folder, because the blocks change their textures for the type of their pole.
Directory Structures
Let me take Electromagnet as an example. The true name of Electromagnet is ac980b9d-19dd-4de6-aca5-97219154ce48-10 which is hyphnation of the GUID of this mod and the local ID of the block. Let me shorten it into BLOCK_NAME.
Besiege\Besiege_Data\Skins\SKIN_NAME\BLOCK_NAME\
  • *.obj
  • *.png
  • off\BLOCK_NAME.obj
  • off\BLOCK_NAME.png
  • north\BLOCK_NAME.obj
  • north\BLOCK_NAME.png
  • south\BLOCK_NAME.obj
  • south\BLOCK_NAME.png
Root folder
The mesh and texture of root folder are used for UI, a ghost, and other vanilla features.
They are not used for the actual look of the blocks.
"off" folder
This folder is needed for deactivated electromagnet.
"north" folder
This folder is needed for both magnets.
"south" folder
This folder is needed for both magnets.

Contribution
onion designed the shape of the blocks and created textures of them.
DynamiteOpanty created meshes of the blocks.
If you want to commit this mod, please Fork and PullRequest in GitHub[github.com]
6 条留言
yamabach  [作者] 3 月 5 日 下午 11:33 
Hi, now I added Gaussmeter block to this mod. Check it out!
yamabach  [作者] 2024 年 5 月 31 日 上午 2:53 
hmm...OK, I will add an issue for magnetosensor in GitHub.
[NoenD_io] 2024 年 5 月 28 日 上午 9:28 
add magnetic sensor where over or under certain threshold it will output a signal
yamabach  [作者] 2024 年 5 月 24 日 上午 5:23 
you mean sensing the magnetic force? I thought length detector could do instead, so I did not implement the sensor.
amanita 2024 年 5 月 5 日 上午 8:23 
Good afternoon,


Congratulations on the mod, it would be possible to add a displacement sensor to adjust the Magnetic charge, so I can make the adjustment using a mechanical system
yamabach  [作者] 2024 年 4 月 10 日 上午 8:51 
If you add this mod, restart the game
or bug will occur