Posted on 09-24-16, 04:34 pm
shit

Posts: 354/656
Since: 08-11-15

Last post: 3 hours
Last view: 2 hours

Quick-E-Links:
the .envset files are documented here.

They're used for the lighting effects. OPT, on the other hand, are the effects spawned that are unrelated to lighting. No idea why they're separate.

So yeah, you select the lighting type (most aren't documented) that you want, and you hit the generate button. This program requires PyQt5, and was tested with Python 3.5. It's not commented because I planned on developing it more for NewerU, but oh well.

effects.txt you need

# dumb envset generator
# by MrRean 9/20/16
from PyQt5 import QtCore, QtGui, QtWidgets
import sys

class EnvSetEditor(QtWidgets.QMainWindow):
    def __init__(self):
        QtWidgets.QMainWindow.__init__(self)

        self.setWindowTitle('Enviornment Setting Generator v0.1')

        self.envLayout = EnvView()
        self.setCentralWidget(self.envLayout)
        self.show()
       
class EnvView(QtWidgets.QWidget):
    def __init__(self):
        QtWidgets.QWidget.__init__(self)

        self.envText = QtWidgets.QTextEdit(self)
        self.envText.setReadOnly(True)
        self.envText.setLineWrapMode(QtWidgets.QTextEdit.NoWrap)

        font = self.envText.font()
        font.setFamily("ComicSans")
        font.setPointSize(100)

        self.version = QtWidgets.QLineEdit()
        self.version.setMaxLength(1)
        self.version.setToolTip("Usually set to 0. If set above, it will use the default effect.")
        self.version.setValidator(QtGui.QIntValidator())

        self.enemy = QtWidgets.QComboBox()
        self.enemy.addItems(sorted(EffectNames.values()))
        self.enemy.setToolTip("The shading an enemy has.")

        self.boss = QtWidgets.QComboBox()
        self.boss.addItems(sorted(EffectNames.values()))
        self.boss.setToolTip("The shading a boss has.")

        self.mapobj = QtWidgets.QComboBox()
        self.mapobj.addItems(sorted(EffectNames.values()))
        self.mapobj.setToolTip("Unknown purpose.")

        self.item = QtWidgets.QComboBox()
        self.item.addItems(sorted(EffectNames.values()))
        self.item.setToolTip("The shading an item has.")

        self.player = QtWidgets.QComboBox()
        self.player.addItems(sorted(EffectNames.values()))
        self.player.setToolTip("The shading the players have.")

        self.name = QtWidgets.QLineEdit()
        self.name.setToolTip("The name of the effect. It should be the same name as the background being altered. NOTE: BEGIN THE BACKGROUND WITH m_!")

        self.effect = QtWidgets.QComboBox()
        self.effect.addItems(sorted(EffectNames.values()))
        self.effect.setToolTip("Unknown purpose.")

        self.lightmap = QtWidgets.QComboBox()
        self.lightmap.addItems(sorted(EffectNames.values()))
        self.lightmap.setToolTip("Unknown purpose.")

        self.generate = QtWidgets.QPushButton()
        self.generate.setText("Generate envset")
        self.generate.clicked.connect(self.handleGenerate)

        env = QtWidgets.QFormLayout()
        env.addRow("Version:", self.version)
        env.addRow("Enemy:", self.enemy)
        env.addRow("Boss:", self.boss)
        env.addRow("MapObj:", self.mapobj)
        env.addRow("Item:", self.item)
        env.addRow("Player:", self.player)
        env.addRow("Name:", self.name)
        env.addRow("Effect:", self.effect)
        env.addRow("LightMap:", self.lightmap)
        env.addRow(self.generate)
        env.addRow(self.envText)
        self.setLayout(env)

    def handleGenerate(self):
        self.envText.setText('' + self.version.text() + '//< Version\n'
                             '"e_' + self.enemy.currentText() + '"//< enemy\n'
                             '"b_' + self.boss.currentText() + '"//< boss\n'
                             '"mo_' + self.mapobj.currentText() + '"//< mapobj\n'
                             '"i_' + self.item.currentText() + '"//< item\n'
                             '"p_' + self.player.currentText() + '"//< player\n'
                             '"' + self.name.text() + '"//< DV\n'
                             '"ef_' + self.effect.currentText() + '"//< effect\n'
                             '"lm_' + self.lightmap.currentText() + '"//< lightmap')

def LoadEffectNames():
    global EffectNames

    EffectNames = {}
    with open('effects.txt') as effectfile:
        for entry in effectfile:
            EffectNames[entry.split(':')[0]] = entry.split(':')[1][:-1]

LoadEffectNames()
       
def main():
    app = QtWidgets.QApplication(sys.argv)
    setEditor = EnvSetEditor()
    sys.exit(app.exec_())

main()



_________________________
motherfucking hype man
Posted on 09-24-16, 05:41 pm

Red Goomba
Modding Wii U games

Posts: 24/38
Since: 09-19-16

Last post: 207 days
Last view: 50 days

Quick-E-Links:
Another moddable format, eh? Great work!

If I understand correctly, each envset is tied to a background? And with something like this, it would be possible to make fitting lighting for new backgrounds for levels?
Posted on 09-24-16, 05:41 pm
shit

Posts: 355/656
Since: 08-11-15

Last post: 3 hours
Last view: 2 hours

Quick-E-Links:
yep
_________________________
motherfucking hype man
Posted on 04-01-17, 03:07 pm

Goomba
Star Wolf

Posts: 5/23
Since: 09-22-16

Last post: 18 hours
Last view: 5 hours

Quick-E-Links:

I created an exe for windows, and an elf for linux devices for those who don't have python.

https://www.mediafire.com/?ip6ulmgsif55929

Nella carne io sono uno, ma nello spirito, che sono e per sempre saranno sette.