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

THIRD Alignment in Dungeon Siege 1?

So in Dungeon Siege there are 2 main alignments (good and evil), and 1 neutral alignment, which simply doesn’t get attacked by either. My question is; is there a way to make an EXTRA alignment that attacks both good and evil? Or some kind of other thing like that? Any way to create it manually or set AI to that? I was thinking maybe something along the lines of teams in multiplayer.
I want to make layered AI battles without using the attack command, where there are multiple sides fighting each other, which right now with my limited knowledge I can only do using the attack commands. If it takes some skrit to code it up I’m more than willing, I just wanted to know if anyone has messed with it before, or at least knows where I can start. I tried a while ago but got kinda stuck as I didn’t even have a jumping off point.

To clarify, my MAIN goal is to have evil AI attack each other based on alignment, instead of commands. For instance, Hassat and Automatons attacked each other in DSLOA, but that was based on commands. What I want is an automatic way to have two ‘bad guys’ who are played attackable attack each other, or a ‘bad guy’ (player attackable) which doesn’t attack ‘good guys’, or something along those lines.

I could maybe work something by throwing in a custom skrit component into templates (not even sure if that’s possible with this problem), but if possible I’d rather make a separate alignment so I can change it with one line of code.

Thanks in advance!

I believe alignments are hardcoded enumeration values within the engine, but you could probably whip up a skrit that has a membership value as a property/parameter and then do a mind radius query from the GoSkritComponent, in this case the Mob, (I forget the name of the function off the top of my head, but I believe it's the one that chain lightning uses to find other targets in an area around the initial target) for those with the passed in membership, then trigger them to attack the closest one or a random one within the list of returned Go's, if any. You could have the skrit 'pulse' in that it runs instead every so often so the mobs are constantly checking around themselves for any membership enemies to attack.

Ah, I was hoping I could avoid more skrit... ah well. Thanks though, you’ve given me a really great place to dive into it. I’ll try and implement that. One thing that’s bugging me though; will this end up taking a lot of memory and processing power up if a lot of monsters have this?

How many mobs and what kind of hardware specs are we looking at? My mod has a ton of generators in every zone with timers running etc., and I extended the frustum radius to 75.000 and I don't have any issues.

Lloyd2k4 wrote:

How many mobs and what kind of hardware specs are we looking at? My mod has a ton of generators in every zone with timers running etc., and I extended the frustum radius to 75.000 and I don't have any issues.


Should you ever release that mod, then let's just hope the average retro-gamer - possibly expecting requirements from over >10 years ago - will share this point of view... Shock
 

Dungeon Siege Fanatic wrote:

Ah, I was hoping I could avoid more skrit... ah well. Thanks though, you’ve given me a really great place to dive into it. I’ll try and implement that. One thing that’s bugging me though; will this end up taking a lot of memory and processing power up if a lot of monsters have this?


Actually I think your concerns are quite resonalble, and while using different memberships is really a good idea, custom/additional area scans on (all?) monsters possiby are not as stressful such things can be for the CPU (...and I have some doubts that DS always can benefit from multi-threading and multiple CPU cores).

 
However 'only' for 'Evil vs. Evil' you could use the WE_FRIEND_SPOTTED event.
The brain_hero.skrit could be a reference for this. Basically this event should behave like WE_ENEMY_SPOTTED and the spotted friend/monster should be available by Mind.HandlingMessage.Data1 (or Mind.HandlingMessage.SendFrom).
Then their memberships could be compared with Common.Membership.ContainsAny, and if the membership of the spotted monster is not an item of spotter's membership (list) you could issue an attack command if the spotter is not busy/attacking already.

 
Honestly I'm not that familiar with these things in DS1, but it's probably worth a try.
Nonetheless technical obstacles may pop up, e.g. dealing with membership assignments can be a bit tricky sometimes (at least in DS2 it is), also it may be that some engage/attack functions perform a late alignment check once again (intentionally to prevent 'evil vs. evil') and you had to tweak or replace these functions then.

KillerGremal wrote:

Lloyd2k4 wrote:

How many mobs and what kind of hardware specs are we looking at? My mod has a ton of generators in every zone with timers running etc., and I extended the frustum radius to 75.000 and I don't have any issues.



Should you ever release that mod, then let's just hope the average retro-gamer - possibly expecting requirements from over >10 years ago - will share this point of view... Shock

 

Dungeon Siege Fanatic wrote:

Ah, I was hoping I could avoid more skrit... ah well. Thanks though, you’ve given me a really great place to dive into it. I’ll try and implement that. One thing that’s bugging me though; will this end up taking a lot of memory and processing power up if a lot of monsters have this?


Actually I think your concerns are quite resonalble, and while using different memberships is really a good idea, I have more concerns about custom/additional area scans on (all?) monsters as such things may stress the CPU quite a lot (...and I have some doubts that DS can really benefit a lot of multi-threading and multiple CPU cores).

 
Now 'only' for 'Evil vs. Evil' you could possibly use the WE_FRIEND_SPOTTED event (beside, there are similar events for the inner+outer comfort zone too).

The brain_hero.skrit could be a reference for this. It might be not a bad idea to give that file another name when used for/on monsters finally) but basically this event should behave like WE_ENEMY_SPOTTED and the spotted friend/monster should be available by Mind.HandlingMessage.Data1 (or Mind.HandlingMessage.SendFrom).
Then their memberships could be compared with Common.Membership.ContainsAny, and if the membership of the spotted monster is not an item of spotter's membership (list) you could issue attack command if the spotter is not busy/attacking already.

 
Honestly I'm not that familiar with these things in DS1, but it's probably worth a try.
However technical obstacles may pop up, e.g. dealing with membership assignments can be a bit tricky sometimes (at least in DS2 it is), also it may be that some engage/attack functions perform a late alignment check once again (intentionally to prevent 'evil vs. evil') and you had to tweak or replace these functions then.

This is a pretty good idea... a somewhat repurposed existing brain skrit could make it less hardware intensive overall since it already does these kinds of things. You could just change the conditions slightly to suit your specific needs.

As far as retro gaming goes and hardware specs, I have no idea what you guys are running, but my PC isn't that great, either. Most games want an Pentium i7 and 12-16GB of RAM with a decent video card, but I'm still running on an Intel i5 with 8GB of RAM and some video card I don't even think is sold anymore. Like a Nvidia GTX 470 or something? It's old and garbage. It's definitely putting my plan to buy Borderlands 3 next month in flux, since the recommended specs for that are 12GB of RAM, a much better video card than what I have, and an Intel i7.

Lloyd2k4 wrote:
. . .

As far as retro gaming goes and hardware specs, I have no idea what you guys are running, but my PC isn't that great, either. Most games want an Pentium i7 and 12-16GB of RAM with a decent video card, but I'm still running on an Intel i5 with 8GB of RAM and some video card I don't even think is sold anymore. Like a Nvidia GTX 470 or something? It's old and garbage. It's definitely putting my plan to buy Borderlands 3 next month in flux, since the recommended specs for that are 12GB of RAM, a much better video card than what I have, and an Intel i7.


Well, concerning 'retro-playing' - DS1 with LoA was released in 2003, now we have 2019.
So many years in between... - I really do not have any clue what an appropriate hardware expectation could be is under these circumstances.

However personally I rather tend to stick with settings as they were when game was released than considering what hardware is possible/popular these days.