tyoeer / Chaoshead

A level editor, scripting interface, campaign editor, and reverse engineering tool for Levelhead
Apache License 2.0
4 stars 1 forks source link

Blue arrow holograms are fuchsia in CH #83

Closed slothybutt closed 1 year ago

slothybutt commented 1 year ago

This likely applies to other objects as well but I can't be bothered to check

tyoeer commented 1 year ago

So for arrows, the default colour that doesn't get explicitly set is blue, while for hardlights it is purple. Yet they still use the same property for colour, meaning the property itself doesn't have a concise default. Aaargh.

tyoeer commented 1 year ago

Default colours:

Adrthegamedev commented 1 year ago

Same problem happens with the "direction" property (31), used for Cromblers, Sweep Lasers, and Doomerangs. Cromblers have it set to "Down", Doomerangs have it set to "Up" (iirc), and i think Sweep Lasers have it set to "Right". I'm not sure on the sweep laser's direction, but I know it's different from the Crombler's.

tyoeer commented 1 year ago
tyoeer commented 1 year ago
The list of all properties that are shared between elements, and said elements - [ ] Sending Channel (0): - Lock Switch (26) - Pressure Switch (35) - Clock Switch (37) - Package Cam (43) - Flippy Longswitch (52) - Jem Switch (61) - Battle Switch (62) - Eye Switch (86) - Tempswitch (98) - Baddie Eyeswitch (115) - Charge Switch (121) - Relay (157) - Waitswitch (158) - Key Switch (187) - Input Switch (202) - [ ] Receiving Channel (1): - Powered Gate (25) - Jukebox (156) - Relay (157) - ZOOM-R (161) - Secret Eye (174) - Jinglebox (198) - Weatherbox (199) - Swipe Teacher (200) - Movement Teacher (201) - [ ] Start State (2): - Lock Switch (26) - Key Gate (30) - Pressure Switch (35) - Clock Switch (37) - Package Cam (43) - Flippy Longswitch (52) - Jem Switch (61) - Battle Switch (62) - Eye Switch (86) - Tempswitch (98) - Beamer (100) - Robo Factory (101) - Baddie Eyeswitch (115) - Charge Switch (121) - Waitswitch (158) - Key Chest (186) - Key Switch (187) - Input Switch (202) - [ ] Rotation (3): - Pressure Switch (35) - Prize Block (40) - Cannon (42) - Tempswitch (98) - Regret Gate (133) - Boombox (139) - Waitswitch (158) - [ ] Direction (4): - Blaster (31) - Trigblaster (39) - Arrow Hologram (51) - Puncher (204) - [ ] Invisible (5): - Jem (11) - Clock Switch (37) - Prize Block (40) - Package Cam (43) - Jem Switch (61) - Battle Switch (62) - Eye Switch (86) - Tempswitch (98) - Baddie Eyeswitch (115) - Boombox (139) - Waitswitch (158) - Input Switch (202) - [ ] Jems Required (6): - Jem Gate (23) - Jem Switch (61) - [ ] Enemies Required (7): - Battle Gate (21) - Battle Switch (62) - [ ] Locking (8): - Package Cam (43) - Eye Switch (86) - Spike Trap (95) - Baddie Eyeswitch (115) - [ ] Behaviour (13): - Tempswitch (98) - Waitswitch (158) - [ ] Range (14): - Package Cam (43) - Eye Switch (86) - Baddie Eyeswitch (115) - [ ] Power (23): - Blaster (31) - Trigblaster (39) - [ ] Spin Speed (24): - Blaster (31) - Trigblaster (39) - [ ] Movement (30): - Blopfush (9) - Whizzblade (24) - Swoopadoop (71) - Fireball (195) - Jabber (205) - [ ] Direction (31): - Crombler (45) - Doomerang (93) - Sweep Laser (138) - [ ] Cooldown (32): - Cannon (42) - Lookannon (44) - Crombler (45) - Doomerang (93) - [ ] Time Offset (33): - Cannon (42) - Lookannon (44) - Doomerang (93) - [ ] Distance (35): - Blopfush (9) - Whizzblade (24) - Swoopadoop (71) - Fireball (195) - Jabber (205) - [ ] Speed (36): - Blopfush (9) - Whizzblade (24) - Swoopadoop (71) - Fireball (195) - Jabber (205) - [ ] Start Direction (40): - Blopfush (9) - Whizzblade (24) - Burny Whirler (49) - Spike Chainer (58) - Swoopadoop (71) - Spinny Platform (129) - Fireball (195) - Jabber (205) - [ ] Rotation Speed (41): - Whizzblade (24) - Burny Whirler (49) - Spike Chainer (58) - Fireball (195) - [ ] Length (42): - Burny Whirler (49) - Spike Chainer (58) - [ ] Chains (45): - Burny Whirler (49) - Spike Chainer (58) - Spinny Platform (129) - [ ] Color (47): - Hardlight (7) - Keycard (29) - Key Gate (30) - Rift (38) - Arrow Hologram (51) - Bumper (125) - Key Chest (186) - Key Switch (187) - Puncher (204) - [ ] Projectile (48): - Cannon (42) - Lookannon (44) - [ ] Receiving Channel (49): - Hardlight (7) - Jem (11) - Ripcord (14) - Sky Wiggler (18) - Tiptow (20) - Waylay (22) - Jackdrop (27) - Keycard (29) - Zipper (32) - Vacsteak (33) - Rift (38) - Prize Block (40) - Cannon (42) - Lookannon (44) - Crombler (45) - Toe Slider (47) - Burny Whirler (49) - Arrow Hologram (51) - Spike Chainer (58) - TBot (59) - Rebound (66) - Lectroshield (89) - Armor Plate (90) - DBot (91) - Sign (92) - Purge Gate (94) - Spike Trap (95) - Tempswitch (98) - Flapsack (99) - Beamer (100) - Robo Factory (101) - Spike Block (102) - Booster (118) - Brake (119) - Battery (120) - Ball Stopper (124) - Bumper (125) - Canoodle Core (126) - Wingarang (127) - Slurb Juice (128) - Spinny Platform (129) - Flingo (130) - Regret Gate (133) - Sweep Laser (138) - Boombox (139) - Recycler (140) - Blopsack (141) - Lizumi Thorn (142) - Flipegg (143) - Pop Medallion (144) - Bug Head (149) - Camera Anchor (154) - Instructions (155) - Waitswitch (158) - Lead Block (188) - Fireball (195) - Input Switch (202) - Shade (203) - Puncher (204) - Jabber (205) - Stackable Armor (211) - [ ] Rotation Speed (58): - Blopfush (9) - Swoopadoop (71) - Spinny Platform (129) - Jabber (205) - [ ] Switch Requirements (60): - Hardlight (7) - Jem (11) - Ripcord (14) - Sky Wiggler (18) - Tiptow (20) - Waylay (22) - Powered Gate (25) - Jackdrop (27) - Keycard (29) - Zipper (32) - Vacsteak (33) - Rift (38) - Prize Block (40) - Cannon (42) - Lookannon (44) - Crombler (45) - Toe Slider (47) - Burny Whirler (49) - Arrow Hologram (51) - Spike Chainer (58) - TBot (59) - Rebound (66) - Lectroshield (89) - Armor Plate (90) - DBot (91) - Sign (92) - Purge Gate (94) - Spike Trap (95) - Tempswitch (98) - Flapsack (99) - Beamer (100) - Robo Factory (101) - Spike Block (102) - Booster (118) - Brake (119) - Battery (120) - Ball Stopper (124) - Bumper (125) - Canoodle Core (126) - Wingarang (127) - Slurb Juice (128) - Spinny Platform (129) - Flingo (130) - Regret Gate (133) - Sweep Laser (138) - Boombox (139) - Recycler (140) - Blopsack (141) - Lizumi Thorn (142) - Flipegg (143) - Pop Medallion (144) - Bug Head (149) - Camera Anchor (154) - Instructions (155) - Jukebox (156) - Relay (157) - Waitswitch (158) - ZOOM-R (161) - Secret Eye (174) - Lead Block (188) - Fireball (195) - Jinglebox (198) - Weatherbox (199) - Swipe Teacher (200) - Movement Teacher (201) - Input Switch (202) - Shade (203) - Puncher (204) - Jabber (205) - Stackable Armor (211) - [ ] Rotation Style (72): - Blaster (31) - Trigblaster (39) - Burny Whirler (49) - Spike Chainer (58) - [ ] Swing Degrees (73): - Blaster (31) - Trigblaster (39) - Burny Whirler (49) - Spike Chainer (58) - [ ] Swing Speed (74): - Burny Whirler (49) - Spike Chainer (58) - [ ] Swing Time Offset (75): - Blaster (31) - Trigblaster (39) - Burny Whirler (49) - Spike Chainer (58) - [ ] Muted (76): - Pressure Switch (35) - Clock Switch (37) - Tempswitch (98) - Waitswitch (158) - [ ] Swing Speed (79): - Blaster (31) - Trigblaster (39) - [ ] Range Right (80): - Package Cam (43) - Eye Switch (86) - Baddie Eyeswitch (115) - [ ] Range Up (81): - Package Cam (43) - Eye Switch (86) - Baddie Eyeswitch (115) - [ ] Range Left (82): - Package Cam (43) - Eye Switch (86) - Baddie Eyeswitch (115) - [ ] Range Down (83): - Package Cam (43) - Eye Switch (86) - Baddie Eyeswitch (115) - [ ] Detection Shape (84): - Package Cam (43) - Eye Switch (86) - Baddie Eyeswitch (115) - [ ] Behaviour (85): - Pressure Switch (35) - Input Switch (202) - [ ] Horizontal Flip (86): - Sign (92) - Key Chest (186) - [ ] Fire Style (87): - Cannon (42) - Lookannon (44) - Burny Whirler (49) - Fireball (195) - [ ] Sending Channel (90): - Key Gate (30) - Robo Factory (101) - Key Chest (186) - [ ] Walk Direction (105): - Canoodle (72) - Scrubb (182) - Peanut (208) - [ ] Color (109): - Spiketron (2) - Spike Chainer (58) - Spike Trap (95) - Spike Block (102)
tyoeer commented 1 year ago

Used script for reference:

-- List all properties that are used by multiple elements

local P = require("levelhead.data.properties")
local E = require("levelhead.data.elements")

local OBJ = require("levelhead.level.object")

local l = {}

for i=0, P:getHighestID() do
    l[i] = {}
end

--skip Delete because we don't know it's properties
for i=1, E:getHighestID() do
    --skip the ones with a parent because their parent will take care of it
    if E:getParent(i)=="No" then
        for prop in E:iterateProperties(i) do
            table.insert(l[prop], i)
        end
    end
end

local out = {}
local function t(f, ...)
    table.insert(out, string.format(f, ...))
end
local y = level.top
for i=0, P:getHighestID() do
    local ll = l[i]
    if #ll>=2 then
        t("%s (%i):", P:getName(i), P:getID(i))
        for x,v in ipairs(ll) do
            level:addObject(OBJ:new(v), x, y)
            t("\t%s (%i)", E:getName(v), E:getID(v))
        end
        y = y + 1
    end
end

local out = table.concat(out, "\n")
love.system.setClipboardText(out)
MainUI:popup(out)
tyoeer commented 1 year ago
All defaults (condensed)

- [x] Sending Channel (0): 0 - [x] Receiving Channel (1): 0 - [x] Start State (2): Inactive - [x] Rotation (3): mostly Up - Pressure Switch (35) - Prize Block (40) - Cannon (42) Left - Tempswitch (98) - Regret Gate (133) Right - Boombox (139) - Waitswitch (158) - [x] Direction (4): - Blaster (31) 0 - Trigblaster (39) 0 - Arrow Hologram (51) 90 - Puncher (204) 90 - [x] Invisible (5): No - [x] Jems Required (6): All - [x] Enemies Required (7): All - [x] Locking (8): No - [x] Behaviour (13): Reusable - [x] Range (14): 3 - [x] Power (23): 2000 - [x] Spin Speed (24): 0 - [x] Movement (30): Horizontal - [x] Direction (31): - Crombler (45) Down - Doomerang (93) Up - Sweep Laser (138) Right - [x] Cooldown (32): - Cannon (42) 2.00 - Lookannon (44) 2.00 - Crombler (45) 1.00 - Doomerang (93) 1.00 - [x] Time Offset (33): 0.00 - [x] Distance (35): 2 - [x] Speed (36): Medium - [x] Start Direction (40): 0 - [x] Rotation Speed (41): 90 - [x] Length (42): 4 - [x] Chains (45): 1 - [x] Color (47): - Hardlight (7) Fuchsia - Keycard (29) Gold - Key Gate (30) Gold - Rift (38) Blue - Arrow Hologram (51) Blue - Bumper (125) Gold - Key Chest (186) Gold - Key Switch (187) Gold - Puncher (204) Gold - [x] Projectile (48): Steel - [x] Receiving Channel (49): 0 - [x] Rotation Speed (58): 60 - [x] Switch Requirements (60): All Active - [x] Rotation Style (72): Spin - [x] Swing Degrees (73): - Blaster (31) 45 - Trigblaster (39) 45 - Burny Whirler (49) 90 - Spike Chainer (58) 90 - [x] Swing Speed (74): 50 - [x] Swing Time Offset (75): 0 - [x] Muted (76): No - [x] Swing Speed (79): 100 - [x] Range Right (80): 3 - [x] Range Up (81): 3 - [x] Range Left (82): 3 - [x] Range Down (83): 3 - [x] Detection Shape (84): Square - [x] Behaviour (85): Hold - [x] Horizontal Flip (86): No - [x] Fire Style (87): Hot Fire - [x] Sending Channel (90): None - [x] Walk Direction (105): Left - [x] Color (109): Red

Just the differing defaults

- Rotation (3): mostly Up - Pressure Switch (35) - Prize Block (40) - Cannon (42) Left - Tempswitch (98) - Regret Gate (133) Right - Boombox (139) - Waitswitch (158) - Direction (4): - Blaster (31) 0 - Trigblaster (39) 0 - Arrow Hologram (51) 90 - Puncher (204) 90 - Direction (31): - Crombler (45) Down - Doomerang (93) Up - Sweep Laser (138) Right - Cooldown (32): - Cannon (42) 2.00 - Lookannon (44) 2.00 - Crombler (45) 1.00 - Doomerang (93) 1.00 - Color (47): - Hardlight (7) Fuchsia - Keycard (29) Gold - Key Gate (30) Gold - Rift (38) Blue - Arrow Hologram (51) Blue - Bumper (125) Gold - Key Chest (186) Gold - Key Switch (187) Gold - Puncher (204) Gold - Swing Degrees (73): - Blaster (31) 45 - Trigblaster (39) 45 - Burny Whirler (49) 90 - Spike Chainer (58) 90

tyoeer commented 1 year ago

Fixed by https://github.com/tyoeer/Chaoshead/commit/09ce8d988f87fcaf823ac0377dd606b6f78818cd