Giter Site home page Giter Site logo

vikigenius / ww-blueprint-core Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wittlewolfie/ww-blueprint-core

0.0 0.0 0.0 16.67 MB

A library to simplify modifying Pathfinder: Wrath of the Righteous.

License: MIT License

C# 99.78% Vim Snippet 0.21% PowerShell 0.01%

ww-blueprint-core's Introduction

WW-Blueprint-Core

NuGet

What is BlueprintCore: A library to simplify modifying Pathfinder: Wrath of the Righteous. At a glance it provides:

  • A fluent API for creating and modifying Blueprints, Actions, and Conditions
BuffConfigurator.New(MyBuffName, MyBuffGuid).AddStatBonus(stat: StatType.Strength, value: 2).Configure();
  • Exposed methods for finding all Blueprint, Action, Condition, and Blueprint Component types in the game
  • Restricted API for modifying Blueprints which exposes only Blueprint Components usable with the given Blueprint type
  • Runtime validation and warnings when potential problems are detected
    • Uses custom logic along with validation checks provided in the game library

If you're interested in contributing, see How to Contribute.

For usage see Getting Started.

Features

Blueprint Configurators

Each Blueprint class has a corresponding configurator, e.g. BuffConfigurator, which exposes a fluent API for modifying its fields and components. Once you call Configure() all of the changes are committed and validation errors are logged as a warning.

This API exposes all supported Blueprint Component types available in the game library. When used with auto-complete it provides a quick and easy way to search for Blueprint Component types.

ActionList and ConditionsChecker Builders

ActionsBuilder is a builder API for ActionList and ConditionsBuilder is a builder API for ConditionsChecker.

The builders provide methods for creating all Action and Condition types, spread across extension classes which limit the scope of auto-complete. The extensions are logically grouped so most uses require only one set.

When Build() is called the corresponding game type is returned and validation errors are logged as a warning. Library methods accept builders directly and call Build() internally to minimize boilerplate.

Utils

Utility classes provide additional functionality to simplify modifying the game as well as helping ensure correct use of game types.

Usage

BlueprintCore is available as NuGet package that provides the source code for compilation into your modification. It requires a public assembly. An optional DLL release is available on GitHub for use with ILRepack.

For more details see the documentation.

Example

Partial Implementation of Skald's Vigor

BuffConfigurator.For(SkladsVigorBuff)
    .ContextRankConfig(ContextRankConfigs.ClassLevel(new string[] { SkaldClass }).WithStartPlusDoubleDivStepProgression(8))
    .FastHealing(1, bonusValue: ContextValues.Rank(AbilityRankType.Default))
    .Configure();

var applyBuff = ActionsBuilder.New().ApplyBuff(SkaldsVigorBuff, permanent: true, dispellable: false);
BuffConfigurator.For(RagingSongBuff)
    .AddFactContextActions(
        onActivated:
            ActionsBuilder.New()
                .Conditional(
                    ConditionsBuilder.New().TargetIsYourself().HasFact(SkaldsVigor),
                    ifTrue: applyBuff)
                .Conditional(
                    ConditionsBuilder.New().CasterHasFact(GreaterSkaldsVigor),
                    ifTrue: applyBuff),
        onDeactivated: ActionsBuilder.New().RemoveBuff(SkaldsVigorBuff))
    .Configure();

Acknowledgements

  • Thank you to the Owlcat modders who came before me, documenting their process and sharing their code.
  • Thank you to the modders on Discord who helped me learn modding so I could create this library.

Interested in modding?

ww-blueprint-core's People

Contributors

wittlewolfie avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.