Jump to content
Sign in to follow this  
igi

object.ids

Recommended Posts

Just consolidating some information into the relevant forum.

 

 

OBJECT.IDS

 

0 Nothing ---parses into [ANYONE]

1 Myself ---works!

2 LeaderOf ---Not Tested

3 GroupOf ---hopelessly screwed

4 WeakestOf ---only detects PC's

5 StrongestOf ---only detects PC's

6 MostDamagedOf ---only detects PC's

7 LeastDamagedOf ---only detects PC's

8 ProtectedBy ---Not tested; should work in conjuction with the working action Protect(O:Object*,I:Range*)

9 ProtectorOf ---see above

10 LastAttackerOf ---works!

11 LastTargetedBy ---hopelessly screwed

12 NearestEnemyOf --works!

13 LastCommandedBy ---not tested

14 Nearest ---cannot be "nested" { -e.g., Nearest([EVILCUTOFF.0.0.MAGE])}

15 LastHitter ---works!

16 LastHelp ---not tested

17 LastTrigger --works for traps, and detects "Last Caster of a Mage Spell"

18 LastSeenBy ---works!

19 LastTalkedToBy ---works!

20 LastHeardBy ---works!

21-26 Player(X) ---works!

27 Protagonist ---seems to work...

28 StrongestOfMale --not tested, probably detects PC's only

29-37 (X)NearestEnemyOf ---works!

38-46 (X)Nearest ---see below

47 WorstAC ---only detects PC's

48 BestAC ---only detects PC's

49 LastSummonerOf --works; simulacrums, etc. aren't "summoned"

50-59 (X)NearestEnemyOfType --see below

60-69 (X)NearestMyGroupOfType ---see below

70-75 Player(X)Fill ---not tested

76-85 (X)NearestDoor ---hopelessly screwed

 

UPDATE: THIS GETS WEIRDER

 

I went ahead and tested all these proximity Objects, and here's what I found:

 

Nearest, Nearest([PC]), Nearest(Myself), Nearest(xxx): ALWAYS detects the one running the script; ALWAYS

 

SecondNearest: detects the second nearest the script runner (not including the script runner).

 

ThirdNearest(etc.): detects the third (etc) nearest the script runner (not including the script runner).

 

 

 

(x)NearestMyGroupOfType: Always detects the nearest member of your group, no matter if Second, Third, or even Tenth is used. You CAN be more specific with it at least:

( --e.g., ...OfType([PC.0.ELF.MAGE_ALL]) )

 

(x)NearestEnemyOfType: As group, above; always detects the nearest enemy regardless of designation (2nd, 3rd, etc). You can also be more specific with this one

(--e.g., ....EnemyOfType([EVILCUTOFF.UNDEAD.ZOMBIE]) )

 

 

(x)NearestEnemyOf(Myself): HURRAH!!! This one does what we've all hoped it would do, all along. I lined up six enemies, and gave each a different:

 

DisplayStringHead({x}NearestEnemyOf(Myself),{4859-68}).

 

The results: a perfect, in-line soundoff of 'loser loser loser!', 'I want my mommy!' etc.

 

 

 

 

(x)NearestEnemyOf(NearestEnemyOf)): Believe it or not, this can be used to properly identify the proximity of you own allies. Starts with the nearest to the script runner (not including the script runner), and works its way out.

 

 

 

All of these checks are subject to sight range!!!

 

Coincidentally, say you use TenthNearest(xxxx) and there's only five within sight range. The furthest of the five will count true as the TenthNearest(xxx). This works as both a See() condition and as an action:

 

IF

See(TenthNearest([PC]))

THEN

RESPONSE #100

DisplayStringHead(TenthNearest([PC]),4859)//LastSeenBy(Myself) works too

END

 

will pick the furthest PC in sight, and call them a 'loser loser loser'

 

 

I know all this is pretty confusing, but it's what seems to be true.

 

 

So, all you scriptors--check your scripts out. I spent a lot of time testing these out in-game, and I stand by my results until somebody can prove differently.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Excellent work Horred This is important and very useful info.

 

I have been testing LastTargettedBy alot lately... trying to figure out why it never returns true unless run by a creature... and then it only returns the damn creature running the script. I get nothing when I try to run it from a trigger or container. Now I know... thanks. Will try something else.

 

Cuv

 

QUOTE(horred the plague @ Jul 14 2005, 06:59 PM)

Thanks to igi, I was able to track down a long lost thread from TeamBG forums. It contains a well of useful information about all the objects in OBJECTS.IDS, and a couple others:

 

QUOTE

OBJECT.IDS

 

0 Nothing ---parses into [ANYONE]

1 Myself ---works!

2 LeaderOf ---Not Tested

3 GroupOf ---hopelessly screwed

4 WeakestOf ---only detects PC's

5 StrongestOf ---only detects PC's

6 MostDamagedOf ---only detects PC's

7 LeastDamagedOf ---only detects PC's

8 ProtectedBy ---Not tested; should work in conjuction with the working action Protect(O:Object*,I:Range*)

9 ProtectorOf ---see above

10 LastAttackerOf ---works!

11 LastTargetedBy ---hopelessly screwed

12 NearestEnemyOf --works!

13 LastCommandedBy ---not tested

14 Nearest ---cannot be "nested" { -e.g., Nearest([EVILCUTOFF.0.0.MAGE])}

15 LastHitter ---works!

16 LastHelp ---not tested

17 LastTrigger --works for traps, and detects "Last Caster of a Mage Spell"

18 LastSeenBy ---works!

19 LastTalkedToBy ---works!

20 LastHeardBy ---works!

21-26 Player(X) ---works!

27 Protagonist ---seems to work...

28 StrongestOfMale --not tested, probably detects PC's only

29-37 (X)NearestEnemyOf ---works!

38-46 (X)Nearest ---see below

47 WorstAC ---only detects PC's

48 BestAC ---only detects PC's

49 LastSummonerOf --works; simulacrums, etc. aren't "summoned"

50-59 (X)NearestEnemyOfType --see below

60-69 (X)NearestMyGroupOfType ---see below

70-75 Player(X)Fill ---not tested

76-85 (X)NearestDoor ---hopelessly screwed

 

UPDATE: THIS GETS WEIRDER

 

I went ahead and tested all these proximity Objects, and here's what I found:

 

Nearest, Nearest([PC]), Nearest(Myself), Nearest(xxx): ALWAYS detects the one running the script; ALWAYS

 

SecondNearest: detects the second nearest the script runner (not including the script runner).

 

ThirdNearest(etc.): detects the third (etc) nearest the script runner (not including the script runner).

 

 

 

(x)NearestMyGroupOfType: Always detects the nearest member of your group, no matter if Second, Third, or even Tenth is used. You CAN be more specific with it at least:

( --e.g., ...OfType([PC.0.ELF.MAGE_ALL]) )

 

(x)NearestEnemyOfType: As group, above; always detects the nearest enemy regardless of designation (2nd, 3rd, etc). You can also be more specific with this one

(--e.g., ....EnemyOfType([EVILCUTOFF.UNDEAD.ZOMBIE]) )

 

 

(x)NearestEnemyOf(Myself): HURRAH!!! This one does what we've all hoped it would do, all along. I lined up six enemies, and gave each a different:

 

DisplayStringHead({x}NearestEnemyOf(Myself),{4859-68}).

 

The results: a perfect, in-line soundoff of 'loser loser loser!', 'I want my mommy!' etc.

 

 

 

 

(x)NearestEnemyOf(NearestEnemyOf)): Believe it or not, this can be used to properly identify the proximity of you own allies. Starts with the nearest to the script runner (not including the script runner), and works its way out.

 

 

 

All of these checks are subject to sight range!!!

 

Coincidentally, say you use TenthNearest(xxxx) and there's only five within sight range. The furthest of the five will count true as the TenthNearest(xxx). This works as both a See() condition and as an action:

 

IF

See(TenthNearest([PC]))

THEN

RESPONSE #100

DisplayStringHead(TenthNearest([PC]),4859)//LastSeenBy(Myself) works too

END

 

will pick the furthest PC in sight, and call them a 'loser loser loser'

 

 

I know all this is pretty confusing, but it's what seems to be true.

 

 

So, all you scriptors--check your scripts out. I spent a lot of time testing these out in-game, and I stand by my results until somebody can prove differently.

Share this post


Link to post

The most important info from this is that xthNearest actions don't return false if there are not enough targets in the list, they simply pick the last.

I hope this is true for all engines so i don't have to implement yet another bloody hack.

Share this post


Link to post

The way it works in BG2, the following is always true: if NearestEnemyOf() is valid, TenthNearestEnemyOf() is always valid. If TenthNearestEnemyOf() is valid, NearestEnemyOf() is always valid.

 

There are never any exceptions to this.

Share this post


Link to post

Mostly integrated.

However, the IESDP is not a scripting guide (where detailed explanations belong).

Share this post


Link to post

I have done some testing on NearestDoor, and it isn't as hopelessly screwed, but it's still very limited, only meant for basic AI use. Something Bioware might have been planning to implement, but didn't get around to doing it; this could be Unfinished Business.

 

Here are the limitations of NearestDoor:

 

Locked and secret doors are not detected by NearestDoor.

 

These triggers work:

See(NearestDoor)

Range(NearestDoor,x)

OpenState(NearestDoor,TRUE/FALSE)

 

These triggers do not work:

Opened(NearestDoor)

Closed(NearestDoor)

 

These actions work:

Open(NearestDoor)

MoveToObject(NearestDoor) [haven't tested this, but I trust aVENGER]

MoveToObjectNoInterrupt(NearestDoor) [haven't tested this, but I trust aVENGER]

 

These actions do not work:

Lock(NearestDoor)

Unlock(NearestDoor) [haven't tested this, but if Lock doesn't work, I am assuming this doesn't either]

PickLock(NearestDoor)

 

On the other hand, all of these actions work if you specify the door name in quotes (eg. "DOOR01").

 

I have not tried any of the Spell() actions yet, but i predict they will not work either, so that might mean no Spell(NearestDoor,WIZARD_KNOCK).

 

-Galactygon

Share this post


Link to post
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.

Sign in to follow this  

×
×
  • Create New...