Author Topic: Altering Races in DC 2.x  (Read 1208 times)

Offline Nol Drek

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 2129
    • Nol Drek's Web Site
Re: Altering Races in DC 2.x
« Reply #15 on: May 03, 2016, 09:57:34 PM »
Hi Paul, at the moment, as far as I can tell, there are already ten races inside the default race.txt/race.dat files, but when starting a game (using the default files!), only seven are shown. Thus, this is not related to my modifications.

I will see if I find a clue to this myself (maybe the amount of shown races is can be set somewhere in the txt-files or in the editor, or maybe it is tied to the races inside the race.txt file). I will cry for help if I do not find a solution...  ;)

The Drow, Duergar, and Svirfneblin races all have the following line in race.txt:

Special Ability = race_RaceSuppress,"Y"

Try commenting out that line, like it is for the other 7 races.
"Into the Drachensgrab Mountains!"

http://www.noldrek.com

Offline Dinonykos

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 2188
    • Dinonykos Dungeon Craft
Re: Altering Races in DC 2.x
« Reply #16 on: May 04, 2016, 12:51:51 AM »
Great! Thank you, Nol! I should have realized this myself. Works fine!
Find four contributions to the Pre-Generated Character Mini-Module Design Contest on my homepage.
New: THE AMBASSADOR'S LETTER, my contribution to the 7-day-challenge.
DINONYKOS DUNGEON CRAFT DESIGN HOMEPAGE

Offline manikus

  • Skriptor
  • Administrator
  • Hero Member
  • *****
  • Posts: 9590
Re: Altering Races in DC 2.x
« Reply #17 on: June 01, 2016, 06:24:18 PM »
Skills are a bit tricky at first. :) Have you tried reading the Help documentation on my or Paul's site? You have? Not terribly helpful, passed a real bare-bones definition.

I have created three new files to be found here:
http://ua.reonis.com/index.php?topic=3322.new#new
Later, I will add them into the Help documentaiton, but for now you can get right to them. :)
These annotated files for baseclass, class and race are a couple or several entries in each database with comments by me that should help explain what is going on. Honestly, I have found using the SkillAdj scripting key word much more difficult so didn't realize that the basics are hard if not understood.
Skill =             // first term is always the name, second term is always initial value
SkillAdjAbility =      // first term is always the name of the skill to modify, second term is always an ability name, third term is how to modify the value, followed by 25 values corresponding to ability score values of 1 to 25, respectively
SkillAdjBaseclass =      // first term is always the name of the skill to modify, second term is always the name of a valid baseclass, third term is how to modify the value, followed by 40 values corresponding to each of the 40 available levels, respectively 1 to 40
SkillAdjRace =         // first term is always the name of the skill to modify. second term is always the name of a valid race, third term is how to modify the value, fourth term is modification value

"valid" means in one of the databses
"how to modify value" is +, -, *, /, %, \= (add, subtract, multiply, divide, percentage, set equal to)

Offline Dinonykos

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 2188
    • Dinonykos Dungeon Craft
Re: Altering Races in DC 2.x
« Reply #18 on: June 02, 2016, 07:34:10 AM »
This is indeed helpful. And it is good to see that you have returned, Manikus!
Find four contributions to the Pre-Generated Character Mini-Module Design Contest on my homepage.
New: THE AMBASSADOR'S LETTER, my contribution to the 7-day-challenge.
DINONYKOS DUNGEON CRAFT DESIGN HOMEPAGE

Offline Dinonykos

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 2188
    • Dinonykos Dungeon Craft
Re: Altering Races in DC 2.x
« Reply #19 on: June 07, 2016, 03:17:11 AM »
Manikus (and, of course, all other competent people), I do not know how limited your time is, but could you imagine that I list some special abilities I want my altered races to have and that you give me some hints how to implement that in the related files (particularly the specialAbilities.txt file)? Or perhaps we could follow your old suggestion if you can find the time:
When you are ready to work on this, I want to make a tutorial/workflow to share with the community, where we will use an example race and an example class and take them from how you did it in .914 to how we do it in the 1+ environment.
This might be a nice approach - I have seen you used a robot as example here: http://ua.reonis.com/index.php?topic=3322.0
This may also be interesting for anybody who thinks about doing a science fiction/superhero design...

Generally, for now I have the following questions:

a) I assume dwarf/gnome resistance means resistance to magic spells?

b) Can we influence the probability of finding a hidden door in the current stage of DC (meaning, can we increase it for races like dwarves - or robots)?

c) There are numerous skills like "ReadLanguages" mentioned in the different files. I guess that most of these do not play a role until an event is added that reads the respective skills in some way, correct? How would one, for example, include the "ClimbWalls" skill into a design?

d) Are there skills which work in combat? I would, e.g., expect "HideinShadows" to do so...
« Last Edit: June 07, 2016, 03:27:39 AM by Dinonykos »
Find four contributions to the Pre-Generated Character Mini-Module Design Contest on my homepage.
New: THE AMBASSADOR'S LETTER, my contribution to the 7-day-challenge.
DINONYKOS DUNGEON CRAFT DESIGN HOMEPAGE

Offline manikus

  • Skriptor
  • Administrator
  • Hero Member
  • *****
  • Posts: 9590
Re: Altering Races in DC 2.x
« Reply #20 on: June 07, 2016, 04:13:11 PM »
I have enough time to help, and as a matter of fact, this is the kind of thing I want to spend my time doing.

I have thought about annotating the special abilities database, but there aren't just a couple of ones I can use as examples. I will start doing some, however and post them as I do them. Also, the documentation on the special abilities Hooks is pretty thorough, and I think Paul has done a great job of explaining. So, that is a place to start... :D


Quote from: Dinonykos
a) I assume dwarf/gnome resistance means resistance to magic spells?

When I was working on this, I couldn't remember what they did. :D But, now I've looked them up, and honestly have no idea if they actually do anything. I've found the threads where nologgie, Paul and I discussed "Short Guy Magic Resistance".
There are other things in FRUA, like AC Bonuses for dwarves and gnomes against giants, etc.

Paul? Can you tell us what exactly Dwarf Resistance and Gnome Resistance do in DC?

All fo the "special" things for dwarves and gnomes can be done with SAs and probably should be. :)

Quote from: Dinonykos
b) Can we influence the probability of finding a hidden door in the current stage of DC (meaning, can we increase it for races like dwarves - or robots)?

Yes. It works perfectly. I forget if we can modify it with scripts, not sure that I have tried to do that yet.

Quote from: Dinonykos
c) There are numerous skills like "ReadLanguages" mentioned in the different files. I guess that most of these do not play a role until an event is added that reads the respective skills in some way, correct? How would one, for example, include the "ClimbWalls" skill into a design?

The easiest way to check for Skills is with the Who Tries? event. You can check for any Skill you are using.
Additionally, a more advanced method might be using a GPDL script as a trigger for an event (there are arguments to get the value of any Skill).
The Skills in the example are associated with thieving skills (used by thieves and assassins in default DC). You can add any you want, for example in a little something I'm working on, I have added "Use Device", "Use Computer" and "Forensics".

Quote from: Dinonykos
d) Are there skills which work in combat? I would, e.g., expect "HideinShadows" to do so...

Not really. You could write a special ability that looks at any Skill, but it's not inherant to the Skill.

Offline Nol Drek

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 2129
    • Nol Drek's Web Site
Re: Altering Races in DC 2.x
« Reply #21 on: June 07, 2016, 07:31:16 PM »
a) I assume dwarf/gnome resistance means resistance to magic spells?

I thought that "DwarfResistance = yes" would grant the Dwarf THAC0 and Dwarf AC Bonus special abilities, but I don't see those special abilities anywhere in the database. Are they hard coded? Every monster has "Dwarf THAC0" and "Dwarf AC" as checkboxes that can be toggled on/off under the "Penalties' section.

The Short Guy Magic Resistance is granted by the line "Special Ability = race_ShortSaveBonus,8" in the races database.
"Into the Drachensgrab Mountains!"

http://www.noldrek.com

Offline manikus

  • Skriptor
  • Administrator
  • Hero Member
  • *****
  • Posts: 9590
Re: Altering Races in DC 2.x
« Reply #22 on: June 07, 2016, 07:42:45 PM »
Ah ha!

Okay, so a monster with one or both of those boxes checked it will allow a PC with "yes" to affect that monster.
Dwarf THC0 and Dwarf AC must be hard-coded or they don't do anything since there is no SA.

Thanks, Nol. Now we need to know about the monster database and if Dwarf AC, Dwarf THAC0, Gnome AC and Gnome THAC0 are hard-coded. This probably needs to be answered for Ranger Bonus as well.

Offline Paul R. Stevens

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 2139
Re: Altering Races in DC 2.x
« Reply #23 on: June 07, 2016, 10:26:12 PM »
Quote from: Manikus
Paul? Can you tell us what exactly Dwarf Resistance and Gnome Resistance do in DC?

In a function called "ModifyACAsTarget" (modify AC as seen from target perspective)

Code: [Select]
  if (pAttacker->HasDwarfACPenalty())
  {
    //if (race() == Dwarf)
    if (raceData.HasDwarfResistance(race()))
    {
      (*pAC) -= 4; // +4 bonus to armor class
      modify=TRUE;
    }
  }
  else if (pAttacker->HasGnomeACPenalty())
  {
    //if (race() == Gnome)
    if (raceData.HasGnomeResistance(race()))
    {
      (*pAC) -= 4; // +4 bonus to armor class   
      modify=TRUE;
    }
  }

The armor class is changed by 4 if
1) the attacker is  a monster
AND
2) the attacker has special characteristic called PenaltyDwarfAC
AND
3) the target has special characteristic called HasDwarfResistance

Ditto for Gnome.
Notice that the test for specific race is removed.  Any race can have
these special characteristics.

I see lots of discussion but this appears to be the only direct question of me.
« Last Edit: June 07, 2016, 10:30:28 PM by Paul R. Stevens »

Offline Dinonykos

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 2188
    • Dinonykos Dungeon Craft
Re: Altering Races in DC 2.x
« Reply #24 on: June 08, 2016, 02:55:39 AM »
Do I understand correctly:

a) The code posted above by Paul is "hard-code", thus, cannot be changed by the ordinary user. Even if we remove/replace Dwarves and Gnomes with other races, we could e.g. give a small/sturdy race the gnome/dwarf resistance, and every monster could be given a "Dwarf penalty" and "Gnome penalty". If both aply in combat, the -4 bonus will be triggered.

b) I assume we could do similar things "soft-coded" via special abilities, e.g. if we wanted only a minor AC bonus of 1, true?

c) I assume that there is something similar hard-coded for THAC0 which would give races with the Dwarf/Gnome THAC0 a THAC0 bonus in case that the attacked monster has the respective checkbox (Penalty: Dwarf/Gnome THAC0) marked.

d) There should be a "ranger" bonus, too.

Questions to a):
What if I put "Dwarf Resistance = yes" into the class file, would that be understood by the program?
What if I give both Dwarf AND Gnome Resistance to a race, would that mean an armor class bonus of -8 if the attacking monster had both penalties?

Question to d):
If there is a ranger bonus, how is it handled? What about the other race specialities - I have seen we started to discuss this elsewhere:

I'll take this, since I am the one that actually said the quote. ;)
For example elves can not be resurrected; dwarves, gnomes and halflings receive saving throw bonuses, half-elves and elves are magic resistant towards certain spells like charm and sleep, as well as some combat adjustments for dwarves, gnomes and halflings. All of these things are hard-coded into DC, and almost none of them actually work, but when I create the Special Abilities to accomplish these tasks, DC will allow them, but they won't allow the same things for other races because you can not access other races in the editor (partly) and because only certain SA hooks work with races (for now).
It seems quite the mess, I know. But Paul and did not write the original code - we're making stuff work first for the default (version 1.0) and then we'll start taking care of other things. :)
Find four contributions to the Pre-Generated Character Mini-Module Design Contest on my homepage.
New: THE AMBASSADOR'S LETTER, my contribution to the 7-day-challenge.
DINONYKOS DUNGEON CRAFT DESIGN HOMEPAGE

Offline manikus

  • Skriptor
  • Administrator
  • Hero Member
  • *****
  • Posts: 9590
Re: Altering Races in DC 2.x
« Reply #25 on: June 08, 2016, 02:20:39 PM »
Do I understand correctly:

a) The code posted above by Paul is "hard-code", thus, cannot be changed by the ordinary user. Even if we remove/replace Dwarves and Gnomes with other races, we could e.g. give a small/sturdy race the gnome/dwarf resistance, and every monster could be given a "Dwarf penalty" and "Gnome penalty". If both aply in combat, the -4 bonus will be triggered.

Correct. If you create a race called "Hobbit" and give it:
DwarfResistance = yes
then, for any monster with Dwarf AC (penalty) checked, the Hobbit will have -4 added to it's AC.

b) I assume we could do similar things "soft-coded" via special abilities, e.g. if we wanted only a minor AC bonus of 1, true?

You are correct again. Not hard to do at all.

c) I assume that there is something similar hard-coded for THAC0 which would give races with the Dwarf/Gnome THAC0 a THAC0 bonus in case that the attacked monster has the respective checkbox (Penalty: Dwarf/Gnome THAC0) marked.

Dwarf Resistance, for example, is for both Dwarf AC Penalty and Dwarf THAC0 Penalty.

d) There should be a "ranger" bonus, too.

Not in this database. :) Ranger bonus should be in the baseclass database.

Questions to a):
What if I put "Dwarf Resistance = yes" into the class file, would that be understood by the program?
What if I give both Dwarf AND Gnome Resistance to a race, would that mean an armor class bonus of -8 if the attacking monster had both penalties?

Don't know the answer to this one. if anyone want to let me know, I'll document it. ;)

Question to d):
If there is a ranger bonus, how is it handled? What about the other race specialities - I have seen we started to discuss this elsewhere:

I'll take this, since I am the one that actually said the quote. ;)
For example elves can not be resurrected; dwarves, gnomes and halflings receive saving throw bonuses, half-elves and elves are magic resistant towards certain spells like charm and sleep, as well as some combat adjustments for dwarves, gnomes and halflings. All of these things are hard-coded into DC, and almost none of them actually work, but when I create the Special Abilities to accomplish these tasks, DC will allow them, but they won't allow the same things for other races because you can not access other races in the editor (partly) and because only certain SA hooks work with races (for now).
It seems quite the mess, I know. But Paul and did not write the original code - we're making stuff work first for the default (version 1.0) and then we'll start taking care of other things. :)

Ranger bonuses belong in a different database. If you look in the baseclass database, there is a Skill for the ranger called "RangerBonusLevel" with a value of 1. In the monster database, there is a penalty for "Ranger Damage".

Offline manikus

  • Skriptor
  • Administrator
  • Hero Member
  • *****
  • Posts: 9590
Re: Altering Races in DC 2.x
« Reply #26 on: June 08, 2016, 02:28:18 PM »
I see lots of discussion but this appears to be the only direct question of me.

That was the only question. Thanks for your answer.

I have a new question, related.
Keyword "RangerDmg" (in text monster database) "Ranger Damage" Penalty in editor for monster. There doesn't seem to be anything corresponding in the baseclass database.
I have included a Skill in the ranger baseclass called "RangerBonusLevel", that I did not document anywhere, and don't know if it does a thing.
Any help on this one would be appreciated.

Offline Nol Drek

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 2129
    • Nol Drek's Web Site
Re: Altering Races in DC 2.x
« Reply #27 on: June 08, 2016, 07:47:17 PM »
Questions to a):
What if I put "Dwarf Resistance = yes" into the class file, would that be understood by the program?

I don't know.

What if I give both Dwarf AND Gnome Resistance to a race, would that mean an armor class bonus of -8 if the attacking monster had both penalties?

No. The code above has an "else if" block, if one applies then the other other does not. The two resistances are mutually exclusive.
"Into the Drachensgrab Mountains!"

http://www.noldrek.com

Offline Dinonykos

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 2188
    • Dinonykos Dungeon Craft
Re: Altering Races in DC 2.x
« Reply #28 on: June 09, 2016, 04:15:13 AM »
No. The code above has an "else if" block, if one applies then the other other does not. The two resistances are mutually exclusive.
Oh...
 :hiding:
I should have seen that myself... thank you!
Find four contributions to the Pre-Generated Character Mini-Module Design Contest on my homepage.
New: THE AMBASSADOR'S LETTER, my contribution to the 7-day-challenge.
DINONYKOS DUNGEON CRAFT DESIGN HOMEPAGE

Offline Paul R. Stevens

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 2139
Re: Altering Races in DC 2.x
« Reply #29 on: June 09, 2016, 06:12:03 PM »
I wonder if the word "else" should be removed.  Why not
allow them to be added together?  Then the designer can
decide.  I bet the "else" was put in there for no good reason.

 

anything