Forums
Games
Cyberpunk 2077 Thronebreaker: The Witcher Tales GWENT®: The Witcher Card Game The Witcher 3: Wild Hunt The Witcher 2: Assassins of Kings The Witcher The Witcher Adventure Game
Jobs Store Support Log in Register
Forums - CD PROJEKT RED
Menu
Forums - CD PROJEKT RED
  • Hot Topics
  • NEWS
  • GENERAL
    THE WITCHER ADVENTURE GAME
  • STORY
    THE WITCHER THE WITCHER 2 THE WITCHER 3 THE WITCHER TALES
  • GAMEPLAY
    THE WITCHER THE WITCHER 2 THE WITCHER 3 MODS (THE WITCHER) MODS (THE WITCHER 2) MODS (THE WITCHER 3)
  • TECHNICAL
    THE WITCHER THE WITCHER 2 (PC) THE WITCHER 2 (XBOX) THE WITCHER 3 (PC) THE WITCHER 3 (PLAYSTATION) THE WITCHER 3 (XBOX) THE WITCHER 3 (SWITCH)
  • COMMUNITY
    FAN ART (THE WITCHER UNIVERSE) FAN ART (CYBERPUNK UNIVERSE) OTHER GAMES
  • RED Tracker
    The Witcher Series Cyberpunk GWENT
THE WITCHER
THE WITCHER 2
THE WITCHER 3
MODS (THE WITCHER)
MODS (THE WITCHER 2)
MODS (THE WITCHER 3)
Menu

Register

Changing Geralt's model/animation at the start of a module

+
D

DeadYorick

Forum regular
#1
Apr 14, 2012
Changing Geralt's model/animation at the start of a module

I was wondering how to change Geralt's animations/model without resorting to a third party mod like Doppler's essance. Like if I say wanted the player to start the module off as a Bruxa or another character. Along with that how would I be able to change the player's starting stats/equipment?
 
C

Corylea.723

Ex-moderator
#2
Apr 14, 2012
DeadYorick said:
I was wondering how to change Geralt's animations/model without resorting to a third party mod like Doppler's essance. Like if I say wanted the player to start the module off as a Bruxa or another character. Along with that how would I be able to change the player's starting stats/equipment?
Click to expand...
This is the script I used in "Medical Problems 2" to change Geralt's usual appearance to a blindfolded version:

void main()
{
object CKPLAYER = GetFirstPC();
SetCreatureAppearance(CKPLAYER, 737);
}


You can use a similar script to change the player character to any appearance that you wish; that number in the SetCreatureAppearance line is the line of the appearance 2da that you want the player to look like.

If you want the player to BE a bruxa, then you just find the bruxa line in the appearance.2da and plug in that number. If you want the bruxa to have Geralt's combat animations, then you'll need to alter the model to give them to the bruxa. You can open up my Dark Elf Mod for an example of how this is done.

There's lots of information in the Djinni Wiki about how to set up the player with their starting equipment, so there's no need for anyone to write all of that out again; consult the Djinni Wiki for that information.
 
D

DeadYorick

Forum regular
#3
Apr 14, 2012
And the script would be placed in a specific trigger? Which one would be ideal?

Also whilst I was fiddling around with the NPC templates I noticed one field that interested me.

http://imageshack.us/photo/my-images/204/31007564.png/

It states here a field for an NPC to have the role of a player character. How does that work?
 
C

Corylea.723

Ex-moderator
#4
Apr 14, 2012
DeadYorick said:
And the script would be placed in a specific trigger? Which one would be ideal?
Click to expand...
How do you intend to set up your player character to begin with? You can call a script when the module loads, you can have a trigger on the starting point, you can call a script when the entry area loads -- there are lots of options.

Also whilst I was fiddling around with the NPC templates I noticed one field that interested me.

http://imageshack.us/photo/my-images/204/31007564.png/

It states here a field for an NPC to have the role of a player character. How does that work?
Click to expand...
I've never used that field to alter the player character; I've always done it with a script.
 
D

DeadYorick

Forum regular
#5
Apr 14, 2012
Corylea said:
How do you intend to set up your player character to begin with? You can call a script when the module loads, you can have a trigger on the starting point, you can call a script when the entry area loads -- there are lots of options.
Click to expand...
Alright I added the script to inc_spawn and tied it to the module's settings under "On Client Enter" and it worked!

Thanks for the help.
 
G

gorthuar

Senior user
#6
May 31, 2012
Corylea said:
If you want the player to BE a bruxa, then you just find the bruxa line in the appearance.2da and plug in that number.
Click to expand...
Riight, so I did that, but the new character's own combat animations won't work. Well, not all of them. Torches, hammers, etc. work as they should, but any attempt to use a sword results in a static model instead of an attack animation. I'm guessing the game wants to use Geralt's attack animations, which the character I chose doesn't have. But according to the above, the game shouldn't treat the character like Geralt?

The character I used is
Siegfried no 282
 
C

Corylea.723

Ex-moderator
#7
May 31, 2012
gorthuar said:
Riight, so I did that, but the new character's own combat animations won't work. Well, not all of them. Torches, hammers, etc. work as they should, but any attempt to use a sword results in a static model instead of an attack animation. I'm guessing the game wants to use Geralt's attack animations, which the character I chose doesn't have. But according to the above, the game shouldn't treat the character like Geralt?

The character I used is
Siegfried no 282
Click to expand...
What did you put in your starting script? If you used the one in the Djinni Wiki or copied the one that's in "The Price of Neutrality" or "Side Effects," then you probably have some lines like this in your starting script (this is taken from "Side Effects"):

object oPC = GetFirstPC();

SetCurrentToxinCapacity(100, oPC);

// Statystyki podstawowe i style walki

AddAbility("HeroStartingAbility", oPC);
AddAttackSequence("WitcherSteelStrong", "WitcherSteelSword", "Steel Sword Strong Active Parry", oPC);
AddAttackSequence("WitcherSteelFast", "WitcherSteelSword", "Steel Sword Fast Active Parry", oPC);
AddAttackSequence("WitcherSteelGroup", "WitcherSteelSword", "Steel Sword Group Active Dodge", oPC);
AddAttackSequence("WitcherSilverStrong", "WitcherSilverSword", "Silver Sword Strong Active Dodge", oPC);
AddAttackSequence("WitcherSilverFast", "WitcherSilverSword", "Silver Sword Fast Active Dodge", oPC);
AddAttackSequence("WitcherSilverGroup", "WitcherSilverSword", "Silver Sword Group Active Dodge", oPC);
AddAttackSequence("FistfightWitcher", "Fistfight", "Fistfight Active Dodge", oPC); // 6
AddSequenceAttack("FistfightWitcher", -1, ATTACK_SUBTYPE_NORMAL, "Fistfight level 1", oPC);
AddAttackSequence("ShortWeaponFast", "ShortWeapon", "ShortWeapon Active Dodge", oPC); // 7
AddSequenceAttack("ShortWeaponFast", -1, ATTACK_SUBTYPE_NORMAL, "ShortWeapon Normal", oPC);
AddAttackSequence("TwoHanded", "TwoHanded", "TwoHandedWeapon Active Dodge", oPC);
AddSequenceAttack("TwoHanded", -1, ATTACK_SUBTYPE_NORMAL, "WitcherTwoHanded", oPC);
AddAttackSequence("DaggerFast", "Dagger", "WitcherDagger Active Dodge", oPC);
AddSequenceAttack("DaggerFast", -1, ATTACK_SUBTYPE_NORMAL, "WitcherDagger", oPC);

// Przydzielone "talenty"

AddAbility("Strength1", oPC);
AddAbility("Strength1 Upgrade1", oPC);
AddAbility("Strength2", oPC);
AddAbility("Strength2 Upgrade1", oPC);
AddAbility("Strength2 Upgrade2", oPC);

AddAbility("Dexterity1", oPC);
AddAbility("Dexterity1 Upgrade1", oPC);
AddAbility("Dexterity2", oPC);
AddAbility("Dexterity2 Upgrade1", oPC);
AddAbility("Dexterity2 Upgrade2", oPC);

AddAbility("Endurance1", oPC);
AddAbility("Endurance2", oPC);
AddAbility("Endurance2 Upgrade1", oPC);
AddAbility("Endurance2 Upgrade2", oPC);
AddAbility("Endurance2 Upgrade3", oPC);

AddAbility("Intelligence1", oPC);
AddAbility("Intelligence1 Upgrade1", oPC);
AddAbility("Intelligence2", oPC);

AddAbility("Aard1", oPC);
AddAbility("Aard1 Powerup", oPC);
AddAbility("Aard1 Upgrade1", oPC);
AddAbility("Aard2", oPC);
AddAbility("Aard2 Powerup", oPC);
AddAbility("Aard2 Upgrade1", oPC);
AddAbility("Aard2 Upgrade2", oPC);

AddAbility("Axi1", oPC);
AddAbility("Axi1 Powerup", oPC);
AddAbility("Axi1 Upgrade1", oPC);
AddAbility("Axi2", oPC);
AddAbility("Axi2 Powerup", oPC);
AddAbility("Axi2 Upgrade1", oPC);
AddAbility("Axi2 Upgrade2", oPC);

AddAbility("Igni1", oPC);
AddAbility("Igni1 Powerup", oPC);
AddAbility("Igni1 Upgrade1", oPC);
AddAbility("Igni2", oPC);
AddAbility("Igni2 Powerup", oPC);
AddAbility("Igni2 Upgrade1", oPC);
AddAbility("Igni2 Upgrade2", oPC);

AddAbility("Quen1", oPC);
AddAbility("Quen1 Powerup", oPC);
AddAbility("Quen1 Upgrade1", oPC);
AddAbility("Quen2", oPC);
AddAbility("Quen2 Powerup", oPC);
AddAbility("Quen2 Upgrade1", oPC);
AddAbility("Quen2 Upgrade2", oPC);

AddAbility("Yrden1", oPC);
AddAbility("Yrden1 Powerup", oPC);
AddAbility("Yrden1 Upgrade1", oPC);
AddAbility("Yrden2", oPC);
AddAbility("Yrden2 Powerup", oPC);
AddAbility("Yrden2 Upgrade1", oPC);
AddAbility("Yrden2 Upgrade2", oPC);

AddAbility("StyleSteelStrong1", oPC);
AddAbility("StyleSteelStrong1 Upgrade1", oPC);
AddAbility("StyleSteelStrong1 Upgrade2", oPC);
AddAbility("StyleSteelStrong1 Upgrade3", oPC);
AddAbility("StyleSteelStrong2", oPC);
AddAbility("StyleSteelStrong2 Upgrade1", oPC);
AddAbility("StyleSteelStrong2 Upgrade2", oPC);
AddAbility("StyleSteelStrong2 Upgrade3", oPC);
AddAbility("StyleSteelStrong3", oPC);

AddAbility("StyleSteelFast1", oPC);
AddAbility("StyleSteelFast1 Upgrade1", oPC);
AddAbility("StyleSteelFast1 Upgrade2", oPC);
AddAbility("StyleSteelFast1 Upgrade3", oPC);
AddAbility("StyleSteelFast2", oPC);
AddAbility("StyleSteelFast2 Upgrade1", oPC);
AddAbility("StyleSteelFast2 Upgrade2", oPC);
AddAbility("StyleSteelFast2 Upgrade3", oPC);
AddAbility("StyleSteelFast3", oPC);

AddAbility("StyleSteelGroup1", oPC);
AddAbility("StyleSteelGroup1 Upgrade1", oPC);
AddAbility("StyleSteelGroup1 Upgrade2", oPC);
AddAbility("StyleSteelGroup1 Upgrade3", oPC);
AddAbility("StyleSteelGroup2", oPC);
AddAbility("StyleSteelGroup2 Upgrade1", oPC);
AddAbility("StyleSteelGroup2 Upgrade2", oPC);
AddAbility("StyleSteelGroup2 Upgrade3", oPC);
AddAbility("StyleSteelGroup3", oPC);

AddAbility("StyleSilverStrong1", oPC);
AddAbility("StyleSilverStrong1 Upgrade1", oPC);
AddAbility("StyleSilverStrong1 Upgrade2", oPC);
AddAbility("StyleSilverStrong1 Upgrade3", oPC);
AddAbility("StyleSilverStrong2", oPC);
AddAbility("StyleSilverStrong2 Upgrade1", oPC);
AddAbility("StyleSilverStrong2 Upgrade2", oPC);
AddAbility("StyleSilverStrong2 Upgrade3", oPC);
AddAbility("StyleSilverStrong3", oPC);

AddAbility("StyleSilverFast1", oPC);
AddAbility("StyleSilverFast1 Upgrade1", oPC);
AddAbility("StyleSilverFast1 Upgrade2", oPC);
AddAbility("StyleSilverFast1 Upgrade3", oPC);
AddAbility("StyleSilverFast2", oPC);
AddAbility("StyleSilverFast2 Upgrade1", oPC);
AddAbility("StyleSilverFast2 Upgrade2", oPC);
AddAbility("StyleSilverFast2 Upgrade3", oPC);
AddAbility("StyleSilverFast3", oPC);

AddAbility("StyleSilverGroup1", oPC);
AddAbility("StyleSilverGroup1 Upgrade1", oPC);
AddAbility("StyleSilverGroup1 Upgrade2", oPC);
AddAbility("StyleSilverGroup1 Upgrade3", oPC);
AddAbility("StyleSilverGroup2", oPC);
AddAbility("StyleSilverGroup2 Upgrade1", oPC);
AddAbility("StyleSilverGroup2 Upgrade2", oPC);
AddAbility("StyleSilverGroup2 Upgrade3", oPC);
AddAbility("StyleSilverGroup3", oPC);

// Autodoskok i i inne umiejetnosci

AddAbility("AutoJump", oPC);
AddAbility("AttackFromBehind", oPC);
AddAbility("SkinningKnife", oPC);
Click to expand...
But those are for GERALT'S combat style. If you're planning to use a human knight as your main character, then your starting script will need to specify a human knight's combat styles, not Geralt's.

You might need to redo the talents table to specify human combat abilities, as well, if you expect the player to level up during your adventure. But that's probably a concern for further on down the line.
 
G

gorthuar

Senior user
#8
May 31, 2012
Corylea said:
What did you put in your starting script?
Click to expand...
As per your suggestion, this:

void main()
{
object CKPLAYER = GetFirstPC();
SetCreatureAppearance(CKPLAYER, 282);
}

I did it fully expecting the character to behive like the specified model... which he does not. Before changing the appearence, Geralt's model behaves reasonably. However changing the model as per the above script makes attacking with anything other than small axes, clubs and torches really funny ;)
 
C

Corylea.723

Ex-moderator
#9
May 31, 2012
gorthuar said:
As per your suggestion, this:

void main()
{
object CKPLAYER = GetFirstPC();
SetCreatureAppearance(CKPLAYER, 282);
}

I did it fully expecting the character to behive like the specified model... which he does not. Before changing the appearence, Geralt's model behaves reasonably. However changing the model as per the above script makes attacking with anything other than small axes, clubs and torches really funny ;)
Click to expand...
I meant -- I thought this was clear from the parts I quoted -- what did you put in your starting script for the hero's attack sequences and starting abilities?

The model will only use the combat animations it has. And the game engine will only try to use the attack sequences you specify. If you specify Geralt's combat abilities but use the Siegfried model, then there's nothing it can do, so it won't do anything. As I said in my last post, if you want to use the human knight's combat abilities, then you'll have to specify those in your starting script.
 
G

gorthuar

Senior user
#10
May 31, 2012
Corylea said:
I meant -- I thought this was clear from the parts I quoted -- what did you put in your starting script for the hero's attack sequences and starting abilities?
Click to expand...
Nothing :) I understood yur original post to mean that changing the appearence will change the player entity completely (with it becoming the bruxa and all). I thought it'd attempt to make attack animations characteristic of the new appearence without any further changes...

Corylea said:
The model will only use the combat animations it has. And the game engine will only try to use the attack sequences you specify. If you specify Geralt's combat abilities but use the Siegfried model, then there's nothing it can do, so it won't do anything. As I said in my last post, if you want to use the human knight's combat abilities, then you'll have to specify those in your starting script.
Click to expand...
All right... so how do I go about that? Is there a list of ability names (with explanations what they are, of course) to be found somewhere? :)
 
C

Corylea.723

Ex-moderator
#11
May 31, 2012
gorthuar said:
Nothing :) I understood yur original post to mean that changing the appearence will change the player entity completely (with it becoming the bruxa and all). I thought it'd attempt to make attack animations characteristic of the new appearence without any further changes...
Click to expand...
I referred the original poster to the Djinni Wiki for information about setting up the player character's equipment and attack capabilities. The fact that I didn't specify them means only that I expected him to follow the Wiki's instructions for making a starting script, not that I thought he didn't need one.


gorthuar said:
All right... so how do I go about that? Is there a list of ability names (with explanations what they are, of course) to be found somewhere? :)
Click to expand...
There's a list to be found in the LUA script that specifies them. As far as I know, there is no other list. You can find the LUA scripts for a few of the game's files at ModDB. I imagine you'll especially want to look at opponent_att.lua and opponent_abl.lua. But this is an area I haven't done much with -- my players have always played as Geralt -- so if I wanted to do what you're doing, I'd open all the LUA scripts that had promising-sounding names and read them. You can do that as well as I can, so I leave you to it. ;)
 
C

Corylea.723

Ex-moderator
#12
May 31, 2012
I answered the question you asked -- about finding a list of abilities and combat styles -- but as I think about it, I don't think that's actually the question you want the answer to. What you want to know is much more simple -- what are those things for the character you're interested in: Siegfried? And that's an easy question.

Go to the templates that you've unbiffed and find Siegfried's NPC Story file. Open it in Djinni, and it will look like this:




Scroll down, looking at the phases, until you find a phase where Siegfried has good combat abilities. When he's Geralt's enemy in the Epilogue seems like a good one. That looks like this:




If we look at that, we see that the character template CDPR used for Siegfried during that phase of the game was zygfryd_q6_2, so we open that character template in Djinni:



If you click on the folder in the Abilities box, you'll get a pop-up that shows what abilities this character has.

And if you click on the Combat Styles folder, you'll get a different pop-up:




By looking at the values in these boxes, we can see that Siegfried is using the combat style SwordWithShield and that the specifier for this is h_adv_swordshield01. He also has the ability EpilogZygfryd, along with a few others. I'd try plugging some of those into your starting script and see what they produce.
 
G

gorthuar

Senior user
#13
Jun 1, 2012
In the meantime I've been tinkering myself. Using the following (and *nothing* more):

AddAbility("HeroStartingAbility", oPC);
AddAttackSequence("WitcherSteelFast", "WitcherSteelSword", "", oPC);

AddAbility("Akt2StartZygfryd", oPC);
AddAbility("finisher_1h_sword_with_item", oPC);

AddAbility("AttackFromBehind", oPC);
AddAbility("SkinningKnife", oPC);

I managed to get our brave knight to run with his sword drawn (previously the animation was hopelessly static, despite the character moving), which is a great improvement! He is still static in combat though (unless using the all-powerful torch! :p)

And I've just tested the abilities you suggested. They merely make him more powerful (and I don't want that ATM).
 
2

234ab

Rookie
#14
Jun 22, 2012
Corylea said:
What did you put in your starting script? If you used the one in the Djinni Wiki or copied the one that's in "The Price of Neutrality" or "Side Effects," then you probably have some lines like this in your starting script (this is taken from "Side Effects"):



But those are for GERALT'S combat style. If you're planning to use a human knight as your main character, then your starting script will need to specify a human knight's combat styles, not Geralt's.

You might need to redo the talents table to specify human combat abilities, as well, if you expect the player to level up during your adventure. But that's probably a concern for further on down the line.
Click to expand...
As a return long and bad stay in a hospital, I see there are many thing which I need to know...
 
Share:
Facebook Twitter Reddit Pinterest Tumblr WhatsApp Email Link
  • English
    English Polski (Polish) Deutsch (German) Русский (Russian) Français (French) Português brasileiro (Brazilian Portuguese) Italiano (Italian) 日本語 (Japanese) Español (Spanish)

STAY CONNECTED

Facebook Twitter YouTube
CDProjekt RED Mature 17+
  • Contact administration
  • User agreement
  • Privacy policy
  • Cookie policy
  • Press Center
© 2018 CD PROJEKT S.A. ALL RIGHTS RESERVED

The Witcher® is a trademark of CD PROJEKT S. A. The Witcher game © CD PROJEKT S. A. All rights reserved. The Witcher game is based on the prose of Andrzej Sapkowski. All other copyrights and trademarks are the property of their respective owners.

Forum software by XenForo® © 2010-2020 XenForo Ltd.