forums | blogs | polls | tutorials | downloads | rules | help

Error message

Deprecated function: The each() function is deprecated. This message will be suppressed on further calls in remember_me_form_alter() (line 78 of /var/www/siegetheday.org/sites/all/modules/contrib/remember_me/remember_me.module).

NPC Invulnerability?

(This is mostly for DSII content, but I'm running it through the BW engine.)

What exactly I'm trying to do is this: You know the Snowbrook Haven soldiers (before they become Plagued) and the Kalrathian rebels? They are green dots who fight by your side, and, with a very few plot-related exceptions, they can either die or survive.

Well, I want to make it so that they can't die.

I figure it must be possible, since the plot guys can't die.
(In addition, since the Snowbrook Haven Commander is at first an undying plot character and then not once she becomes Plagued, I assume this will work for other soldiers who become Plagued. Honestly, I don't know enough about it to know for sure on my own...)

I've tried really really hard to figure this out on my own on and off for years, including looking about online for tutorials that edit NPCs or trying to follow the footsteps of others who already have. But I just can't find anything that seems to help--anything that addresses a similar enough endeavour that I can use as an example, even just to get me started.

System etc info in case it matters:
Windows XP
Latest version of Broken World engine

I do use the Succubus starter in order to get my widescreen resolution and a further zoom, but I was working with backup files I created immediately after game installation. (Though I don't use the Succubus Modlet itself.)

I've been trying to use:
TankViewer 2
TankCreator 2
Siege Editor 2
Tank Extractor 1.1
But I'm having all kinds of fun trouble trying to find or extract or access or modify the proper files.

I did try opening a .dds file of someone else's with WordPad to have a look at the code (I do have a certain rudimentary experience with that) but I wasn't knowledgeable enough to decipher things for sure on my own. I found an "Invulnerable" value, but I wasn't really sure which characters I was editing, or if any values were re-used for different random NPCs and could break something by modifying other characters I didn't mean to (I've also had more than enough years of trouble with that in the Knights of the Old Republic games. And Fable TLC... Well I did finally figure out KotOR thanks to the kind people at Holowan Labs, at least.......).

I could really use some specific help, if anyone could please do so? I'd really appreciate it!

First create a folder on your system to do the editing, never directly edit the game files or you will spend more time installing the game than you will actually spend modding.
I assume that you wish to make the changes to Dungeon Siege 2 and not any of the other maps available for Dungeon Siege 2 and Broken World. Most of what you will need to change is located in Logic.ds2res. Copy Logic.ds2res from its location in Program Files\Microsoft Games\Dungeon Siege 2\Resources to the Folder/directory that you created to do the editing in. Within that Folder/directory create a sub folder/directory called DS2_Logic. Then using Tank Viewer 2 extract logic.ds2res to the folder called DS2_Logic making sure that you have All selected in the files to extract box, and use folder names checked. This is very very important or you will not be able to reassemble the mod when you are done editing. This extraction can take quite some time so be wait until it is done. Within the extracted files look for the folder called World open it and then open Contentdb then templates then Actors -- within this you will find several folders like Good, Evil and so on. Next you wish to look at all the gas files contained within each. I use skrit pad to do this (it can be downloaded here in the ds1 tools section) you can use any other txt editor like note pad or word pad. However I have found over many years of modding that programs other than skrit pad can and sometimes do add things or remove things so that the game engine gets confused by your edits. Once you understand how the character templates are configured you will be ready for the next step.

I am sure that others here will also add tips and other ideas. Once you understand the layout of the various character templates find the ones you wish to edit and we will continue.

Elf

do everything Bare_elf has said in her reply, if u haven't done so but need to extract the ds2 world map file in maps folder as well..... a dds file is mainly a picture that dungeon siege2 uses for the art aspect of things but for this a dds file wont be what u need to look at.
that's very much possible indeed... the game uses a command to change the "mind" from actor good to actor evil, its setup with flick and skrit etc...as u see in the game it plays a movie, that part of the transition process as well... the question should be are u wanting the plagued ones not to die or just not the normal ones not to die? cause to make the non-plagued ones unkillable and not die would have to rip out the Plagued part (evil), cause if u make the plagued unkillable you would have a monster that would never die...perhaps it would be cooler to somehow be able to get them down to a certain health and they revert their "mind" back to normal... but yes all that can be done.

\Dungeon Siege 2 Mod\Maps\world\maps\ds2_world\regions\a2_08_03_castle\objects\command.gas - that's the act 2 castle region of the game where I think u fight the dragon with the commander
sample

[cmd_change_property]
{
object_list = "0x10700233,0x107002AA,0x107002AB,0x10700238,0x10700246,0x10700247,0x1070029C,0x1070029D,0x1070029E,0x1070029F"; - may not be the right characters
i start_state = 2;
state1_alignment = aa_evil;
b state1_change_alignment = true;
b state1_change_disable_mind = true;
b state1_change_visible = true;
b state1_visible = true;
b state2_change_alignment = true; //
b state2_change_disable_mind = true;
b state2_change_visible = true;
b state2_visible = false;
}

that's code done on the map side of things to convert an actor from good to bad or reverse
skrit wise -
Go.actor.SSetAlignment - will change and alignment from evil to good, etc
Go.Aspect.SSetIsInvincible( true ); - can make an actor Invincible(unkillable)
Go.Mind.SSetMayAttack( true ); - actor can attack
Go.Mind.SSetMayBeAttacked( true ); actor can be attacked by others
Go.Mind.SSetMayAttack( false ); - actor cant attack anything
Go.Mind.SSetMayBeAttacked( false ); - actor cant be attacked
i'm not a very good teacher, perhaps someone with more knowledge of this like Killergremal or iryan will reply later with more help but that's pretty much the basics of what may have to be changed to do what u want.

Thanks both of you so much for replying quickly! I waited a while to check back since I didn't think it'd be so fast.
Alright, a few questions now:

bare_elf:

I've extracted properly and looked through most of the Actors gas files (with SkritPad if that makes any difference to future issues). I can understand the code fairly well, at least most of it, though I don't think I'd like to mess with the syntax or even some of the values without knowing for sure.

Finding the characters I'm looking for doesn't seem too difficult; some people have names, after all. Some people I'll have to figure out more carefully, but I think I'll try to figure out what I'm doing first...

It seems like the characters who are capable of combat, at least some of them, have an "Invulnerable" value, and some of them--that do make sense--have it set to "True", although not the same for others I would think should be... So I'm not sure about that. I also saw the "May Be Attacked" value, which I suppose might technically work (assuming it does what it sounds like), but it would probably look rather off, the bad guys just standing there letting themselves get beat up by the good guys...

By the way, will this also work with Broken World? I'm using that engine to play DSII (for various reasons), and I think there're places in Broken World I might want to do this in as well.

A side issue that may be nothing: Tank Viewer and SkritPad will navigate to the folder I extracted to and can see the files; however, they're like, invisible in Windows Explorer. I don't know if it matters, or why it does that; I think it said Tank Viewer 2 was for Windows 7/8 (I could be wrong) and I'm using XP...Maybe that's why... But so far it doesn't make any difference.

Darkelf:

Change from evil back to good at the end, huh... I'd have to think about that...

But I'm slightly confused; the Snowbrook Haven Commander, at the start, is unkillable, since she's needed for the plot, but then can be killed after she transforms. Do you know if--in the a2_08_03castle\objects\command gas file, there's a list like:

[t:cmd_change_property,n:0x1070023d]
{
[cmd_change_property]
{
object_list = "0x10700237";
i start_state = 2;
b state1_change_invincible = true;
b state1_change_selectable = true;
b state1_change_visible = true;
b state1_visible = true;
b state2_change_invincible = true;
b state2_change_selectable = true;
b state2_change_visible = true;
b state2_visible = false;

--do you think something in here might have to do with it? Again, I only know so much about this code, but it refers to changing the state of invincibility, or it seems so...

Also, aside from big plot things like Snowbrook Haven and the Kalrathian Rebellion, there were a few random characters I was also hoping to grant invisibility...like those nameless Dryad guards by the Elven Shrine, and the nameless Elf guards at the Aman'lu exits...

Oh, I was also hoping to do the Windstone Fortress soldiers--you know, when there's the cutscene where they blow open the wall, and they run off ahead of you to right before the Temple to battle that mass of Fellspines.

Various things like that.....

Anyway, if either of you or anyone else can help me any further, I'd be really grateful!

By the way, in case anyone is wondering or cares in the least, I don't want to save all these guys just because they'll help me fight...after all, the longer you fight, the more you level up... It's just that... I have these existential angst sort of issues...up to now I've always just equipped my party up, even used cheats, to try and kill the bad guys as fast as possible, but...I only ever get limited success...and then I feel sick all over........sometimes I try over and over and over and over and never do any better...... hooray.

Aliryn wrote:
Thanks both of you so much for replying quickly! I waited a while to check back since I didn't think it'd be so fast.
Alright, a few questions now:

bare_elf:

I've extracted properly and looked through most of the Actors gas files (with SkritPad if that makes any difference to future issues). I can understand the code fairly well, at least most of it, though I don't think I'd like to mess with the syntax or even some of the values without knowing for sure.

Finding the characters I'm looking for doesn't seem too difficult; some people have names, after all. Some people I'll have to figure out more carefully, but I think I'll try to figure out what I'm doing first...

It seems like the characters who are capable of combat, at least some of them, have an "Invulnerable" value, and some of them--that do make sense--have it set to "True", although not the same for others I would think should be... So I'm not sure about that. I also saw the "May Be Attacked" value, which I suppose might technically work (assuming it does what it sounds like), but it would probably look rather off, the bad guys just standing there letting themselves get beat up by the good guys...

By the way, will this also work with Broken World? I'm using that engine to play DSII (for various reasons), and I think there're places in Broken World I might want to do this in as well.

A side issue that may be nothing: Tank Viewer and SkritPad will navigate to the folder I extracted to and can see the files; however, they're like, invisible in Windows Explorer. I don't know if it matters, or why it does that; I think it said Tank Viewer 2 was for Windows 7/8 (I could be wrong) and I'm using XP...Maybe that's why... But so far it doesn't make any difference.

Darkelf:

Change from evil back to good at the end, huh... I'd have to think about that...

But I'm slightly confused; the Snowbrook Haven Commander, at the start, is unkillable, since she's needed for the plot, but then can be killed after she transforms. Do you know if--in the a2_08_03castle\objects\command gas file, there's a list like:

[t:cmd_change_property,n:0x1070023d]
{
[cmd_change_property]
{
object_list = "0x10700237";
i start_state = 2;
b state1_change_invincible = true;
b state1_change_selectable = true;
b state1_change_visible = true;
b state1_visible = true;
b state2_change_invincible = true;
b state2_change_selectable = true;
b state2_change_visible = true;
b state2_visible = false;

--do you think something in here might have to do with it? Again, I only know so much about this code, but it refers to changing the state of invincibility, or it seems so...

Also, aside from big plot things like Snowbrook Haven and the Kalrathian Rebellion, there were a few random characters I was also hoping to grant invisibility...like those nameless Dryad guards by the Elven Shrine, and the nameless Elf guards at the Aman'lu exits...

Oh, I was also hoping to do the Windstone Fortress soldiers--you know, when there's the cutscene where they blow open the wall, and they run off ahead of you to right before the Temple to battle that mass of Fellspines.

Various things like that.....

Anyway, if either of you or anyone else can help me any further, I'd be really grateful!

By the way, in case anyone is wondering or cares in the least, I don't want to save all these guys just because they'll help me fight...after all, the longer you fight, the more you level up... It's just that... I have these existential angst sort of issues...up to now I've always just equipped my party up, even used cheats, to try and kill the bad guys as fast as possible, but...I only ever get limited success...and then I feel sick all over........sometimes I try over and over and over and over and never do any better...... hooray.


For the side issue about not seeing the files using windows explorer here is a very long winded response.
The version of tank viewer that you are using will work with windows xp, windows 7 and windows 8. I used windows xp up until about a year ago and was concerned that some of the tools would not work with windows 7 as I had heard many bad things about the game and both windows 7 and 8. So I tested the tools like tank viewer, tank viewer 2, tank creator and tank creator 2 to verify that they work. The only real problem I discovered was with tank creator 2 and windows xp is that some of the 2015 versions of most anti-virus programs see it as a trojan horse, which is not true and never has been. so you may have to turn off your anti virus program when using it. There is a different version of Tank creator 2 for windows 7/8/10 and if you should upgrade at some point or purchase a new computer I will give you the link to it. Skrit Pad has worked with every version of windows from 98SE to the current. It is a basic text editor designed for Dungeon Siege. I am not sure why windows explorer can not find the folder or the files as I never saw a problem with it in win xp or win 7 64 professional. It may be that you are not giving the full path to where the file is located. For example to reach my dungeon siege 1 editing folder the path is e:\dungeon_siege_mods\mod name. So that I can find both the resource folder and the map folder of each game I create a short cut on my desk top and the same for each of the modding folders. So currently on my desk top you would find Dungeon Siege Files which would lead to the root directory of DS1, Legend of Aranna files which would lead to the legends of aranna directory within the ds1 directory, Dungeon Siege 2 Files which would lead to the root directory of the Dungeon Siege 2 game and like wise with Broken World. I also have folders called DS1 mods, DSLoA Mods, DS2 Mods and Broken World Mods. Where I keep a copy of the current version of every mod I download and the folders which I have extracted them to. Now keep in mind that I have Three computers this one has a C drive of 1 terabyte, D drive DVD Burner, an E drive of 1 terabyte, an F drive of 512 gigabytes, 2 64 Gigabyte flash drives and a 32 Gigabyte flash drive to move things between this computer my laptop and my second computer which is just slightly less powerful than this one. I keep all the program files on C drive, all of my photos and game related editing files on E drive along with old files from DS sites that are no longer active and other bits of history. F Drive is mostly music. I will most like be forced to add an additional Drive soon as I appear only to have about 1 terabyte of free space. My lap top runs windows XP, This computer runs Windows 7 professional 64 bit. The other Desktop runs Windows 7 Professional 64 bit, and Windows XP 32 bit depending on what drive I boot from. The way I do this is with swappable C drives in removable bays. There are other ways to do it but since I had the hardware from an older computer why not use it.

Yes this will also work with broken world. Basically Broken World uses the map and resources folders from DS2 plus its own map and resources folders. There is a hierarchy that can be at times confusing. Items that are placed in the DS2 resources or map folder can be used by Broken World. Files in the Broken World Directories can not be seen by DS2. Some mods have a DS2 version and a broken world version. If you are using as you are the broken world start, you may have to remove the DS2 version of the mod. (the read me file should tell you).
I would recommend that you install the Ely's Allsaves for broken world as it makes modding much easier. The normal start for both DS2 and BW reads a checksum so if you change anything within a mod that you are developing and start with a saved game to see if the change works the game will crash. The allsaves allows you to continue on and see the effects of most changes. There are some however that will require a new character and game, however the changes you are planning should not cause this issue. Should you ever decided to install the Legendary Mod or DS2BW Adepts Allsaves is required. This is true of many other mods created by iryan, KillerGremal, Dark_Elf and myself. So basically download it, install it and use it.
Note that when you make a mod you should save it at a priority higher than factory so that it will override the original game file without it having to be removed. You can use any number between 1 and 35767. For example The Legendary Mod uses the same priority as the original game because it is adding new items and maps to the already existing DS2 so there would be no conflict. Whereas Broken World Adepts which modifies both the original DS2, BW, and the legendary mod to use anime characters must use a priority of 35767. The Date at which a mod is created the time stamp has some effect. Where an older mod of the same name will be superseded by a newer one most of the time unless you remove the older version first. That is why revision numbers for mods are very important. Spelling of mods with similar names can also be an issue. for example you will notice that the DS2 logic.ds2res is named differently than the Broken World logic file which is xlogic.ds2res. The xlogic.ds2res supersedes the logic.ds2res where both files have the same information. Again a bit of a long winded response sorry.

Keep in mind what Dark_Elf said about characters related to a specific map or area of a map will be located in the map file and not the logic file or objects file. Therefore your Snowbrook Haven characters and your Windstone Fortress soldiers and the dryad guards might be found there as well as in the actors section of the logic file so that you might have to change one or the other or both to make things work.

Elf

Aliryn wrote:

Darkelf:

Change from evil back to good at the end, huh... I'd have to think about that...
Magrus the half giant thief for the Lothar quest in Act 2 is a good example, he is initially good, then turns evil for the fight then when u get him down in health he yields. He is essential the best example of good-bad-good

But I'm slightly confused; the Snowbrook Haven Commander, at the start, is unkillable, since she's needed for the plot, but then can be killed after she transforms. Do you know if--in the a2_08_03castle\objects\command gas file, there's a list like: [=blue] there is code called [unkillable] in some actors that is a skrit.. also should read components.gas some time not sure if it got any of this stuff in it or not though.... as for code the commander has a actor template in templates\actor once u have that name use a good search, I use Total Commander for searching as it has 2 windows side by side to compare stuff....anyways search for that commander template in the maps region folder, and in the region there will be an actor.gas, inside it should have her template and beside that u will find a number similar to 0x10700237 below but not that particular one....actually she will have 2 numbers like that one is the area on the map where she at, the other is her assigned number by the editor. anyways if u do a search for the cmd_change_property of her specific map number u should be able to change her.[/code]

[t:cmd_change_property,n:0x1070023d]
{
[cmd_change_property]
{
object_list = "0x10700237";
i start_state = 2;
b state1_change_invincible = true;
b state1_change_selectable = true;
b state1_change_visible = true;
b state1_visible = true;
b state2_change_invincible = true;
b state2_change_selectable = true;
b state2_change_visible = true;
b state2_visible = false;

--do you think something in here might have to do with it? Again, I only know so much about this code, but it refers to changing the state of invincibility, or it seems so...

Also, aside from big plot things like Snowbrook Haven and the Kalrathian Rebellion, there were a few random characters I was also hoping to grant invisibility...like those nameless Dryad guards by the Elven Shrine, and the nameless Elf guards at the Aman'lu exits...

Oh, I was also hoping to do the Windstone Fortress soldiers--you know, when there's the cutscene where they blow open the wall, and they run off ahead of you to right before the Temple to battle that mass of Fellspines. [code=blue] there is probably a flick someplace in global for that...if u want them to stay alive, maybe be simpilar to use the [unkillable]{} in their gas.file if can find it...otherwise it may be in flick or skrit that they will die anyways not sure.[/code]

Various things like that.....

Anyway, if either of you or anyone else can help me any further, I'd be really grateful!

By the way, in case anyone is wondering or cares in the least, I don't want to save all these guys just because they'll help me fight...after all, the longer you fight, the more you level up... It's just that... I have these existential angst sort of issues...up to now I've always just equipped my party up, even used cheats, to try and kill the bad guys as fast as possible, but...I only ever get limited success...and then I feel sick all over........sometimes I try over and over and over and over and never do any better...... hooray.

I like your ideas, it would be nice to see an alternate world where they live or were somehow saved from the plague via serum