I want to find out how to script, the player starting as a werewolf.
I have it in my mind with a cutscene, and then once you start playing you take over one of the characters in the scene. And this is a werewolf.
From the questions I've asked round it seems that this has to be scripted and I have no idea how to do that.
Playable Character, Werewolf.
Débuté par
RyuAzai
, mars 06 2010 06:05
#1
Posté 06 mars 2010 - 06:05
#2
Posté 06 mars 2010 - 08:27
#3
Posté 06 mars 2010 - 04:59
Yes, I was reading that. Near the end it said by skipping the process you will get a character that is featureless and bald.
Though before that it says you can create a creature template, to get your starting equipment from, but I don't know if that means you start as the creature or if you just take its equipment
So I was wondering if anyone had already done this or encountered these things or found a work aaround for the problem.
Though before that it says you can create a creature template, to get your starting equipment from, but I don't know if that means you start as the creature or if you just take its equipment
So I was wondering if anyone had already done this or encountered these things or found a work aaround for the problem.
#4
Posté 06 mars 2010 - 06:07
Once you call the required functions to do the char gen (as in the wiki), you can call SetAppearanceType with ID 53 to set the werewolf appearance (couldn't find werewolf in APR_base but there was Witherfang which I assume is close enough).
#5
Posté 06 mars 2010 - 06:08
It only takes it's items. through the function LoadItemsFromTemplate(), you could of course have a script that copy other things from objects aswell or read them in from a .2da. It's what you make of it.
#6
Posté 06 mars 2010 - 06:17
TimelordDC wrote...
Once you call the required functions to do the char gen (as in the wiki), you can call SetAppearanceType with ID 53 to set the werewolf appearance (couldn't find werewolf in APR_base but there was Witherfang which I assume is close enough).
So, in the script, I would input that? And it would skip the character generation? Or would it start it, but you just would have the appearance of a werewolf as you start up?
Though what about the head, would I have to set that ID as well? Since appearance gives you a headless body.
EDIT: On the other thing, beyond loaditemsform, is it possible to use loadappearance, loadstats, load etc etc?
Kinda along the lines of Setappearance? As in you could use all of them?
Modifié par RyuAzai, 06 mars 2010 - 06:18 .
#7
Posté 06 mars 2010 - 07:07
werewolves doesn't use morphs so i can't see how you can lose the head. but there can be a glitch I haven't experimented with it.
there are no such load functions but if you write them you can of course use them.
there are no such load functions but if you write them you can of course use them.
#8
Posté 06 mars 2010 - 08:53
Ah, I don't know a thing about writing script.
What I mean is not morph, but when creating a creature you still had to set its 'head' so to speak.
What I mean is not morph, but when creating a creature you still had to set its 'head' so to speak.
#9
Posté 07 mars 2010 - 02:39
You don't need to create any creatures in the toolset. If you want items that are not present in the default template - it is much easier to load the items directly to the character. The below snippet would go into your module script.
case EVENT_TYPE_MODULE_START:
{
object oHero = GetHero();
// skip character generation
Chargen_InitializeCharacter(oHero);
Chargen_SelectGender(oHero, GENDER_MALE);
Chargen_SelectRace(oHero, RACE_HUMAN);
Chargen_SelectCoreclass(oHero, class_WARRIOR);
Chargen_SelectBackground(oHero, BACKGROUND_NOBLE);
// give the player some equipment
EquipItem(oHero, UT_AddItemToInventory(R"gen_im_arm_cht_lgt_rlr.uti"));
EquipItem(oHero, UT_AddItemToInventory(R"gen_im_arm_bot_lgt_rlr.uti"));
EquipItem(oHero, UT_AddItemToInventory(R"gen_im_arm_glv_lgt_rlr.uti"));
EquipItem(oHero, UT_AddItemToInventory(R"gen_im_arm_shd_sml_wdn.uti"));
EquipItem(oHero, UT_AddItemToInventory(R"gen_im_wep_mel_lsw_lsw.uti"));
SetAppearanceType(oHero, 53);
break;
[color="#000000"]}[/color]
Modifié par TimelordDC, 07 mars 2010 - 02:40 .
#10
Posté 07 mars 2010 - 04:29
So in this script. If I changed Race_Human to Race_Werewolf(Or I think they label it as monster) and the same with class.
Then set the idea, 53, which you said is Witherfang? if I edit those then when my place starts they will be a werewolf or well whatever I want them to be set as?
Then set the idea, 53, which you said is Witherfang? if I edit those then when my place starts they will be a werewolf or well whatever I want them to be set as?
#11
Posté 07 mars 2010 - 06:11
well i would go directly on the main functions then going through chargens specific function, because those are built for player races only. some of them won't do a thing if they get unsupported parameters, while other will work fine.
so use Setgender(),SetAppearance,SetCreatureProperties() and so on to be sure it work exactly like you want it.
so use Setgender(),SetAppearance,SetCreatureProperties() and so on to be sure it work exactly like you want it.
#12
Posté 07 mars 2010 - 06:57
Okay. And I should take out anything within a /// right?
Like /// give the player some equipment?
And other wise if I put that script in it should make the player start as whatever I put in chargen functions?
EDIT: I realized what you were saying now, and changing the chargen code to functions.
I guess my only other question now is, will this be the only script I need for this specific event, to procede forward? After I set up my cutscene, play it and then finish it with the script tagged a long. It should work fine?
Like /// give the player some equipment?
And other wise if I put that script in it should make the player start as whatever I put in chargen functions?
EDIT: I realized what you were saying now, and changing the chargen code to functions.
I guess my only other question now is, will this be the only script I need for this specific event, to procede forward? After I set up my cutscene, play it and then finish it with the script tagged a long. It should work fine?
Modifié par RyuAzai, 07 mars 2010 - 11:33 .
#13
Posté 08 mars 2010 - 07:16
I think so, but make sure you test to levelup aswell.
#14
Posté 08 mars 2010 - 07:58
Tried it but the script wouldn't compile.
I think I didn't have enough functions.
Gender, Apperance, Creature Properties, and inventory was what I included. Very late now but tomorrow I am gonna grab the log and see what went wrong.
I think I didn't have enough functions.
Gender, Apperance, Creature Properties, and inventory was what I included. Very late now but tomorrow I am gonna grab the log and see what went wrong.





Retour en haut






