BombMod v3 [0.08][spaar`s mod loader]

ZiMMy

New Member
#1
(Based on ITR's Remote Bomb & ModifyExplosion Mod)


Features
- Assign hotkeys to detonate each bomb
- Change the explosion force of each bomb

- Disable explosion on collision

Installation
Copy the downloaded file to \Besiege_Data\Mods in your Besiege folder. spaar's Mod Loader must be installed.

Changelog
Version 3 - bomb explosion on collision now can be disabled
Version 2 - bomb settings remain after changing the level (but not after loading a saved machine yet)

Attached Files
BombMod.dll
 

ITR

l̺̤͈̘̰̺͉̳͉̖̝̱̻̠̦͈ͅ֍̫̜̥̭͖̱̟̟͉͙̜̰ͅl̺̤͈̘̰̺͉̳͉̖̝̱̻̠̦͈ͅ
Staff member
#2
Wait, how does this not lag at all? When I tried doing that it was extremely laggy :/
 

ZiMMy

New Member
#3
ITR said:
Wait, how does this not lag at all? When I tried doing that it was extremely laggy :/
It's quite simple.

Code:
​public void Update()
{
    if (!AddPiece.isSimulating)
    {
        GameObject[] gameObjectArray = Object.FindObjectsOfType<GameObject>();

        foreach (GameObject gameObject in gameObjectArray)
        {
            MyBlockInfo blockInfo = gameObject.GetComponent<MyBlockInfo>();
            if (blockInfo != null)
            {
                if (blockInfo.blockName == "BOMB" && gameObject.GetComponent<ExplosionModifier>() == null)
                {
                    gameObject.AddComponent<ExplosionModifier>();
                }
            }
        }
    }
}
First of all it checks if object is a block.
 

ITR

l̺̤͈̘̰̺͉̳͉̖̝̱̻̠̦͈ͅ֍̫̜̥̭͖̱̟̟͉͙̜̰ͅl̺̤͈̘̰̺͉̳͉̖̝̱̻̠̦͈ͅ
Staff member
#4
ZiMMy said:
It's quite simple.

Code:
​public void Update()
{
if (!AddPiece.isSimulating)
{
GameObject[] gameObjectArray = Object.FindObjectsOfType<GameObject>();

foreach (GameObject gameObject in gameObjectArray)
{
MyBlockInfo blockInfo = gameObject.GetComponent<MyBlockInfo>();
if (blockInfo != null)
{
if (blockInfo.blockName == "BOMB" && gameObject.GetComponent<ExplosionModifier>() == null)
{
gameObject.AddComponent<ExplosionModifier>();
}
}
}
}
}
First of all it checks if object is a block.
So that's quicker? Huh, never would have thought. I guess I'll add it to the next update

Also, check out the post for the modders steam group, and see if you want to join :3
 

ZiMMy

New Member
#5
Update. Now bomb settings aren't reset after changing the level. However, I still don't know how to keep them with saved machines.
 

ITR

l̺̤͈̘̰̺͉̳͉̖̝̱̻̠̦͈ͅ֍̫̜̥̭͖̱̟̟͉͙̜̰ͅl̺̤͈̘̰̺͉̳͉̖̝̱̻̠̦͈ͅ
Staff member
#8
ZiMMy said:
Yes. I think I'm gonna add it.

Done.
How did you do that? I probably should add it to my version too, and I didn't manage to figure out how to do it last time.
 

ZiMMy

New Member
#9
ITR said:
How did you do that? I probably should add it to my version too, and I didn't manage to figure out how to do it last time.
There's a variable explodeOnCollision in class ExplodeOnCollide.
 

ITR

l̺̤͈̘̰̺͉̳͉̖̝̱̻̠̦͈ͅ֍̫̜̥̭͖̱̟̟͉͙̜̰ͅl̺̤͈̘̰̺͉̳͉̖̝̱̻̠̦͈ͅ
Staff member
#10
ZiMMy said:
There's a variable explodeOnCollision in class ExplodeOnCollide.
Oh. Didn't see that XD

 
#11
First... Awesome Mod!

Second... It is kind of broken!

If you set your bombs to NOT Detonate On Impact, and they hit a Spring or Brace, they EXPLODE! (They also explode if hit with Arrows from the Archers, I'd like to see this NOT happen perhaps?)

PROOF: https://youtu.be/4Qk0jOKe0e4
Excuse the poor quality, OBS Streaming Software doesn't record as well as I'd like.
 
#13
Ok GrandDaddy of weird bugs! If you use the parameter tuner wrench tool and Disable the "explode on collision" toggle and then switch to the "Translate Machine" tool and then begin the simulation the explosion that was set to not explode on impact detonates instantly. But ONLY if you have the tool on.
 
#14
Oh, that's probably because the arrows from the translate machine tool count as solid. You'll notice that if you're using the map editor mod, you cant place a part onto the arrows from the mod. Pretty sure that in the instant where the simulation starts but the translation arrows haven't disappeared yet, the translation arrows pierce the bomb and it explodes.
 

Z3r0

New Member
#15
could you make the toggle also stop fire from detonating bombs, or if its is possible(and i doubt it is) make a separate toggle, cause of course there would be cases where you would want no collision, but still want fire detonation, so actually it might be better not to implement unless you can make the other toggle(or something else possibly?).
 
#16
hi, I'm getting a problem where the bomb settings dosen't give any options at all as if it is just a wooden block!

here is my log:

Trying to load AutoTargetMod.dll
AutoTargetMod.dll contains no implementation of Mod. Trying fallback system.
Fallback system failed too. Skipping.
Trying to load BesiegeMultiplayerMod.dll
Multiplayer Mod (1.0) by TesseractCat was loaded!
Trying to load BetterModGUI.dll
BetterModGUI.dll contains no implementation of Mod. Trying fallback system.
Loaded BetterModGUILoader (1.0) by ITR
This mod was loade using a compatibility wrapper for the old system.
Please upgrade the mod.
Trying to load BlockLoader.dll
BlockLoader (0.2-beta.3) by TheGuysYouDespise was loaded!
Trying to load BombMod.dll
BombMod.dll contains no implementation of Mod. Trying fallback system.
Fallback system failed too. Skipping.
Trying to load ClippingMod.dll
NoClip Mod (0.8) by TesseractCat was loaded!
Trying to load LaserMod.dll
Laser Mod (100.100) by TesseractCat was loaded!
Trying to load MetalBlockMod.dll
Metal Block (1.0) by MaxTCC was loaded!
Trying to load MissleMod.dll
Missle Block (100.100) by TesseractCat was loaded!
Trying to load NoBounds.dll
NoBounds (1.0) by ITR was loaded!
Trying to load RocketMod.dll
Rocket Mod (100.100) by TesseractCat was loaded!
Trying to load Roller.dll
Roller (1.0) by fenymak was loaded!
Trying to load RollerMotor.dll
Motor Roller (1.0) by fenymak was loaded!
Trying to load StartBlockMover.dll
StartBlockMover.dll contains no implementation of Mod. Trying fallback system.
Fallback system failed too. Skipping.
Trying to load Track.dll
Track (1.0) by fenymak was loaded!


 

spaar

Active Member
#17
williamcll said:
hi, I'm getting a problem where the bomb settings dosen't give any options at all as if it is just a wooden block!

here is my log:

--snip--
Looks like the mod doesn't work with the 1.x.x versions of the mod loader anymore since it was written for 0.x.x. It would have to be updated in order to be loaded at this point.
 

spaar

Active Member
#19
Is what out? The mod loader is now at 1.0.1, 0.x.x won't work with Besiege v0.2 either. I don't know whether anybody made a mod with similiar functions to this one that works with the newest version.
 
Top