Talk:Oni engine patches (Mac PPC): Difference between revisions

From OniGalore
Jump to navigation Jump to search
(the plot thickens...)
m (+cat)
 
(47 intermediate revisions by 6 users not shown)
Line 1: Line 1:
Just tested the upgrade for 1024x1024 and Oni crashed. First of all OniSplit works fine with a 1024x1024 targa image, I can import and export.
==Mac Daodan==
:What's the possibility of making something [[wikipedia:DLL_injection#Approaches_on_Unix-like_systems|Daodan-like]] for the Mac, or placing function calls in code caves? --[[User:RossyMiles|rossy]] 11:18, 10 October 2008 (CEST)


When I imported a 1024x1024 image (delorean.tga) I got the level 4 splash screen, but then I got a black screen, I had to force quit Oni.  So no crash report.  Next I did the same image at 512x512, same result, except this time I got Oni's crash report. Here it is:
:Define "code caves"; I'm not sure there's many of those, and we can't go very far with a hackish approach anyway. As for DLL-similar stuff, SFeLi said it was feasible and even relatively easy with [[wikipedia:Mach-O|Mach-O]] files: I haven't looked into that myself. --[[User:Geyser|geyser]] 18:06, 10 October 2008 (CEST)
::Code caves? There are a ton of those in the Mac executable :) [[User:Neo|Neo]]
:::[[wikt:code_cave]] Sounds neat\useful, for someone who is good at asm.[[User:Gumby|Gumby]] 05:38, 16 October 2008 (CEST)


Process: Oni (1.0 (Mac OS X) (v1.36) (01/28/03))
 
  exception = 0x00000001, code = 0x00063328;0x00000001;0x88428882;
----
==Uppercase letters at the console==
:''Issue still unsolved as of 06:39, 22 October 2008 (CEST)
Hmm, about the Shift key not being 'accessible'... I actually never noticed before that one cannot type capital letters on the command line, and if I did notice it I would have assumed the PC version was the same. So, one point and one question:
*It's not exactly true that the Shift key is not accessible or not recognized, because I can type important characters like the underscore and parentheses. It's merely that uppercase letters cannot be typed.
*Is the lack of access to uppercase letters an issue? This is total news to me, so naturally I am curious as to whether this has been a problem on the Mac side of things that I never knew about. --[[User:Iritscen|Iritscen]] 03:04, 7 October 2008 (CEST)
 
 
:The PC command line has no major issues: uppercase letters can be entered both on PC and PC demo. There are occasional glitches with autocompletion and some inconsistencies with multithreading (i.e., "fork"ing may not work as expected when launched from the console). Also, the command line is not displayed properly or at all at large resolutions.
:Thanks for the disambiguation about the Shift key. Ed didn't make it clear how exactly it didn't work. Do you confirm that the ''only'' characters that can't be entered are uppercase letters? Also, Ed, how long have your 3 "known issues" been around? Right from the moment when the Dev Mode was unlocked?
:The original variables and functions (preset of scripted) are all lowercase, but team names are capitalized, and many AI names contain uppercase letters as well. So lowercase-only input can be frustrating. The obvious workaround is to use scripts more, so that all command line statements can be lowercase.
::[[User:Geyser|geyser]] 03:36, 7 October 2008 (CEST)
:::Just confirmed it to make sure; only a-z cannot be modified by the Shift key, i.e., become uppercase. All other characters that require Shift can be typed. And thanks for the answer on what uses uppercase, the team names and AI names slipped my mind. I tested that as well, hoping that the Mac would ignore case, but alas; the console indeed does not recognize any team names without the uppercase letters. --[[User:Iritscen|Iritscen]] 04:02, 7 October 2008 (CEST)
:::Also, I now see that capitals are required to type in animation names, therefore the chr_animate command is essentially unuseable on the Mac Oni console line; however, the command still works from within a BSL script, where caps are recognized. --[[User:Iritscen|iritscen]] 06:01, 7 November 2008 (CET)
::::Iritscen, you beat me to it. The SHIFT key does not work in Dev Mode to enter uppercase letters (I should have been more specific, sorry).  How long have I've known these issues?  The SHIFT key problem was discovered when you, (geyser) asked me to enter some code in the console, I forgot when that happened.  The Window mode issue was known as soon as it was figured out how to run Omni group's version in a window. I'm sure this was mentioned at some point, either here or at OCF. The problems with the Numpad key was known back in Jan 2007 and you suggested using the [[User_talk:EdT|key_config.txt file]] [[User:EdT|EdT]] 04:11, 7 October 2008 (CEST)
 
 
----
 
==Large textures==
The crash report is now history, but let's clarify the status of the patch at 0x001151C3. Is it irrelevant and can it be reverted?
:0x001151C3 needs to be changed to 0x40 for 1024 textures, reverting to 0x04 or 0x10 results in crashes. Fortunately, I had already changed it to 0x40 prior to the latest patch.[[User:EdT|EdT]] 07:17, 22 October 2008 (CEST)
 
 
----
 
==Projectile awareness==
Fixed as of Dec 18 2008
 
{|
|
{{table}}
{{th}}
!Offset!!Old hex!!New hex!!Description
|-align=center
|0x00016503<BR>0x00016507<BR>0x0001650B<BR>0x000164F1<BR>0x000164F2||50<br>54<br>58<br>9D<br>23||74<br>78<br>7C<br>BD<br>2B
|align=left|projectile awareness fixed
|}
|}
 
 
----
 
==BSL functions==
Cleaning up previous talk, see history if you need reference
#Redeeming cm_barabus, because it looks like it works after all, and could be useful to both scripters and video makers (basically it interpolates the camera until it focuses on a certain character). So, Ed, please revert it.
#Scrapping all 11 ai2_skill_* functions, because their table entries and strings are conveniently grouped. Putting 11 "essentials" there. If you want to tweak shooting skills, use another version ^_^
#Keeping chr_holdkey as chr_location for now; may move it around later ^_^
#Turning ai2_panic into equally useless chr_draw_dot; we may change it later ^_^
#Turning ai2_chump into modder-oriented chr_who; we may change it later ^_^
#Turning ai2_printbnvindex into ui_fill_element; we may change it later ^_^
#For the big continuous patch you probably don't want to go nuts doing it byte by byte like I did, so grab a patched engine [http://geyser.oni2.net/TEMP/omni/OniBSL.zip HERE] and copy the relevant sections over to your backup. I used the big table below to proofread the patch, and we may still need it to check function pointers etc if something doesn't work.
 
{{Table}} style="white-space:nowrap"
|+making '''ai2_printbnvindex''' into '''ui_fill_element''': fixing pointers
{{th}}
!Offset
!Old hex
!New hex
!Description
|-
|0x1B9BDC
|00 17 1A 40
|00 17 1A 40
|pointer to BSL name; unchanged
|-
|0x1B9BE8
|00 17 1A 54
|00 17 1A 54
|pointer to help string; unchanged
|-
|0x1B9BEC
|00 16 A1 48
|00 17 86 20
|pointer to signature string; redirected
|-
|0x1B9BF0
|00 03 27 DC
|00 '''07 19 DC'''
|pointer to function; now pointing to _ONiInGameUI_FillElement
|}
 
 
{{Table}} style="white-space:nowrap"
|+making '''chr_hold_key''' into '''chr_location''': fixing pointers
{{th}}
!Offset
!Old hex
!New hex
!Description
|-
|0x1B918C
|00 16 EE 24
|00 16 EE '''23'''
|pointer to BSL name; shifting 1 char backwards
|-
|0x1B9198
|00 16 FB E8
|00 16 FB E8
|pointer to help string; unchanged
|-
|0x1B919C
|00 16 FC 20
|00 16 FC 20
|pointer to signature string; unchanged
|-
|0x1B91A0
|00 03 45 A8
|00 '''04 17 20'''
|pointer to function; now pointing to _iSetAnyCharacterLocation
|}
 
 
{{Table}} style="white-space:nowrap"
|+making '''ai2_chump''' into '''chr_who''': fixing pointers
{{th}}
!Offset
!Old hex
!New hex
!Description
|-
|0x1B9BF4
|00 17 1A 7C
|00 17 1A 7C
|pointer to BSL name; unchanged
|-
|0x1B9C00
|00 17 1A 88
|00 17 1A 88
|pointer to help string; unchanged
|-
|0x1B9C04
|00 16 A1 48
|00 16 A1 48
|pointer to signature string; unchanged
|-
|0x1B9C08
|00 03 2E E0
|00 '''04 00 88'''
|pointer to function; now pointing to _ONrWho
|}
 
 
{{Table}} style="white-space:nowrap"
|+making '''ai2_panic''' into '''chr_draw_dot''': fixing pointers
{{th}}
!Offset
!Old hex
!New hex
!Description
|-
|0x1B95DC
|00 16 F2 EC
|00 16 F2 '''EA'''
|pointer to BSL name; shifting 2 chars backwards
|-
|0x1B95E8
|00 17 09 48
|00 17 09 48
|pointer to help string; unchanged
|-
|0x1B95EC
|00 17 09 68
|00 17 09 68
|pointer to signature string; unchanged
|-
|0x1B95F0
|00 03 55 F8
|00 '''04 15 04'''
|pointer to function; now pointing to _iDrawDot
|}
 
 
{{Table}} style="white-space:nowrap"
|+making '''ai2_printbnvindex''' into '''ui_fill_element''': fixing strings
{{th}}
!Offset
!0x170A40
!0x170A54
|-
!Old chars
|<tt>ai2_printbnvindex°°°</tt>
|<tt>prints the index of the player's BNV°°°°</tt>
|-
!New chars
|<tt>ui_fill_element°°°°°</tt>
|<tt>forces a part of the UI to appear full°°</tt>
|-
!Description
|replacing name in_place
|replacing help string in-place
|}
 
 
{{Table}} style="white-space:nowrap"
|+making '''chr_hold_key''' into '''chr_location''': fixing strings
{{th}}
!Offset
!0x16DE23
!0x16EBE8
!0x16EC20
|-
!Old chars
|<tt>°chr_holdkey°</tt>
|<tt>forces a character to hold a key down for some frames°°°</tt>
|<tt><nowiki>[ai_name:string | script_id:int] key_name:string num_frames:int°</nowiki></tt>
|-
!New chars
|<tt>chr_location°</tt>
|<tt>sets location of a character or prints current location°</tt>
|<tt><nowiki>chr_index:int [[loc_x:float loc_y:float loc_z:float] | ]°°°°°°°°</nowiki></tt>
|-
!Description
|replacing/shifting name
|replacing help string in-place
|replacing signature string in-place
|}
 
 
{{Table}} style="white-space:nowrap"
|+making '''ai2_chump''' into '''chr_who''': fixing strings
{{th}}
!Offset
!0x170A7C
!0x170A88
|-
!Old chars
|<tt>ai2_chump°</tt>
|<tt>creates a chump°</tt>
|-
!New chars
|<tt>chr_who°°°</tt>
|<tt>lists all chars°</tt>
|-
!Description
|replacing name in-place
|replacing help string in-place
|}
 
 
{{Table}} style="white-space:nowrap"
|+making '''ai2_panic''' into '''chr_draw_dot''': fixing strings
{{th}}
!Offset
!0x16E2EA
!0x16F948
!0x16F968
|-
!Old chars
|<tt>°°ai2_panic°°°</tt>
|<tt>makes an AI panic or not panic°°</tt>
|<tt><nowiki>[ai_name:string | script_id:int] timer:int°°</nowiki></tt>
|-
!New chars
|<tt>chr_draw_dot°°</tt>
|<tt>draw line from player to point°°</tt>
|<tt><nowiki>[[loc_x:float loc_y:float loc_z:float] | ]°°</nowiki></tt>
|-
!Description
|replacing/shifting name
|replacing help string in-place
|replacing signature string in-place
|}
 
 
{{Table}} style="white-space:nowrap"
|+making '''ai2_skill_*''' into eleven other funcs: fixing pointers
{{th}}
!Offset
!Old hex
!New hex
!Description
|-
|0x1B975C
|00 17 0E 24
|'''00 17 11 53
|pointer to BSL name '''chr_focus
|-
|0x1B9768
|00 17 0E 38
|'''00 17 10 20
|pointer to help string
|-
|0x1B976C
|00 17 0E 5C
|'''00 17 11 5D
|pointer to signature string
|-
|0x1B9770
|00 03 0A 14
|'''00 04 19 6C
|pointer to function; now pointing to _SetMainCharacter
|-
|0x1B9774
|00 17 0E 84
|'''00 17 11 68
|pointer to BSL name '''powerup_reset
|-
|0x1B9780
|00 17 0E 94
|'''00 17 10 4A
|pointer to help string
|-
|0x1B9784
|00 16 A1 48
|00 16 A1 48
|pointer to signature string; unchanged
|-
|0x1B9788
|00 03 0B 60
|'''00 0A 57 8C
|pointer to function; now pointing to _WPiPowerups_Reset
|-
|0x1B978C
|00 17 0E C0
|'''00 17 11 76
|pointer to BSL name '''corpse_reset
|-
|0x1B9798
|00 17 0E D4
|'''00 17 10 64
|pointer to help string
|-
|0x1B979C
|00 16 A1 48
|00 16 A1 48
|pointer to signature string; unchanged
|-
|0x1B97A0
|00 03 0C DC
|'''00 04 08 A0
|pointer to function; now pointing to _ONrCorpse_Reset
|-
|0x1B97A4
|00 17 0F 10
|'''00 17 11 83
|pointer to BSL name '''weapon_reset
|-
|0x1B97B0
|00 17 0F 20
|'''00 17 10 7D
|pointer to help string
|-
|0x1B97B4
|00 16 A1 48
|00 16 A1 48
|pointer to signature string; unchanged
|-
|0x1B97B8
|00 03 0D 90
|'''00 0A 56 38
|pointer to function; now pointing to _WPiWeapons_Reset
|-
|0x1B97BC
|00 17 0F 5C
|'''00 17 11 1E
|pointer to BSL name '''chr_set_class
|-
|0x1B97C8
|00 17 0F 70
|'''00 17 0F F4
|pointer to help string
|-
|0x1B97CC
|00 17 0F A0
|'''00 17 11 2C
|pointer to signature string
|-
|0x1B97D0
|00 03 0F C0
|'''00 04 06 14
|pointer to function; now pointing to _iSetCharacterClass
|-
|0x1B97D4
|00 17 0F BC
|'''00 17 11 00
|pointer to BSL name '''chr_health
|-
|0x1B97E0
|00 17 0F D0
|'''00 17 0F DD
|pointer to help string
|-
|0x1B97E4
|00 17 0F FC
|'''00 17 11 0B
|pointer to signature string
|-
|0x1B97E8
|00 03 10 4C
|'''00 04 18 48
|pointer to function; now pointing to _iSetAnyCharacterHealth
|-
|0x1B97EC
|00 17 10 10
|'''00 17 10 EB
|pointer to BSL name '''gs_fov_set
|-
|0x1B97F8
|00 17 10 20
|'''00 17 0F B4
|pointer to help string
|-
|0x1B97FC
|00 17 10 3C
|'''00 17 10 F6
|pointer to signature string
|-
|0x1B9800
|00 03 11 38
|'''00 05 B8 18
|pointer to function; now pointing to _ONrGameState_FieldOfView_Set
|-
|0x1B9804
|00 17 10 50
|'''00 17 10 D3
|pointer to BSL name '''make_corpse
|-
|0x1B9810
|00 17 10 60
|'''00 17 0F 94
|pointer to help string
|-
|0x1B9814
|00 17 10 7C
|'''00 17 10 DF
|pointer to signature string
|-
|0x1B9818
|00 03 11 C4
|'''00 04 09 24
|pointer to function; now pointing to _ONrMakeCorpse
|-
|0x1B981C
|00 17 10 90
|'''00 17 10 BA
|pointer to BSL name '''chr_display_combat_stats
|-
|0x1B9828
|00 17 10 A8
|'''00 17 0F 74
|pointer to help string
|-
|0x1B982C
|00 17 10 D4
|'''00 17 11 5D
|pointer to signature string
|-
|0x1B9830
|00 03 12 50
|'''00 04 04 54
|pointer to function; now pointing to _iDiplayCharacterCombatStats
|-
|0x1B9834
|00 17 10 E8
|'''00 17 10 A1
|pointer to BSL name '''chr_location_settocamera
|-
|0x1B9840
|00 17 10 FC
|'''00 17 0F 55
|pointer to help string
|-
|0x1B9844
|00 17 11 2C
|'''00 17 11 5D
|pointer to signature string
|-
|0x1B9848
|00 03 12 DC
|'''00 04 1A AC
|pointer to function; now pointing to _iCharacterLocation_SetFromCamera
|-
|0x1B984C
|00 17 11 3C
|'''00 17 10 96
|pointer to BSL name '''chr_weapon
|-
|0x1B9858
|00 17 11 50
|'''00 17 0F 29
|pointer to help string
|-
|0x1B985C
|00 17 11 80
|'''00 17 11 2C
|pointer to signature string
|-
|0x1B9860
|00 03 13 84
|'''00 04 19 E0
|pointer to function; now pointing to _iSetAnyCharacterWeapon
|}
 
 
;Replacing ai2_skill_* with eleven other funcs, leaving room for more strings
  Offset    0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F
   
   
  5 threads:
  001B9750                                      00 17 0E 24              ...$
  Thread 0:
  001B9760  00 00 00 00 00 00 00 00 00 17 0E 38 00 17 0E 5C  ...........8...\
  srr0: 0x9000b348 srr1: 0x0000d030  cr: 0x24022024 xer: 0x00000000 lr: 0x9000b29c ctr: 0x9000b340
  001B9770 00 03 0A 14 00 17 0E 84 00 00 00 00 00 00 00 00  .......„........
  r0: 0xffffffe1 r8: 0x00000000 r16: 0x00000000 r24: 0xf0182840
001B9780 00 17 0E 94 00 16 A1 48 00 03 0B 60 00 17 0E C0 ...”..¡H...`...À
  r1: 0xf0182770 r9: 0x00000000 r17: 0x00000000 r25: 0x00000450
  001B9790  00 00 00 00 00 00 00 00 00 17 0E D4 00 16 A1 48  ...........Ô..¡H
  r2: 0xa1b1c1d3 r10: 0x91444fa8 r18: 0x00006803 r26: 0x00006603
  001B97A0 00 03 0C DC 00 17 0F 10 00 00 00 00 00 00 00 00 ...Ü............
  r3: 0xf0182840 r11: 0xa0006a28 r19: 0x00000000 r27: 0x00000000
  001B97B0 00 17 0F 20 00 16 A1 48 00 03 0D 90 00 17 0F 5C ... ..¡H.......\
  r4: 0x03000006 r12: 0x9000b340 r20: 0x05c8046a r28: 0x00000000
  001B97C0  00 00 00 00 00 00 00 00 00 17 0F 70 00 17 0F A0  ...........p... 
  r5: 0x00000000 r13: 0x00000000 r21: 0x177348d1  r29: 0x03000006
  001B97D0  00 03 0F C0 00 17 0F BC 00 00 00 00 00 00 00 00  ...À...¼........
  r6: 0x00000450 r14: 0x00000000 r22: 0x0063e7b8 r30: 0x03000006
  001B97E0 00 17 0F D0 00 17 0F FC 00 03 10 4C 00 17 10 10 ...Ð...ü...L....
  r7: 0x00006603 r15: 0x00000001 r23: 0x00000000 r31: 0x907de670
  001B97F0  00 00 00 00 00 00 00 00 00 17 10 20 00 17 10 3C  ........... ...<
    0 -- 0x9000b348 -- _mach_msg_trap
  001B9800 00 03 11 38 00 17 10 50 00 00 00 00 00 00 00 00 ...8...P........
    1 -- 0x9000b29c -- _mach_msg
  001B9810  00 17 10 60 00 17 10 7C 00 03 11 C4 00 17 10 90  ...`...|...Ä....
    2 -- 0x907de998 -- ___CFRunLoopRun
  001B9820 00 00 00 00 00 00 00 00 00 17 10 A8 00 17 10 D4 ...........¨...Ô
    3 -- 0x907de29c -- _CFRunLoopRunSpecific
  001B9830 00 03 12 50 00 17 10 E8 00 00 00 00 00 00 00 00 ...P...è........
    4 -- 0x91458524 -- __ZN10HALRunLoop9OwnThreadEPv
  001B9840 00 17 10 FC 00 17 11 2C 00 03 12 DC 00 17 11 3C ...ü...,...Ü...<
    5 -- 0x914582c4 -- __ZN9CAPThread5EntryEPS_
  001B9850 00 00 00 00 00 00 00 00 00 17 11 50 00 17 11 80 ...........P...€
    6 -- 0x9002bd08 -- __pthread_body
  001B9860 00 03 13 84                                      ...„
must be changed to
  Offset    0 1 2 3 4 5 6 7  8  9  A  B  C  D  E  F
   
   
  Thread 1:
  001B9750                                      00 17 11 53              ...S
  srr0: 0x00063328 srr1: 0x0000f030  cr: 0x84000248 xer: 0x00000004 lr: 0x0012aec8 ctr: 0x0b127490
  001B9760  00 00 00 00 00 00 00 00 00 17 10 20 00 17 11 5D  ........... ...]
  r0: 0x0012aec8 r8: 0x00186418 r16: 0x00000000 r24: 0x00000000
  001B9770 00 04 19 6C 00 17 11 68 00 00 00 00 00 00 00 00 ...l...h........
  r1: 0xbffff9e0 r9: 0x88428842 r17: 0x00000000 r25: 0x00195f6d
  001B9780 00 17 10 4A 00 16 A1 48 00 0A 57 8C 00 17 11 76 ...J..¡H..WŒ...v
  r2: 0x0b207498 r10: 0x0b127498 r18: 0x00000000 r26: 0x00000000
  001B9790  00 00 00 00 00 00 00 00 00 17 10 64 00 16 A1 48  ...........d..¡H
  r3: 0x00000000 r11: 0x0187de20 r19: 0x00000000 r27: 0x00000000
  001B97A0  00 04 08 A0 00 17 11 83 00 00 00 00 00 00 00 00  ... ...ƒ........
  r4: 0x000003fc r12: 0x00063300 r20: 0x00000000 r28: 0xbffffb28
  001B97B0 00 17 10 7D 00 16 A1 48 00 0A 56 38 00 17 11 1E ...}..¡H..V8....
  r5: 0x000003fc r13: 0x00000000 r21: 0x00000000 r29: 0x001910bc
  001B97C0  00 00 00 00 00 00 00 00 00 17 0F F4 00 17 11 2C  ...........ô...,
  r6: 0x0019624c r14: 0x00000000 r22: 0x00000000 r30: 0x00218c3c
  001B97D0 00 04 06 14 00 17 11 00 00 00 00 00 00 00 00 00 ................
  r7: 0x43300000 r15: 0x00000000 r23: 0x00000000 r31: 0x0012afb4
  001B97E0  00 17 0F DD 00 17 11 0B 00 04 18 48 00 17 10 EB  ...Ý.......H...ë
    0 -- 0x00063328 -- _ONrGameState_GetEnvironment
  001B97F0 00 00 00 00 00 00 00 00 00 17 0F B4 00 17 10 F6 ...........´...ö
    1 -- 0x0012aec8 -- _P3iDisplayDecals
  001B9800 00 05 B8 18 00 17 10 D3 00 00 00 00 00 00 00 00 ..¸....Ó........
    2 -- 0x0012afc4 -- _P3rDisplayStaticDecals
  001B9810  00 17 0F 94 00 17 10 DF 00 04 09 24 00 17 10 BA  ...”...ß...$...º
    3 -- 0x00062b38 -- _ONiGameState_Display_Reflectable
  001B9820 00 00 00 00 00 00 00 00 00 17 0F 74 00 17 11 5D ...........t...]
    4 -- 0x00062d20 -- _ONrGameState_Display
001B9830  00 04 04 54 00 17 10 A1 00 00 00 00 00 00 00 00 ...T...¡........
    5 -- 0x00003d48 -- _ONiRunGame
  001B9840 00 17 0F 55 00 17 11 5D 00 04 1A AC 00 17 10 96 ...U...]...¬...–
    6 -- 0x00004610 -- _ONiMain
  001B9850 00 00 00 00 00 00 00 00 00 17 0F 29 00 17 11 2C ...........)...,
    7 -- 0x0000470c -- _main
  001B9860 00 04 19 E0                                      ...à
    8 -- 0x00002b40 -- __start
and
    9 -- 0x00002970 -- start
  Offset    0 1 2 3 4 5 6 7 8 9 A  B  C  D  E  F
   
   
  Thread 2:
  0016FE20        00 00 61 69 32 5F 73 6B 69 6C 6C 5F 73 65    ..ai2_skill_se
  srr0: 0x90054388 srr1: 0x0200f030   cr: 0x24008244 xer: 0x00000000 lr: 0x90070be8 ctr: 0x90054380
0016FE30  6C 65 63 74 00 00 00 00 73 65 6C 65 63 74 73 20  lect....selects
  r0: 0xffffffd9 r8: 0x91468918 r16: 0x00000000 r24: 0x00000000
0016FE40  61 20 73 68 6F 6F 74 69 6E 67 20 73 6B 69 6C 6C  a shooting skill
  r1: 0xf0284b00 r9: 0xa0001fac r17: 0x00000000 r25: 0xa00009dc
0016FE50  20 74 6F 20 65 64 69 74 00 00 00 00 63 68 61 72  to edit....char
  r2: 0x00000001 r10: 0x00acc0d9 r18: 0x00000000 r26: 0x0063ff94
0016FE60  5F 63 6C 61 73 73 3A 73 74 72 69 6E 67 20 77 65  _class:string we
  r3: 0x00000031 r11: 0xa0006be0 r19: 0x00000000 r27: 0x0063ffc0
  0016FE70  61 70 6F 6E 5F 6E 61 6D 65 3A 73 74 72 69 6E 67  apon_name:string
  r4: 0x00002f03 r12: 0x90054380 r20: 0x00000000 r28: 0xf0284bb0
0016FE80  00 00 00 00 61 69 32 5F 73 6B 69 6C 6C 5F 73 68  ....ai2_skill_sh
  r5: 0x00000000 r13: 0x00000000 r21: 0x00000000 r29: 0xa0001fac
0016FE90  6F 77 00 00 73 68 6F 77 73 20 74 68 65 20 63 75  ow..shows the cu
  r6: 0x00acc0d9 r14: 0x00000000 r22: 0x00000000 r30: 0xa0001fac
0016FEA0  72 72 65 6E 74 6C 79 20 73 65 6C 65 63 74 65 64  rrently selected
  r7: 0xf0284d58 r15: 0x00000000 r23: 0x00000000 r31: 0x900709dc
0016FEB0  20 73 68 6F 6F 74 69 6E 67 20 73 6B 69 6C 6C 00  shooting skill.
    0 -- 0x90054388 -- _semaphore_timedwait_signal_trap
0016FEC0  61 69 32 5F 73 6B 69 6C 6C 5F 72 65 76 65 72 74  ai2_skill_revert
    1 -- 0x90070be8 -- _pthread_cond_timedwait_relative_np
0016FED0  00 00 00 00 72 65 76 65 72 74 73 20 74 68 65 20  ....reverts the
    2 -- 0x914696ac -- __ZN7CAGuard7WaitForEy
0016FEE0  73 68 6F 6F 74 69 6E 67 20 73 6B 69 6C 6C 20 62  shooting skill b
    3 -- 0x914695bc -- __ZN7CAGuard9WaitUntilEy
0016FEF0  65 69 6E 67 20 65 64 69 74 65 64 20 74 6F 20 74  eing edited to t
    4 -- 0x91467800 -- __ZN11HP_IOThread8WorkLoopEv
0016FF00  68 65 20 73 61 76 65 64 20 63 6F 70 79 00 00 00  he saved copy...
    5 -- 0x91467498 -- __ZN11HP_IOThread11ThreadEntryEPS_
0016FF10  61 69 32 5F 73 6B 69 6C 6C 5F 73 61 76 65 00 00  ai2_skill_save..
    6 -- 0x914582c4 -- __ZN9CAPThread5EntryEPS_
0016FF20  73 61 76 65 73 20 74 68 65 20 73 68 6F 6F 74 69  saves the shooti
    7 -- 0x9002bd08 -- __pthread_body
0016FF30  6E 67 20 73 6B 69 6C 6C 20 62 65 69 6E 67 20 65 ng skill being e
0016FF40  64 69 74 65 64 20 6F 75 74 20 61 73 20 61 20 74  dited out as a t
0016FF50  65 78 74 20 66 69 6C 65 00 00 00 00 61 69 32 5F  ext file....ai2_
0016FF60  73 6B 69 6C 6C 5F 72 65 63 6F 69 6C 00 00 00 00  skill_recoil....
0016FF70  73 65 74 73 20 61 6E 20 41 49 27 73 20 72 65 63  sets an AI's rec
0016FF80  6F 69 6C 20 63 6F 6D 70 65 6E 73 61 74 69 6F 6E  oil compensation
0016FF90  20 61 6D 6F 75 6E 74 20 28 30 2D 31 29 00 00 00   amount (0-1)...
0016FFA0  72 65 63 6F 69 6C 5F 63 6F 6D 70 65 6E 73 61 74  recoil_compensat
0016FFB0  69 6F 6E 3A 66 6C 6F 61 74 00 00 00 61 69 32 5F  ion:float...ai2_
0016FFC0  73 6B 69 6C 6C 5F 62 65 73 74 61 6E 67 6C 65 00  skill_bestangle.
0016FFD0  73 65 74 73 20 61 6E 20 41 49 27 73 20 62 65 73  sets an AI's bes
0016FFE0  74 20 61 69 6D 69 6E 67 20 61 6E 67 6C 65 20 69  t aiming angle i
0016FFF0  6E 20 64 65 67 72 65 65 73 00 00 00 62 65 73 74  n degrees...best
00170000  5F 61 6E 67 6C 65 3A 66 6C 6F 61 74 00 00 00 00 _angle:float....
00170010  61 69 32 5F 73 6B 69 6C 6C 5F 65 72 72 6F 72 00  ai2_skill_error.
00170020  73 65 74 73 20 61 6E 20 41 49 27 73 20 67 72 6F  sets an AI's gro
00170030  75 70 69 6E 67 20 65 72 72 6F 72 00 65 72 72 6F uping error.erro
00170040  72 5F 61 6D 6F 75 6E 74 3A 66 6C 6F 61 74 00 00  r_amount:float..
00170050  61 69 32 5F 73 6B 69 6C 6C 5F 64 65 63 61 79 00  ai2_skill_decay.
00170060  73 65 74 73 20 61 6E 20 41 49 27 73 20 67 72 6F  sets an AI's gro
00170070  75 70 69 6E 67 20 64 65 63 61 79 00 64 65 63 61  uping decay.deca
00170080  79 5F 61 6D 6F 75 6E 74 3A 66 6C 6F 61 74 00 00  y_amount:float..
  00170090  61 69 32 5F 73 6B 69 6C 6C 5F 69 6E 61 63 63 75  ai2_skill_inaccu
  001700A0 72 61 63 79 00 00 00 00 73 65 74 73 20 61 6E 20 racy....sets an
  001700B0  41 49 27 73 20 73 68 6F 6F 74 69 6E 67 20 69 6E  AI's shooting in
  001700C0 61 63 63 75 72 61 63 79 20 6D 75 6C 74 69 70 6C accuracy multipl
  001700D0  69 65 72 00 69 6E 61 63 63 75 72 61 63 79 3A 66  ier.inaccuracy:f
  001700E0 6C 6F 61 74 00 00 00 00 61 69 32 5F 73 6B 69 6C loat....ai2_skil
  001700F0  6C 5F 64 65 6C 61 79 6D 69 6E 00 00 73 65 74 73 l_delaymin..sets
  00170100 20 61 6E 20 41 49 27 73 20 6D 69 6E 20 64 65 6C  an AI's min del
  00170110  61 79 20 62 65 74 77 65 65 6E 20 73 68 6F 74 73  ay between shots
  00170120 2C 20 69 6E 20 66 72 61 6D 65 73 00 6D 69 6E 64 , in frames.mind
  00170130  65 6C 61 79 3A 69 6E 74 00 00 00 00 61 69 32 5F  elay:int....ai2_
  00170140 73 6B 69 6C 6C 5F 64 65 6C 61 79 6D 61 78 00 00 skill_delaymax..
  00170150  73 65 74 73 20 61 6E 20 41 49 27 73 20 6D 61 78 sets an AI's max
  00170160 20 64 65 6C 61 79 20 62 65 74 77 65 65 6E 20 73  delay between s
  00170170  68 6F 74 73 2C 20 69 6E 20 66 72 61 6D 65 73 00  hots, in frames.
  00170180 6D 61 78 64 65 6C 61 79 3A 69 6E 74 00 00 00 00 maxdelay:int....
must be changed to
  Offset    0 1 2 3 4 5 6 7 8  9  A  B  C  D  E  F
   
   
  Thread 3:
  0016FE20        00 00 00 00 00 00 00 00 00 00 00 00 00 00    ..............
  srr0: 0x9003288c srr1: 0x0000d030   cr: 0x82000002 xer: 0x00000000 lr: 0x33332814 ctr: 0x90032880
0016FE30  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  r0: 0x00000007 r8: 0x00000000 r16: 0x00000000 r24: 0x00000000
0016FE40  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  r1: 0xf00807d0 r9: 0xa0010204 r17: 0x00000000 r25: 0x00000000
0016FE50  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  r2: 0x000000d9 r10: 0x90032824 r18: 0x00000000 r26: 0xf0080bec
0016FE60  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  r3: 0x00005997 r11: 0x42000008 r19: 0x00000000 r27: 0x00063328
0016FE70  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  r4: 0x00000000 r12: 0x90032880 r20: 0x00000000 r28: 0x00000001
0016FE80  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  r5: 0x00000000 r13: 0x00000000 r21: 0x00000000 r29: 0x00005997
0016FE90  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  r6: 0x00000000 r14: 0x00000000 r22: 0x00000000 r30: 0x00000002
0016FEA0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  r7: 0x00000000 r15: 0x00000000 r23: 0x00000000 r31: 0x333325c8
0016FEB0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    0 -- 0x9003288c -- _wait4
0016FEC0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    1 -- 0x33332814 -- _OCCHandleException
0016FED0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    2 -- 0x33331e34 -- _OCCExc_catch_exception_raise_state_identity
0016FEE0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    3 -- 0x333329cc -- __Xexception_raise_state_identity
0016FEF0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    4 -- 0x33332adc -- _OCCExc_server
0016FF00  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    5 -- 0x33331ee0 -- +[OCCCrashCatcher(MachPrivate) _handleExceptions]
0016FF10  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    6 -- 0x92bf6118 -- _forkThreadForFunction
0016FF20  00 00 00 00 00 00 00 00 00 73 65 74 73 20 4F 4E  .........sets ON
    7 -- 0x9002bd08 -- __pthread_body
0016FF30  57 43 20 66 6F 72 20 67 69 76 65 6E 20 63 68 61  WC for given cha
0016FF40  72 61 63 74 65 72 20 62 79 20 6E 61 6D 65 20 6F  racter by name o
Thread 4:
0016FF50  72 20 69 64 00 74 65 6C 65 70 6F 72 74 73 20 74  r id.teleports t
srr0: 0x9002c3c8  srr1: 0x0000f030  cr: 0x24000084  xer: 0x00000000  lr: 0x90030eac ctr: 0x9002c3c0
0016FF60  6F 20 63 61 6D 65 72 61 20 62 79 20 63 68 61 72  o camera by char
r0: 0xffffffdb r8: 0xf0101a00 r16: 0x00000000  r24: 0x00000000
0016FF70  20 69 64 00 70 72 69 6E 74 73 20 66 72 61 67 73  id.prints frags
r1: 0xf0101c80  r9: 0xa0001fac  r17: 0x00000000  r25: 0x00000000
0016FF80  20 61 6E 64 20 64 61 6D 61 67 65 20 63 6F 75 6E  and damage coun
r2: 0x00000001  r10: 0x90a3f628  r18: 0x00000000  r26: 0xa0000cdc
0016FF90  74 65 72 00 63 72 65 61 74 65 73 20 63 6F 72 70  ter.creates corp
r3: 0x00003003  r11: 0xa0006bf4  r19: 0x00000000  r27: 0x00627168
0016FFA0  73 65 20 66 69 6C 65 20 66 72 6F 6D 20 70 6C 61  se file from pla
r4: 0x00002d03  r12: 0x9002c3c0  r20: 0x00000000  r28: 0xa0001fac
0016FFB0  79 65 72 00 73 65 74 73 20 68 6F 72 69 7A 6F 6E  yer.sets horizon
r5: 0x000003e8  r13: 0x00000000  r21: 0x00000000  r29: 0x00627194
0016FFC0  74 61 6C 20 66 69 65 6C 64 20 6F 66 20 76 69 65  tal field of vie
r6: 0xffffffff  r14: 0x00000000  r22: 0x00000000  r30: 0xa0001fac
0016FFD0  77 20 69 6E 20 64 65 67 72 65 65 73 00 73 65 74  w in degrees.set
r7: 0x000000ff  r15: 0x00000000  r23: 0x00000000 r31: 0x90030cdc
0016FFE0  73 20 68 65 61 6C 74 68 20 62 79 20 63 68 61 72  s health by char
    0 -- 0x9002c3c8 -- _semaphore_wait_signal_trap
0016FFF0  20 69 64 00 73 65 74 73 20 4F 4E 43 43 20 66 6F  id.sets ONCC fo
    1 -- 0x90030eac -- _pthread_cond_wait
00170000  72 20 67 69 76 65 6E 20 63 68 61 72 61 63 74 65  r given characte
    2 -- 0x92bfd284 -- -[NSConditionLock lockWhenCondition:]
00170010  72 20 62 79 20 6E 61 6D 65 20 6F 72 20 69 64 00  r by name or id.
    3 -- 0x001548a4 -- -[SoundChannelProcessor(Private) _processQueue]
00170020  74 72 61 6E 73 66 65 72 73 20 63 61 6D 65 72 61  transfers camera
    4 -- 0x0015483c -- -[SoundChannelProcessor processQueueForever:]
00170030  20 66 6F 63 75 73 20 61 6E 64 20 70 6C 61 79 65  focus and playe
    5 -- 0x92bf6118 -- _forkThreadForFunction
00170040  72 20 63 6F 6E 74 72 6F 6C 00 72 65 73 65 74 73  r control.resets
    6 -- 0x9002bd08 -- __pthread_body
  00170050 20 70 6F 77 65 72 75 70 73 20 66 72 6F 6D 20 50   powerups from P
::;Ed
00170060  57 52 55 00 72 65 73 65 74 73 20 63 6F 72 70 73  WRU.resets corps
:Hm, I didn't notice you had tried 512x512 before and still got a crash. Oh well... "the truth is somewhere completely different". Sorry.
00170070  65 73 20 66 72 6F 6D 20 43 52 53 41 00 72 65 73  es from CRSA.res
::[[User:Geyser|geyser]] 11:40, 13 August 2008 (CEST)
00170080 65 74 73 20 77 65 61 70 6F 6E 73 20 66 72 6F 6D ets weapons from
  00170090  20 57 45 41 50 00 63 68 72 5F 77 65 61 70 6F 6E  WEAP.chr_weapon
  001700A0 00 63 68 72 5F 6C 6F 63 61 74 69 6F 6E 5F 73 65 .chr_location_se
  001700B0  74 74 6F 63 61 6D 65 72 61 00 63 68 72 5F 64 69  ttocamera.chr_di
  001700C0 73 70 6C 61 79 5F 63 6F 6D 62 61 74 5F 73 74 61 splay_combat_sta
  001700D0  74 73 00 6D 61 6B 65 5F 63 6F 72 70 73 65 00 6E  ts.make_corpse.n
  001700E0 61 6D 65 3A 73 74 72 69 6E 67 00 67 73 5F 66 6F ame:string.gs_fo
  001700F0  76 5F 73 65 74 00 66 6F 76 3A 66 6C 6F 61 74 00  v_set.fov:float.
  00170100 63 68 72 5F 68 65 61 6C 74 68 00 63 68 72 5F 69 chr_health.chr_i
  00170110  64 20 5B 68 70 3A 69 6E 74 20 7C 20 5D 00 63 68  d [hp:int | ].ch
  00170120 72 5F 73 65 74 5F 63 6C 61 73 73 00 63 68 72 5F r_set_class.chr_
  00170130  69 64 3A 69 6E 74 20 5B 63 6C 61 73 73 5F 6E 61  id:int [class_na
  00170140 6D 65 20 7C 20 63 6C 61 73 73 5F 69 64 3A 69 6E me | class_id:in
  00170150  74 5D 00 63 68 72 5F 66 6F 63 75 73 00 63 68 72  t].chr_focus.chr
  00170160 5F 69 64 3A 69 6E 74 00 70 6F 77 65 72 75 70 5F _id:int.powerup_
  00170170  72 65 73 65 74 00 63 6F 72 70 73 65 5F 72 65 73  reset.corpse_res
  00170180 65 74 00 77 65 61 70 6F 6E 5F 72 65 73 65 74 00 et.weapon_reset.
 
 
----
 
==BSL variables==
:''Unsolved as of 06:39, 22 October 2008 (CEST). Needs a trimmed list of necessary PC vars matched with disposable Mac vars.
Since sc_bind_f2 and sc_bind_f3 won't work, the OTA needs to be rewritten whatever we do. Probably waiting for special anims should be replaced with waiting for hotkeyed variables like fast_mode (Ctrl+Shift/Alt+F), draw_every_frame (Ctrl+Shift/Alt+G), or gs_show_performance (Ctrl+Shift/Alt+Y). If this is done in the randomizer loop, there will actually be fewer contexts pushed than in the current version. There will also be no counterintuitive keypress sequences (F9,F2,F10), no spurious FILM files and no risk of buffer overflow. --[[User:Geyser|geyser]] 06:39, 22 October 2008 (CEST)
:: Can you give a script example of waiting for hotkeyed variables?  I would like to test it out.  Thanks [[User:EdT|EdT]] 20:45, 28 October 2008 (CET)
===Preset Mac variables===
2+3+1+39=45 registered through tables ^_^
:16 variables registered elsewhere -_-
;Missing (pointer to string can't be found)
#p3_debug_collision (disposable)
#p3_everything_breakable (...)
#p3_furniture_breakable (cheatable)
#p3_glass_breakable (disposable?)
#p3_show_env_collision (disposable)
;Quite disposable, but missing too -_-
#ph_active
#ph_debug_keyforces
#ph_show_collisions
;Also missing
#sound_show_debug (pity; it's quite disposable)
#wp_disable_fade (this one is useful anyway)
#ui_suppress_prompt (useful too)
;OpenGL initialisation (useful, missing)
#gl_fog_blue
#gl_fog_end
#gl_fog_green
#gl_fog_red
#gl_fog_start
;Table of boolean vars at 0x1BA2AC
#marketing_line_off (used)
#chr_big_head (used)
;Table of boolean vars at 0x1BAC00
#invincible (used)
#omnipotent (used)
#unstoppable
;Table of integer vars at 0x1BAC00
#save_point
;Table at 0x0x1B9C54
#ai2_showpaths
#ai2_showgrids
#ai2_showdynamicgrids
#ai2_showpathfindingerrors
#ai2_showconnections
#ai2_showactivationpaths
#ai2_showastar
#ai2_showcombatranges
#ai2_showvision
#ai2_showprediction
#ai2_showtargeting
#ai2_showlasers
#ai2_showlos
#ai2_showprojectiles
#ai2_showfiringspreads
#ai2_showlocalmelee
#ai2_showfights
#ai2_shownames
#ai2_showhealth
#ai2_showjoblocations
#ai2_showlinetochar
#ai2_showsounds
#ai2_printspawn
#ai2_blind
#ai2_deaf
#ai2_ignore_player
#ai2_chump_stop
#ai2_stopignoring_count
#ai2_stopignoring_time
#ai2_melee_weightcorrection
#ai2_spacing_enable
#ai2_spacing_cookies
#ai2_spacing_weights
#ai2_barabbas_run
#ai2_boss_battle
#ai2_showintersections
#ai2_debug_localmovement
#ai2_debug_localpathfinding
#ai2_debug_showsettingIDs
 
===Wishlist===
:Trying to list necessary variables off the top of my head (omitting sc_bind_f2 and sc_bind_f3, which won't work): --[[User:Geyser|geyser]] 06:39, 22 October 2008 (CEST)
 
#co_display (to run stuff in dev mode without cluttering up the screen with debug messages all the time)
#fast_mode (Ctrl+Shift/Alt+F)
#draw_every_frame (Ctrl+Shift/Alt+G)
#show_performance (Ctrl+Shift/Alt+Y)
#li_center_cursor (to reclaim -noswitch; not sure it can be done)
#chr_pin_character
 
;Camera management
#cm_distance
#cm_height
#cm_canter_weapon
#cm_canter_unarmed
#wp_scale_adjustment
 
;Gameplay tweaking
#chr_aim_width
#chr_auto_aim_arc
#chr_auto_aim_dist
#chr_block_angle
#chr_disable_melee
#chr_weapon_auto_aim
 
;Advanced stuff
#chr_all_active
#chr_disable_visactive
#chr_draw_all_characters (pbly redundant of chr_all_active for the needs of OTA etc)
#chr_lod (do we really need this?)
#door_ignore_locks
#gs_input_accel
#gs_show_corpses
#single_step (probably not needed; the hotkeys are enough)
 
;Goofy
#chr_big_head_amount
#chr_mini_me
#chr_mini_me_amount
#wp_kickable
#fx_laser_width
#m3_fill_solid
#m3_shade_vertex
#gs_show_environment
 
That's 33, which is a lot. 25 if we kick out the goofy. 24 if li_center_cursor doesn't work.
===Brainstorming===
Below are two little tables and two big ones. The first table is variables that don't seem to work but probably do, with the special case of '''ai2_boss_battle''' beilng used in [compound]. Then there's a small table of "huh" variables that are almost certainly disposable. Then there are tables (mutually exclusive, but overlapping with the small ones): debug/display things (32 items) and not-likely-to-be-tweaked things (17 items). Those would disempower modders and hackers but wouldn't change much or anything for level logic. 49 variables is a lot, but we have to choose wisely, and may end up having to maintain two versions of the Mac engine, one with debug stuff, the other with stuff that is meant to be used in scripts. --[[User:Geyser|geyser]] 05:14, 10 October 2008 (CEST)
:I'll start testing the variables and those I find that do not have a visible effect, I'll add to the possibly broken and disposable section. [[User:EdT|EdT]] 07:08, 10 October 2008 (CEST)
::Is it possible to add '''gs_show_ui'''?  That would be useful when taking screenshots or videos without the HUD.  I can maintain 2 versions of the Mac Engine, I think a very small number would need the debug features, but having more PC compatible commands will be more appealing since Mac users will be able to play more scripts. Plus it will make it easier for the script writers since there one script fits all! [[User:EdT|EdT]] 21:53, 10 October 2008 (CEST)
::Ed, you can use '''ui_show_element(left,0)''' and '''ui_show_element(right,0)''' instead of '''gs_show_ui=0'''; and don't forget '''ui_suppress_prompt=0''' and such. The compatibility of scripts, of course, is the main goal. I just wanted to make sure you backed up the versions prior to those rewiring of mine because we ''are'' screwing with the engine in hackish ways and may want to take a few steps back. --[[User:Geyser|geyser]] 02:01, 11 October 2008 (CEST)
:::Thank you, I did not know about that command, that saves one variable :-) I seem to recall another PC command '''door_ignore_locks''' used in some script, this might be useful... [[User:EdT|EdT]] 05:40, 11 October 2008 (CEST)
::::According to Neo '''sc_bind_f2''', '''sc_bind_f3''' cannot be added because the are strings and neither can '''gs_fov_set''' be added. However, he was able to add '''co_display''' and '''door_ignore_locks''' [[User:EdT|EdT]] 00:38, 16 October 2008 (CEST)
:::::''He'' was able to add them? So he gave you the fish after all? ^_^ If you want to allow me to give you more fish this week-end, please document the new fish in more detail, so that I know what disposable variables I can no longer use. As for gs_fov_set, it's a pity, gonna ask Neo what's the matter with it. --[[User:Geyser|geyser]] 01:18, 16 October 2008 (CEST)
 
:For Reference, Neo's changes
:co_display = _COgDisplayConsole
:name string: at 0x170E8C - REPLACE "ai2_showlos" with "co_display", 0
:var pointer: at 0x1B9D20 - REPLACE 0x0018EDD4 with 0x00193579
 
:door_ignore_locks = _OBJgDoor_IgnoreLocks
:name string: at 0x171410 - REPLACE "ai2_showintersections" with "door_ignore_locks", 0
:var pointer: at 0x1B9E90 - REPLACE 0x00195D2C with 0x0027A1B9
 
:wp_kickable = _WPgPlayerKicksWeapons
:name string: at 0x171098 -REPLACE "ai2_showsounds" with "wp_kickable", 0
:var pointer: at 0x1B9DB0 - REPLACE 0x0018EDC2 with 0x00192B05
 
:[[User:EdT|EdT]] 04:29, 16 October 2008 (CEST)
 
::Just curious, why wp_kickable? I have tried, and I cannot figure out what is stopping Konoko from kicking weapons...[[User:Gumby|Gumby]] 05:36, 16 October 2008 (CEST)
:::I'll probably change wp_kickable to something else. wp_kickable allows the AI's to kick or move the weapon that's on the ground, but Konoko or the player cannot. [[User:EdT|EdT]]
 
 
----
{{Table}}
|+BSL variables available on the Mac that have no visible effect but are not likely to be broken, either
|bool ai2_boss_battle=0||"enables AI boss-battle target selection"
|-
|bool ai2_melee_weightcorrection=1||"weights down non-attack techniques so they are never more than attacks"
|-
|int32 ai2_stopignoring_count=6||"set the number of events before the AI will stop ignoring"
|-
|int32 ai2_stopignoring_time=240||"set the delay timer before the AI forgets about ignored events"
|}
 
 
{{Table}}
|+BSL variables available on the Mac that have no visible effect and are possibly broken and disposable
|bool ai2_debug_showsettingIDs=0||"shows ID numbers for combat, melee and neutral settings"
|-
|bool ai2_showastar=0||"shows grid squares that are evaluated by the A* pathfinding"
|-
|bool ai2_showintersections=0||"debug AI's melee intersections"
|-
|bool ai2_showlasers=0||"turns on laser sights for AI2 characters"
|-
|bool ph_debug_keyforces=0||"toggle keyboard applied forces"
|-
|int32 ai2_debug_localmove_lines=20||"number of lines to cast to debug local-movement code"<br>(needs ai2_debug_localmovement, which is missing)
|-
|bool ai2_showlos=0||"shows AI line-of-sight checking"
|-
|bool ai2_shownames=0||"draws the name of every AI above their head"
|-
|bool ai2_showsounds=0||"shows AI sounds as they are generated"
 
|}
 
 
{{Table}}
|+BSL variables available on the Mac that enable debug display
|bool ai2_debug_localmovement||...
|-
|bool ai2_debug_localpathfinding=0||"debug local-path code from player's position and facing"
|-
|bool ai2_debug_showsettingIDs=0||"shows ID numbers for combat, melee and neutral settings" (no visible effect)
|-
|bool ai2_printspawn=0||"prints information about each AI spawn"
|-
|bool ai2_showactivationpaths=0||"turns on inactive ==> active pathfinding rendering"
|-
|bool ai2_showastar=0||"shows grid squares that are evaluated by the A* pathfinding" (no visible effect)
|-
|bool ai2_showcombatranges=0||"shows circles that represent the combat ranges of each AI"
|-
|bool ai2_showconnections=0||"turns on pathfinding connection rendering"
|-
|bool ai2_showdynamicgrids=0||"turns on pathfinding dynamic grid display"
|-
|bool ai2_showfights=0||"shows fights in progress"
|-
|bool ai2_showfiringspreads=0||"shows AI firing spread knowledge"
|-
|bool ai2_showgrids=0||"turns on pathfinding grid rendering"
|-
|bool ai2_showhealth=0||"draws a health bar for every AI above their head"
|-
|bool ai2_showintersections=0||"debug AI's melee intersections" (no visible effect)
|-
|bool ai2_showjoblocations=0||"draws a green cross at each AI's job location"
|-
|bool ai2_showlasers=0||"turns on laser sights for AI2 characters" (no visible effect)
|-
|bool ai2_showlinetochar=0||"draws a line from the player to every AI"
|-
|bool ai2_showlocalmelee=0||"shows local-environment melee awareness"
|-
|bool ai2_showlos=0||"shows AI line-of-sight checking" (no visible effect)
|-
|bool ai2_shownames=0||"draws the name of every AI above their head" (no visible effect)
|-
|bool ai2_showpathfindingerrors=0||"enables visual display of pathfinding errors"
|-
|bool ai2_showpaths=0||"shows the path each AI is following"
|-
|bool ai2_showprediction=0||"shows prediction info for AI2 characters"
|-
|bool ai2_showprojectiles=0||"shows AI projectile knowledge"
|-
|bool ai2_showsounds=0||"shows AI sounds as they are generated" (no visible effect)
|-
|bool ai2_showtargeting=0||"shows targeting info for AI2 characters"
|-
|bool ai2_showvision=0||"shows each AI's vision cones (central and peripheral)"
|-
|int32 p3_debug_collision=256||"enables collision debugging display"
|-
|bool ph_debug_keyforces=0||"toggle keyboard applied forces" (no visible effect)
|-
|bool p3_show_env_collision=0||"draws particle / environment collisions"
|-
|bool ph_show_collisions=0||"toggle display of colliding quads"
|-
|bool sound_show_debug=0||"displays sound debugging info"
|}
That's 32!!! ^_^ however, the last 5 are not registered in the common table, so we actually have access to 25 vars: enough to accomodate everything except the goofy.
 
 
{{Table}}
|+BSL variables available on the Mac that we're not too likely to modify in level logic
|bool ai2_barabbas_run=1||"lets Barabbas run while carrying his gun" (disposable if we never need 0)
|-
|bool ai2_blind=0||"turns off the AI's visual sensing system" (disposable if we never need blind AI; they can still be made blind individually)
|-
|bool ai2_chump_stop=0||"stops the chump" (disposable since we scrapped ai2_chump anyway)
|-
|bool ai2_deaf=0||"turns off the AI's sound sensing system" (disposable if we never need deaf AI; they can still be made deaf individually)
|-
|bool ai2_melee_weightcorrection=1||"weights down non-attack techniques so they are never more than attacks" (no visible effect)
|-
|int32 ai2_spacing_cookies=2||"number of cookies per fight"
|-
|bool ai2_spacing_enable=1||"master enable switch for spacing behavior"
|-
|bool ai2_spacing_weights=1||"enables position-sensitive weighting of spacing behaviors"
|-
|int32 ai2_stopignoring_count=6||"set the number of events before the AI will stop ignoring" (no visible effect)
|-
|int32 ai2_stopignoring_time=240||"set the delay timer before the AI forgets about ignored events" (no visible effect)
|-
|bool marketing_line_off=0||"turns the laser line off" (player's laser sight, crosshair, etc)
|-
|bool p3_everything_breakable=0||"makes every quad breakable"
|-
|bool p3_furniture_breakable=0||"makes all furniture breakable"
|-
|bool p3_glass_breakable=1||"enables breakable glass"
|-
|bool ph_active=1||"enable physics"
|-
|bool ph_debug_keyforces=0||"toggle keyboard applied forces" (no visible effect)
|}
That's 16, but the last 6 can't be used (marketing_line_off is used and the other 5 are "registered elsewhere"). So, 10.
 
===Summary===
All in all, we apparently have a maximum of 35 disposable variables, and a total of 31 on the wishlist. My suggestion:
:If li_center_cursor works, leave these 4: ai2_spacing_cookies, ai2_spacing_enable, ai2_spacing_weights, ai2_barabbas_run.
:If li_center_cursor doesn't work, leave these 5: ai2_melee_weightcorrection, ai2_spacing_cookies, ai2_spacing_enable, ai2_spacing_weights, ai2_barabbas_run.
:Maybe don't keep anything and add 4 or 5 extras instead, like draw_every_frame_multiple, gs_screen_shot_reduce...
Convert stuff "en masse" (there will be large contiguous blocks in the table, and in the name/description pool as well, although less so).
 
The 3 blocks are as follows:
#ai2_showpaths
#ai2_showgrids
#ai2_showdynamicgrids
#ai2_showpathfindingerrors
#ai2_showconnections
#ai2_showactivationpaths
#ai2_showastar
#ai2_showcombatranges
#ai2_showvision
#ai2_showprediction
#ai2_showtargeting
#ai2_showlasers
#ai2_showlos
#ai2_showprojectiles
#ai2_showfiringspreads
#ai2_showlocalmelee
#ai2_showfights
#ai2_shownames
#ai2_showhealth
#ai2_showjoblocations
#ai2_showlinetochar
#ai2_showsounds
#ai2_printspawn
#ai2_blind
#ai2_deaf
#KEEP DEFINITELY
#ai2_chump_stop
#ai2_stopignoring_count
#ai2_stopignoring_time
#ai2_melee_weightcorrection (keep if no extras and li_center_cursor doesn't work)
#ai2_spacing_enable (keep if no extras)
#ai2_spacing_cookies (keep if no extras)
#ai2_spacing_weights (keep if no extras)
#ai2_barabbas_run (keep if no extras)
#KEEP DEFINITELY
#ai2_showintersections
#ai2_debug_localmovement
#ai2_debug_localpathfinding
#ai2_debug_showsettingIDs
(this does not necessarily correspond to contiguous strings)
 


::Maybe this will be a clue, when using the new hex of 10, I was able to start level 4. Oni only crashed when the delorean (Using the new 512x512 texture) came into view. Previously, with the hex at 40, Oni crashed right after the splash screen. [[User:EdT|EdT]] 15:49, 13 August 2008 (CEST)
And our wishlist is like this:
::I have tested some more on my side and it turned out that the mysterious crash for 1024x1024 textures was some kind of user error (like forgetting to save or something equally stupid). So 1024x1024 works just fine on PC now, and there is thus no similarity between our cases anymore. Also, the crash right after the splashscreen (which one, BTW? intro splashscreen of a level?) seems very suspicious. So, could you please: 1) double-check that you're changing stuff at the right address; 2) let us have a look at the engine after you patched it. --[[User:Geyser|geyser]] 21:48, 13 August 2008 (CEST)
#co_display
#fast_mode
#draw_every_frame
#show_performance
#li_center_cursor
#chr_pin_character
#cm_distance
#cm_height
#cm_canter_weapon
#cm_canter_unarmed
#wp_scale_adjustment
#chr_aim_width
#chr_auto_aim_arc
#chr_auto_aim_dist
#chr_block_angle
#chr_disable_melee
#chr_weapon_auto_aim
#chr_all_active
#chr_disable_visactive
#chr_draw_all_characters
#chr_lod
#door_ignore_locks
#gs_input_accel
#gs_show_corpses
#single_step
#chr_big_head_amount
#chr_mini_me
#chr_mini_me_amount
#wp_kickable
#fx_laser_width
#m3_fill_solid
#m3_shade_vertex
#gs_show_environment
33, to which we can add 4 or 5 extras like draw_every_frame_multiple, gs_screen_shot_reduce...
:My impression is that there's plenty of space to accomodate all that. So let's do it.
::[[User:Geyser|geyser]] 07:35, 22 October 2008 (CEST)


:::I tried the 512 patch on a fresh unpatched version of Oni.  Same result.  I can start level 4, move around, but when I turn to look at the Delorean, Oni crashes.  I'm using the files you provided with the new M3GM and OBAN files. However, if I change TXMPdelorean to 256x256, no crash.  When I used the previous patch of 40, then Oni would crash after the splash screen for level 4.  Note: in both cases, I had imported the TXMPdelorean file into level4 not level0.  Here is the patched engine: http://edt.oni2.net/files/Oni512.zip [[User:EdT|EdT]] 01:14, 14 August 2008 (CEST)
[[Category:Patches]]
::::Sorry for the late reply. Let's run a clean experiment on your side while we double-check OMNI's engine:
:::#Try and import another large texture than the DeLorean's (a skybox, a poster, Master Chief, anything) and test this other large texture without involving the DeLorean at all. Make sure that you rule out everything else that may make Oni crash (e.g., an old M3GM).
:::#As for the DeLorean, make sure its M3GM was imported with a recent version of OniSplit: it could be that it suffers from the same issue as the one that used to plague early TRBS import (i.e., it may be missing extra storage space at the end of the TXCA).
::::Let us know if it still crashes for the "clean experiment" (just a texture replaced with a large one). And oh, if it crashes, send us the TXMP, just in case.
:::::[[User:Geyser|geyser]] 15:33, 21 August 2008 (CEST)
::::::hmmm, time for a stupid question, what is the option in OniSplit to create a 512x512 TXMP?  I just tried to import a 512x512 texture, but when I exported that file it was 256x256. I imported these files: http://edt.oni2.net/AE_Files/TXMPAIR_FLOOR002.tga and http://edt.oni2.net/AE_Files/TXMPPOSTER1.tga for the Airport lobby floor and poster[[User:EdT|EdT]] 23:52, 21 August 2008 (CEST)
::::::So you mean that all this time you were in fact letting OniSplit downsample your textures to 256x256? Then I really don't understand what about the texture may have caused the crashes you reported. The option for disabling the auto-downsampling (and thus retaining the native size of your picture) is '''''-large''''', e.g.: '''''OniSplit.exe -create:txmp TXMPcreated -format:bgr32 -large TXMPPOSTER1.tga''''' --[[User:Geyser|geyser]] 00:24, 22 August 2008 (CEST)

Latest revision as of 01:39, 4 May 2022

Mac Daodan

What's the possibility of making something Daodan-like for the Mac, or placing function calls in code caves? --rossy 11:18, 10 October 2008 (CEST)
Define "code caves"; I'm not sure there's many of those, and we can't go very far with a hackish approach anyway. As for DLL-similar stuff, SFeLi said it was feasible and even relatively easy with Mach-O files: I haven't looked into that myself. --geyser 18:06, 10 October 2008 (CEST)
Code caves? There are a ton of those in the Mac executable :) Neo
wikt:code_cave Sounds neat\useful, for someone who is good at asm.Gumby 05:38, 16 October 2008 (CEST)



Uppercase letters at the console

Issue still unsolved as of 06:39, 22 October 2008 (CEST)

Hmm, about the Shift key not being 'accessible'... I actually never noticed before that one cannot type capital letters on the command line, and if I did notice it I would have assumed the PC version was the same. So, one point and one question:

  • It's not exactly true that the Shift key is not accessible or not recognized, because I can type important characters like the underscore and parentheses. It's merely that uppercase letters cannot be typed.
  • Is the lack of access to uppercase letters an issue? This is total news to me, so naturally I am curious as to whether this has been a problem on the Mac side of things that I never knew about. --Iritscen 03:04, 7 October 2008 (CEST)


The PC command line has no major issues: uppercase letters can be entered both on PC and PC demo. There are occasional glitches with autocompletion and some inconsistencies with multithreading (i.e., "fork"ing may not work as expected when launched from the console). Also, the command line is not displayed properly or at all at large resolutions.
Thanks for the disambiguation about the Shift key. Ed didn't make it clear how exactly it didn't work. Do you confirm that the only characters that can't be entered are uppercase letters? Also, Ed, how long have your 3 "known issues" been around? Right from the moment when the Dev Mode was unlocked?
The original variables and functions (preset of scripted) are all lowercase, but team names are capitalized, and many AI names contain uppercase letters as well. So lowercase-only input can be frustrating. The obvious workaround is to use scripts more, so that all command line statements can be lowercase.
geyser 03:36, 7 October 2008 (CEST)
Just confirmed it to make sure; only a-z cannot be modified by the Shift key, i.e., become uppercase. All other characters that require Shift can be typed. And thanks for the answer on what uses uppercase, the team names and AI names slipped my mind. I tested that as well, hoping that the Mac would ignore case, but alas; the console indeed does not recognize any team names without the uppercase letters. --Iritscen 04:02, 7 October 2008 (CEST)
Also, I now see that capitals are required to type in animation names, therefore the chr_animate command is essentially unuseable on the Mac Oni console line; however, the command still works from within a BSL script, where caps are recognized. --iritscen 06:01, 7 November 2008 (CET)
Iritscen, you beat me to it. The SHIFT key does not work in Dev Mode to enter uppercase letters (I should have been more specific, sorry). How long have I've known these issues? The SHIFT key problem was discovered when you, (geyser) asked me to enter some code in the console, I forgot when that happened. The Window mode issue was known as soon as it was figured out how to run Omni group's version in a window. I'm sure this was mentioned at some point, either here or at OCF. The problems with the Numpad key was known back in Jan 2007 and you suggested using the key_config.txt file EdT 04:11, 7 October 2008 (CEST)



Large textures

The crash report is now history, but let's clarify the status of the patch at 0x001151C3. Is it irrelevant and can it be reverted?

0x001151C3 needs to be changed to 0x40 for 1024 textures, reverting to 0x04 or 0x10 results in crashes. Fortunately, I had already changed it to 0x40 prior to the latest patch.EdT 07:17, 22 October 2008 (CEST)



Projectile awareness

Fixed as of Dec 18 2008

Offset Old hex New hex Description
0x00016503
0x00016507
0x0001650B
0x000164F1
0x000164F2
50
54
58
9D
23
74
78
7C
BD
2B
projectile awareness fixed



BSL functions

Cleaning up previous talk, see history if you need reference

  1. Redeeming cm_barabus, because it looks like it works after all, and could be useful to both scripters and video makers (basically it interpolates the camera until it focuses on a certain character). So, Ed, please revert it.
  2. Scrapping all 11 ai2_skill_* functions, because their table entries and strings are conveniently grouped. Putting 11 "essentials" there. If you want to tweak shooting skills, use another version ^_^
  3. Keeping chr_holdkey as chr_location for now; may move it around later ^_^
  4. Turning ai2_panic into equally useless chr_draw_dot; we may change it later ^_^
  5. Turning ai2_chump into modder-oriented chr_who; we may change it later ^_^
  6. Turning ai2_printbnvindex into ui_fill_element; we may change it later ^_^
  7. For the big continuous patch you probably don't want to go nuts doing it byte by byte like I did, so grab a patched engine HERE and copy the relevant sections over to your backup. I used the big table below to proofread the patch, and we may still need it to check function pointers etc if something doesn't work.
making ai2_printbnvindex into ui_fill_element: fixing pointers
Offset Old hex New hex Description
0x1B9BDC 00 17 1A 40 00 17 1A 40 pointer to BSL name; unchanged
0x1B9BE8 00 17 1A 54 00 17 1A 54 pointer to help string; unchanged
0x1B9BEC 00 16 A1 48 00 17 86 20 pointer to signature string; redirected
0x1B9BF0 00 03 27 DC 00 07 19 DC pointer to function; now pointing to _ONiInGameUI_FillElement


making chr_hold_key into chr_location: fixing pointers
Offset Old hex New hex Description
0x1B918C 00 16 EE 24 00 16 EE 23 pointer to BSL name; shifting 1 char backwards
0x1B9198 00 16 FB E8 00 16 FB E8 pointer to help string; unchanged
0x1B919C 00 16 FC 20 00 16 FC 20 pointer to signature string; unchanged
0x1B91A0 00 03 45 A8 00 04 17 20 pointer to function; now pointing to _iSetAnyCharacterLocation


making ai2_chump into chr_who: fixing pointers
Offset Old hex New hex Description
0x1B9BF4 00 17 1A 7C 00 17 1A 7C pointer to BSL name; unchanged
0x1B9C00 00 17 1A 88 00 17 1A 88 pointer to help string; unchanged
0x1B9C04 00 16 A1 48 00 16 A1 48 pointer to signature string; unchanged
0x1B9C08 00 03 2E E0 00 04 00 88 pointer to function; now pointing to _ONrWho


making ai2_panic into chr_draw_dot: fixing pointers
Offset Old hex New hex Description
0x1B95DC 00 16 F2 EC 00 16 F2 EA pointer to BSL name; shifting 2 chars backwards
0x1B95E8 00 17 09 48 00 17 09 48 pointer to help string; unchanged
0x1B95EC 00 17 09 68 00 17 09 68 pointer to signature string; unchanged
0x1B95F0 00 03 55 F8 00 04 15 04 pointer to function; now pointing to _iDrawDot


making ai2_printbnvindex into ui_fill_element: fixing strings
Offset 0x170A40 0x170A54
Old chars ai2_printbnvindex°°° prints the index of the player's BNV°°°°
New chars ui_fill_element°°°°° forces a part of the UI to appear full°°
Description replacing name in_place replacing help string in-place


making chr_hold_key into chr_location: fixing strings
Offset 0x16DE23 0x16EBE8 0x16EC20
Old chars °chr_holdkey° forces a character to hold a key down for some frames°°° [ai_name:string | script_id:int] key_name:string num_frames:int°
New chars chr_location° sets location of a character or prints current location° chr_index:int [[loc_x:float loc_y:float loc_z:float] | ]°°°°°°°°
Description replacing/shifting name replacing help string in-place replacing signature string in-place


making ai2_chump into chr_who: fixing strings
Offset 0x170A7C 0x170A88
Old chars ai2_chump° creates a chump°
New chars chr_who°°° lists all chars°
Description replacing name in-place replacing help string in-place


making ai2_panic into chr_draw_dot: fixing strings
Offset 0x16E2EA 0x16F948 0x16F968
Old chars °°ai2_panic°°° makes an AI panic or not panic°° [ai_name:string | script_id:int] timer:int°°
New chars chr_draw_dot°° draw line from player to point°° [[loc_x:float loc_y:float loc_z:float] | ]°°
Description replacing/shifting name replacing help string in-place replacing signature string in-place


making ai2_skill_* into eleven other funcs: fixing pointers
Offset Old hex New hex Description
0x1B975C 00 17 0E 24 00 17 11 53 pointer to BSL name chr_focus
0x1B9768 00 17 0E 38 00 17 10 20 pointer to help string
0x1B976C 00 17 0E 5C 00 17 11 5D pointer to signature string
0x1B9770 00 03 0A 14 00 04 19 6C pointer to function; now pointing to _SetMainCharacter
0x1B9774 00 17 0E 84 00 17 11 68 pointer to BSL name powerup_reset
0x1B9780 00 17 0E 94 00 17 10 4A pointer to help string
0x1B9784 00 16 A1 48 00 16 A1 48 pointer to signature string; unchanged
0x1B9788 00 03 0B 60 00 0A 57 8C pointer to function; now pointing to _WPiPowerups_Reset
0x1B978C 00 17 0E C0 00 17 11 76 pointer to BSL name corpse_reset
0x1B9798 00 17 0E D4 00 17 10 64 pointer to help string
0x1B979C 00 16 A1 48 00 16 A1 48 pointer to signature string; unchanged
0x1B97A0 00 03 0C DC 00 04 08 A0 pointer to function; now pointing to _ONrCorpse_Reset
0x1B97A4 00 17 0F 10 00 17 11 83 pointer to BSL name weapon_reset
0x1B97B0 00 17 0F 20 00 17 10 7D pointer to help string
0x1B97B4 00 16 A1 48 00 16 A1 48 pointer to signature string; unchanged
0x1B97B8 00 03 0D 90 00 0A 56 38 pointer to function; now pointing to _WPiWeapons_Reset
0x1B97BC 00 17 0F 5C 00 17 11 1E pointer to BSL name chr_set_class
0x1B97C8 00 17 0F 70 00 17 0F F4 pointer to help string
0x1B97CC 00 17 0F A0 00 17 11 2C pointer to signature string
0x1B97D0 00 03 0F C0 00 04 06 14 pointer to function; now pointing to _iSetCharacterClass
0x1B97D4 00 17 0F BC 00 17 11 00 pointer to BSL name chr_health
0x1B97E0 00 17 0F D0 00 17 0F DD pointer to help string
0x1B97E4 00 17 0F FC 00 17 11 0B pointer to signature string
0x1B97E8 00 03 10 4C 00 04 18 48 pointer to function; now pointing to _iSetAnyCharacterHealth
0x1B97EC 00 17 10 10 00 17 10 EB pointer to BSL name gs_fov_set
0x1B97F8 00 17 10 20 00 17 0F B4 pointer to help string
0x1B97FC 00 17 10 3C 00 17 10 F6 pointer to signature string
0x1B9800 00 03 11 38 00 05 B8 18 pointer to function; now pointing to _ONrGameState_FieldOfView_Set
0x1B9804 00 17 10 50 00 17 10 D3 pointer to BSL name make_corpse
0x1B9810 00 17 10 60 00 17 0F 94 pointer to help string
0x1B9814 00 17 10 7C 00 17 10 DF pointer to signature string
0x1B9818 00 03 11 C4 00 04 09 24 pointer to function; now pointing to _ONrMakeCorpse
0x1B981C 00 17 10 90 00 17 10 BA pointer to BSL name chr_display_combat_stats
0x1B9828 00 17 10 A8 00 17 0F 74 pointer to help string
0x1B982C 00 17 10 D4 00 17 11 5D pointer to signature string
0x1B9830 00 03 12 50 00 04 04 54 pointer to function; now pointing to _iDiplayCharacterCombatStats
0x1B9834 00 17 10 E8 00 17 10 A1 pointer to BSL name chr_location_settocamera
0x1B9840 00 17 10 FC 00 17 0F 55 pointer to help string
0x1B9844 00 17 11 2C 00 17 11 5D pointer to signature string
0x1B9848 00 03 12 DC 00 04 1A AC pointer to function; now pointing to _iCharacterLocation_SetFromCamera
0x1B984C 00 17 11 3C 00 17 10 96 pointer to BSL name chr_weapon
0x1B9858 00 17 11 50 00 17 0F 29 pointer to help string
0x1B985C 00 17 11 80 00 17 11 2C pointer to signature string
0x1B9860 00 03 13 84 00 04 19 E0 pointer to function; now pointing to _iSetAnyCharacterWeapon


Replacing ai2_skill_* with eleven other funcs, leaving room for more strings
 Offset    0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F

001B9750                                      00 17 0E 24              ...$
001B9760  00 00 00 00 00 00 00 00 00 17 0E 38 00 17 0E 5C  ...........8...\
001B9770  00 03 0A 14 00 17 0E 84 00 00 00 00 00 00 00 00  .......„........
001B9780  00 17 0E 94 00 16 A1 48 00 03 0B 60 00 17 0E C0  ...”..¡H...`...À
001B9790  00 00 00 00 00 00 00 00 00 17 0E D4 00 16 A1 48  ...........Ô..¡H
001B97A0  00 03 0C DC 00 17 0F 10 00 00 00 00 00 00 00 00  ...Ü............
001B97B0  00 17 0F 20 00 16 A1 48 00 03 0D 90 00 17 0F 5C  ... ..¡H.......\
001B97C0  00 00 00 00 00 00 00 00 00 17 0F 70 00 17 0F A0  ...........p... 
001B97D0  00 03 0F C0 00 17 0F BC 00 00 00 00 00 00 00 00  ...À...¼........
001B97E0  00 17 0F D0 00 17 0F FC 00 03 10 4C 00 17 10 10  ...Ð...ü...L....
001B97F0  00 00 00 00 00 00 00 00 00 17 10 20 00 17 10 3C  ........... ...<
001B9800  00 03 11 38 00 17 10 50 00 00 00 00 00 00 00 00  ...8...P........
001B9810  00 17 10 60 00 17 10 7C 00 03 11 C4 00 17 10 90  ...`...|...Ä....
001B9820  00 00 00 00 00 00 00 00 00 17 10 A8 00 17 10 D4  ...........¨...Ô
001B9830  00 03 12 50 00 17 10 E8 00 00 00 00 00 00 00 00  ...P...è........
001B9840  00 17 10 FC 00 17 11 2C 00 03 12 DC 00 17 11 3C  ...ü...,...Ü...<
001B9850  00 00 00 00 00 00 00 00 00 17 11 50 00 17 11 80  ...........P...€
001B9860  00 03 13 84                                      ...„

must be changed to

 Offset    0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F

001B9750                                      00 17 11 53              ...S
001B9760  00 00 00 00 00 00 00 00 00 17 10 20 00 17 11 5D  ........... ...]
001B9770  00 04 19 6C 00 17 11 68 00 00 00 00 00 00 00 00  ...l...h........
001B9780  00 17 10 4A 00 16 A1 48 00 0A 57 8C 00 17 11 76  ...J..¡H..WŒ...v
001B9790  00 00 00 00 00 00 00 00 00 17 10 64 00 16 A1 48  ...........d..¡H
001B97A0  00 04 08 A0 00 17 11 83 00 00 00 00 00 00 00 00  ... ...ƒ........
001B97B0  00 17 10 7D 00 16 A1 48 00 0A 56 38 00 17 11 1E  ...}..¡H..V8....
001B97C0  00 00 00 00 00 00 00 00 00 17 0F F4 00 17 11 2C  ...........ô...,
001B97D0  00 04 06 14 00 17 11 00 00 00 00 00 00 00 00 00  ................
001B97E0  00 17 0F DD 00 17 11 0B 00 04 18 48 00 17 10 EB  ...Ý.......H...ë
001B97F0  00 00 00 00 00 00 00 00 00 17 0F B4 00 17 10 F6  ...........´...ö
001B9800  00 05 B8 18 00 17 10 D3 00 00 00 00 00 00 00 00  ..¸....Ó........
001B9810  00 17 0F 94 00 17 10 DF 00 04 09 24 00 17 10 BA  ...”...ß...$...º
001B9820  00 00 00 00 00 00 00 00 00 17 0F 74 00 17 11 5D  ...........t...]
001B9830  00 04 04 54 00 17 10 A1 00 00 00 00 00 00 00 00  ...T...¡........
001B9840  00 17 0F 55 00 17 11 5D 00 04 1A AC 00 17 10 96  ...U...]...¬...–
001B9850  00 00 00 00 00 00 00 00 00 17 0F 29 00 17 11 2C  ...........)...,
001B9860  00 04 19 E0                                      ...à

and

 Offset    0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F

0016FE20        00 00 61 69 32 5F 73 6B 69 6C 6C 5F 73 65    ..ai2_skill_se
0016FE30  6C 65 63 74 00 00 00 00 73 65 6C 65 63 74 73 20  lect....selects 
0016FE40  61 20 73 68 6F 6F 74 69 6E 67 20 73 6B 69 6C 6C  a shooting skill
0016FE50  20 74 6F 20 65 64 69 74 00 00 00 00 63 68 61 72   to edit....char
0016FE60  5F 63 6C 61 73 73 3A 73 74 72 69 6E 67 20 77 65  _class:string we
0016FE70  61 70 6F 6E 5F 6E 61 6D 65 3A 73 74 72 69 6E 67  apon_name:string
0016FE80  00 00 00 00 61 69 32 5F 73 6B 69 6C 6C 5F 73 68  ....ai2_skill_sh
0016FE90  6F 77 00 00 73 68 6F 77 73 20 74 68 65 20 63 75  ow..shows the cu
0016FEA0  72 72 65 6E 74 6C 79 20 73 65 6C 65 63 74 65 64  rrently selected
0016FEB0  20 73 68 6F 6F 74 69 6E 67 20 73 6B 69 6C 6C 00   shooting skill.
0016FEC0  61 69 32 5F 73 6B 69 6C 6C 5F 72 65 76 65 72 74  ai2_skill_revert
0016FED0  00 00 00 00 72 65 76 65 72 74 73 20 74 68 65 20  ....reverts the 
0016FEE0  73 68 6F 6F 74 69 6E 67 20 73 6B 69 6C 6C 20 62  shooting skill b
0016FEF0  65 69 6E 67 20 65 64 69 74 65 64 20 74 6F 20 74  eing edited to t
0016FF00  68 65 20 73 61 76 65 64 20 63 6F 70 79 00 00 00  he saved copy...
0016FF10  61 69 32 5F 73 6B 69 6C 6C 5F 73 61 76 65 00 00  ai2_skill_save..
0016FF20  73 61 76 65 73 20 74 68 65 20 73 68 6F 6F 74 69  saves the shooti
0016FF30  6E 67 20 73 6B 69 6C 6C 20 62 65 69 6E 67 20 65  ng skill being e
0016FF40  64 69 74 65 64 20 6F 75 74 20 61 73 20 61 20 74  dited out as a t
0016FF50  65 78 74 20 66 69 6C 65 00 00 00 00 61 69 32 5F  ext file....ai2_
0016FF60  73 6B 69 6C 6C 5F 72 65 63 6F 69 6C 00 00 00 00  skill_recoil....
0016FF70  73 65 74 73 20 61 6E 20 41 49 27 73 20 72 65 63  sets an AI's rec
0016FF80  6F 69 6C 20 63 6F 6D 70 65 6E 73 61 74 69 6F 6E  oil compensation
0016FF90  20 61 6D 6F 75 6E 74 20 28 30 2D 31 29 00 00 00   amount (0-1)...
0016FFA0  72 65 63 6F 69 6C 5F 63 6F 6D 70 65 6E 73 61 74  recoil_compensat
0016FFB0  69 6F 6E 3A 66 6C 6F 61 74 00 00 00 61 69 32 5F  ion:float...ai2_
0016FFC0  73 6B 69 6C 6C 5F 62 65 73 74 61 6E 67 6C 65 00  skill_bestangle.
0016FFD0  73 65 74 73 20 61 6E 20 41 49 27 73 20 62 65 73  sets an AI's bes
0016FFE0  74 20 61 69 6D 69 6E 67 20 61 6E 67 6C 65 20 69  t aiming angle i
0016FFF0  6E 20 64 65 67 72 65 65 73 00 00 00 62 65 73 74  n degrees...best
00170000  5F 61 6E 67 6C 65 3A 66 6C 6F 61 74 00 00 00 00  _angle:float....
00170010  61 69 32 5F 73 6B 69 6C 6C 5F 65 72 72 6F 72 00  ai2_skill_error.
00170020  73 65 74 73 20 61 6E 20 41 49 27 73 20 67 72 6F  sets an AI's gro
00170030  75 70 69 6E 67 20 65 72 72 6F 72 00 65 72 72 6F  uping error.erro
00170040  72 5F 61 6D 6F 75 6E 74 3A 66 6C 6F 61 74 00 00  r_amount:float..
00170050  61 69 32 5F 73 6B 69 6C 6C 5F 64 65 63 61 79 00  ai2_skill_decay.
00170060  73 65 74 73 20 61 6E 20 41 49 27 73 20 67 72 6F  sets an AI's gro
00170070  75 70 69 6E 67 20 64 65 63 61 79 00 64 65 63 61  uping decay.deca
00170080  79 5F 61 6D 6F 75 6E 74 3A 66 6C 6F 61 74 00 00  y_amount:float..
00170090  61 69 32 5F 73 6B 69 6C 6C 5F 69 6E 61 63 63 75  ai2_skill_inaccu
001700A0  72 61 63 79 00 00 00 00 73 65 74 73 20 61 6E 20  racy....sets an 
001700B0  41 49 27 73 20 73 68 6F 6F 74 69 6E 67 20 69 6E  AI's shooting in
001700C0  61 63 63 75 72 61 63 79 20 6D 75 6C 74 69 70 6C  accuracy multipl
001700D0  69 65 72 00 69 6E 61 63 63 75 72 61 63 79 3A 66  ier.inaccuracy:f
001700E0  6C 6F 61 74 00 00 00 00 61 69 32 5F 73 6B 69 6C  loat....ai2_skil
001700F0  6C 5F 64 65 6C 61 79 6D 69 6E 00 00 73 65 74 73  l_delaymin..sets
00170100  20 61 6E 20 41 49 27 73 20 6D 69 6E 20 64 65 6C   an AI's min del
00170110  61 79 20 62 65 74 77 65 65 6E 20 73 68 6F 74 73  ay between shots
00170120  2C 20 69 6E 20 66 72 61 6D 65 73 00 6D 69 6E 64  , in frames.mind
00170130  65 6C 61 79 3A 69 6E 74 00 00 00 00 61 69 32 5F  elay:int....ai2_
00170140  73 6B 69 6C 6C 5F 64 65 6C 61 79 6D 61 78 00 00  skill_delaymax..
00170150  73 65 74 73 20 61 6E 20 41 49 27 73 20 6D 61 78  sets an AI's max
00170160  20 64 65 6C 61 79 20 62 65 74 77 65 65 6E 20 73   delay between s
00170170  68 6F 74 73 2C 20 69 6E 20 66 72 61 6D 65 73 00  hots, in frames.
00170180  6D 61 78 64 65 6C 61 79 3A 69 6E 74 00 00 00 00  maxdelay:int....

must be changed to

 Offset    0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F

0016FE20        00 00 00 00 00 00 00 00 00 00 00 00 00 00    ..............
0016FE30  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0016FE40  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0016FE50  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0016FE60  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0016FE70  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0016FE80  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0016FE90  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0016FEA0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0016FEB0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0016FEC0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0016FED0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0016FEE0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0016FEF0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0016FF00  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0016FF10  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0016FF20  00 00 00 00 00 00 00 00 00 73 65 74 73 20 4F 4E  .........sets ON
0016FF30  57 43 20 66 6F 72 20 67 69 76 65 6E 20 63 68 61  WC for given cha
0016FF40  72 61 63 74 65 72 20 62 79 20 6E 61 6D 65 20 6F  racter by name o
0016FF50  72 20 69 64 00 74 65 6C 65 70 6F 72 74 73 20 74  r id.teleports t
0016FF60  6F 20 63 61 6D 65 72 61 20 62 79 20 63 68 61 72  o camera by char
0016FF70  20 69 64 00 70 72 69 6E 74 73 20 66 72 61 67 73   id.prints frags
0016FF80  20 61 6E 64 20 64 61 6D 61 67 65 20 63 6F 75 6E   and damage coun
0016FF90  74 65 72 00 63 72 65 61 74 65 73 20 63 6F 72 70  ter.creates corp
0016FFA0  73 65 20 66 69 6C 65 20 66 72 6F 6D 20 70 6C 61  se file from pla
0016FFB0  79 65 72 00 73 65 74 73 20 68 6F 72 69 7A 6F 6E  yer.sets horizon
0016FFC0  74 61 6C 20 66 69 65 6C 64 20 6F 66 20 76 69 65  tal field of vie
0016FFD0  77 20 69 6E 20 64 65 67 72 65 65 73 00 73 65 74  w in degrees.set
0016FFE0  73 20 68 65 61 6C 74 68 20 62 79 20 63 68 61 72  s health by char
0016FFF0  20 69 64 00 73 65 74 73 20 4F 4E 43 43 20 66 6F   id.sets ONCC fo
00170000  72 20 67 69 76 65 6E 20 63 68 61 72 61 63 74 65  r given characte
00170010  72 20 62 79 20 6E 61 6D 65 20 6F 72 20 69 64 00  r by name or id.
00170020  74 72 61 6E 73 66 65 72 73 20 63 61 6D 65 72 61  transfers camera
00170030  20 66 6F 63 75 73 20 61 6E 64 20 70 6C 61 79 65   focus and playe
00170040  72 20 63 6F 6E 74 72 6F 6C 00 72 65 73 65 74 73  r control.resets
00170050  20 70 6F 77 65 72 75 70 73 20 66 72 6F 6D 20 50   powerups from P
00170060  57 52 55 00 72 65 73 65 74 73 20 63 6F 72 70 73  WRU.resets corps
00170070  65 73 20 66 72 6F 6D 20 43 52 53 41 00 72 65 73  es from CRSA.res
00170080  65 74 73 20 77 65 61 70 6F 6E 73 20 66 72 6F 6D  ets weapons from
00170090  20 57 45 41 50 00 63 68 72 5F 77 65 61 70 6F 6E   WEAP.chr_weapon
001700A0  00 63 68 72 5F 6C 6F 63 61 74 69 6F 6E 5F 73 65  .chr_location_se
001700B0  74 74 6F 63 61 6D 65 72 61 00 63 68 72 5F 64 69  ttocamera.chr_di
001700C0  73 70 6C 61 79 5F 63 6F 6D 62 61 74 5F 73 74 61  splay_combat_sta
001700D0  74 73 00 6D 61 6B 65 5F 63 6F 72 70 73 65 00 6E  ts.make_corpse.n
001700E0  61 6D 65 3A 73 74 72 69 6E 67 00 67 73 5F 66 6F  ame:string.gs_fo
001700F0  76 5F 73 65 74 00 66 6F 76 3A 66 6C 6F 61 74 00  v_set.fov:float.
00170100  63 68 72 5F 68 65 61 6C 74 68 00 63 68 72 5F 69  chr_health.chr_i
00170110  64 20 5B 68 70 3A 69 6E 74 20 7C 20 5D 00 63 68  d [hp:int | ].ch
00170120  72 5F 73 65 74 5F 63 6C 61 73 73 00 63 68 72 5F  r_set_class.chr_
00170130  69 64 3A 69 6E 74 20 5B 63 6C 61 73 73 5F 6E 61  id:int [class_na
00170140  6D 65 20 7C 20 63 6C 61 73 73 5F 69 64 3A 69 6E  me | class_id:in
00170150  74 5D 00 63 68 72 5F 66 6F 63 75 73 00 63 68 72  t].chr_focus.chr
00170160  5F 69 64 3A 69 6E 74 00 70 6F 77 65 72 75 70 5F  _id:int.powerup_
00170170  72 65 73 65 74 00 63 6F 72 70 73 65 5F 72 65 73  reset.corpse_res
00170180  65 74 00 77 65 61 70 6F 6E 5F 72 65 73 65 74 00  et.weapon_reset.



BSL variables

Unsolved as of 06:39, 22 October 2008 (CEST). Needs a trimmed list of necessary PC vars matched with disposable Mac vars.

Since sc_bind_f2 and sc_bind_f3 won't work, the OTA needs to be rewritten whatever we do. Probably waiting for special anims should be replaced with waiting for hotkeyed variables like fast_mode (Ctrl+Shift/Alt+F), draw_every_frame (Ctrl+Shift/Alt+G), or gs_show_performance (Ctrl+Shift/Alt+Y). If this is done in the randomizer loop, there will actually be fewer contexts pushed than in the current version. There will also be no counterintuitive keypress sequences (F9,F2,F10), no spurious FILM files and no risk of buffer overflow. --geyser 06:39, 22 October 2008 (CEST)

Can you give a script example of waiting for hotkeyed variables? I would like to test it out. Thanks EdT 20:45, 28 October 2008 (CET)

Preset Mac variables

2+3+1+39=45 registered through tables ^_^

16 variables registered elsewhere -_-
Missing (pointer to string can't be found)
  1. p3_debug_collision (disposable)
  2. p3_everything_breakable (...)
  3. p3_furniture_breakable (cheatable)
  4. p3_glass_breakable (disposable?)
  5. p3_show_env_collision (disposable)
Quite disposable, but missing too -_-
  1. ph_active
  2. ph_debug_keyforces
  3. ph_show_collisions
Also missing
  1. sound_show_debug (pity; it's quite disposable)
  2. wp_disable_fade (this one is useful anyway)
  3. ui_suppress_prompt (useful too)
OpenGL initialisation (useful, missing)
  1. gl_fog_blue
  2. gl_fog_end
  3. gl_fog_green
  4. gl_fog_red
  5. gl_fog_start
Table of boolean vars at 0x1BA2AC
  1. marketing_line_off (used)
  2. chr_big_head (used)
Table of boolean vars at 0x1BAC00
  1. invincible (used)
  2. omnipotent (used)
  3. unstoppable
Table of integer vars at 0x1BAC00
  1. save_point
Table at 0x0x1B9C54
  1. ai2_showpaths
  2. ai2_showgrids
  3. ai2_showdynamicgrids
  4. ai2_showpathfindingerrors
  5. ai2_showconnections
  6. ai2_showactivationpaths
  7. ai2_showastar
  8. ai2_showcombatranges
  9. ai2_showvision
  10. ai2_showprediction
  11. ai2_showtargeting
  12. ai2_showlasers
  13. ai2_showlos
  14. ai2_showprojectiles
  15. ai2_showfiringspreads
  16. ai2_showlocalmelee
  17. ai2_showfights
  18. ai2_shownames
  19. ai2_showhealth
  20. ai2_showjoblocations
  21. ai2_showlinetochar
  22. ai2_showsounds
  23. ai2_printspawn
  24. ai2_blind
  25. ai2_deaf
  26. ai2_ignore_player
  27. ai2_chump_stop
  28. ai2_stopignoring_count
  29. ai2_stopignoring_time
  30. ai2_melee_weightcorrection
  31. ai2_spacing_enable
  32. ai2_spacing_cookies
  33. ai2_spacing_weights
  34. ai2_barabbas_run
  35. ai2_boss_battle
  36. ai2_showintersections
  37. ai2_debug_localmovement
  38. ai2_debug_localpathfinding
  39. ai2_debug_showsettingIDs

Wishlist

Trying to list necessary variables off the top of my head (omitting sc_bind_f2 and sc_bind_f3, which won't work): --geyser 06:39, 22 October 2008 (CEST)
  1. co_display (to run stuff in dev mode without cluttering up the screen with debug messages all the time)
  2. fast_mode (Ctrl+Shift/Alt+F)
  3. draw_every_frame (Ctrl+Shift/Alt+G)
  4. show_performance (Ctrl+Shift/Alt+Y)
  5. li_center_cursor (to reclaim -noswitch; not sure it can be done)
  6. chr_pin_character
Camera management
  1. cm_distance
  2. cm_height
  3. cm_canter_weapon
  4. cm_canter_unarmed
  5. wp_scale_adjustment
Gameplay tweaking
  1. chr_aim_width
  2. chr_auto_aim_arc
  3. chr_auto_aim_dist
  4. chr_block_angle
  5. chr_disable_melee
  6. chr_weapon_auto_aim
Advanced stuff
  1. chr_all_active
  2. chr_disable_visactive
  3. chr_draw_all_characters (pbly redundant of chr_all_active for the needs of OTA etc)
  4. chr_lod (do we really need this?)
  5. door_ignore_locks
  6. gs_input_accel
  7. gs_show_corpses
  8. single_step (probably not needed; the hotkeys are enough)
Goofy
  1. chr_big_head_amount
  2. chr_mini_me
  3. chr_mini_me_amount
  4. wp_kickable
  5. fx_laser_width
  6. m3_fill_solid
  7. m3_shade_vertex
  8. gs_show_environment

That's 33, which is a lot. 25 if we kick out the goofy. 24 if li_center_cursor doesn't work.

Brainstorming

Below are two little tables and two big ones. The first table is variables that don't seem to work but probably do, with the special case of ai2_boss_battle beilng used in [compound]. Then there's a small table of "huh" variables that are almost certainly disposable. Then there are tables (mutually exclusive, but overlapping with the small ones): debug/display things (32 items) and not-likely-to-be-tweaked things (17 items). Those would disempower modders and hackers but wouldn't change much or anything for level logic. 49 variables is a lot, but we have to choose wisely, and may end up having to maintain two versions of the Mac engine, one with debug stuff, the other with stuff that is meant to be used in scripts. --geyser 05:14, 10 October 2008 (CEST)

I'll start testing the variables and those I find that do not have a visible effect, I'll add to the possibly broken and disposable section. EdT 07:08, 10 October 2008 (CEST)
Is it possible to add gs_show_ui? That would be useful when taking screenshots or videos without the HUD. I can maintain 2 versions of the Mac Engine, I think a very small number would need the debug features, but having more PC compatible commands will be more appealing since Mac users will be able to play more scripts. Plus it will make it easier for the script writers since there one script fits all! EdT 21:53, 10 October 2008 (CEST)
Ed, you can use ui_show_element(left,0) and ui_show_element(right,0) instead of gs_show_ui=0; and don't forget ui_suppress_prompt=0 and such. The compatibility of scripts, of course, is the main goal. I just wanted to make sure you backed up the versions prior to those rewiring of mine because we are screwing with the engine in hackish ways and may want to take a few steps back. --geyser 02:01, 11 October 2008 (CEST)
Thank you, I did not know about that command, that saves one variable :-) I seem to recall another PC command door_ignore_locks used in some script, this might be useful... EdT 05:40, 11 October 2008 (CEST)
According to Neo sc_bind_f2, sc_bind_f3 cannot be added because the are strings and neither can gs_fov_set be added. However, he was able to add co_display and door_ignore_locks EdT 00:38, 16 October 2008 (CEST)
He was able to add them? So he gave you the fish after all? ^_^ If you want to allow me to give you more fish this week-end, please document the new fish in more detail, so that I know what disposable variables I can no longer use. As for gs_fov_set, it's a pity, gonna ask Neo what's the matter with it. --geyser 01:18, 16 October 2008 (CEST)
For Reference, Neo's changes
co_display = _COgDisplayConsole
name string: at 0x170E8C - REPLACE "ai2_showlos" with "co_display", 0
var pointer: at 0x1B9D20 - REPLACE 0x0018EDD4 with 0x00193579
door_ignore_locks = _OBJgDoor_IgnoreLocks
name string: at 0x171410 - REPLACE "ai2_showintersections" with "door_ignore_locks", 0
var pointer: at 0x1B9E90 - REPLACE 0x00195D2C with 0x0027A1B9
wp_kickable = _WPgPlayerKicksWeapons
name string: at 0x171098 -REPLACE "ai2_showsounds" with "wp_kickable", 0
var pointer: at 0x1B9DB0 - REPLACE 0x0018EDC2 with 0x00192B05
EdT 04:29, 16 October 2008 (CEST)
Just curious, why wp_kickable? I have tried, and I cannot figure out what is stopping Konoko from kicking weapons...Gumby 05:36, 16 October 2008 (CEST)
I'll probably change wp_kickable to something else. wp_kickable allows the AI's to kick or move the weapon that's on the ground, but Konoko or the player cannot. EdT



BSL variables available on the Mac that have no visible effect but are not likely to be broken, either
bool ai2_boss_battle=0 "enables AI boss-battle target selection"
bool ai2_melee_weightcorrection=1 "weights down non-attack techniques so they are never more than attacks"
int32 ai2_stopignoring_count=6 "set the number of events before the AI will stop ignoring"
int32 ai2_stopignoring_time=240 "set the delay timer before the AI forgets about ignored events"


BSL variables available on the Mac that have no visible effect and are possibly broken and disposable
bool ai2_debug_showsettingIDs=0 "shows ID numbers for combat, melee and neutral settings"
bool ai2_showastar=0 "shows grid squares that are evaluated by the A* pathfinding"
bool ai2_showintersections=0 "debug AI's melee intersections"
bool ai2_showlasers=0 "turns on laser sights for AI2 characters"
bool ph_debug_keyforces=0 "toggle keyboard applied forces"
int32 ai2_debug_localmove_lines=20 "number of lines to cast to debug local-movement code"
(needs ai2_debug_localmovement, which is missing)
bool ai2_showlos=0 "shows AI line-of-sight checking"
bool ai2_shownames=0 "draws the name of every AI above their head"
bool ai2_showsounds=0 "shows AI sounds as they are generated"


BSL variables available on the Mac that enable debug display
bool ai2_debug_localmovement ...
bool ai2_debug_localpathfinding=0 "debug local-path code from player's position and facing"
bool ai2_debug_showsettingIDs=0 "shows ID numbers for combat, melee and neutral settings" (no visible effect)
bool ai2_printspawn=0 "prints information about each AI spawn"
bool ai2_showactivationpaths=0 "turns on inactive ==> active pathfinding rendering"
bool ai2_showastar=0 "shows grid squares that are evaluated by the A* pathfinding" (no visible effect)
bool ai2_showcombatranges=0 "shows circles that represent the combat ranges of each AI"
bool ai2_showconnections=0 "turns on pathfinding connection rendering"
bool ai2_showdynamicgrids=0 "turns on pathfinding dynamic grid display"
bool ai2_showfights=0 "shows fights in progress"
bool ai2_showfiringspreads=0 "shows AI firing spread knowledge"
bool ai2_showgrids=0 "turns on pathfinding grid rendering"
bool ai2_showhealth=0 "draws a health bar for every AI above their head"
bool ai2_showintersections=0 "debug AI's melee intersections" (no visible effect)
bool ai2_showjoblocations=0 "draws a green cross at each AI's job location"
bool ai2_showlasers=0 "turns on laser sights for AI2 characters" (no visible effect)
bool ai2_showlinetochar=0 "draws a line from the player to every AI"
bool ai2_showlocalmelee=0 "shows local-environment melee awareness"
bool ai2_showlos=0 "shows AI line-of-sight checking" (no visible effect)
bool ai2_shownames=0 "draws the name of every AI above their head" (no visible effect)
bool ai2_showpathfindingerrors=0 "enables visual display of pathfinding errors"
bool ai2_showpaths=0 "shows the path each AI is following"
bool ai2_showprediction=0 "shows prediction info for AI2 characters"
bool ai2_showprojectiles=0 "shows AI projectile knowledge"
bool ai2_showsounds=0 "shows AI sounds as they are generated" (no visible effect)
bool ai2_showtargeting=0 "shows targeting info for AI2 characters"
bool ai2_showvision=0 "shows each AI's vision cones (central and peripheral)"
int32 p3_debug_collision=256 "enables collision debugging display"
bool ph_debug_keyforces=0 "toggle keyboard applied forces" (no visible effect)
bool p3_show_env_collision=0 "draws particle / environment collisions"
bool ph_show_collisions=0 "toggle display of colliding quads"
bool sound_show_debug=0 "displays sound debugging info"

That's 32!!! ^_^ however, the last 5 are not registered in the common table, so we actually have access to 25 vars: enough to accomodate everything except the goofy.


BSL variables available on the Mac that we're not too likely to modify in level logic
bool ai2_barabbas_run=1 "lets Barabbas run while carrying his gun" (disposable if we never need 0)
bool ai2_blind=0 "turns off the AI's visual sensing system" (disposable if we never need blind AI; they can still be made blind individually)
bool ai2_chump_stop=0 "stops the chump" (disposable since we scrapped ai2_chump anyway)
bool ai2_deaf=0 "turns off the AI's sound sensing system" (disposable if we never need deaf AI; they can still be made deaf individually)
bool ai2_melee_weightcorrection=1 "weights down non-attack techniques so they are never more than attacks" (no visible effect)
int32 ai2_spacing_cookies=2 "number of cookies per fight"
bool ai2_spacing_enable=1 "master enable switch for spacing behavior"
bool ai2_spacing_weights=1 "enables position-sensitive weighting of spacing behaviors"
int32 ai2_stopignoring_count=6 "set the number of events before the AI will stop ignoring" (no visible effect)
int32 ai2_stopignoring_time=240 "set the delay timer before the AI forgets about ignored events" (no visible effect)
bool marketing_line_off=0 "turns the laser line off" (player's laser sight, crosshair, etc)
bool p3_everything_breakable=0 "makes every quad breakable"
bool p3_furniture_breakable=0 "makes all furniture breakable"
bool p3_glass_breakable=1 "enables breakable glass"
bool ph_active=1 "enable physics"
bool ph_debug_keyforces=0 "toggle keyboard applied forces" (no visible effect)

That's 16, but the last 6 can't be used (marketing_line_off is used and the other 5 are "registered elsewhere"). So, 10.

Summary

All in all, we apparently have a maximum of 35 disposable variables, and a total of 31 on the wishlist. My suggestion:

If li_center_cursor works, leave these 4: ai2_spacing_cookies, ai2_spacing_enable, ai2_spacing_weights, ai2_barabbas_run.
If li_center_cursor doesn't work, leave these 5: ai2_melee_weightcorrection, ai2_spacing_cookies, ai2_spacing_enable, ai2_spacing_weights, ai2_barabbas_run.
Maybe don't keep anything and add 4 or 5 extras instead, like draw_every_frame_multiple, gs_screen_shot_reduce...

Convert stuff "en masse" (there will be large contiguous blocks in the table, and in the name/description pool as well, although less so).

The 3 blocks are as follows:

  1. ai2_showpaths
  2. ai2_showgrids
  3. ai2_showdynamicgrids
  4. ai2_showpathfindingerrors
  5. ai2_showconnections
  6. ai2_showactivationpaths
  7. ai2_showastar
  8. ai2_showcombatranges
  9. ai2_showvision
  10. ai2_showprediction
  11. ai2_showtargeting
  12. ai2_showlasers
  13. ai2_showlos
  14. ai2_showprojectiles
  15. ai2_showfiringspreads
  16. ai2_showlocalmelee
  17. ai2_showfights
  18. ai2_shownames
  19. ai2_showhealth
  20. ai2_showjoblocations
  21. ai2_showlinetochar
  22. ai2_showsounds
  23. ai2_printspawn
  24. ai2_blind
  25. ai2_deaf
  26. KEEP DEFINITELY
  27. ai2_chump_stop
  28. ai2_stopignoring_count
  29. ai2_stopignoring_time
  30. ai2_melee_weightcorrection (keep if no extras and li_center_cursor doesn't work)
  31. ai2_spacing_enable (keep if no extras)
  32. ai2_spacing_cookies (keep if no extras)
  33. ai2_spacing_weights (keep if no extras)
  34. ai2_barabbas_run (keep if no extras)
  35. KEEP DEFINITELY
  36. ai2_showintersections
  37. ai2_debug_localmovement
  38. ai2_debug_localpathfinding
  39. ai2_debug_showsettingIDs

(this does not necessarily correspond to contiguous strings)


And our wishlist is like this:

  1. co_display
  2. fast_mode
  3. draw_every_frame
  4. show_performance
  5. li_center_cursor
  6. chr_pin_character
  7. cm_distance
  8. cm_height
  9. cm_canter_weapon
  10. cm_canter_unarmed
  11. wp_scale_adjustment
  12. chr_aim_width
  13. chr_auto_aim_arc
  14. chr_auto_aim_dist
  15. chr_block_angle
  16. chr_disable_melee
  17. chr_weapon_auto_aim
  18. chr_all_active
  19. chr_disable_visactive
  20. chr_draw_all_characters
  21. chr_lod
  22. door_ignore_locks
  23. gs_input_accel
  24. gs_show_corpses
  25. single_step
  26. chr_big_head_amount
  27. chr_mini_me
  28. chr_mini_me_amount
  29. wp_kickable
  30. fx_laser_width
  31. m3_fill_solid
  32. m3_shade_vertex
  33. gs_show_environment

33, to which we can add 4 or 5 extras like draw_every_frame_multiple, gs_screen_shot_reduce...

My impression is that there's plenty of space to accomodate all that. So let's do it.
geyser 07:35, 22 October 2008 (CEST)