Besiege

Besiege

Not enough ratings
Magnet
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
3.598 MB
10 Apr, 2024 @ 5:47am
5 Mar @ 11:14pm
3 Change Notes ( view )

Subscribe to download
Magnet

Description
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 Comments
yamabach  [author] 5 Mar @ 11:33pm 
Hi, now I added Gaussmeter block to this mod. Check it out!
yamabach  [author] 31 May, 2024 @ 2:53am 
hmm...OK, I will add an issue for magnetosensor in GitHub.
[NoenD_io] 28 May, 2024 @ 9:28am 
add magnetic sensor where over or under certain threshold it will output a signal
yamabach  [author] 24 May, 2024 @ 5:23am 
you mean sensing the magnetic force? I thought length detector could do instead, so I did not implement the sensor.
amanita 5 May, 2024 @ 8:23am 
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  [author] 10 Apr, 2024 @ 8:51am 
If you add this mod, restart the game
or bug will occur