Aller au contenu

Photo

Setting a Creature as Hero


  • Veuillez vous connecter pour répondre
4 réponses à ce sujet

#1
Rithwald

Rithwald
  • Members
  • 7 messages
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 :P. Thanks everyone.

#2
st4rdog

st4rdog
  • Members
  • 104 messages
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.

#3
smjones23

smjones23
  • Members
  • 42 messages
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?

#4
Rithwald

Rithwald
  • Members
  • 7 messages
make sure class is all caps

anyone figured out how to change heads on the fly with scripts?

Modifié par Rithwald, 11 novembre 2009 - 05:12 .


#5
SpaceRouge

SpaceRouge
  • Members
  • 1 messages
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.