FAQ  •  Register  •  Login

The DungeonToolKit (Plug-in!)

<<

Fordcars

User avatar

Posts: 1016

Joined: Fri Apr 20, 2012 3:51 pm

Location: Some city, somewhere

Post Sat Apr 13, 2013 10:52 pm

The DungeonToolKit (Plug-in!)

Yep, me again posting stuff

I made this plug-in to make nice levels faster! You can add delayed teleporters, spinning Speed Zones, energy items, ghost ships, scaled asteroids or turrets with different weapons all in-game without even touching the level file!

WARNING: This plug-in will not work in 019 or later

  Code:
---- DUNGEON TOOLKIT
---- by fordcars
---- I will try to keep this plug-in up-to-date


function getArgsMenu()

    return "Dungeon ToolKit",
        {
            ToggleMenuItem.new("Select Item", {"DelayedTeleport", "TurretWeapon", "RotatingSpeedZones", "EnergyItem", "GhostShip", "ScaledAsteroids"}, 1, true, "Pick one!"),
            CounterMenuItem.new("Delayed Teleport", 2, 1, 0, 100, "seconds", "", "The amount of time before the teleporter will be usable again", "Select a delay time"),
            ToggleMenuItem.new("Turret Weapon", {"Phaser", "Triple", "Burst", "Bouncer", "Seeker"}, 1, true, "Pick a weapon!"),
            CounterMenuItem.new("Rotating SpeedZone", 1, 1, 0, 100, "", "", "The speed of the rotating speed zone", "Select a speed"),
            CounterMenuItem.new("Asteroid Size", 1, 1, 0, 14, "", "", "The size of the asteroid", "Select a size"),
            CounterMenuItem.new("Ghost Ship X", 0, 1, 0, 999999999, "", "", "The X coord of ghost ship", "Select coord"),
            CounterMenuItem.new("Ghost Ship Y", 0, 1, 0, 999999999, "", "", "The Y coord of ghost ship", "Select coord")
        }
end

function main()

    local itemSel    = arg[1]
    local delay      = arg[2]
    local turWeapon  = arg[3]
    local rotZone    = arg[4]
    local astSize    = arg[5]
    local ghostX     = arg[6]
    local ghostY     = arg[7]
    local levelLine  = nil

    if (itemSel == "DelayedTeleport") then
        levelLine = "Teleporter 0 0 1 0 Delay=" .. delay
    end
    if (itemSel == "TurretWeapon") then
        levelLine = "Turret -1 0 0 0 W=" .. turWeapon
    end
    if (itemSel == "RotatingSpeedZones") then
        levelLine = "SpeedZone 0 0 0.5 0 2000 Rotate=" .. rotZone
    end
    if (itemSel == "EnergyItem") then
        levelLine = "EnergyItem 0 0 20"
    end
    if (itemSel == "GhostShip") then
        levelLine = "Ship 0 " .. ghostX .. " " .. ghostY
    end
    if (itemSel == "ScaledAsteroids") then
        levelLine = "Asteroid 0 0 Size=" .. astSize
    end

    plugin:addLevelLine(levelLine)

end


 


To install this plug-in, put this code in a document named "dungeonToolKit.lua" and put this document in the "editor_plugins" folder (located with the bitfighter.ini) and type "Plugin2=Ctrl+.|dungeonToolKit.lua|Make dungeons!" under the [EditorPlugins] section of your "bitfighter.ini".

Enjoy!

UPDATE: I added Ghost Ships, Energy Items and Scaled Asteroids!
Last edited by Fordcars on Sun Feb 23, 2014 7:24 pm, edited 1 time in total.
skybax: Why is this health pack following me?
bobdaduck: uh, it likes you.
<<

sky_lark

User avatar

Posts: 2053

Joined: Wed Mar 10, 2010 6:00 pm

Post Wed Dec 04, 2013 10:43 am

Re: The DungeonToolKit (Plug-in!)

I think at least part of this plugin might be broken in 019. I can't add delayed teleports or turret weapons, for example.
Follow Bitfighter! FacebookTwitterDiscord
<<

raptor

Posts: 1046

Joined: Mon Oct 11, 2010 9:03 pm

Post Wed Dec 04, 2013 10:58 am

Re: The DungeonToolKit (Plug-in!)

Evil. Just... Evil

Standard developer warning:

Any of these objects or options can disappear at any time or be broken from one release to another.

Thank you and have a nice day!
<<

Quartz

User avatar

Posts: 901

Joined: Thu Jun 17, 2010 12:14 am

Location: Texas

Post Wed Dec 04, 2013 12:15 pm

Re: The DungeonToolKit (Plug-in!)

raptor wrote:Evil. Just... Evil

Standard developer warning:

Any of these objects or options can disappear at any time or be broken from one release to another.

Thank you and have a nice day!
We've known that for some time lol. Fordcars just made it more convenient.

I guess this is to compensate for the fact that I can't even figure out how to use the new editor. So many keystrokes are different, I'm fucking confused.
Exploits of Quartz and bobdaduck - Pleiades Maps
19-year-old Quartz mad about lawn removal
raptor wrote:sometimes I think getting Quartz to use plugins is like getting my mom to use a computer
<<

Fordcars

User avatar

Posts: 1016

Joined: Fri Apr 20, 2012 3:51 pm

Location: Some city, somewhere

Post Wed Dec 04, 2013 4:28 pm

Re: The DungeonToolKit (Plug-in!)

raptor wrote:Evil. Just... Evil

Standard developer warning:

Any of these objects or options can disappear at any time or be broken from one release to another.

Thank you and have a nice day!


Mhahahah :twisted:

And that is why I wrote "I will try to keep this plug-in up-to-date" in the beginning of the file :P

This doesn't work now anyway since addLevelLine doesn't work anymore :)
skybax: Why is this health pack following me?
bobdaduck: uh, it likes you.
<<

sky_lark

User avatar

Posts: 2053

Joined: Wed Mar 10, 2010 6:00 pm

Post Wed Dec 04, 2013 6:05 pm

Re: The DungeonToolKit (Plug-in!)

Fordcars wrote:This doesn't work now anyway since addLevelLine doesn't work anymore :)

Totally broken? eep
Follow Bitfighter! FacebookTwitterDiscord
<<

Fordcars

User avatar

Posts: 1016

Joined: Fri Apr 20, 2012 3:51 pm

Location: Some city, somewhere

Post Wed Dec 04, 2013 8:55 pm

Re: The DungeonToolKit (Plug-in!)

Shouldn't be difficulty to fix though. I think it's now plugin:addItem or something :ugeek:
skybax: Why is this health pack following me?
bobdaduck: uh, it likes you.
<<

sky_lark

User avatar

Posts: 2053

Joined: Wed Mar 10, 2010 6:00 pm

Post Thu Dec 05, 2013 1:05 am

Re: The DungeonToolKit (Plug-in!)

Oh, ok. I've had to stop being lazy and manually type the objects into the level file, so I'm relieved to hear not all hope is lost. ;)
Follow Bitfighter! FacebookTwitterDiscord
<<

Fordcars

User avatar

Posts: 1016

Joined: Fri Apr 20, 2012 3:51 pm

Location: Some city, somewhere

Post Thu Dec 05, 2013 7:04 pm

Re: The DungeonToolKit (Plug-in!)

:P
skybax: Why is this health pack following me?
bobdaduck: uh, it likes you.
<<

Fordcars

User avatar

Posts: 1016

Joined: Fri Apr 20, 2012 3:51 pm

Location: Some city, somewhere

Post Thu Dec 05, 2013 7:13 pm

Re: The DungeonToolKit (Plug-in!)

Poop, I am trying to update this, but I think I'll have to manually open the file and add the level line :/

Sorry devs!
skybax: Why is this health pack following me?
bobdaduck: uh, it likes you.
<<

amgine

Posts: 1399

Joined: Thu Apr 19, 2012 2:57 pm

Post Sat Dec 13, 2014 3:45 pm

Re: The DungeonToolKit (Plug-in!)

what about slip zones and circle items!
Bitfighter Forever.
<<

bobdaduck

User avatar

Global Moderator

Posts: 790

Joined: Thu Mar 11, 2010 1:39 pm

Location: Utah

Post Mon May 18, 2020 4:05 pm

Re: The DungeonToolKit (Plug-in!)

Quick and dirty dirty dirty update for this plugin. Most features devs have hard-locked out of lua, and the turret:setWeapon() function seems to be totally broken, so this iteration includes ONLY:
- Scaled asteroids (you can scale them in the editor, but not THIS much!
- Slipzone (idk what people use these for, racetracks?)
- EnergyItem (bitfighter goes green!)

Just take the code and put it in the editor_plugins folder as "dungeon_toolkit.lua" (text file and then changing the file extension is fine) then F4 in level editor to use. I just made it so it adds everything at 0,0 so look for your objects there.

  Code:
--Dungeon Toolkit by fordcars

function getArgsMenu()

    return "Dungeon ToolKit",
        {
            ToggleMenuItem.new("Select Item", { "EnergyItem", "ScaledAsteroids", "SlipZone"}, 1, true, "Pick one!"),
            ToggleMenuItem.new("Turret Weapon", {"Weapon.Phaser", "Weapon.Triple", "Weapon.Burst", "Weapon.Bouncer", "Weapon.Seeker", "Weapon.Mine", "Weapon.SpyBug"}, 1, true, "Pick a weapon!"),
            CounterMenuItem.new("Rotating SpeedZone", 1, 1, 0, 100, "", "", "The speed of the rotating speed zone", "Select a speed"),
            CounterMenuItem.new("Asteroid Size", 1, 1, 0, 14, "", "", "The size of the asteroid", "Select a size"),
        }
end

function main()

    local itemSel    = arg[1]
    local turWeapon  = arg[2]
    local rotZone    = arg[3]
    local astSize    = arg[4]

    local object

    --if (itemSel == "TurretWeapon") then
        --object = Turret.new()
        --object:setPos(point.new(0,0))
        --logprint(turWeapon)
        --object:setWeapon(turWeapon)
    --end
    --if (itemSel == "RotatingSpeedZones") then
       -- levelLine = "SpeedZone 0 0 0.5 0 2000 Rotate=" .. rotZone
    --end
    if (itemSel == "EnergyItem") then
        object = EnergyItem.new()
        object:setPos(point.new(0,0))
    end
    --if (itemSel == "GhostShip") then
       -- object = Robot.new()
       -- object:setPos(point.new(0,0))
    --end
    if (itemSel == "ScaledAsteroids") then
        object = Asteroid.new()
        object:setPos(point.new(0,0))
        object:setSize(astSize)
    end
    if (itemSel == "SlipZone") then
        object = SlipZone.new()
        object:setGeom(point.new(0,0), point.new(1,1), point.new(2,2))
    end
    bf:addItem(object)

end
Little_Apple wrote:DnD: the REAL bitfighter levelgen documentation

Santiago ZAP wrote:bob doesn't make new maps, he makes new gamemodes
<<

Fordcars

User avatar

Posts: 1016

Joined: Fri Apr 20, 2012 3:51 pm

Location: Some city, somewhere

Post Tue May 19, 2020 7:33 pm

Re: The DungeonToolKit (Plug-in!)

bobdaduck wrote:Quick and dirty dirty dirty update for this plugin. Most features devs have hard-locked out of lua, and the turret:setWeapon() function seems to be totally broken, so this iteration includes ONLY:
- Scaled asteroids (you can scale them in the editor, but not THIS much!
- Slipzone (idk what people use these for, racetracks?)
- EnergyItem (bitfighter goes green!)

Just take the code and put it in the editor_plugins folder as "dungeon_toolkit.lua" (text file and then changing the file extension is fine) then F4 in level editor to use. I just made it so it adds everything at 0,0 so look for your objects there.

  Code:
--Dungeon Toolkit by fordcars

function getArgsMenu()

    return "Dungeon ToolKit",
        {
            ToggleMenuItem.new("Select Item", { "EnergyItem", "ScaledAsteroids", "SlipZone"}, 1, true, "Pick one!"),
            ToggleMenuItem.new("Turret Weapon", {"Weapon.Phaser", "Weapon.Triple", "Weapon.Burst", "Weapon.Bouncer", "Weapon.Seeker", "Weapon.Mine", "Weapon.SpyBug"}, 1, true, "Pick a weapon!"),
            CounterMenuItem.new("Rotating SpeedZone", 1, 1, 0, 100, "", "", "The speed of the rotating speed zone", "Select a speed"),
            CounterMenuItem.new("Asteroid Size", 1, 1, 0, 14, "", "", "The size of the asteroid", "Select a size"),
        }
end

function main()

    local itemSel    = arg[1]
    local turWeapon  = arg[2]
    local rotZone    = arg[3]
    local astSize    = arg[4]

    local object

    --if (itemSel == "TurretWeapon") then
        --object = Turret.new()
        --object:setPos(point.new(0,0))
        --logprint(turWeapon)
        --object:setWeapon(turWeapon)
    --end
    --if (itemSel == "RotatingSpeedZones") then
       -- levelLine = "SpeedZone 0 0 0.5 0 2000 Rotate=" .. rotZone
    --end
    if (itemSel == "EnergyItem") then
        object = EnergyItem.new()
        object:setPos(point.new(0,0))
    end
    --if (itemSel == "GhostShip") then
       -- object = Robot.new()
       -- object:setPos(point.new(0,0))
    --end
    if (itemSel == "ScaledAsteroids") then
        object = Asteroid.new()
        object:setPos(point.new(0,0))
        object:setSize(astSize)
    end
    if (itemSel == "SlipZone") then
        object = SlipZone.new()
        object:setGeom(point.new(0,0), point.new(1,1), point.new(2,2))
    end
    bf:addItem(object)

end


Thanks for keeping the dungeon spirit alive!
skybax: Why is this health pack following me?
bobdaduck: uh, it likes you.

Return to Editor Plugin Gallery

Who is online

Users browsing this forum: No registered users and 1 guest

cron