Grasscutter icon indicating copy to clipboard operation
Grasscutter copied to clipboard

Implement missing event types

Open Hartie95 opened this issue 2 years ago • 7 comments

To make scripts work better, we need to propperly trigger the missing Lua event types: The dependencies and work needed for each event are different, some are easier to implement, some are harder because they need other system implemented first. When implementing its best to check the usages in the scripts, to understand what exactly the event expects.

  • [ ] EVENT_VARIABLE_CHANGE
  • [ ] EVENT_CLIENT_EXECUTE
  • [ ] EVENT_CITY_LEVELUP_UNLOCK_DUNGEON_ENTRY
  • [ ] EVENT_DUNGEON_BROADCAST_ONTIMER
  • [ ] EVENT_SEAL_BATTLE_BEGIN
  • [ ] EVENT_SEAL_BATTLE_END
  • [ ] EVENT_GATHER
  • [ ] EVENT_MONSTER_BATTLE
  • [ ] EVENT_CITY_LEVELUP
  • [ ] EVENT_CUTSCENE_END
  • [ ] EVENT_AVATAR_NEAR_PLATFORM
  • [ ] EVENT_PLATFORM_REACH_POINT
  • [ ] EVENT_GROUP_WILL_UNLOAD
  • [ ] EVENT_GROUP_WILL_REFRESH
  • [ ] EVENT_GROUP_REFRESH
  • [ ] EVENT_MONSTER_TIDE_OVER
  • [ ] EVENT_MONSTER_TIDE_CREATE
  • [ ] EVENT_SEALAMP_PHASE_CHANGE
  • [ ] EVENT_BLOSSOM_PROGRESS_FINISH
  • [ ] EVENT_BLOSSOM_CHEST_DIE
  • [ ] EVENT_GADGET_PLAY_START
  • [ ] EVENT_GADGET_PLAY_START_CD
  • [ ] EVENT_GADGET_PLAY_STOP
  • [ ] EVENT_GADGET_LUA_NOTIFY
  • [ ] EVENT_MP_PLAY_PREPARE
  • [ ] EVENT_MP_PLAY_BATTLE
  • [ ] EVENT_MP_PLAY_PREPARE_INTERRUPT
  • [ ] EVENT_SELECT_DIFFICULTY
  • [ ] EVENT_SCENE_MP_PLAY_BATTLE_STATE
  • [ ] EVENT_SCENE_MP_PLAY_BATTLE_STAGE_CHANGE
  • [ ] EVENT_SCENE_MP_PLAY_BATTLE_RESULT
  • [ ] EVENT_SEAL_BATTLE_PROGRESS_DECREASE
  • [ ] EVENT_GENERAL_REWARD_DIE
  • [ ] EVENT_SCENE_MP_PLAY_BATTLE_INTERRUPT
  • [ ] EVENT_MONSTER_DIE_BEFORE_LEAVE_SCENE
  • [ ] EVENT_SCENE_MP_PLAY_OPEN
  • [ ] EVENT_OFFERING_LEVELUP
  • [ ] EVENT_DUNGEON_REVIVE
  • [ ] EVENT_SCENE_MP_PLAY_ALL_AVATAR_DIE
  • [ ] EVENT_DUNGEON_ALL_AVATAR_DIE
  • [ ] EVENT_GENERAL_REWARD_TAKEN
  • [ ] EVENT_PLATFORM_REACH_ARRAYPOINT
  • [ ] EVENT_SCENE_MULTISTAGE_PLAY_STAGE_END
  • [ ] EVENT_SCENE_MULTISTAGE_PLAY_END_STAGE_REQ
  • [ ] EVENT_MECHANICUS_PICKED_CARD
  • [ ] EVENT_POOL_MONSTER_TIDE_OVER
  • [ ] EVENT_POOL_MONSTER_TIDE_CREATE
  • [ ] EVENT_POOL_MONSTER_TIDE_DIE
  • [ ] EVENT_DUNGEON_AVATAR_SLIP_DIE
  • [ ] EVENT_GALLERY_START
  • [ ] EVENT_GALLERY_STOP
  • [ ] EVENT_TIME_AXIS_PASS
  • [ ] EVENT_FLEUR_FAIR_DUNGEON_ALL_PLAYER_ENTER
  • [ ] EVENT_GADGETTALK_DONE
  • [ ] EVENT_SET_GAME_TIME
  • [ ] EVENT_HIDE_AND_SEEK_PLAYER_QUIT
  • [ ] EVENT_AVATAR_DIE
  • [ ] EVENT_SCENE_MULTISTAGE_PLAY_STAGE_START
  • [ ] EVENT_GALLERY_PROGRESS_PASS
  • [ ] EVENT_GALLERY_PROGRESS_EMPTY
  • [ ] EVENT_GALLERY_PROGRESS_FULL
  • [ ] EVENT_HUNTING_FINISH_FINAL
  • [ ] EVENT_USE_WIDGET_TOY_FOX_CAMERA
  • [ ] EVENT_LUNA_RITE_SACRIFICE
  • [ ] EVENT_SUMO_SWITCH_TEAM_EVENT
  • [ ] EVENT_FISHING_START
  • [ ] EVENT_FISHING_STOP
  • [ ] EVENT_FISHING_QTE_FINISH
  • [ ] EVENT_FISHING_TIMEOUT_FLEE
  • [ ] EVENT_ROGUE_CELL_STATE_CHANGE
  • [ ] EVENT_ROGUE_CELL_CONSTRUCT
  • [ ] EVENT_ROGUE_CELL_FINISH_SELECT_CARD
  • [ ] EVENT_ANY_MONSTER_CAPTURE
  • [ ] EVENT_ACTIVITY_INTERACT_GADGET
  • [ ] EVENT_CHALLENGE_PAUSE
  • [ ] EVENT_LEVEL_TAG_CHANGE
  • [ ] EVENT_CUSTOM_DUNGEON_START
  • [ ] EVENT_CUSTOM_DUNGEON_RESTART
  • [ ] EVENT_CUSTOM_DUNGEON_REACTIVE
  • [ ] EVENT_CUSTOM_DUNGEON_OUT_STUCK
  • [ ] EVENT_CUSTOM_DUNGEON_EXIT_TRY
  • [ ] EVENT_CUSTOM_DUNGEON_OFFICIAL_RESTART
  • [ ] EVENT_ANY_MONSTER_CAPTURE_AND_DISAPPEAR
  • [ ] EVENT_MICHIAE_INTERACT
  • [ ] EVENT_SELECT_UIINTERACT
  • [ ] EVENT_LUA_NOTIFY
  • [ ] EVENT_PHOTO_FINISH
  • [ ] EVENT_IRODORI_MASTER_READY
  • [ ] EVENT_ROGUE_START_FIGHT
  • [ ] EVENT_ROGUE_CREAGE_FIGHT_GADGET
  • [ ] EVENT_ROGUE_CREAGE_REPAIR_GADGET
  • [ ] EVENT_ROGUE_OPEN_ACCESS
  • [ ] EVENT_GADGET_GIVING_FINISHED
  • [ ] EVENT_OBSERVATION_POINT_NOTIFY
  • [ ] EVENT_GADGET_GIVING_TAKEBACK
  • [ ] EVENT_ECHO_SHELL_INTERACT
  • [ ] EVENT_PLATFORM_ARRIVAL
  • [ ] EVENT_PLAYER_BACK_GALLERY_REVIVE_POINT
  • [ ] EVENT_GALLERY_CANNOT_START_AFTER_COUNTDOWN

Hartie95 avatar Sep 27 '22 22:09 Hartie95

Is it possible to implement these functions and improve the missing scripts through official leaked scripts

Skrtono avatar Oct 31 '22 02:10 Skrtono

Is it possible to implement these functions and improve the missing scripts through official leaked scripts

Many of them are already relatively self explanatory if you check the name and the usage in the script, so its not necessary to use the leaks for that.

Also using the leaks for development is a problem legally for the whole grasscutter project, so I can't just use it, even if it would be nice to have a little less work to do figuring out stuff.

Hartie95 avatar Oct 31 '22 04:10 Hartie95

@Hartie95 could we compile and then decompile the latest script to gain big world scripts since 2.8?

eternalcomet avatar Oct 31 '22 05:10 eternalcomet

along with the latest quest?

eternalcomet avatar Oct 31 '22 05:10 eternalcomet

@Hartie95 could we compile and then decompile the latest script to gain big world scripts since 2.8?

Its probably better to focus on what we already have for now, and get that running, afterwards we can think about 2.8+ stuff. Also compiling and decompiling the scripts doesn't really change anything about the copyright problems and hoyos wrath will probably also stay the same.

Hartie95 avatar Oct 31 '22 06:10 Hartie95

Just rename the variables, re-order things, change comments, etc. enough to the point that it serves the same purpose, but isn't the same code in substance anymore.

We can only change the variable and functions names to a certain degree without breaking compability. Also it's kinda obvious that the leak was used, if we just add hunderets or more of groups, with all of them containing all events, triggers, monsters, gadgets and suites, with perfectly matching positions, id's and logic, while a lot of it is not really observable by the client.

Hartie95 avatar Mar 03 '23 23:03 Hartie95

当然是这样,关键是动漫游戏公司能不能DMCA。即使它看起来完全像官方服务器,如果代码看起来完全不同,它就不能再作为他们的代码进行 DMCA。

至于第一点(以及第二点),我们可以稍微更改格式和渲染结果,如果您将两者并排放置,您只会注意到它不一样。

例如,假设你有这样的 Lua(我有一段时间没有编写 Lua 代码,所以这会稍微偏离):

-- 基础信息
local base_info = {
	group_id = 240653001
}

-- 怪物
monsters = {
	{ config_id = 1008, monster_id = 25310101, pos = { x = 3.787, y = 0.192, z = -2.572 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1, affix = { 1008 }, pose_id = 1 },
	{ config_id = 1011, monster_id = 25310301, pos = { x = -0.030, y = 0.192, z = -3.311 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1, affix = { 6104, 1008 } },
	{ config_id = 1012, monster_id = 25310201, pos = { x = -4.607, y = 0.192, z = -2.466 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1, affix = { 1008 }, pose_id = 1 }
}

只需将其更改为:

-- Basic info and data
local base_info = {group_id = 240653001}

-- Actual monster config
monsters = {
    {
        config_id = 1008,
        monster_id = 25310101,
        pos = {x = 3.787, y = 0.192, z = -2.572},
        rot = {x = 0.000, y = 0.000, z = 0.000},
        level = 1,
        affix = {1008},
        pose_id = 1
    }, {
        config_id = 1011,
        monster_id = 25310301,
        pos = {x = -0.030, y = 0.192, z = -3.311},
        rot = {x = 0.000, y = 0.000, z = 0.000},
        level = 1,
        affix = {6104, 1008}
    }, {
        config_id = 1012,
        monster_id = 25310201,
        pos = {x = -4.607, y = 0.192, z = -2.466},
        rot = {x = 0.000, y = 0.000, z = 0.000},
        level = 1,
        affix = {1008},
        pose_id = 1
    }
}

Well, not everyone is that stupid

Bannyfelt13 avatar Mar 13 '23 04:03 Bannyfelt13