ShootersForever.com Forum Index

GoldenEye 007 Nintendo 64 Community, GoldenEye X, Nintendo 64 Games Discussion
GoldenEye Cheats, GoldenEye X Codes, Tips, Help, Nintendo 64 Gaming Community


Pd Object Flags (and some action blocks)

 
Post new topic   Reply to topic    ShootersForever.com Forum Index -> Carrington's Hacker Central
View previous topic :: View next topic  
Lazlo52
Secret Agent
Secret Agent


Joined: 18 Nov 2017
Posts: 331
Location: N.J.

 PostPosted: Mon Nov 20, 2017 10:48 pm    Post subject: Pd Object Flags (and some action blocks) Reply with quote Back to top

I've messed with Perfect Dark a lot in the past year and, once I saw how much I found out, it seemed necessary to share all the info someplace. Most of the following information was found through examining natural environments (vanilla Pd levels) and simple brute force (subtracting from FFFFFFFF).

Disclaimer: My testing environment was mostly GoldenEye X, but later additions were tested in Perfect Dark proper.

Guard Flags
Note: Result will not occur unless all underlined flags are set (need both 2's for a guard to surrender).
Also Note: Unless stated otherwise, these don't work on skedar.
Hide Guard
1000 00000000 00000000 00 00000000
Makes the guard hidden from the start, and even stops his action block from executing. The action block started when I set off an explosion and killed the guard, forcing him to appear. It might also remove the guard's collision; when I recently hid a guard with an action block, I could still bump into him, but for this 1000 flag, I never noticed any collision. Found through brute force.
•Untested on skedar, but probably works just the same.

Unrandomized Height
4000 00000000 00000000 00 00000000
Also makes the standard skedar huge. Tried using on human guards, and it made them the same height every time. Used by the skedar who breaks down the door in CI Defense, and on a few random humans on A51 Infiltration.

Sunglasses Randomly
0002 00000000 00000000 00 00000000
Sometimes gives the guard sunglasses. Could be used to add some subtle randomization. Found through brute force.

Fast Melee
0000 00002000 00300000 00 00000000
Incompatible with certain flags, requiring most flags off? or just random for no reason? I can't really tell, it keeps changing from working to not working. It's possible that melee speed is randomized so drastically, this can appear to not make a difference. Anyway, confirmed with brute force, but found on skedar at Skedar Ruins. Also exists as an action block flag.
•Works for skedar.

Cover-Related Check?
0000 00000000 00004000 00 00000000
Causes a 90 instead of 10 cover search? By that, I mean a built-in action block (000C?) checks for this flag to determine if it should use sub-action 0121 with a modifier of 10 or 90. Immediately before, a debug comment says "LOOK FOR COVER," so I suspect it relates to how far the guard will check for Extra Pads. After testing in one area, it appears to be an unnoticeable change. Used by maians and a single skedar in Attack Ship's wide, open hangar.
•Skedar can use cover, so this affects them, too.

Crouch for Cover
0000 10002000 00000000 00 00000000
Used by the crate guards in the tunnel leading to the cleaning bot activation rooms. The guard will crouch down until Jo is in sight, then he'll pop up and shoot from a standing position. After that, the guard will either crouch back down or open fire again. Getting near the guard will unset one or both flags, allowing him to use melee and pursue Jo like a normal guard. Thus, I believe this is a generally better option than either of the two "Guard Stays in Place" flags, which disallows melee and lets guards shoot at cloaked players.
For some reason, guards are unable to see through certain crates, nullifying the point of this flag. I cannot determine why certain crates block their sight while others don't.
•Untested on skedar, but they can't crouch anyway.

Keeps Distance From Jo
0000 00000100 00000000 00 00000000
After firing at Jo, guard will try to run away from her for a couple seconds, then either run to an Extra Pad or run to/attack Jo. Allows for an exciting fight if used in a place like GE's Jungle with a clever Extra Pad setup. Used by the guard in dD Investigation who walks by the elevator.
•Untested on skedar.

Needs to Reload
0000 00000000 00000020 00 00000000
Set mid-game when a guard decides he's low on bullets. Once set, the guard will play a reloading animation (209) after firing his weapon. Under normal circumstances, the flag is unset immediately? but when set through the Object Editor, it's turned off when the animation plays all the way. It's possible the built-in action blocks check for it but don't set it, and handles reloading some other random way. Regardless, the flag does something.

Surrender If Hurt & Alone
0000 00200200 00000000 00 00000000
Once the guard takes a hit, he will drop his weapon and raise his hands. The guard will not surrender if Jo is unarmed, but will once a weapon is pulled out. Tends to continue fighting if a nearby guard in the same Group is alive. Multiple guards near each other in the same Group can't surrender simultaneously. If the guard tries to punch Jo, he may forget he's supposed to surrender. A disarmed guard uses entirely separate logic to determine if he should surrender, go melee, or pull out a pistol. Used by the first guard in dD Defection who stands still.
•Didn't test, but I doubt it works on skedar.

Always Surrender
0000 00200001 00000000 00 00000000
The guard will immediately surrender once he sees Jo. Only one guard per Group will surrender it seems, even if others are taken out (dunno about cleaned up corpses). Always Melee (see below) seems to interfere with this because that one leads to a somewhat isolated action block. Basically, only use one or the other. Also, found through brute force.
•Didn't test, but I doubt it works on skedar.

Never Melee
0000 00000000 00001000 00 00000000
Guard will skip all checks for melee attacks. Get as close as you want, but he can still land a shot. Used by a number of guards on Air Force One, but it must be unset on most of them once the attack starts.
•Works on skedar.

Always Melee
0000 00000000 00000001 00 00000000
Assuming "Never Melee" is off, guard will always run to Jo and use melee attacks. Needs to be set for unarmed guards to attack correctly. Used by the male civilian in the kitchen of Air Force One.
•Not needed for skedar, but it probably works (untested).

Painful Melee
0000 00000000 80000000 00 00000000
Guard's melee power goes up greatly. On Agent difficulty with max health, three hits will leave Jo with no health. Used by Perfect Buddies and guards defected with the Psychosis Gun.
•Skedar will instantly kill, as seen in WAR!.

Super Melee
0000 00000080 00000080 00 00000000
Guard's melee animations will be super-quick and will slowly increase in damage over time a little randomly. Used by Pugilist buddy.
•Untested on skedar.

Guard Operates Console Diagonal Facing
...
This is actually "Guard Operates Console Facing 2328 Preset." Every time he finishes his button animation, he turns to face his 2328 preset. If he's already facing it, he just stands for a second. Works nicely when finished greeting a disguised Jo.


Object Flags
R-Tracked Yellow
00000000 00000000 00000040
Listed in the description for "Set Tags 3 for 16-Object," but works in the Object Editor, too.

R-Tracked Blue
00000000 00000000 00000800
Same deal as above.

Allow Walkthrough Object
00000000 00000000 00000400
Same as above two, but I never tested this because I've yet to need a walkthrough object.

Weapon Empty
40000000 00000000 00000000
Collected weapon will provide no ammo. Used in GoldenEye by the guns in the Depot's weapon cache. No, I don't know any Pd examples.

Action Block Sub-Actions
Set Guard Bits (00A4, 00A5, 00A6)
00080000 Run animations quicker (like mini skedar).
Speeds up running animation. Also works on humans. Recent tests suggest it's the same flag Trevelyan uses in Cradle to run fast.

00000800 No auto-aim.
Disables auto-aim on guard, but still shows red target.

Set Guard Flag Tags 3 (011B, 011C, 011D)
00020000 Quicker melee animations
Same as the "Fast Melee" object flag above, but slightly more reliable. I still think it's a little broken... Turn as many Object Editor flags off as you can for the guard(s) this applies to. I also apparently saw this get turned off when a guard greeted a disguised Jo?

80000000 Hit by Psychosis Gun.
Applied when a guard is shot by a Psychosis Gun. Since this is the flag that starts the chain of events, applying this via action block creates a defected guard.

Check Guard Object Flags
009D.XXXXXXXX.SS.TT.RR
X are the same flags from the Object Editor (allow disarm, surprised on see jo, etc).
If SS=01, believe checks if set instead of unset.
If TT=01, use the second set of flags (sniping position, pullout pistol, etc).
RR is the return value.

Setting and unsetting bits is the same, TT is the furthest right.
Set 009B.XXXXXXXX.TT
Unset 009C.XXXXXXXX.TT


Guard Does Animation
000B.aaaa.bbbb.cccc.dd.ee.gg.ss
aaaa = Animation
bbbb = Start Frame
cccc = End Frame (FFFF for whole anim)
dd = Flags
•01 is mirrored
•04 pauses at end, allows loop
•10 do default pose at end
•40 won't move guard (ignores translation)
ee = Animation Blend Frames (00 instant cut, 10 nice quick blend)
gg = Guard ID
ss = Animation Speed (02 normal, 01 double speed, 04 slow speed)

Turn Off Music in Slot 0-3 or All Music (FF)
00FA.xx
I used the same text from "actions.ini" because this one functions exactly like it did in GoldenEye. Stops the x-theme playing in the slot and continues normal music.

Set Action Block Variable 2 to XX
008A.XX
Value is checked internally to determine if guard can be knocked out from behind. Guard cannot be instantly knocked out from behind if this Block Variable is greater than 63. Built-in action blocks also use this value to determine if guard detected Jo.

If Action Block Variable 2 is Less/Greater Than XX, Return Value
008E.XX.TT.RR
XX = value to compare
TT = 00, less than
TT = 01, greater than
Guard cannot be instantly knocked out from behind if this Block Variable is greater than 63. Built-in action blocks also use this value to determine if guard detected Jo.

Set Same Group Guards' Alertness to XX
131.XX
Sets Action Block Variable 2 (Alertness) of any nearby guards who are in the same group as current guard. If "Alerts Others in Group" is set, affects all of the guards in same group. Use 64 or greater for when guards should be aware of Jo. Guards cannot be instantly knocked out from behind if Action Block Variable 2 (Alertness) is greater than 63. Built-in action blocks also use it to determine if guard detected Jo. First found inside the action block for Crash Site's G5Bots.

If Guard in xx Proximity to Jo and Line of Sight
0128.xx.rr
This has a generic name in the Action Block List. 10 is just outside of the player's melee range. Obeys player's cloak (cannot detect cloaked).

If Fade Completed, Return Value
01CC.RR
Works with both fade-ins and fade-outs.



Built-In Action Blocks
A rough, incomplete list of the built-in action blocks.

0008 Get Up From Sitting, Jump to 0007
0009 Sub-Action 0132.0100, Overwrite Subroutine, Then End
000A Guard Console Operation (Subroutine)
000B wait for line of sight, guard can react to near-miss, jumps to 000C
000C Various Guard Attacks (Subroutine, Can Be Standalone)
000D Get Up From Sitting, Jump to 000C
000E Jump to 0007 When Jo in Sight
000F Guard Attempts Melee (Subroutine)
0010 Guard Greets Disguised Jo (Subroutine)
0011 react to grenade, unused? (Subroutine)
0012 Perfect Buddy Setup, Jump to 0014 (sets objective 00000080 on AFO and Ruins)
0013 Perfect Buddy Setup + Fast Run (same as 0012, but no FC id set, does Alertness C8 instead of 64, and sets fast run. might be Pugilist?)
0014 Perfect Buddy Main Actions
0015 Perfect Buddy Hide for Cinema?
...
001D Guard Searches Around for Jo
...
001F Wait for Detect, No Idle Animations
0020 Perfect Buddy Teleport, Then Jump to 0014
0021 Twitch If Shot
...
0026 Setup Defected Guard (Psychosis Gun)
0027 Defected Guard Actions
0028 list: aidead, Wait for 0176 to Pass, Then Jump to 0029
0029 list: aibotinit, set health to 50, Reaction to 64, Set Return Sub to 002A, Go to 002A If Not Finished Death Anim, Else Loop Forever
002A If Dying/Dead, Go to 0028
...
002C sets 10000400 to guard's right-side object flags, jumps to 001D


And that, as they say, is that. If I find anything else out, I'll try to edit this post.
_________________
Quote:
22 not happening nerds. forget about it. 23 til the day i die.


Last edited by Lazlo52 on Mon Jan 22, 2018 9:46 pm; edited 8 times in total
 
View user's profile Send private message
pavarini
00 Agent
00 Agent


Joined: 07 May 2015
Posts: 479

 PostPosted: Tue Nov 21, 2017 12:41 am    Post subject: Reply with quote Back to top

Thank you for sharing these notes!
 
View user's profile Send private message
AL64inthedark
00 Agent
00 Agent


Joined: 18 Sep 2014
Posts: 548
Location: France

 PostPosted: Tue Nov 21, 2017 3:55 am    Post subject: Reply with quote Back to top

Good find. Hopefully it will help us understand how to make better IA behavior in Ge:X and other PD mods.
_________________
Listen to me
https://youtu.be/BzZ3k3NmhLM?t=25m51s
 
View user's profile Send private message MSN Messenger
SubDrag
Administrator
Administrator


Joined: 16 Aug 2006
Posts: 6118

 PostPosted: Wed Nov 22, 2017 7:51 am    Post subject: Reply with quote Back to top

Thanks for the info, welcome, and excellent findings! I always knew the Extra Presets were related to guards, but I never figured it out. Still not sure why it has that extra unsigned long associated that counts up.

I'll try and add what I can to the editor.
 
View user's profile Send private message
SubDrag
Administrator
Administrator


Joined: 16 Aug 2006
Posts: 6118

 PostPosted: Wed Nov 22, 2017 3:46 pm    Post subject: Reply with quote Back to top

Thanks again for all your notes. I think I've updated the beta editor and ini with your notes. The only thing I didn't add was Fast Melee because it used 3 flags and seemed like didn't always work (more complicated than this).

Feel free to help as much as you can. It might help if we organize the bits to see what's left.

http://goldeneyevault.com/editor/pdactions.ini
http://goldeneyevault.com/editor/runwaysetupeditor.exe
 
View user's profile Send private message
Lazlo52
Secret Agent
Secret Agent


Joined: 18 Nov 2017
Posts: 331
Location: N.J.

 PostPosted: Wed Nov 22, 2017 8:29 pm    Post subject: Reply with quote Back to top

SubDrag wrote:
Thanks again for all your notes. I think I've updated the beta editor and ini with your notes. The only thing I didn't add was Fast Melee because it used 3 flags and seemed like didn't always work (more complicated than this).

Feel free to help as much as you can. It might help if we organize the bits to see what's left.

http://goldeneyevault.com/editor/pdactions.ini
http://goldeneyevault.com/editor/runwaysetupeditor.exe


Everything looks well enough...except that "Quick and Stronger Melee" shows as ticked when only one of the required flags are set. All the others look correct, though.

I forgot to mention it earlier, but the very first console operation, "Guard Console Operation Two-Handed Typing Standing" is more like investigating. Because he leans forward and examines whatever's in front of him.

I also just noticed that sub-action 010F, Check Guard's Shield Damage, must have the wrong byte set as the Guard ID. For cases like these, how difficult would it be to implement the option to manually edit sub-action bytes?

Actually, where do you prefer to receive bug reports? I feel like a pest listing off these little issues here.
_________________
Quote:
22 not happening nerds. forget about it. 23 til the day i die.


Last edited by Lazlo52 on Wed Nov 22, 2017 8:37 pm; edited 1 time in total
 
View user's profile Send private message
pavarini
00 Agent
00 Agent


Joined: 07 May 2015
Posts: 479

 PostPosted: Wed Nov 22, 2017 8:31 pm    Post subject: Reply with quote Back to top

Editor bugs usually go in this thread
 
View user's profile Send private message
SubDrag
Administrator
Administrator


Joined: 16 Aug 2006
Posts: 6118

 PostPosted: Thu Nov 23, 2017 3:06 am    Post subject: Reply with quote Back to top

I fixed those issues in beta editor, thanks.
 
View user's profile Send private message
Lazlo52
Secret Agent
Secret Agent


Joined: 18 Nov 2017
Posts: 331
Location: N.J.

 PostPosted: Sun Dec 03, 2017 9:31 pm    Post subject: Reply with quote Back to top

pavarini wrote:
Editor bugs usually go in this thread

How have I not seen that thread?! I swear I was looking for it when scouting the forums... Oh well...



Anyway, today I must correct a mistake! It turns out that sub-actions 008E and 0131 actually refer to "Action Block Variable 2!" It's also confirmed that object flag "Alerts Others in Group" does indeed affect 0131. Furthermore, I've learned that Action Block Variable 2 is responsible for making a guard immune to being instantly knocked out from behind. Now, we can have a guard jump to a custom action block and not be easily defeated with a spinal tap!


Set Action Block Variable 2 to XX
008A.XX
Value is checked internally to determine if guard can be knocked out from behind. Guard cannot be instantly knocked out from behind if this Block Variable is greater than 63. Built-in action blocks also use this value to determine if guard detected Jo.

If Action Block Variable 2 is Less/Greater Than XX, Return Value
008E.XX.TT.RR
XX = value to compare
TT = 00, less than
TT = 01, greater than
Guard cannot be instantly knocked out from behind if this Block Variable is greater than 63. Built-in action blocks also use this value to determine if guard detected Jo.

Set Same Group Guards' Alertness to XX
131.XX
Sets Action Block Variable 2 (Alertness) of any nearby guards who are in the same group as current guard. If "Alerts Others in Group" is set, affects all of the guards in same group.
Use 64 or greater for when guards should be aware of Jo. Guards cannot be instantly knocked out from behind if Action Block Variable 2 (Alertness) is greater than 63. Built-in action blocks also use it to determine if guard detected Jo.
_________________
Quote:
22 not happening nerds. forget about it. 23 til the day i die.
 
View user's profile Send private message
SATURN_81
00 Agent
00 Agent


Joined: 06 Jun 2010
Posts: 423
Location: spain

 PostPosted: Mon Dec 04, 2017 7:34 am    Post subject: Reply with quote Back to top

I see these discoveries very well and I hope that more behaviors and "Action Blocks" will be discovered and the way they work.

Can you give an example of a guard being immune to being struck instantly from behind? So far I have only been able to imagine Tren Easton in the Crash Site as an example of this type of guards.

Set the guards alert of the same group to XX:

this seems quite interesting that can be configured if the guards are on alert a whole group or individually. I hope this helps even more GE-X.
 
View user's profile Send private message MSN Messenger
Lazlo52
Secret Agent
Secret Agent


Joined: 18 Nov 2017
Posts: 331
Location: N.J.

 PostPosted: Mon Dec 04, 2017 1:30 pm    Post subject: Reply with quote Back to top

SATURN_81 wrote:
Can you give an example of a guard being immune to being struck instantly from behind? So far I have only been able to imagine Tren Easton in the Crash Site as an example of this type of guards.

Once someone sees you, it takes two punches from behind to knock him out. If the character is unaware of Jo, then a single strike will knock him out. That's what I mean.

This is an example of a character not being immune when they probably should: On the Air Force One stage, the two Mr. Blonde guards next to Trent Easton can be incapacitated instantly if you punch them from behind, even if they see you.
_________________
Quote:
22 not happening nerds. forget about it. 23 til the day i die.
 
View user's profile Send private message
Lazlo52
Secret Agent
Secret Agent


Joined: 18 Nov 2017
Posts: 331
Location: N.J.

 PostPosted: Tue Dec 05, 2017 6:21 pm    Post subject: Reply with quote Back to top

Oops, again. Looks like I was wrong about sub-action 0129. What it really does is...I have no clue. My mistake was that I tested it exactly once and immediately went to 0128, assuming them to be related. But no, 0129 is currently a mystery.

When setting 0129's variable to 06, it passed when l shot the guard. Upon rebooting the game for an unrelated test, 06 passed immediately. So, I set it to 05 and it went back to passing when the guard got hurt. Fast forward to the next day, I move the guard to a different room and the check never passes. The only thing that seemed consistent was that high numbers make it pass immediately, while low numbers make it never pass. Oh well.



In more positive news, I found another sub-action port from GE: Detect If Fade Complete! Don't worry, I made sure to test this more thoroughly and it definitely worked on both fade-ins and fade-outs.

If Fade Completed, Return Value
01CC.RR
Works with both fade-ins and fade-outs.
_________________
Quote:
22 not happening nerds. forget about it. 23 til the day i die.
 
View user's profile Send private message
SubDrag
Administrator
Administrator


Joined: 16 Aug 2006
Posts: 6118

 PostPosted: Wed Dec 06, 2017 5:28 am    Post subject: Reply with quote Back to top

Nice! There's so many actions in PD, really good you're poking it. I haven't had time to add to editor your new findings, but will this weekend.
 
View user's profile Send private message
AL64inthedark
00 Agent
00 Agent


Joined: 18 Sep 2014
Posts: 548
Location: France

 PostPosted: Thu Dec 07, 2017 8:37 am    Post subject: Reply with quote Back to top

Yes. It's been a long time that I wished people would just mod GE:X instead of GE for all the things that PD add.

With all those finding, we're coming closer to understand and create content on that engine. Thanks to everyone who worked and works on improving our comprehension on that engine.
_________________
Listen to me
https://youtu.be/BzZ3k3NmhLM?t=25m51s
 
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    ShootersForever.com Forum Index -> Carrington's Hacker Central All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Cobalt 2.0 BB theme/template by Jakob Persson.
Copyright © 2002-2004 Jakob Persson


Powered by BB © 01, 02 BB Group

 


Please Visit My Other Sites: GoldenEyeForever.com | GrandTheftAutoForever.com

Got kids? Check out my Dora The Explorer site with games and coloring pages!

Our forums feature Nintendo 64 games, GoldenEye 007 N64 New Maps and Missions, GoldenEye Cheats, N64 Emulator, Gameshark, GoldenEye Multiplayer and more!

[ Privacy Policy ]