Coder Social home page Coder Social logo

boosters-lab's Introduction

Booster's Lab

a Cave Story level editor

Overview and History

This project began in early 2012 as a replacement for Cave Editor to complement my then-ongoing Cave Story fangame/rewrite. Certain features of Cave Editor (CE) didn't meet my needs and I also wanted to have the experience of creating a 2D map editor. Also, I couldn't figure out how to build CE.

Since then, the project has grown to include many features not originally present in CE. It's also been built to accommodate editing certain other projects that use a Cave-Story-Like format. As a side-effect of 5 years of sporadic and careless development Booster's Lab has many rough edges and forgotten secrets. Knowing this, please approach the code with an open mind.

Building/Running

Booster's Lab is included with project files for IntelliJ Idea Community Edition. If you would rather use a different tool then that's your decision but I probably won't be able to help you with it. Booster's Lab has no dependencies. The program has only one main method, located in ca.noxid.lab.EditorApp. To launch it from intelliJ, create a run configuration that launches that main method. To export a Jar, create an artifact that contains the compiled output of the program.

Organization

The project's source files are separated into several packages, each grouping approximately similar functional units of the editor.

  • ca.noxid.uiComponents
    • A collection of Swing components extended to have slightly different behaviour or, more often than not, textured backgrounds.
  • ca.noxid.lab
    • Contains the main class, EditorApp, and several other classes that haven't been given a more specific category.
    • ca.noxid.lab.entity
      • Classes relating to the Entity view, including the npc.tbl editor
    • ca.noxid.lab.gameinfo
      • Classes that manipulate the Cave Story executable, and classes that contain information about the state of the game/project
    • ca.noxid.lab.mapdata
      • relating specifically to the metadata of each specific map (e.g. which tileset it uses, what its name is, etc)
    • ca.noxid.lab.rsrc
      • holds all static resources used by the program such as images and default files, as well as the resource manager class.
    • ca.noxid.lab.script
      • Anything to do with TSC (text scripts)
    • ca.noxid.lab.tile
      • Classes used by the Tile view, including the tileset pane and linemode behaviour.

Contributing

If you are planning to contribute a change, please open an issue in github's issue tracker so I can let you know whether it fits into the project roadmap. All merge requests are subject to code review. Please at least approximately follow standard Java naming and bracket conventions etc. and use tabs for indentation.

License

This project is licensed under the Apache License, Version 2.0. http://www.apache.org/licenses/LICENSE-2.0

boosters-lab's People

Contributors

enlight1 avatar ewancg avatar fdeitylink avatar gabrielravier avatar jozsefsallai avatar leo40git avatar mshirt avatar taedixon avatar tendrille avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

boosters-lab's Issues

[Suggestion] New TSC defines system

(Suggestion by GabrielRavier#5356 on Discord)
Have comments at the end of a script that store the defines, as such:

(normal events)
#LAST
<END
//#define FACE_SUE 0001
//#define ARMS_BLADE 0007

Pros:

  • More obvious system than the current one
  • As long as ScriptSource is available, the defines are also available

Cons:

  • Making global defines with this system would be difficult
  • Would require 2 runs when saving the script (one to find the defines, one to actually replace them)

return value of "ca.noxid.lab.rsrc.ResourceManager.getImg(java.io.File)" is null

So apparently the thing is having issues loading some png files, i tried with different MODE and BITMAPMODE configurations but they just cause the program to crash

Sample of file causing issues
ItemImage

Using doukutsu-rs which is apparently an improved version of the freeware version, altho the files are the same as the original game

This only happens on some maps, like Mimi.pxm. But Start.pxm, Shelt.pxm and Cemet.pxm do not have any issues outside of missing tile textures in the editor

Log:
F:\Downloads\CS Repainted\MouskaTools\Text and Tiles\BoostLab0512C>java -jar BoostLab.jar "MODE=0" "BITMAPMODE=1"
Key not found for getImgGraphics
F:\Downloads\CS Repainted\doukutsu-rs_0.99.0_beta4_win64\data\ItemImage.png
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException: Cannot invoke "java.awt.image.BufferedImage.getSubimage(int, int, int, int)" because the return value of "ca.noxid.lab.rsrc.ResourceManager.getImg(java.io.File)" is null
at ca.noxid.lab.script.TscPane.addCommandExtra(TscPane.java:451)
at ca.noxid.lab.script.TscPane.setCommandExtras(TscPane.java:328)
at ca.noxid.lab.script.TscPane$4.caretUpdate(TscPane.java:296)
at java.desktop/javax.swing.text.JTextComponent.fireCaretUpdate(JTextComponent.java:412)
at java.desktop/javax.swing.text.JTextComponent$MutableCaretEvent.fire(JTextComponent.java:4491)
at java.desktop/javax.swing.text.JTextComponent$MutableCaretEvent.stateChanged(JTextComponent.java:4513)
at java.desktop/javax.swing.text.DefaultCaret.fireStateChanged(DefaultCaret.java:842)
at java.desktop/javax.swing.text.DefaultCaret.changeCaretPosition(DefaultCaret.java:1313)
at java.desktop/javax.swing.text.DefaultCaret.handleSetDot(DefaultCaret.java:1212)
at java.desktop/javax.swing.text.DefaultCaret.setDot(DefaultCaret.java:1193)
at java.desktop/javax.swing.text.DefaultCaret$Handler.insertUpdate(DefaultCaret.java:1789)
at java.desktop/javax.swing.text.AbstractDocument.fireInsertUpdate(AbstractDocument.java:226)
at java.desktop/javax.swing.text.AbstractDocument.handleInsertString(AbstractDocument.java:780)
at java.desktop/javax.swing.text.AbstractDocument.insertString(AbstractDocument.java:739)
at java.desktop/javax.swing.text.DefaultEditorKit.read(DefaultEditorKit.java:239)
at java.desktop/javax.swing.JEditorPane.setText(JEditorPane.java:1484)
at ca.noxid.lab.script.TscPane.loadFile(TscPane.java:171)
at ca.noxid.lab.script.TscPane.(TscPane.java:117)
at ca.noxid.lab.EditorApp.addMapTab(EditorApp.java:2028)
at ca.noxid.lab.EditorApp.actionPerformed(EditorApp.java:2147)
at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1972)
at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2313)
at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:405)
at java.desktop/javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:262)
at java.desktop/javax.swing.AbstractButton.doClick(AbstractButton.java:374)
at java.desktop/javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1028)
at java.desktop/javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1072)
at java.desktop/java.awt.Component.processMouseEvent(Component.java:6626)
at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3389)
at java.desktop/java.awt.Component.processEvent(Component.java:6391)
at java.desktop/java.awt.Container.processEvent(Container.java:2266)
at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5001)
at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2324)
at java.desktop/java.awt.Component.dispatchEvent(Component.java:4833)
at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4948)
at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4575)
at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4516)
at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2310)
at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2780)
at java.desktop/java.awt.Component.dispatchEvent(Component.java:4833)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:773)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:722)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:716)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:97)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:746)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:744)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:743)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)

    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

Booster's lab 0.5.1.0 displays wrong version internally

Screenshot_2019-03-10_20-09-27

For a second I thought I had opened the old version by mistake. But I double checked, and that was not the case. I'm using 0.5.1.0 (NO_JRE), but the title bar and the "about" dialog seem to be unaware that any such update has occurred.

[Suggestion] Adding "place entity" to the right-click menu.

One of the most common questions regarding using BL for the first time is figuring out how to place entities. Not gonna argue about the "i" key, since it is already known to be necessary to fix/overcome other issues.

One suggestion I have is to add a "place entity" option to the right-click menu when it entity mode. This option could/should be labeled "Place Entity (i)" so that the new user can both find it and determine the shortcut for it just from clicking around while learning the editor.

Add confirmation to map deletion

I'm surprised this isn't already implemented. Map deletion seems like one of the first things you'd add a confirmation prompt to.

Missing Manual Pages?

Hi! I was looking the BL manual, and its like... half of the pages are missing. Its there any place to download these missing pages, or just the pages dont exists? Thanks.

Resolve platform issues for Linux

Currently Booster's Lab has trouble running on anything that isn't windows. Primarily this is due to a few discrepancies with case-sensitive filenames but there may be other more subtle bugs.

Nordic characters/letters are messed up(öäå/ÖÄÅ)

https://forum.cavestory.org/threads/translating-to-finnish-using-boosters-lab-apparently-courier-new-doesnt-have-special-characters.15434/post-377868

So if you modify script and rooms names with boosters lab and include ÖÄÅ/öäå in them, they will look all messed up, with some tinkering with windows's settings to enable beta UTF-8 support then it looks right but with extra space after said characters/letters.

When editing script and room names via other programs this does not happen.

Add undo/redo to script editor

Remember to apply this to both full and minimized script editors.
Request by zxin ("Noxid is fucking useless." ~zxin, 2017)

Crashing on doing pretty much anything

I'm getting a crash in BL upon doing literally anything other than just opening the program. Changing tileset scale, pressing New or Open, anything. For reference last I used BL (late 2016) it worked fine.

Version: 0.5 (happened in 0.4.5.5 too)
Java: Most recent 8, both 64 and 32.
OS: Windows 10

Java log: https://pastebin.com/Th4CQskZ

Expand Help Documentation

I intended to add more to this a long time ago and even stubbed out a few articles but they never saw the light of day. It would be useful to have documentation on some of the editor's more esoteric features.

I would like to contribute a new hack XML file.

curlys_nemesis.xml.zip

So, I wanted to do a challenge run where you complete the good ending with the mimiga mask on and no Booster, using the machine gun to fly, but it turned out that was impossible in the stock game.

I could have just used a couple hacked saves to play through Last Cave (hidden) and Sacred Grounds like that anyway, but I decided to go a step further and download Booster's lab to try and make it possible to do properly. I figured out how to do script edits and ended up making a complete mod (that I may try and actually release to the public later) where you never collect anything but the machine gun and Momorin doesn't give you back your Booster after finishing the rocket.

I could have left it at that, but... after going to all that trouble to make a machine gun only run, it seemed disappointing that Curly ruined it by having a Nemesis. I could have just edited her out of the script completely, but that seemed unsatisfactory. So after some serious reverse engineering I never expected to get into at the start of this whole thing (which was only possible thanks to the CSE2 decompilation project), I ended up making a new hack, which is attached as a zipped XML file, and listed below:

<?xml version="1.0" encoding="UTF-8"?>
<hack name="Curly's Nemesis Hack">
	<panel>
		<field type="label">
			Bullet Type ID (can mimic other weapons)
		</field>
		<field type="text" offset="0x46762e" size="1"/>
		
		<field  type="label">
			Bullet Type ID to use for onscreen limit test
		</field>
		<field type="text" offset="0x4675f4" size="1"/>
		
		<field type="label">
			Number of Bullets Allowed Onscreen
		</field>
		<field type="text" offset="0x4675ff" size="1"/>
		    
		<field type="label" col = "1">
			ID of Sound Effect to play
		</field>
		<field type="text" offset="0x467660" size="1"/>
		
		<field type="label">
			Automatic Fire (1 shot per frame, kinda broken)
		</field>

		<field type="check" name="Autofire (Try with L1 Polar Star bullet for reasonable results)">
            <checked>
                <field type="data" offset="0x467603">
                    10 E2 49 00
                </field>
            </checked>
            <unchecked>
                <field type="data" offset="0x467603">
                    14 E2 49 00
                </field>
            </unchecked>
        </field>
    </panel>
</hack>

screenshot_2019-03-03_10-26-42

It allows you to change the bullet type spawned by Curly's Nemesis, set the maximum of those bullets onscreen, and optionally set it to rapid-fire instead of fire once per trigger pull.

The rapid fire is one shot per frame, which is usually insane, but works well with Lv1 polar star bullets (set bullet id number to 4) and the max on-screen shots set to a high number like 50. Combine that with the existing weapon hack to increase Lv1 polar star bullet lifetime from 8 to 18 frames (increasing range), and some edits to NpcSym.bmp, and Curly is now wielding a reasonable "machine gun".

mpv-shot0021

Anyway, I'm actually pretty proud of my Curly's Nemesis hack-xml file and am wondering if you would like to carry it upstream and bundle it along with the others in the next release of Booster's Lab.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.