Larian Banner: Baldur's Gate Patch 9
Previous Thread
Next Thread
Print Thread
#561228 12/01/15 03:40 AM
Joined: Oct 2014
Location: Hogwarts
member
OP Offline
member
Joined: Oct 2014
Location: Hogwarts
A few questions:

- How do you stop an enemy from dropping loot when it dies?
- How can you give your character a certain armor and a certain weapon? (I want 3 NPCs to have the same armor, but use different weapons)
- How do you give henchmen spells?
- How do you make enemies use magic? (All my characters that should use magic are just auto attacking. I can get swords, bows and fists to work but not spells.)

If any of this requires super advanced programming just let me know.


Joined: Oct 2014
B
enthusiast
Offline
enthusiast
B
Joined: Oct 2014
Originally Posted by JecklynHyde
A few questions:

- How do you stop an enemy from dropping loot when it dies?
- How can you give your character a certain armor and a certain weapon? (I want 3 NPCs to have the same armor, but use different weapons)
- How do you give henchmen spells?
- How do you make enemies use magic? (All my characters that should use magic are just auto attacking. I can get swords, bows and fists to work but not spells.)

If any of this requires super advanced programming just let me know.



1.) You can remove their loot table in the sidebar in the "Treasure" box.

2.) Not sure, haven't tried yet.

3.) Use CharacterAddSkill.

4.) Working on this pretty soon myself. My mages also just autoattack, I'm guessing it's probably also CharacterAddSkill by hand for each NPC.

Joined: Jul 2014
R
addict
Offline
addict
R
Joined: Jul 2014
You can set the character's equipment to be whatever you want, if you make an equipment Stat file for it. I don't think it auto-equips though if it's in their inventory list.

To have enemies actually use magic, you need to attach the appropriate charScript to them. Just having the skill known isn't enough; it's the charScript that lets them use skills in battle.

Joined: Oct 2014
B
enthusiast
Offline
enthusiast
B
Joined: Oct 2014
Originally Posted by Rhidian
You can set the character's equipment to be whatever you want, if you make an equipment Stat file for it. I don't think it auto-equips though if it's in their inventory list.

To have enemies actually use magic, you need to attach the appropriate charScript to them. Just having the skill known isn't enough; it's the charScript that lets them use skills in battle.


Do you know which CharScripts im looking for? I've attached something like CMB_Mage to a magic user, and now he does run away to create distance in combat, but he still doesn't cast.

Joined: Jul 2014
R
addict
Offline
addict
R
Joined: Jul 2014
The charScript you're looking for has the specific skill name in its name. Like Skill_Fireball or something like that (I can't recall the specific script since its been a long time since I looked at it). You could look at any spell casting NPC from the main campaign to see what they use.

What the skill charScript does is give the skill to the NPC if they don't already have it, and gives them the logic to use it in combat. The default auto attack that you're seeing is coming from the DefaultCharacter script most characters have.

So yeah, just look for a charScript with the name "Flare" or any other specific skill in its name.

Joined: Oct 2014
B
enthusiast
Offline
enthusiast
B
Joined: Oct 2014
Great info, thank you.

Joined: Jul 2014
R
addict
Offline
addict
R
Joined: Jul 2014
Alright, I took a look at the scripts and the ones you are looking for start with "SKILL_" followed by the skill type and name.

Examples include:
SKILL_Projectile_EnemyChainLightning.charScript
SKILL_Rain_EnemyRainWater.charScript
SKILL_Shout_EnemyInspire.charScript

Joined: Oct 2014
Location: Hogwarts
member
OP Offline
member
Joined: Oct 2014
Location: Hogwarts
How do I make an equipment stat file?

Joined: Jul 2014
R
addict
Offline
addict
R
Joined: Jul 2014
It's just a txt file within your mod's Public/Stats/Generated/ folder. Here is what the game uses for the Ranger class equipment, for example:

Code
new equipment "Class_Ranger"
add equipmentgroup 
add equipment entry "WPN_StandardIssueBow"
add equipmentgroup 
add equipment entry "WPN_FightingKnife_B"
add equipmentgroup 
add equipment entry "POTION_Minor_Healing_Potion"
add equipmentgroup 
add equipment entry "POTION_Minor_Healing_Potion"
add equipmentgroup 
add equipment entry "WPN_Arrow_Poison_A"
add equipmentgroup 
add equipment entry "WPN_Arrow_Stunning_A"
add equipmentgroup 
add equipment entry "WPN_Arrow_Fire_A"
add equipmentgroup 
add equipment entry "SCROLL_Resurrect_1"
add equipmentgroup 
add equipment entry "CONT_Backpack_A_SourceHunter"



There's the [new equipment] line at the top that states the name to use in the Editor.

There's the [add equipmentgroup] line between each item.

And then there's [add equipment entry "item"] that states what item it has.

Joined: Oct 2014
Location: Hogwarts
member
OP Offline
member
Joined: Oct 2014
Location: Hogwarts
I modified the Equipment file to include a ranged equipment set, then I opened the editor, clicked an NPC, opened his side bar, and looked for the new equipment set under Equipment but it's not there. How would I make the new equipment set appear in the list?


Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.5