OBSE getrace function?

Post » Sun May 05, 2013 11:32 am

Does OBSE have a getrace function? Something like this:

That I could make a custom Dunmer for instance, And still have NPC's referring to my character as a Dunmer?

Thanks. -s-

User avatar
Lil Miss
 
Posts: 3373
Joined: Thu Nov 23, 2006 12:57 pm

Post » Sun May 05, 2013 9:18 am

This would be better asked in the http://www.gamesas.com/topic/1456224-rel-oblivion-script-extender-obse-0021-beta-2. But while the latest http://obse.silverlock.org/obse_command_doc.html does not have a direct equivalent, check out the 'http://obse.silverlock.org/obse_command_doc.html#Race' section. Also the http://cs.elderscrolls.com/index.php/Category:Oblivion_Script_Extender entry on OBSE.

-Dubious-

User avatar
Syaza Ramali
 
Posts: 3466
Joined: Wed Jan 24, 2007 10:46 am

Post » Sun May 05, 2013 4:29 pm

You could try http://obse.silverlock.org/obse_command_doc.html#SetRaceAlias. It won't work with GetRace but it will work for GetIsRace, which is the function that is used by most dialog (and quest) checks.

User avatar
Casey
 
Posts: 3376
Joined: Mon Nov 12, 2007 8:38 am

Post » Sun May 05, 2013 1:51 am

Thanks you both so much..SetRaceAlias sounds like what I am wanting.. -s-

User avatar
Cagla Cali
 
Posts: 3431
Joined: Tue Apr 10, 2007 8:36 am

Post » Sun May 05, 2013 7:03 am

What about this?

User avatar
Christine
 
Posts: 3442
Joined: Thu Dec 14, 2006 12:52 am

Post » Sun May 05, 2013 10:20 am

What exactly are you trying to do?

Also

Looks like Morrowind syntax. It won't compile in Oblivion CS.

User avatar
Veronica Flores
 
Posts: 3308
Joined: Mon Sep 11, 2006 5:26 pm

Post » Sun May 05, 2013 4:46 pm

I am trying to make a script so that I can have a custom race, that will be referred to as a vanilla race.

Is there somewhere I can see examples of how to begin and end the script?

User avatar
Louise
 
Posts: 3407
Joined: Wed Nov 01, 2006 1:06 pm

Post » Sun May 05, 2013 7:20 am

Is this better?

User avatar
claire ley
 
Posts: 3454
Joined: Fri Aug 04, 2006 7:48 pm

Post » Sun May 05, 2013 2:53 am

Yes, assuming you are going to use it as a magic effect for a spell or magical ability.
User avatar
Manny(BAKE)
 
Posts: 3407
Joined: Thu Oct 25, 2007 9:14 am

Post » Sun May 05, 2013 1:45 pm

In dialogue? Use something like this:

scn MyQuestScriptBegin GameMode   If GetGameLoaded == 1      SetRaceAlias MyRace Orc   EndifEnd

And then use GetIsRace checks in Dialogue conditions.

User avatar
Jynx Anthropic
 
Posts: 3352
Joined: Fri Sep 08, 2006 9:36 pm

Post » Sun May 05, 2013 12:58 pm

I don't understand this part:

And then use GetIsRace checks in Dialogue conditions.

This would be instead of what I wrote? And using OBSE?

Would what I wrote work at all?

-Edit-

Could I also use more than one SetRaceAlias at one time in the script?

Dunmer, Orsimer, Breton2, Imperial2, etc?

Saebel: It would be for dialog.

Thanks a ton for the helps you both -s-

User avatar
Stu Clarke
 
Posts: 3326
Joined: Fri Jun 22, 2007 1:45 pm

Post » Sun May 05, 2013 11:26 am

Do you want it to work with vanilla dialogue or your own?

The script you wrote needs to be attached to a spell or magic ability. It will work if you add conditions GetGlobalValue PCRace == X to dialogue responses. (And create such global value, of course)

My script needs to be attached to a quest. It will run every gameload and set "race alias" each time, meaning that GetIsRace checks used in all vanilla dialogue will recognize one race as another.

My script will require OBSE, yours won't.

User avatar
Adam Baumgartner
 
Posts: 3344
Joined: Wed May 30, 2007 12:12 pm

Post » Sun May 05, 2013 2:26 am

I'm still new with dialogue, but I think you have to be in menu mode first, then, presuming you have a number of buttons representing your options, you capture the button choice.

The button choice determines which race to set your PC to.

I highly recommend the CS wiki at this point. What you are doing is complicated and potentially prone to crashing. The wiki has a number of tutorials for how to handle dialogue/menus, go through those first and then once you have a better grasp of what's going on, we'll be able to help more once you have a better concept for what you are specifically trying to accomplish and have run some tests.

And don't just bastardize the tutorials thinking they will do what you want right from the start, there are all kinds of gotchas and exceptions.
User avatar
Nicole Mark
 
Posts: 3384
Joined: Wed Apr 25, 2007 7:33 pm

Post » Sun May 05, 2013 3:38 am

Ok thank you both so very much! :banana:

I want it to work with Vanilla dialog.

User avatar
Unstoppable Judge
 
Posts: 3337
Joined: Sat Jul 29, 2006 11:22 pm

Post » Sun May 05, 2013 7:41 am

Would this also work?

User avatar
le GraiN
 
Posts: 3436
Joined: Thu Mar 22, 2007 6:48 pm

Post » Sun May 05, 2013 11:44 am

Yes, that should work.

Internally it's creating arrays of race variations.
User avatar
FABIAN RUIZ
 
Posts: 3495
Joined: Mon Oct 15, 2007 11:13 am

Post » Sun May 05, 2013 5:11 pm

Funny fact, when I first saw this thread I was like "getrace?, what the heck is a ge-trace?" :P

User avatar
Kevan Olson
 
Posts: 3402
Joined: Tue Oct 16, 2007 1:09 am


Return to IV - Oblivion