Character Generation
#1
Posté 28 décembre 2009 - 09:47
#2
Posté 28 décembre 2009 - 03:59
#3
Posté 29 décembre 2009 - 06:16
#4
Posté 29 décembre 2009 - 07:02
#5
Posté 29 décembre 2009 - 09:56
#6
Posté 29 décembre 2009 - 12:57
My bad - I'd forgotten there is also a Client Script field, which doesn't do anything useful.
#7
Posté 29 décembre 2009 - 04:38
#8
Posté 29 décembre 2009 - 05:30
#9
Posté 29 décembre 2009 - 08:37
"The simple solution? In the core files, find "default.utc." Duplicate this and make it part of your module. Change the appearance to match the race and gender of your desired character. Make sure, when exported, it's landed in ...Addins\\YourModule\\module\\override."
#10
Posté 30 décembre 2009 - 09:34
#11
Posté 30 décembre 2009 - 03:04
default didnt work for me and you cant actually create default_player because of the conflict so just create a default.utc and then copy and rename it to the override directory.
#12
Posté 30 décembre 2009 - 05:52
#13
Posté 30 décembre 2009 - 07:20
Good to know.bigrickman wrote...
got it working but you have to use default_player.utc
default didnt work for me and you cant actually create default_player because of the conflict so just create a default.utc and then copy and rename it to the override directory.
I prefer to avoid manual tweaks to folders, in case they create integrity problems for players. Has anyone tried changing the default template in the chargen_preload table of the background 2da?
#14
Posté 01 janvier 2010 - 12:31
#15
Posté 02 janvier 2010 - 11:47
bigrickman wrote...
got it working but you have to use default_player.utc
default didnt work for me and you cant actually create default_player because of the conflict so just create a default.utc and then copy and rename it to the override directory.
I read your solution and it works for me. Only i don't know how to assign a name to the generated charachter. I mean the name you can see in inventory and stats page.
#16
Posté 03 janvier 2010 - 06:48
I notice that the name Jaden is also hard-coded in one of the Bioware chargen scripts, so maybe a safer option is
SetName(GetHero(), "Susan") ;in your module event script, immediately after character generation.
#17
Posté 03 janvier 2010 - 03:09
How do you discovered SetName() was the right function?
#18
Posté 04 janvier 2010 - 07:20
Professional answer? Search for a suitable function using the index. Right now, SetName is under Appearance functions, which isn't especially intuitive IMO. There's a discussion going on in the wiki editors' group about potential improvements to this documentation.
Alternatively, in the toolset you can filter function names. Knowing that the field you want to change is called Name, filtering on Name tells you that there are functions called GetName, SetName etc. Click on a function to display its syntax in the help window. This method works quite well, but you can get caught out - for example, stuff about placeables contains the letters PLC but not the word placeable.
Modifié par Proleric1, 04 janvier 2010 - 07:25 .
#19
Posté 04 janvier 2010 - 02:32
I known the filtering method but i can't find this help window that you are taking about. I'll try to search it.
#20
Posté 04 janvier 2010 - 06:40
Proleric1 wrote...
Honest answer? SetName is the function I'd use in NWN. So I looked to see whether it exists in DAO, which it does.
Professional answer? Search for a suitable function using the index. Right now, SetName is under Appearance functions, which isn't especially intuitive IMO. There's a discussion going on in the wiki editors' group about potential improvements to this documentation.
Somewhere in between Proleric1's two answers, I'm going to say how I worked out the SetName function:
I had the builder-to-builder package for someone else's mod (Red Riding Hood Redux). It had a custom character in it, so I looked at the script in that one and determined how he did it from there.
I've learned more looking at existing scripts than anywhere else. The Demo Tutorial module that comes with the toolset is also very handy for this.
#21
Posté 05 janvier 2010 - 03:02
#22
Posté 17 janvier 2010 - 12:15
#23
Posté 20 janvier 2010 - 09:46
#include "sys_chargen_h"
#include "utility_h"
void main()
{
// keep track of whether the event has been handled
int nEventHandled = FALSE;
event ev = GetCurrentEvent();
switch(GetEventType(ev))
{
case EVENT_TYPE_MODULE_START:
{
object oHero = GetHero();
// skip character generation
Chargen_InitializeCharacter(oHero);
Chargen_SelectGender(oHero, GENDER_MALE);
Chargen_SelectRace(oHero, RACE_DWARF);
Chargen_SelectCoreclass(oHero, class_WARRIOR);
Chargen_SelectBackground(oHero, BACKGROUND_NOBLE);
SetName(oHero, "Gimli");
// 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"));
break;
}
}
// if this event wasn't handled by this script fall through to the core script
if(!nEventHandled)
{
HandleEvent(ev, RESOURCE_SCRIPT_MODULE_CORE);
}
}
NOTE- JUST REPLACE THE THE GENDER, RACE, class, BACKGROUND AND NAME WITH ANY YOU CHOOSE. YOU CAN ALSO ADD EXTRA ITEMS JUST BY ADDING EXTRA LINES OR REPLACE EXISTING ITEMS
Modifié par beaukane, 20 janvier 2010 - 09:55 .
#24
Posté 20 janvier 2010 - 06:53
Yay! Always good to know it has helped someone as that was the main reason for uploading it.cstanish wrote...
I had the builder-to-builder package for someone else's mod (Red Riding Hood Redux). It had a custom character in it, so I looked at the script in that one and determined how he did it from there.
#25
Posté 20 janvier 2010 - 07:01
That solution (minus the SetName line) already exists as the second example in the wiki's Character Generation article.beaukane wrote...
have solved the problem to buypass chargen and get a character of any race, class, gender, background and any name you choose. i will post the script but it still leaves you with a bald character. i just hope it helps and somebody can figure out how to change the facial features.
Also there does not currently appear to be a way to set a creatures head/morph through scripting. Hopefully this will be addressed by BioWare in the not to distant future.





Retour en haut






