Jump to content

Creature Creation BG2 original w DLTCEP


Recommended Posts

Howdy there modders,

 

I am trying to create a summonable Dragon, which is pretty much undefeatable. It is supposed to be used via a Ring.

I use DLTCEP and edited Abazighal, and saved the edited Abazighal as a new creature. And I kinda made it work.

Except for the fact that he doesn't attack that much. I can barely move him around... and he doesn't bump NPCs

even though that opcode is in the list. As soon as I summon, he may attack one creature.... then attacks a little... and then does nothing.

Until next commant. After that command, I gotta command him to do things again. What am I doing wrong? And yes, he is supposed

to be friendly.

 

All the best

Link to comment

What script is your dragon running? Did you make a new one from scratch for it, or is it based on an old one?

 

Most if not all attacks of many enemies specifically target PC, so if you change them to friendly, you won't see them do much, I imagine.

 

If you attach the script that your dragon is running, we could take a look at it see if there's anything not ok.

Link to comment

What script is your dragon running? Did you make a new one from scratch for it, or is it based on an old one?

 

Most if not all attacks of many enemies specifically target PC, so if you change them to friendly, you won't see them do much, I imagine.

 

If you attach the script that your dragon is running, we could take a look at it see if there's anything not ok.

Emm... not sure. LOL :D I just used standard. I think. I really have no clue what I'm doing. Couldn't find good tutorials on .CRE making.

And I don't know scripting. I thought the AI would handle the attack reactions automatically.

 

Here are screenshots of my current settings of the .CRE file.

post-3258-0-56984200-1534671824_thumb.jpg

post-3258-0-03437800-1534671833_thumb.jpg

post-3258-0-71693400-1534671841_thumb.jpg

post-3258-0-08594400-1534671850_thumb.jpg

post-3258-0-39354000-1534671860_thumb.jpg

post-3258-0-67281600-1534671867_thumb.jpg

post-3258-0-78355500-1534671876_thumb.jpg

post-3258-0-76278300-1534671885_thumb.jpg

Link to comment

I suspected that is the case. As it is right now, your dragon is using Abazigal's scripts.

 

I'm assuming you have mods like SCS and/or Spell Revisions? SCS scripts for many enemies specifically instruct them to target PC players and/or friendly (green circle) creatures only, because those enemies can never be a friendly in the whole game. So if you change allegiance of one such enemy to a "friendly" type, the MAJORITY of the stuff that they usually do won't happen, because you, the PC, are not their enemy. Or more precisely, because THEY are no longer ENEMY. There is usually a "check" that goes something like - IF Allegiance(Myself,ENEMY) - that goes before the majority of their actions. It means it requires them to be ENEMY (red circle) for them to execute any of those actions.

 

In most cases, their scripts do have a couple of generic lines near the end of the scripts that instruct them to attack whoever attacks them, for one round or so (using AttackOneRound() or AttackReevaluate() action). This is most likely why you see them attack for a bit, when they are targeted by a hostile, then stop.

 

Making a custom script for a custom friendly like this can be quite easy or quite a bit of work, depends on *what* you would like them to do. If you simply want the dragon to act mostly as a tank, with a dragon's wide range of immunities and resistances, and just basic attack, then that's fairly simple. You can probably just use the vanilla WTASIGHT.BCS, for example, for that purpose. This is a very simple script for a generic melee fighter. This script simply instructs the creature to attack the closest hostile, or whoever attacks them. No potion using, no ability using, no smart target selection. Nothing fancy. The vanilla script is something like 30 lines long.

 

However, if you want your friendly summoned creature to do other stuff, like casting spells, using innate abilities, it could take quite a bit of work. Take the Planetars, for example. The Planetars have many innate abilities as well as standard spells. There are a lot of things they could possibly do aside from basic attacking the closest enemy. The script for a Planetar can be 400+ lines long, as per Spell Revisions, or nearly 4000 lines long, as per the PnP Celestials mod.

 

Another factor affecting how complex the script *should* be, is whether you want this friendly summon to be uncontrollable, or completely controllable by you. If it is controllable by you, the script might be simpler. Because you can give the creature commands to suit the situation, doing what and when as you see fit. On the other hand, if it is uncontrollable, and if you want it to be an EFFECTIVE combatant, usually the script needs to be a bit more specific. You'll need to instruct it to use every single ability that you give it in a reasonably smart manner (it's pointless if you give it a specific ability but never instruct it to use the ability at all), select its target in a reasonably smart manner, and so on.

 

So you probably want to start looking into the codes and play around with them, if you would like to make a custom summoned creature. If you start from scratch, first you want to decide what you want the creature to do, what abilities they have, and so on. Then give them instruction to perform each action.

 

Or, you could take the script of the original enemy, then modify it so that it works even when they are friendly. This could potentially require a lot of work, because you would need to go through every single block (and there are MANY of them, if you have SCS and smart dragons installed) and modify the targeting and triggers. Use NearInfinity and open up the script for the black dragon in chapter 7 and take a look at it, you'll see.

Edited by ABlake
Link to comment

I suspected that is the case. As it is right now, your dragon is using Abazigal's scripts.

 

I'm assuming you have mods like SCS and/or Spell Revisions? SCS scripts for many enemies specifically instruct them to target PC players and/or friendly (green circle) creatures only, because those enemies can never be a friendly in the whole game. So if you change allegiance of one such enemy to a "friendly" type, the MAJORITY of the stuff that they usually do won't happen, because you, the PC, are not their enemy. Or more precisely, because THEY are no longer ENEMY. There is usually a "check" that goes something like - IF Allegiance(Myself,ENEMY) - that goes before the majority of their actions. It means it requires them to be ENEMY (red circle) for them to execute any of those actions.

 

In most cases, their scripts do have a couple of generic lines near the end of the scripts that instruct them to attack whoever attacks them, for one round or so (using AttackOneRound() or AttackReevaluate() action). This is most likely why you see them attack for a bit, when they are targeted by a hostile, then stop.

 

Making a custom script for a custom friendly like this can be quite easy or quite a bit of work, depends on *what* you would like them to do. If you simply want the dragon to act mostly as a tank, with a dragon's wide range of immunities and resistances, and just basic attack, then that's fairly simple. You can probably just use the vanilla WTASIGHT.BCS, for example, for that purpose. This is a very simple script for a generic melee fighter. This script simply instructs the creature to attack the closest hostile, or whoever attacks them. No potion using, no ability using, no smart target selection. Nothing fancy. The vanilla script is something like 30 lines long.

 

However, if you want your friendly summoned creature to do other stuff, like casting spells, using innate abilities, it could take quite a bit of work. Take the Planetars, for example. The Planetars have many innate abilities as well as standard spells. There are a lot of things they could possibly do aside from basic attacking the closest enemy. The script for a Planetar can be 400+ lines long, as per Spell Revisions, or nearly 4000 lines long, as per the PnP Celestials mod.

 

Another factor affecting how complex the script *should* be, is whether you want this friendly summon to be uncontrollable, or completely controllable by you. If it is controllable by you, the script might be simpler. Because you can give the creature commands to suit the situation, doing what and when as you see fit. On the other hand, if it is uncontrollable, and if you want it to be an EFFECTIVE combatant, usually the script needs to be a bit more specific. You'll need to instruct it to use every single ability that you give it in a reasonably smart manner (it's pointless if you give it a specific ability but never instruct it to use the ability at all), select its target in a reasonably smart manner, and so on.

 

So you probably want to start looking into the codes and play around with them, if you would like to make a custom summoned creature. If you start from scratch, first you want to decide what you want the creature to do, what abilities they have, and so on. Then give them instruction to perform each action.

 

Or, you could take the script of the original enemy, then modify it so that it works even when they are friendly. This could potentially require a lot of work, because you would need to go through every single block (and there are MANY of them, if you have SCS and smart dragons installed) and modify the targeting and triggers. Use NearInfinity and open up the script for the black dragon in chapter 7 and take a look at it, you'll see.

 

Oh that's very comprehensive information - thank you for this! Unfortunately, I don't know coding. And no, I don't have any mods installed. :/ I've been working on my own for over 10 years now. Just my own gear. And I didn't install any other mod in fear of it overwriting some of my files, or changing strings in the dialogue.tlk file, thus messing up the description of my items.

 

But yes, the Dragon is supposed to be some kind of tank AND healer. He is supposed to have a behaviour similar to a planetar. He would have the best priest and wizard spells, paired with some dragon breathing action (which only damages hostile creatures). The spells would not necessary be needed to be cast automatically, save for some protective spells for the party - but the PC would be able to choose the vast variety of spells to cast.

Link to comment

Well, your override script is NONE in the picture... just change that to be say... DEFAULT.

It attacks if it's attacked.

Hmh! It works! I tried using Planetars, but it didn't work. One more thing though...

How do I move him? He is static when I summon he. Although I click for him to move here and there, he doesn't.

 

And I also don't know how to add spells for him.

 

Thanks a bunch!

Link to comment

Make sure the dragon's allegiance is set to CONTROLLED, not ALLY or something else. Then there's no reason why you can't move him.

 

To add spell with DLTCEP:

 

- Navigate to the "Items & Spells" tab, then the "Memorized Spells & Innates" area

- In "Level Slot" field, select the level of the spell you want to add - Priest/Wizard/Innate. For example, choose "Wizard Level 1" if you're about to add a Magic Missile spell.

- Next click "Browse" under the "Choose Spell" field

- A window will pop up. It lists all the spell resources in the game. You'll have to know which resource is for which spell - for example, the standard Magic Missile is SPWI112. The wing buffet dragons use is SPIN695.

+ All standard wizard spells start with SPWI. SPWI1xx for level 1, SPWI2xx for level 2, and so on.

+ All standard priest spells start with SPPR. SPPR1xx for level 1, SPPR2xx for level 2, and so on.

(To know which resource represents which spell, refer to SPELL.IDS)

- After you've picked a spell, click "New Spell" to the right. Every time you click "New Spell", the spell you just picked will be added to one memorization slot. So for example, if you want the dragon to have five casts of Magic Missile, choose Magic Missile then click "New Spell" five times.

 

With DLTCEP, that's about it. Since the dragon or a summoned creature in general is not a standard NPC and can't join party, so a few steps can be omitted and everything would still be fine. After all spells/abilities have been properly added, you will be able to see them in the dragon's Spell Select / Special Abilities, and can cast them yourself.

 

Personally, as far as spells/items are concerned, I prefer NearInfinity over DLTCEP. More user-friendly.

 

Here we're only adding stuff that are already in the game. If you want custom spells/abilities for your summoned creature, naturally you'll first have to create them yourself.

Edited by ABlake
Link to comment

Make sure the dragon's allegiance is set to CONTROLLED, not ALLY or something else. Then there's no reason why you can't move him.

 

To add spell with DLTCEP:

 

- Navigate to the "Items & Spells" tab, then the "Memorized Spells & Innates" area

- In "Level Slot" field, select the level of the spell you want to add - Priest/Wizard/Innate. For example, choose "Wizard Level 1" if you're about to add a Magic Missile spell.

- Next click "Browse" under the "Choose Spell" field

- A window will pop up. It lists all the spell resources in the game. You'll have to know which resource is for which spell - for example, the standard Magic Missile is SPWI112. The wing buffet dragons use is SPIN695.

+ All standard wizard spells start with SPWI. SPWI1xx for level 1, SPWI2xx for level 2, and so on.

+ All standard priest spells start with SPPR. SPPR1xx for level 1, SPPR2xx for level 2, and so on.

(To know which resource represents which spell, refer to SPELL.IDS)

- After you've picked a spell, click "New Spell" to the right. Every time you click "New Spell", the spell you just picked will be added to one memorization slot. So for example, if you want the dragon to have five casts of Magic Missile, choose Magic Missile then click "New Spell" five times.

 

With DLTCEP, that's about it. Since the dragon or a summoned creature in general is not a standard NPC and can't join party, so a few steps can be omitted and everything would still be fine. After all spells/abilities have been properly added, you will be able to see them in the dragon's Spell Select / Special Abilities, and can cast them yourself.

 

Personally, as far as spells/items are concerned, I prefer NearInfinity over DLTCEP. More user-friendly.

 

Here we're only adding stuff that are already in the game. If you want custom spells/abilities for your summoned creature, naturally you'll first have to create them yourself.

Dude, thanks a bunch. I followed your steps, and now it works like a charm! I can control the dragon, and I have tons of spells in the inventory to play with! Way awesome. Sure was confusing with all these options, but now I got it! :) Thanks man! *hands over a free beer* :D :D

Link to comment

By the way, @ABlake, I have noticed that some creature I make, which I set to CONTROLLED.... they turn on me if they get injured by my spells. Is there any way that the summoned creatures do not attack the PC, no matter what?

 

If your summoned creature turns hostile if it is injured by you or other allies, it is because in its script there are one or more blocks that say something like this: IF (attacked by allies) THEN Enemy().

 

First you need to open up its script, search for all the lines that say "Enemy()". This action changes allegiance of a creature to hostile (red circle). To get rid of this behavior you need to get rid of all instances of this line, which essentially means getting rid of all blocks that contain this line. However, unless you're using a custom script, otherwise you don't want to modify existing scripts recklessly, because there are other creatures in the game that use those scripts and modifying them will cause strange behaviors.

 

So what you want to do instead, is first to make a custom script for yourself. If you're using DLTCEP, open a script that you want to use, then save it as something else, then edit the new script instead. Don't forget to put the script in the Override folder. Then give the new script to your summoned creature. It's your own custom script, so you can experiment with it all you want. You can go ahead and delete all blocks that contain the line "Enemy()".

 

Also, make sure your summoned creature is using only ONE script (the one you make for it). A second script will interfere with it.

Edited by ABlake
Link to comment

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...