Setting a Creature as Hero
Débuté par
Rithwald
, nov. 11 2009 02:35
#1
Posté 11 novembre 2009 - 02:35
Hey does anyone know how to set the Player's Hero to a creature instead of using the chargen? I'm looking to make a mod based off of specific character that i create. I don't want that player making their own and ruining the story
. Thanks everyone.
#2
Posté 11 novembre 2009 - 03:07
http://social.biowar...cter_generation
Remember to make them the correct level if you want heavier armor equipped. I haven't figured out how to get a face morph in-game yet...
Also, remember to include the other two #includes from the 2nd script.
Remember to make them the correct level if you want heavier armor equipped. I haven't figured out how to get a face morph in-game yet...
Also, remember to include the other two #includes from the 2nd script.
#3
Posté 11 novembre 2009 - 04:13
This is what I posted for that script:
#include "sys_chargen_h"
#include "utility_h"
case EVENT_TYPE_MODULE_START:
{
// skip character generation
object oHero = GetHero();
Chargen_InitializeCharacter(oHero);
Chargen_SelectRace(oHero,RACE_HUMAN);
Chargen_SelectCoreclass(oHero,class_WARRIOR);
Chargen_SelectBackground(oHero,BACKGROUND_NOBLE);
LoadItemsFromTemplate(oHero, "main_character.utc", TRUE);
break;
}
I keep getting error: invalid declaration type
What am I doing wrong?
#include "sys_chargen_h"
#include "utility_h"
case EVENT_TYPE_MODULE_START:
{
// skip character generation
object oHero = GetHero();
Chargen_InitializeCharacter(oHero);
Chargen_SelectRace(oHero,RACE_HUMAN);
Chargen_SelectCoreclass(oHero,class_WARRIOR);
Chargen_SelectBackground(oHero,BACKGROUND_NOBLE);
LoadItemsFromTemplate(oHero, "main_character.utc", TRUE);
break;
}
I keep getting error: invalid declaration type
What am I doing wrong?
#4
Posté 11 novembre 2009 - 05:11
make sure class is all caps
anyone figured out how to change heads on the fly with scripts?
anyone figured out how to change heads on the fly with scripts?
Modifié par Rithwald, 11 novembre 2009 - 05:12 .
#5
Posté 24 novembre 2009 - 12:44
I'm not sure how to change heads on the fly, but I found how to start a campaign with a default character and choose a head for it instead of having the default bald head if that is what you want to solve.
Essentially, I've given up customising the hero class (after one fustrating night's work) and created the player character as a party member, then removed the hero object permanently from the party. I'm guessing there will be one or two issues with this approach since I've only just started with this, but thought I'd put down my code as early as possible in case it helps.
This is the code in the module script:
case EVENT_TYPE_MODULE_START:
{
// Initialise a blank hero
object oHero = GetHero();
Chargen_InitializeCharacter(oHero);
break;
}
I placed a character with the name, appearance and inventory I want in the start area (and gave it the tag "flick"), and the code I have in the area's script is:
case EVENT_TYPE_ENTER:
{
// Add player creature to party and set as main character
object oFlick = GetObjectByTag("flick");
UT_HireFollower(oFlick);
SetPartyLeader(oFlick);
// Remove the blank Hero class from the position
object oBlankHero = GetHero();
SetFollowerState(oBlankHero, FOLLOWER_STATE_INVALID);
SetObjectActive(oBlankHero, 0);
// Set event as handled
nEventHandled = TRUE;
break;
}
Probably not the best code since I am only beginning with this, but it is seeming to solve the problem I think you are having. I also still need to sort out starting experience and skills and the such, but again this is an early pass.
Essentially, I've given up customising the hero class (after one fustrating night's work) and created the player character as a party member, then removed the hero object permanently from the party. I'm guessing there will be one or two issues with this approach since I've only just started with this, but thought I'd put down my code as early as possible in case it helps.
This is the code in the module script:
case EVENT_TYPE_MODULE_START:
{
// Initialise a blank hero
object oHero = GetHero();
Chargen_InitializeCharacter(oHero);
break;
}
I placed a character with the name, appearance and inventory I want in the start area (and gave it the tag "flick"), and the code I have in the area's script is:
case EVENT_TYPE_ENTER:
{
// Add player creature to party and set as main character
object oFlick = GetObjectByTag("flick");
UT_HireFollower(oFlick);
SetPartyLeader(oFlick);
// Remove the blank Hero class from the position
object oBlankHero = GetHero();
SetFollowerState(oBlankHero, FOLLOWER_STATE_INVALID);
SetObjectActive(oBlankHero, 0);
// Set event as handled
nEventHandled = TRUE;
break;
}
Probably not the best code since I am only beginning with this, but it is seeming to solve the problem I think you are having. I also still need to sort out starting experience and skills and the such, but again this is an early pass.





Retour en haut






