Refactor: Add support for loading primary stats from mod file #1466

Closed
dorkster opened this Issue Sep 12, 2016 · 7 comments

Projects

None yet

3 participants

@dorkster
Collaborator
dorkster commented Sep 12, 2016 edited

Right now, the primary stats (Physical, Mental, Offense, Defense) are hard-coded into the engine. They are fine for the game we're making, but may not be a good fit for other games. Changing these stats to be more flexible will need some sweeping changes to the mod API, so it should be done before 1.0.

Here is a list of the areas of the code-base/mod API this will affect:

  • Player title requirements
  • Item requirements
  • Character menu layout
  • Player power requirements
  • Creature limit for spawn powers
  • Default primary stat point allocation for classes
  • Player/creature stats that depend on primary stats
  • Effects that change primary stats
@dorkster dorkster added the refactor label Sep 12, 2016
@dorkster dorkster added this to the Pre-1.0 milestone Sep 12, 2016
@dorkster dorkster self-assigned this Sep 12, 2016
@clintbellanger
Owner
clintbellanger commented Sep 13, 2016 edited

Suggestion:

in stats.txt definitions look like:

stat_per_defense=avoidance,5

I suggest something like this, where it's [primary stat], [number], [bonus stat]

stat_bonus=defense,5,avoidance

or even:

stat_bonus=1,defense,5,avoidance

Anything more complex than simple ratios like that and I'd suggest going to scripts.

@dorkster
Collaborator

That's what I had in mind. Since we already use the "stat_per_..." language for "stat_per_level", I was thinking of:

stat_per_primary=defense,avoidance,5

Order could change, but you obviously get the idea.

@clintbellanger
Owner

Finally, one more wild idea:

Primary stats may not be needed at all. Powers could replace them entirely. There could be passive HP, MP, and Avoidance bonuses in the skill trees. Weapon proficiencies could also be unlocked via skill tree. Not to mention getting to spend level up points all in one place.

But, people love their primary stats. Being able to arbitrarily define them is going to be very useful. Most of the time when I read someone's RPG idea, novel primary stats are one of the first things created.

@DoKel
DoKel commented Sep 18, 2016

@clintbellanger in my opinion, that idea sounds really good.
Even wilder idea is to make presence of primary stats optional.
I mean, it's possible to let modders to create any number of stats, and let weapon proficiencies/skills/whatever depend on them. They're able to create powers, which increases any amount of any stats.

So, what will we get? If modder wanna provide primary stats, he can:

  1. Create custom stats, called "Strength, Agilty, Mental, etc"
    That stats have to be displayed in character menu, ofc.
  2. Create powers for each of them. Each power increases related stats by X points.
    Modder may also want that stats to apear at separated tab.
  3. Let player use X power-ups per level.
  4. Write dependencies to weapons/other powers for each stat
    Here we are! Primary stats are set. The only problem is harder balance -- player can spend all power-ups to skills and just ignore stats, so the ability to unlock a skill have to depend on primary stats even more than earlier.

But there is still much work to provide that. And there is much less to do for intorducing your idea. However, there is not more work than to just make custom primary stats, and gain is much more (I already have ideas, which nice features can be introduced by that, and can't be realised now).

@dorkster
Collaborator

Sneak peak: There's still a bit of work to do + some cleanup, but things are functional now. Here's a screenshot showing the potential for adding a "Luck" stat. (Note: I don't think our game in particular needs a luck stat, it's just an example):
gscreenshot_2016-10-10-010154

@dorkster
Collaborator

For modders: here is a Bash script that will update your mod to the new syntax. Simply run it from the root of your mod.

https://gist.github.com/dorkster/2dd11e8b0d071d494c128be7df938045

@dorkster dorkster closed this Oct 11, 2016
@clintbellanger
Owner

This is rad, definitely one of those dream-features I was hoping would squeeze into 1.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment