Aller au contenu

Photo

Making the player start with a completely pre-made character [solved]


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

#1
Kilrogg_

Kilrogg_
  • Members
  • 296 messages
For the first episode of our mod, we want the player character to be pre-made and have a specific set of abilities and stats. I want to be able to adjust literally everything on the character, as if I made him myself, leveled it up and spent the points, then handed it over to the player.

Problem #1
If I use only the default_player replacement method, I can give classes, skills, talents, spells and appearance successfully. However the player has no background, and while the correct classes are listed in the character pane, he actually remains a Warrior instead of a Rogue (he can only pick from warrior specs when leveling up), despite the fact I have set him as a Rogue both via the HIDDEN_ROGUE talent and class -> Rogue in the creature editor.

Problem #2
Using a combination of default_player replacement and this script pastebin.org/287127 (which I have not written), the script seems to override the advanced classes/skills/talents (so the player doesn't have them at all), but he has the correct background and is actually a rogue this time.

So it seems this needs to be done via scripting only and the toolset has a bunch of chargen_ functions that seem like they would do what I need, but I'm not sure how to use them. For example:

Chargen_SpendAttributePoints
Chargen_LoadPresetsTable
Chargen_HasPointsToSpend
Chargen_ApplyclassAbilities

Any tips on how I would use these? And what's a PresetsTable?

Thanks! :)

Modifié par Kilrogg_, 29 mai 2010 - 01:17 .


#2
Proleric

Proleric
  • Members
  • 2 354 messages
I guess you've seen the scripting advice in the wiki?

That probably doesn't have all the answers you need, but it would achieve some of the basics, like generating the correct class.

Modifié par Proleric1, 28 mai 2010 - 07:08 .


#3
Kilrogg_

Kilrogg_
  • Members
  • 296 messages
Thats where I got my script, but it doesnt explain the use of all the other chargen_ stuff

#4
CID-78

CID-78
  • Members
  • 1 124 messages
you don't need the chargen if you don't let the player make choices. you can either hardcode the values directly in the script or let it copy the values from a blueprint or .2da table.

#5
Kilrogg_

Kilrogg_
  • Members
  • 296 messages
That's what I want to do, I'm just not sure how to do it :x

#6
TimelordDC

TimelordDC
  • Members
  • 923 messages
I suggest going through the sys_chargen_h to see what you need to do.



In addition to the commands in the script, you need to have the following:

- SetCreatureProperty calls to set the various attributes

- _AddAbility calls to add your starting abiltiies



You don't need the chargen_ function calls at all. Instead, you can just use the direct functions in sys_chargen_h to achieve the same thing.

#7
Kilrogg_

Kilrogg_
  • Members
  • 296 messages
I think I found the functions I needed in there, but I'm hoping I can still keep the chargen code in there since it sets up a lot of the properties I don't need to modify, and then run the SetCreatureProperties/AddAbility for the ones I need to modify.



Thanks Timelord.

#8
Kilrogg_

Kilrogg_
  • Members
  • 296 messages
I've been able to do everything I wanted using SetCreatureProperty and AddAbility, as well as SetQuickSlot to populate the quickbar.



Thanks again for the help :)