Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some fix about scene script and quest #2029

Merged
merged 7 commits into from
Feb 9, 2023

Conversation

ZanyRain
Copy link
Contributor

Description

Please carefully read the Contributing note and Code of conduct before making any pull requests.
And, Do not make a pull request to merge into stable unless it is a hotfix. Use the development branch instead.

  • [ScriptLib] Query player when not get entity from scene
    Q351 will use the ScriptLib.GetEntityType as finish condition
    The script will put userId and want to get EntityType.Avatar as result
    And TODO maybe account id length should be limit as the official to 9 to avoid conflict other entity id.
  • Fix NPE when doing quests
  • Add QUEST_CONTENT_SKILL trigger
    Q352 need it.
  • Add a lua table serializer implement with jackson
    This is not going to replace the default one, but provide an alternative.
    When using the default one, it throws some exceptions, but I can not figure out why
> java.lang.RuntimeException: Class cannot be created (missing no-arg constructor): sun.reflect.generics.reflectiveObjects.TypeVariableImpl
	at com.esotericsoftware.reflectasm.ConstructorAccess.get(ConstructorAccess.java:68)
	at emu.grasscutter.scripts.serializer.LuaSerializer.cacheType(LuaSerializer.java:191)
	at emu.grasscutter.scripts.serializer.LuaSerializer.serialize(LuaSerializer.java:139)
	at emu.grasscutter.scripts.serializer.LuaSerializer.serializeList(LuaSerializer.java:97)
	at emu.grasscutter.scripts.serializer.LuaSerializer.serialize(LuaSerializer.java:130)
	at emu.grasscutter.scripts.serializer.LuaSerializer.serialize(LuaSerializer.java:161)
	at emu.grasscutter.scripts.serializer.LuaSerializer.serializeMap(LuaSerializer.java:54)
	at emu.grasscutter.scripts.serializer.LuaSerializer.toMap(LuaSerializer.java:35)
	at emu.grasscutter.game.quest.GameMainQuest.addRewindPoints(GameMainQuest.java:208)
	at emu.grasscutter.game.quest.GameMainQuest.<init>(GameMainQuest.java:79)
	at emu.grasscutter.game.quest.QuestManager.addMainQuest(QuestManager.java:178)
	at emu.grasscutter.game.quest.QuestManager.addQuest(QuestManager.java:197)
	at java.base/java.util.Optional.ifPresent(Optional.java:178)
	at emu.grasscutter.game.quest.QuestManager.startMainQuest(QuestManager.java:226)
	at java.base/java.util.Spliterators$IntArraySpliterator.forEachRemaining(Spliterators.java:1076)
	at java.base/java.util.stream.IntPipeline$Head.forEach(IntPipeline.java:617)
	at emu.grasscutter.game.quest.GameMainQuest.finish(GameMainQuest.java:150)
	at emu.grasscutter.game.quest.GameQuest.finish(GameQuest.java:142)
	at emu.grasscutter.game.quest.GameMainQuest.tryFinishSubQuests(GameMainQuest.java:337)
	at emu.grasscutter.game.quest.QuestManager.triggerEvent(QuestManager.java:276)
	at emu.grasscutter.game.quest.QuestManager.triggerEvent(QuestManager.java:229)
	at emu.grasscutter.server.packet.recv.HandlerAddQuestContentProgressReq.handle(HandlerAddQuestContentProgressReq.java:29)
	at emu.grasscutter.server.game.GameServerPacketHandler.handle(GameServerPacketHandler.java:93)
	at emu.grasscutter.server.game.GameSession.handleReceive(GameSession.java:222)
	at emu.grasscutter.server.game.GameSessionManager$1.lambda$handleReceive$0(GameSessionManager.java:72)
	at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174)
	at io.netty.channel.DefaultEventLoop.run(DefaultEventLoop.java:54)
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.lang.NoSuchMethodException: sun.reflect.generics.reflectiveObjects.TypeVariableImpl.<init>()
	at java.base/java.lang.Class.getConstructor0(Class.java:3585)
	at java.base/java.lang.Class.getDeclaredConstructor(Class.java:2754)
	at com.esotericsoftware.reflectasm.ConstructorAccess.get(ConstructorAccess.java:65)
	... 30 more

, so I reimplement one using jackson, it works well.
And the scene script is ugly, difficult to read, make lua table to json and then to Java object can help to log the script data

  • Add some missing fields that contain in scene scripts
    This is the jackson serializer above helps me

Happy Lantern Rite and Spring Festival

Issues fixed by this PR

Type of changes

  • Bug fix
  • New feature
  • Enhancement
  • Documentation

Checklist:

  • My code follows the style guidelines of this project
  • My pull request is unique and no other pull requests have been opened for these changes
  • I have read the Contributing note and Code of conduct
  • I am responsible for any copyright issues with my code if it occurs in the future.

@Hartie95
Copy link
Contributor

Hartie95 commented Jan 26, 2023

If you are interested in quests, I can recommend taking a look at my fork, where we are working on getting most of the quest framework running.

https://github.com/Anime-Game-Servers/Grasscutter-Quests

We are planing to bring the improvements back into the main project in the end, but many parts need/needed refactoring for it to fully work.
Currently quests from 351 to the 3 dungeons work without any command, then you need a command to enter the dungeons.
All dungeons can now be completed more or less without commands, and afterwards auto progression fails, but a big part of the gliding challenge also works.
StartForKiller also recently changed group loading to be more like on official, so now less random monster will be there.
I'm also currently testing a different handling for accept conditions, that allows hidden and side quests to automatically trigger.

@ZanyRain
Copy link
Contributor Author

If you are interested in quests, I can recommend taking a look at my fork, where we are working on getting most of the quest framework running.

https://github.com/Anime-Game-Servers/Grasscutter-Quests

We are planing to bring the improvements back into the main project in the end, but many parts need/needed refactoring for it to fully work. Currently quests from 351 to the 3 dungeons work without any command, then you need a command to enter the dungeons. All dungeons can now be completed more or less without commands, and afterwards auto progression fails, but a big part of the gliding challenge also works. StartForKiller also recently changed group loading to be more like on official, so now less random monster will be there. I'm also currently testing a different handling for accept conditions, that allows hidden and side quests to automatically trigger.

Good work

@GanyusLeftHorn GanyusLeftHorn merged commit 3b29ba0 into Grasscutters:development Feb 9, 2023
github-actions bot added a commit to RainAfterDark/GrassLogger that referenced this pull request Feb 13, 2023
Update languages [skip actions]
Fix whitespace [skip actions]
Merge branch 'Grasscutters:development' into grasslogger
Fix goal (Grasscutters#2052)
Some fix about scene script and quest (Grasscutters#2029)
Teapot Implementations & Fixes (Grasscutters#2032)
Merge branch 'Grasscutters:development' into grasslogger
Fix Cooking Compound Retrieval (Grasscutters#2039)
Revert "Add the `lombok` Gradle plugin & run `delombok`"
Bump to version `1.4.6`
Add the `lombok` Gradle plugin & run `delombok`
Merge branch 'Grasscutters:development' into grasslogger
Unlock hidden points (Grasscutters#2016)
Clean-Up Startup Sequence
Push "updates" from grasslogger-dev
Merge branch 'Grasscutters:development' into grasslogger
Output the handbook based off the client language (Grasscutters#1993)
Update gc to 3.3 (Grasscutters#1981)
Add grasslogger-dev to workflows
Merge branch 'Grasscutters:development' into grasslogger
Update Korean translation (Grasscutters#1977)
Merge branch 'Grasscutters:development' into grasslogger
Formalizing and changing untranslated words (Grasscutters#1973)
Update CHS translation (Grasscutters#1965)
Add more explicit NoSuchFileException message for excels
Accidentally left recent banner on test string
Fix up pity tallies for new BannerTypes Also fixes Beginner banner using Standard pity.
Bake banner defaults into BannerType enum, and add every historic banner
Add Position JsonAdapter for [x,y,z] format Also add serializers for existing JsonAdapters
Finally enforce deprecation of ancient Banners.json fields Also add costItemId10 column so people know it exists, and removeC6FromPool column because it's a cool setting nobody knows about.
Forgot about a 5star character that was added to the standard pool
Add Data TSJ loading, replace and update Banners
Fix oversight on EnumTypeAdapterFactory
TSJ and TSV parsing (Grasscutters#1962)
Work on French localization (Grasscutters#1958)
Merge branch 'Grasscutters:development' into grasslogger
added IT redeirect on all ReadME and typo fix (Grasscutters#1954)
Update DeforestationManager.java (Grasscutters#1955)
Merge branch 'Grasscutters:development' into grasslogger
Added it-IT translaton (Grasscutters#1946)
Added devcontainer config
Merge remote-tracking branch 'upstream/development' into grasslogger
[FIX] Language es-ES (spanish) (Grasscutters#1941)
Version 1.4.4-dev [skip actions]
Version 1.4.3
Update languages [skip actions]
Fix whitespace [skip actions]
Refactor Entity data
Clean up excels
Make PlayerBuffManager::removeBuff actually remove buff
Remove LinkedList usage https://twitter.com/joshbloch/status/583813919019573248
Add FIGHT_PROP_CUR_DEFENSE alias to setstats (closes Grasscutters#1929)
Update gradle wrapper (closes Grasscutters#1076)
Add warnings to ancient deprecated Banners.json fields Will probably turn these into runtime errors in 1.5.0, people need to stop sharing configs with dead fields and especially stop making PRs with them.
3.2 First Half Banners (closes Grasscutters#1932)
Reimplement namecard claiming (fixes Grasscutters#1882)
Merge remote-tracking branch 'upstream/development' into grasslogger
Kill console on IOError
Refactor command kwarg parsing
Update roomSceneId obfuscated names (Grasscutters#1926)
Add the new keys (3.2 Support) (Grasscutters#1923)
Update README_ja-JP.md (Grasscutters#1922)
Fix Mail SendToAll Freeze (Grasscutters#1913)
Remove deprecated constructor call
Debug system (Grasscutters#1894)
[Security][Bugfix] Fix directory traversal exploit (Grasscutters#1907)
Updated spanish translations (Grasscutters#1911)
Don't override en-us gacha strings with vietnamese
Fix gacha history internal server error
Fix CONTIBUTING typo in protect_files.yml
Remove compilation warning on Language.java
Merge branch 'Grasscutters:development' into grasslogger
Version 1.4.3-dev [skip actions]
Version 1.4.2
Update languages [skip actions]
Fix whitespace [skip actions]
Update README and fil-PH (Grasscutters#1901)
Remove references to old repo
Make Player lazyload correct Account (should fix Grasscutters#1900)
Lombokify Grasscutter.java some more
Update ru-RU.json (Grasscutters#1895)
Extend setConstCommand "all" (Grasscutters#1884)
add Quest command alias (Grasscutters#1891)
Added zh-CN translaton for non-translated strings (Grasscutters#1890)
Updated Polish Translation (Grasscutters#1889)
Added "s" alias to SpawnCommand (closes Grasscutters#1840)
fix: unlocking home bgm doesn't work. (Grasscutters#1886)
Fix edge case on FileUtils::getFilenameWithoutPath
Medicine revival&Login white screen (Grasscutters#1883)
Save avatar in forceConstellationLevel (closes Grasscutters#1881)
Fix IllegalStateException when execute toMap (Grasscutters#1879)
Fix StackOverFlow when execute /give all (Grasscutters#1878)
Version 1.4.2-dev [skip actions]
Version 1.4.1
Fix whitespace [skip actions]
Restore ability to run without jar (Grasscutters#1875)
Avoid NPE on CookingCompoundManager init
Extend give command "skill level" & shortening /talent all (Grasscutters#1865)
Remove stale item handling code
Fix gacha avatars (fixes Grasscutters#1870)
Merge remote-tracking branch 'upstream/development' into grasslogger
Merge remote-tracking branch 'upstream/development' into grasslogger
Refactor out some EntrySets
send CompoundDataNotify on Login;fix spelling mistakes. (Grasscutters#1869)
Change logging level on item use from info to debug
feat:cooking food ingredient(aka:compound) implementation (Grasscutters#1858)
Remove constellation charge and talent level bonuses from db
Fix ambiguous command regexes
feat: set emoji collection in chat screen (Grasscutters#1864)
feat: set friend enter home option (Grasscutters#1860)
EDA SHOULD NOT be resolved to a boolean...
Add a dictionary for Encryption public keys (Grasscutters#1862)
Refactor handbook generation to not use naked textmap getter
Send monster affix to the player for tracking
Accept resource enums of form "1"
stfu InventorySystem
Added skill cast logging
Merge branch 'Grasscutters:development' into grasslogger
Add recognition for bountiful blooms
Update ru-RU.json (Grasscutters#1855)
Version 1.4.1-dev [skip actions]
Version 1.4.0
Fix whitespace [skip actions]
[BREAKING] Item Usage Overhaul
Updated MAX_FRIENDS (Grasscutters#1852)
Refactor GameData, remove deprecated getGsonFactory - Fix day-of-week dungeons - AvatarSkill max level enforcement from excels - Partial fix to bonus levels (need packet on talent update)
Lombokify and sort GameData
Extend talent command "all" (Grasscutters#1850)
fix: Solar Isotoma Elevator doesn't work in multiplayer mode (Grasscutters#1848)
fix: ConcurrentModificationError by removing gadget (Grasscutters#1849)
Add DynamicFloat class
Small changes and optimizations
Merge branch 'Grasscutters:development' into grasslogger
fix: albedo elevator doesn't work (Grasscutters#1845)
Update GM Handbook with Spincrystal names and Monster strings
feat: unlock homeworld bgm and set homeworld bgm. (Grasscutters#1844)
Merge branch 'Grasscutters:development' into grasslogger
Flatten language translation keys in-memory
feat: set namecards in profile editing. (Grasscutters#1843)
fix costumes are unable to be unlocked. (Grasscutters#1842)
NullPointer-proofed the logger and some cleanup
PLEASE build
Fix lints (?) and added some command descriptions
Add grasslogger branch to workflows
Fix the supposed "fix" for Collei Hyperblooms
github-actions bot added a commit to RainAfterDark/GrassLogger that referenced this pull request Feb 14, 2023
Update languages [skip actions]
Fix whitespace [skip actions]
Update build.yml
Merge branch 'Grasscutters:development' into grasslogger
Fix goal (Grasscutters#2052)
Some fix about scene script and quest (Grasscutters#2029)
Teapot Implementations & Fixes (Grasscutters#2032)
Merge branch 'Grasscutters:development' into grasslogger
Fix Cooking Compound Retrieval (Grasscutters#2039)
Revert "Add the `lombok` Gradle plugin & run `delombok`"
Bump to version `1.4.6`
Add the `lombok` Gradle plugin & run `delombok`
Merge branch 'Grasscutters:development' into grasslogger
Unlock hidden points (Grasscutters#2016)
Clean-Up Startup Sequence
Push "updates" from grasslogger-dev
Merge branch 'Grasscutters:development' into grasslogger
Output the handbook based off the client language (Grasscutters#1993)
Update gc to 3.3 (Grasscutters#1981)
Add grasslogger-dev to workflows
Merge branch 'Grasscutters:development' into grasslogger
Update Korean translation (Grasscutters#1977)
Merge branch 'Grasscutters:development' into grasslogger
Formalizing and changing untranslated words (Grasscutters#1973)
Update CHS translation (Grasscutters#1965)
Add more explicit NoSuchFileException message for excels
Accidentally left recent banner on test string
Fix up pity tallies for new BannerTypes Also fixes Beginner banner using Standard pity.
Bake banner defaults into BannerType enum, and add every historic banner
Add Position JsonAdapter for [x,y,z] format Also add serializers for existing JsonAdapters
Finally enforce deprecation of ancient Banners.json fields Also add costItemId10 column so people know it exists, and removeC6FromPool column because it's a cool setting nobody knows about.
Forgot about a 5star character that was added to the standard pool
Add Data TSJ loading, replace and update Banners
Fix oversight on EnumTypeAdapterFactory
TSJ and TSV parsing (Grasscutters#1962)
Work on French localization (Grasscutters#1958)
Merge branch 'Grasscutters:development' into grasslogger
added IT redeirect on all ReadME and typo fix (Grasscutters#1954)
Update DeforestationManager.java (Grasscutters#1955)
Merge branch 'Grasscutters:development' into grasslogger
Added it-IT translaton (Grasscutters#1946)
Added devcontainer config
Merge remote-tracking branch 'upstream/development' into grasslogger
[FIX] Language es-ES (spanish) (Grasscutters#1941)
Version 1.4.4-dev [skip actions]
Version 1.4.3
Update languages [skip actions]
Fix whitespace [skip actions]
Refactor Entity data
Clean up excels
Make PlayerBuffManager::removeBuff actually remove buff
Remove LinkedList usage https://twitter.com/joshbloch/status/583813919019573248
Add FIGHT_PROP_CUR_DEFENSE alias to setstats (closes Grasscutters#1929)
Update gradle wrapper (closes Grasscutters#1076)
Add warnings to ancient deprecated Banners.json fields Will probably turn these into runtime errors in 1.5.0, people need to stop sharing configs with dead fields and especially stop making PRs with them.
3.2 First Half Banners (closes Grasscutters#1932)
Reimplement namecard claiming (fixes Grasscutters#1882)
Merge remote-tracking branch 'upstream/development' into grasslogger
Kill console on IOError
Refactor command kwarg parsing
Update roomSceneId obfuscated names (Grasscutters#1926)
Add the new keys (3.2 Support) (Grasscutters#1923)
Update README_ja-JP.md (Grasscutters#1922)
Fix Mail SendToAll Freeze (Grasscutters#1913)
Remove deprecated constructor call
Debug system (Grasscutters#1894)
[Security][Bugfix] Fix directory traversal exploit (Grasscutters#1907)
Updated spanish translations (Grasscutters#1911)
Don't override en-us gacha strings with vietnamese
Fix gacha history internal server error
Fix CONTIBUTING typo in protect_files.yml
Remove compilation warning on Language.java
Merge branch 'Grasscutters:development' into grasslogger
Version 1.4.3-dev [skip actions]
Version 1.4.2
Update languages [skip actions]
Fix whitespace [skip actions]
Update README and fil-PH (Grasscutters#1901)
Remove references to old repo
Make Player lazyload correct Account (should fix Grasscutters#1900)
Lombokify Grasscutter.java some more
Update ru-RU.json (Grasscutters#1895)
Extend setConstCommand "all" (Grasscutters#1884)
add Quest command alias (Grasscutters#1891)
Added zh-CN translaton for non-translated strings (Grasscutters#1890)
Updated Polish Translation (Grasscutters#1889)
Added "s" alias to SpawnCommand (closes Grasscutters#1840)
fix: unlocking home bgm doesn't work. (Grasscutters#1886)
Fix edge case on FileUtils::getFilenameWithoutPath
Medicine revival&Login white screen (Grasscutters#1883)
Save avatar in forceConstellationLevel (closes Grasscutters#1881)
Fix IllegalStateException when execute toMap (Grasscutters#1879)
Fix StackOverFlow when execute /give all (Grasscutters#1878)
Version 1.4.2-dev [skip actions]
Version 1.4.1
Fix whitespace [skip actions]
Restore ability to run without jar (Grasscutters#1875)
Avoid NPE on CookingCompoundManager init
Extend give command "skill level" & shortening /talent all (Grasscutters#1865)
Remove stale item handling code
Fix gacha avatars (fixes Grasscutters#1870)
Merge remote-tracking branch 'upstream/development' into grasslogger
Merge remote-tracking branch 'upstream/development' into grasslogger
Refactor out some EntrySets
send CompoundDataNotify on Login;fix spelling mistakes. (Grasscutters#1869)
Change logging level on item use from info to debug
feat:cooking food ingredient(aka:compound) implementation (Grasscutters#1858)
Remove constellation charge and talent level bonuses from db
Fix ambiguous command regexes
feat: set emoji collection in chat screen (Grasscutters#1864)
feat: set friend enter home option (Grasscutters#1860)
EDA SHOULD NOT be resolved to a boolean...
Add a dictionary for Encryption public keys (Grasscutters#1862)
Refactor handbook generation to not use naked textmap getter
Send monster affix to the player for tracking
Accept resource enums of form "1"
stfu InventorySystem
Added skill cast logging
Merge branch 'Grasscutters:development' into grasslogger
Add recognition for bountiful blooms
Update ru-RU.json (Grasscutters#1855)
Version 1.4.1-dev [skip actions]
Version 1.4.0
Fix whitespace [skip actions]
[BREAKING] Item Usage Overhaul
Updated MAX_FRIENDS (Grasscutters#1852)
Refactor GameData, remove deprecated getGsonFactory - Fix day-of-week dungeons - AvatarSkill max level enforcement from excels - Partial fix to bonus levels (need packet on talent update)
Lombokify and sort GameData
Extend talent command "all" (Grasscutters#1850)
fix: Solar Isotoma Elevator doesn't work in multiplayer mode (Grasscutters#1848)
fix: ConcurrentModificationError by removing gadget (Grasscutters#1849)
Add DynamicFloat class
Small changes and optimizations
Merge branch 'Grasscutters:development' into grasslogger
fix: albedo elevator doesn't work (Grasscutters#1845)
Update GM Handbook with Spincrystal names and Monster strings
feat: unlock homeworld bgm and set homeworld bgm. (Grasscutters#1844)
Merge branch 'Grasscutters:development' into grasslogger
Flatten language translation keys in-memory
feat: set namecards in profile editing. (Grasscutters#1843)
fix costumes are unable to be unlocked. (Grasscutters#1842)
NullPointer-proofed the logger and some cleanup
PLEASE build
Fix lints (?) and added some command descriptions
Add grasslogger branch to workflows
Fix the supposed "fix" for Collei Hyperblooms
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants