Scripts That Rely On Race, And How To Adjust Them.

Questions specific to OpenMW-CS can be asked, and content development related topics can be discussed here
Post Reply
psychotrip
Posts: 22
Joined: 21 Aug 2018, 15:18

Scripts That Rely On Race, And How To Adjust Them.

Post by psychotrip »

Hi everyone. I've been playing around the Construction Set lately (I have everything backed up so I don't care if I break stuff), and I've come across an interesting problem.

I'm using a custom race based on the high elf race. It has both visual and stat differences, but "lore-wise" it's the same race. I want everyone in the game to treat my character like a high elf. Ideally, this means:

1. Disposition bonus with other high elves.
2. The player receives all Altmer-based dialogue. ("Something on your mind, Goldenrod"?)
3. All scripts relating to race treat my character as a high elf.

Here's what I've tried so far. I know absolutely nothing about coding or scripting. I've mostly just been fumbling around:

I noticed that race checks seem to rely on a script called "RaceCheck" that runs at the beginning of the game. Basically, it uses a global variable called "PCRace" to assign each race ID a number (high elf is 4 for example), checks what race your character is, and assigns that number to your character. Most race checks seem to check for that number and not the race ID itself.

So what I've been trying to do is make the game assign the right number (4) to my Alternate High Elf race. I've tried:

1. Adjusting the RaceCheck script to assign PCRace 4 to both the High Elf and Alt High Elf races (so the script would look something like this)
Spoiler: Show
2. Creating a new script with a simple command like:

if ( Player->GetRace "Alt High Elf" == 1 )
set PCRace to 4


3. Running any variation of these scripts in-game using console commands (ie startscript RaceCheck). I tried this because I assumed the script only ran at the beginning of the game, so I thought I could start it manually. I didn't get any errors but it also didn't change anything.

4. Setting the global variable PCRace (where the number values come from) from 0 to 4. This seems like a pretty dangerous thing to do so I just tried this to see what would happen. Nothing did.

Since nothing seems to be working, I'm left with a few questions:

1. Is it even possible to accomplish any of the 3 goals I listed above?
2. Am I approaching this from the right angle? Or am I just fumbling around in the dark?

Thanks in advance for any advice/instructions you can give. I hope this post didn't come off as long-winded or verbose. I just want to be as descriptive as possible so I can find a solution.
User avatar
Capostrophic
Posts: 794
Joined: 22 Feb 2016, 20:32

Re: Scripts That Rely On Race, And How To Adjust Them.

Post by Capostrophic »

Is the ID of your race "alt high elf"?
psychotrip
Posts: 22
Joined: 21 Aug 2018, 15:18

Re: Scripts That Rely On Race, And How To Adjust Them.

Post by psychotrip »

Nah that was just a placeholder example. I can't remember what its actually called since I'm not at my computer right now. But I used the race's ID for the script, yes. Do you think thats the issue?
Post Reply