Author Topic: New Classes  (Read 4385 times)

peewee_RotA

  • Sr. Member
  • Posts: 272
  • Karma: +8/-0
    • View Profile
New Classes
« on: January 18, 2014, 06:57:32 PM »
So I did a bunch of play testing and since the last bug I saw, everything is pretty darned stable. So I thought I'd dabble into the codebase. Two things that I've always thought were missing are Barbarians and Monks. When it comes to new classes there's quite a bit of work to do, but here's a brief summary of the changes it took:

Add to class enum
Increase NUM_CLASSES
Update all references when loading characters for class base enhancements (starting weapons, magik type, combat/movement bonuses)
Place weapon and armor restrictions
Set stats
Set leveling names

These were pretty straight forward. The harder portion is updating the .RES files. The character descriptions and images are pulled from PICS.RES inside the UI/CREATEC folder. Slade is not very stable when viewing this and can't save changes to res files. XWE will save but it messes with the dirrectory structure, doesn't place any new files in the right content chunks, and otherwise kills off the .RES.

SO! I've started extracting the need for the description texts and images from the actual resource file. This required moving some of the STATS.H definitions to a new header file and changing up StatsUpdateCreateCharacterUI s little. But what it provides is an easier way to insert the new content. I don't think it will be adapted for the real branch... but If I start my own branch I'll definitely make it available. It will have a bare structure looking directly for the files instead of navigating the .res sources... and should make adding new classes much easier for anyone who wants to.

I've got some issues to work out, but once they are done I'll try to post the code changes.

 :D


Barbarian:
Str 40
Con 40
Acc 10
Spd 35
Mag 10
Stl 10

Weapons: Axes and Maces (and staff because there is no built in restrictions on the weapon type)
Armor: Leather
Magic: Mage

Starts only with runes for leap and speed buff spells. Only starts with these spells.

Class advantages:
+25% jump
+25% attack speed
+25% damage
+20% health regen

I think it all makes up for the weapon/armor limitation

peewee_RotA

  • Sr. Member
  • Posts: 272
  • Karma: +8/-0
    • View Profile
Re: New Classes
« Reply #1 on: January 19, 2014, 03:17:35 PM »
So question regarding this..

I'm seeing that most class advantages are given in STATS.c in  StatsCalcClassStats. There is a switch that checks against G_activeStats->ClassType. I tried replacing this section and noticed that at this point in the code, G_activeStats->ClassType is always 0. So I restored the original switch statement and it's as if the existing code gets ignored because the 0 value.


Am I missing something?


Nevermind. I figured it out. These values are only calculated at character cration. However the function is called several times during character load with a default of 0. The values that it determines at creation get saved into the character save. So anything that it spits out while loading a character is outdated anyway...
« Last Edit: January 19, 2014, 03:32:30 PM by peewee_RotA »

LysleShields

  • Administrator
  • Full Member
  • Posts: 208
  • Karma: +6/-1
  • Is the potion half full or half empty?
    • View Profile
    • Amulets & Armor
Re: New Classes
« Reply #2 on: January 21, 2014, 08:25:46 PM »
This sounds interesting.  Is the Sailor and the Barbarian similar?  Mage magick, hmm, okay.

I need to post the .RES and tools online.  Currently, they are still mostly DOS tools, so you have to run them from DOSBox, but it would be a start for making custom content.

peewee_RotA

  • Sr. Member
  • Posts: 272
  • Karma: +8/-0
    • View Profile
Re: New Classes
« Reply #3 on: January 22, 2014, 07:28:28 AM »
That'd be pretty cool. I've not yet tried to move the BMPs out of the res. (Using blank images for the new classes right now)


Speaking of which, I'm confused about the character descriptions. The .RES text files contain some kind of newline characters, but manually placing "\n"'s doesn't get interpreted as newlines. Neither do the equivalent windows newlines in actual text files that I'm reading now. I didn't see any literal whitespace either. And copy/pasting the text from the .txt files in the res to windows .txt files preserved actual newline characters. Is this a windows/linux newline format thing or is there something else involved. (maybe I've got the wrong encoding)



As for the barbarian/sailor, the concept was for the barbarian to have "berserking" abilities. So he gets the scrolls for speed, and strength right off the bat. Also, he only gets Str, Spd, and Con. Everything else is at the minimum. His leveling values are also more focused, so he should get more of the primary 3 at each level than the sailor. But the big thing for me is that he's a class that actually wants to use axes. All other fighting classes will stick to longswords and shortswords, unless they are limited otherwise. I'm curious how a playthrough works when the character actually holds on the the various axes and tries to purchase them in the shop.
« Last Edit: January 22, 2014, 07:50:50 AM by peewee_RotA »

peewee_RotA

  • Sr. Member
  • Posts: 272
  • Karma: +8/-0
    • View Profile
Re: New Classes
« Reply #4 on: January 22, 2014, 07:54:29 AM »
Oh, I've added 2 more for the fun of it:

Monk who has a high base punch damage. (everyone else has 3. He has 6)
Ninja who has high ACC and STL but nothing else.

The monk works pretty well, but without the *3 mana regen of the priest or the armor of the paladin, the priest spells are not nearly as powerful.

The Ninja is fun, but is really weak. He can one or two-shot a lot of baddies by level 3 but not always. He's really fast, though, so the strategy changes from stunlocking or traping to running around and getting off single hits. (all the while, dodging)

I'm inspired to add the ability to throw daggers. (probably use the arrow as a placeholder) I also want to add some sort of jumpkick for the monk, but I'm afraid that it won't be easy to perform without a HUD weapon animation to show what's happening.

peewee_RotA

  • Sr. Member
  • Posts: 272
  • Karma: +8/-0
    • View Profile
Re: New Classes
« Reply #5 on: January 23, 2014, 02:17:25 PM »
Got throwing daggers working. Similar mechanic to pick pocketing. If you have a dagger in the off hand you can throw it with a shortcut. The dagger respawns wherever the arrow(placeholder) hits. It's really cool. Especially since there's a dagger in level 1.. which makes a second dagger for the rogue.

I'm changing the rogue and ninja to spawn with more than 1 dagger so that they can have another option in combat.

LysleShields

  • Administrator
  • Full Member
  • Posts: 208
  • Karma: +6/-1
  • Is the potion half full or half empty?
    • View Profile
    • Amulets & Armor
Re: New Classes
« Reply #6 on: January 23, 2014, 02:52:25 PM »
Is that generating a new dagger each time you throw and lands in the world?  Does this leave a bunch of daggers everywhere?

peewee_RotA

  • Sr. Member
  • Posts: 272
  • Karma: +8/-0
    • View Profile
Re: New Classes
« Reply #7 on: January 23, 2014, 10:32:38 PM »
It kills the mouse hand dagger, spawns a projectile, then spawns a new dagger after hitting a wall. So as far as the player is concerned it's the same one. It makes things a bit interesting.

Right now I've got the daggers calculating damage the same as weapons, except using ACC instead of STR. From what I can tell, missile weapons never roll for crits, so it makes higher ACC characters have another way to use that stat. Right now my ninja that I'm testing with has 12 daggers sitting in his inventory. (which has forced me to be more concerned about finances. I've got something to throw gold at... and soon I'll toss som platinums at upgrading all 12)

Based on the placement of daggers, does anyone know if this was going to be a planned feature that was scrapped? I noticed that there is an item description for shurikens in pics.res that didn't make the cut.