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

Update director api. Update game build check #368

Merged
merged 20 commits into from Mar 24, 2022

Conversation

xiaoxiao921
Copy link
Member

  • Update DirectorAPI to work for current game patch:

    • The latest game patch introduced a new system called DccsPool which is an extra wrapper around DirectorCardCategorySelection (DCCS) by using categories (DccsPool.Category[]), a Category is weighted for random selection. A Categoryusually have multiple PoolEntry available, ones that are always included in the pool are in alwaysIncluded, some are included only if some conditions are met (if user has game DLC for example), and some others are included if none of the aforementioned conditions were met. A PoolEntry is weighted for random selection. A PoolEntry holds a DCCS.
    • Not all vanilla game stages moved to this new system, which make the old events (like MonsterActions) a bit harder to use. I tried to alleviate this problem by adding tests so that modders can have them as reference as well as adding a lot of documentation, and also making sure that the existing Helpers methods are covering most if not all edge cases.
  • This PR also changes how the game build is checked, now uses UnityEngine Application.version which should allow the check to also work for the EGS game release.

  • Due to the nature of game modding, added a new form of tests which are different than the ones that are fired automatically when the test plugin is loaded into the appdomain. They are under the form of console commands, they can enabled and disabled on the fly for allow quick tests on some features which require multiple game systems to be in use. (Like the Director ones)

Copy link
Member

@tristanmcpherson tristanmcpherson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, looks great

@Nebby1999
Copy link
Contributor

ILY ideath, especially the final commit of mapping the enum to sceneDefs, that'll save me a LOT of headache on future projects <3

@tristanmcpherson tristanmcpherson merged commit cd09ef5 into risk-of-thunder:master Mar 24, 2022
Nebby1999 pushed a commit to Nebby1999/R2API that referenced this pull request Mar 26, 2022
* code style

* correct log level for tests

* add new vanilla stage entries to enum

* move them to folder (not changing namespace)

* add new vanilla stage entries to switch case. closes risk-of-thunder#355

* remove extra spaces

* better organization for the test project

* ILLine is now part of the RoR2BepInExPack

* ThrowIfStringIsNullOrWhiteSpace string util

* IsSameOrSubclassOf

* bump gamelibs

* proper game build id
remove build param for submodules as it is basically unused

* this api is entirely covered by DirectorAPI

* DirectorAPI update for SOTV

* Some tests for DirectorAPI through console commands

* add prefab dump code

* Update MonsterNames and InteractableNames

* add / enhance back support for old monster families

* test for monster families

* Add mapping of vanilla stages to scene defs
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

3 participants