Larian Banner: Baldur's Gate Patch 9
Previous Thread
Next Thread
Print Thread
#635039 01/11/17 05:35 PM
Joined: Jul 2014
Location: East Coast
journeyman
OP Offline
journeyman
Joined: Jul 2014
Location: East Coast
https://github.com/Sinistralis-DOS2-Mods/SkillGenerator

Github readme says it all. To use this, you have to have some working knowledge of JS or Node.js (just understanding require and hash tables/JS objects) and how to execute a command from a terminal. I might include a video of this in the readme at a later date.

Currently, it just equals functionality of the editor. I'll be working on finishing ENUMs and having the files it generate actually put in your project next, along with the first custom feature: Hotswapping Skills.

There will likely be a manual step involved in the next update, as I don't know of any way to automatically add a .gamescript to a project's resources.

Any feedback would be appreciated.

Joined: Oct 2017
Location: US
S
apprentice
Offline
apprentice
S
Joined: Oct 2017
Location: US
You rock, this is super useful!

Joined: Jul 2014
Location: East Coast
journeyman
OP Offline
journeyman
Joined: Jul 2014
Location: East Coast
Now injects into editor properly, has some very basic validation again uniqueness, and I spent way too much time getting the definitions to generate with useful documentation. If you use VSCode, when you define a field in a skill it will now tell you what the field expects, including if you need to import an ENUM value.

Will start work on weapon modifiers tommorrow.

Joined: Jun 2014
veteran
Offline
veteran
Joined: Jun 2014
Originally Posted by Sinistralis
Now injects into editor properly, has some very basic validation again uniqueness, and I spent way too much time getting the definitions to generate with useful documentation. If you use VSCode, when you define a field in a skill it will now tell you what the field expects, including if you need to import an ENUM value.

Will start work on weapon modifiers tommorrow.


Thank you for your all hard work.

Joined: Jul 2014
Location: East Coast
journeyman
OP Offline
journeyman
Joined: Jul 2014
Location: East Coast
Got a bit sidetracked, so Weapon Modifiers aren't in yet as I still need to figure out how to handle Osiris/Horus script workflows.

However, I have drastically cleaned up the code and this tool is now 100% extendable. What this means is you can now inject your own behavior into the Skill Generator. For example, if you want to create a modifier that will cause any skill with the field 'elemental' to generate duplicate skills but one for each element, now you can!

Once I figure out a good workflow for Modifiers to inject custom Osiris and Horus scripts, the ability of this thing will be scary.

I'm pretty stoked about this.

I just finished my first "real" modifier for it. I call it "Associate" and here is how it works:

Code
const { SHOUT_NAMES } = require('../lib/definitions/skillFields');
const { STATUS_CONSUME_NAMES } = require('../lib/definitions/statusFields');
const { POTION_NAMES, WEAPON_NAMES } = require('../lib/definitions/statFields');
const { DAMAGE_TYPE } = require('../lib/definitions/enums');

const skills = [
  {
    [SHOUT_NAMES.NAME]: 'FrostCoating',
    [SHOUT_NAMES.USING]: 'VenomCoating',
    'associate': {
      turns: 2,
      chance: 100,
      Status_CONSUME: {
        [STATUS_CONSUME_NAMES.NAME]: 'FROST_COATING',
        [STATUS_CONSUME_NAMES.USING]: 'VENOM_COATING',
      },
      Potion: {
        [POTION_NAMES.NAME]: 'Stats_FrostCoating',
        [POTION_NAMES.USING]: 'Stats_VenomCoating',
      },
      Weapon: {
        [WEAPON_NAMES.NAME]: 'Status_FrostCoating',
        [WEAPON_NAMES.USING]: 'Status_VenomCoating',
        [WEAPON_NAMES.DAMAGE_TYPE]: DAMAGE_TYPE.WATER,
      },
    },
  }
];

module.exports = skills;


The above, when built, will generate 4 skills. A shout, a status, a potion, and a weapon. It will automatically connect them all (skill gives status, status has potion id, and potion has boost weapon).

This is just an example of what this tool is capable of. The above is a very simple, minor example. I'll have more fun ones to show off once I figure out scripting support.

Last edited by Sinistralis; 04/11/17 06:08 AM.
Joined: Jul 2014
Location: East Coast
journeyman
OP Offline
journeyman
Joined: Jul 2014
Location: East Coast
Ok, this now has proper Script and Osiris support. I'm still working on cleaning up some APIs, but this just became even more powerful. I'm starting to flesh out some core scripts and extensions.

Below is an example of a hybrid effect, which allows you to attach multiple damage instances to a skill to simulate hybrid scaling or hybrid damage types:

Code
const { PROJECTILE_NAMES } = require('../lib/definitions/skillFields');
const { DAMAGE_TYPE, DEATH_TYPE, SKILL_ABILITY } = require('../lib/definitions/enums');

const skills = [
  {
    [PROJECTILE_NAMES.NAME]: 'PyroclasticRock',
    [PROJECTILE_NAMES.USING]: 'PyroclasticRock',
    [PROJECTILE_NAMES.COOLDOWN]: '2',    
    [PROJECTILE_NAMES.DAMAGE_MULTIPLIER]: 65,
    [PROJECTILE_NAMES.DAMAGE_RANGE]: 10,
    [PROJECTILE_NAMES.DESCRIPTION]: 'Lob a giant rock filled with sticky oil that will deal [1] and physical damage on landing creating a pool of oil, slowing enemies trapped within.',
    [PROJECTILE_NAMES.STATS_DESCRIPTION_PARAMS]: 'Damage',
    remote: {
      [PROJECTILE_NAMES.ABILITY]: SKILL_ABILITY.EARTH,
      [PROJECTILE_NAMES.DAMAGE_MULTIPLIER]: 65,
      [PROJECTILE_NAMES.DAMAGE_RANGE]: 10,
      [PROJECTILE_NAMES.DAMAGE_TYPE]: DAMAGE_TYPE.PHYSICAL,
      [PROJECTILE_NAMES.DEATH_TYPE]: DEATH_TYPE.PHYSICAL,
      [PROJECTILE_NAMES.EXPLODE_RADIUS]: 0,
      [PROJECTILE_NAMES.TEMPLATE]: '71251b25-90b3-4332-afce-d9fcb6d88381',
    }
  }
];

module.exports = skills;



Further, I have decided I am going to be turning this into a fully fledged skill editor. This means a proper UI. Larian has their hands full with a lot of things and the current Skill Editor has a large number of issues with it.

I will be starting work on the UI side of things once I has further fleshed out some more extension ideas I need for Ascension.

Features of this UI I am looking at doing:

  • - A detail UI view that will not require horizontal movement
  • - Global searching
  • - Better autocomplete for fields like animations, SkillProperties, Requirements, etc.
  • - Tooltips
  • - Proper USING support that fills in fields.
  • - Extension/Modification support


The goal of this is to make something so good, even Larian uses it.

Anyway, thanks for reading! Looking forward to fleshing this out more and to really give people who are too intimidated by scripting the power to make some awesome skills!



Joined: Jan 2010
Location: USA
F
enthusiast
Offline
enthusiast
F
Joined: Jan 2010
Location: USA
You're going to write the GUI in JavaScript? Or C#?


LSLib Contributor | My Mods: DOS2, DOS2DE | 560K Steam Workshop Subscribers
Joined: Jul 2014
Location: East Coast
journeyman
OP Offline
journeyman
Joined: Jul 2014
Location: East Coast
The current plan is in JS using Electron. It's been on my bucket list to learn for awhile as it will likely help me in my career to know it, especially with the advent of Web Assembly coming.

I also really prefer React/Redux for building UIs and handling state management. It really reasonates with how my brain works.

Last edited by Sinistralis; 12/11/17 05:22 AM.
Joined: Nov 2017
4
4NZ Offline
stranger
Offline
stranger
4
Joined: Nov 2017
This is great stuff - I've cloned and snooped around in your project and I look forward to making use of it in my mod, though I'm not quite ready for it yet. Thanks for putting in the hard work!


Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.5