Replaceweapon Coding Help

I want my 15 rapid-fire quantum torpedo launchers Uber-Defiant now! - Get help from modders. Share your work. Discuss modifications.
1, 2, 3
posted on June 15th, 2012, 11:07 pm
@ crisis

Its cool, thanks for the help.

@ dom

is utritiumball the stock name for u_ball_obj?

Also, is there a working example of the canonimp with ubeam firing a uball? I understand the process, but I couldn't write it from scratch. Do you know if this process is used in FO atm?

Thanks guys
posted on June 15th, 2012, 11:15 pm
Yup, that's correct. The majority of Fleet Ops special weapons make use of this. I can't list a specific example as I don't have a computer with ODFs sitting in front of me at the moment, but there should be many examples available. If I recall correctly, the Siege Cruiser's EM Blast, Canaveral's Sensor Blackout, Qaw'Duj's Polaron Field, etc, should all use something similar. :)
posted on June 15th, 2012, 11:44 pm
cool, thanks, I'll take a look. :thumbsup:
posted on June 16th, 2012, 1:30 am
Hey dom, or anyone else, can you take a look at this chain? It is the second item which should simply replace a ship at a target location. The uball has a sod as well. Right now, it crashes when I select the target location.

apparently .odf files are not allowed to be attached, so here is a zip... :pinch:

Attachments

BSG_buy_valkA.zip
(1.25 KiB) Downloaded 262 times
posted on June 16th, 2012, 2:03 am
When in doubt, read the guide :'(

* The GameObject defined by objectName is limited to 16 characters. Must be defined with a valid GameObject or will cause a crash.


So, here, you have an entry that's 18 characters long unfortunately...
posted on June 16th, 2012, 2:51 pm
Alright, now everything works right up to the point when the ship should appear, but it doesn't. :(

Uball

Code: Select all
classlabel = "u_ball_obj"
lifetimer = 2.99
avoidme = 0
avoidanceclass = 0
animation = 3
ignoreinterface = 1
maxspecialenergy = 500
specialenergyrate = 0
weapon1 = "BSG_buy_valkA"
weaponhardpoints1 = "root"
mapicon = "mapicon_empty"
invincible = 1
invalidastarget = 1
clearsfog = 0
perceivedneutral = 1


replaceweapon

Code: Select all
wpnname = "Valk autoreplace"
tooltip = "Valk autoreplace"
verbosetooltip = "automatically replace the valk"
buttonslot = 0
replacementaction = 3
replacementkeepowner = 1
replacementinstantdelay = 5.0
replacementresetspecialenergy = 0
selectmode = 2
replacementinstantai = 1
replacementinstantplayer = 1
transferstats = 0
classlabel = "replaceweapon"
special = 1
replacementmaintainorders = 1
speakonattack = 0
attackspeech = 0
replacement0class0 = "BSG_valkyrie.odf"
replacementregisterasnew = 1
posted on June 16th, 2012, 4:19 pm
Well, it would help if the weapon carrier lasted longer than the weapon delay :D . As far as I know, the ship cannot fire because the utritiumball object is deleted prior to the weapon being activated :)


lifetimer = 2.99

replacementinstantdelay = 5.0
posted on June 16th, 2012, 8:09 pm
Yeah, I figured it was something like that, but now it crashes. :(

Aand... .txt is not allowed either. :pinch:

aaand, there is a 20000 char limit. :pinch: :pinch:

Code: Select all
date/time         : 2012-06-16, 15:58:17, 802ms
computer name     : TIBERIUS
user name         : <admin>
registered owner  : Hewlett-Packard
operating system  : Windows 7 x64 Service Pack 1 build 7601
system language   : English
system up time    : 3 days 4 hours
program up time   : 24 seconds
processors        : 4x AMD A8-3500M APU with Radeon(tm) HD Graphics
physical memory   : 3321/5611 MB (free/total)
free disk space   : (C:) 425.76 GB
display mode      : 1366x768, 32 bit
process id        : $1dec
allocated memory  : 152.17 MB
command line      : "C:Program Files (x86)ActivisionStar Trek Armada II Fleet OperationsDataArmada2.exe" /mod "BSG Addon Mod"
executable        : Armada2.exe
current module    : FleetOpsHook.dll
module date/time  : 2011-12-10 12:54
version           : 3.2.6
mod               : Battlestar Galactica: Worthy of Survival
contact name      : Z.
contact email     :
callstack crc     : $8aff9cfb, $bd50b1d1, $bd50b1d1
exception number  : 1
exception class   : EAccessViolation
exception message : Access violation at address 00438038 in module 'Armada2.exe'. Read of address 0000028C.

main thread ($30b4):
00438038 +028 Armada2.exe                                     CraftProcess.AIPossibleIdleRepair
00434242 +052 Armada2.exe                                     CraftProcess.Stop
00437fd9 +059 Armada2.exe                                     CraftProcess.AssessCombatSituation
004322e0 +110 Armada2.exe                                     CraftProcess.Do_Timestep
0042eb0d +05d Armada2.exe                                     CraftProcess.Execute
0040195e +0be Armada2.exe                                     AiMission.Update
00450de7 +007 Armada2.exe                                     EmptyMission.Update
0044e84e +01e Armada2.exe                                     Manage_AI
00483574 +124 Armada2.exe                                     Program.GameProcess
00559b7a +0fa Armada2.exe                                     TransportLocal.GameExecute
00487293 +1b3 Armada2.exe                                     Program.GameDoOne
00486b44 +544 Armada2.exe                                     Program.MainLoop
0047608d +11d Armada2.exe                                     _WinMain@16
5a9ada11 +029 FleetOpsHook.dll FleetOpsFunctionsHook 4974  +3 DebugException_Execute_New
5a9ade6f +26b FleetOpsHook.dll FleetOpsFunctionsHook 5094 +75 A2_WinMain
006734ef +12f Armada2.exe                                     _WinMainCRTStartup
75303398 +010 kernel32.dll                                    BaseThreadInitThunk

thread $2d5c:
77861f1f +0b ntdll.dll     NtWaitForWorkViaWorkerFactory
75303398 +10 kernel32.dll  BaseThreadInitThunk

thread $2cf0:
77860136 +0e ntdll.dll     NtWaitForMultipleObjects
75303398 +10 kernel32.dll  BaseThreadInitThunk

thread $24c8:
77861f1f +0b ntdll.dll     NtWaitForWorkViaWorkerFactory
75303398 +10 kernel32.dll  BaseThreadInitThunk

thread $1c5c:
77861f1f +0b ntdll.dll     NtWaitForWorkViaWorkerFactory
75303398 +10 kernel32.dll  BaseThreadInitThunk

thread $1738: <priority:-3>
7785f8aa +0e ntdll.dll       NtWaitForSingleObject
75c30a8b +92 KERNELBASE.dll  WaitForSingleObjectEx
7530118f +3e kernel32.dll    WaitForSingleObjectEx
75301143 +0d kernel32.dll    WaitForSingleObject
75a81323 +67 msvcrt.dll      _endthreadex
75303398 +10 kernel32.dll    BaseThreadInitThunk

thread $2198: <priority:2>
7785f8aa +0e ntdll.dll       NtWaitForSingleObject
75c30a8b +92 KERNELBASE.dll  WaitForSingleObjectEx
7530118f +3e kernel32.dll    WaitForSingleObjectEx
75301143 +0d kernel32.dll    WaitForSingleObject
75a81323 +67 msvcrt.dll      _endthreadex
75303398 +10 kernel32.dll    BaseThreadInitThunk

thread $cd4: <priority:2>
7785fd6a +0e ntdll.dll       NtDelayExecution
75c331b5 +5f KERNELBASE.dll  SleepEx
75c33a86 +0a KERNELBASE.dll  Sleep
75a81323 +67 msvcrt.dll      _endthreadex
75303398 +10 kernel32.dll    BaseThreadInitThunk

thread $6e4:
77861f1f +0b ntdll.dll     NtWaitForWorkViaWorkerFactory
75303398 +10 kernel32.dll  BaseThreadInitThunk

thread $b04:
77861f1f +0b ntdll.dll     NtWaitForWorkViaWorkerFactory
75303398 +10 kernel32.dll  BaseThreadInitThunk

thread $2728: <priority:1>
7785fd6a +0e ntdll.dll       NtDelayExecution
75c331b5 +5f KERNELBASE.dll  SleepEx
75c33a86 +0a KERNELBASE.dll  Sleep
75a81323 +67 msvcrt.dll      _endthreadex
75303398 +10 kernel32.dll    BaseThreadInitThunk

thread $2850: <priority:15>
77860136 +0e ntdll.dll       NtWaitForMultipleObjects
75c30bd7 +fa KERNELBASE.dll  WaitForMultipleObjectsEx
75301a27 +89 kernel32.dll    WaitForMultipleObjectsEx
75304203 +13 kernel32.dll    WaitForMultipleObjects
00463ce7 +57 Armada2.exe     BinkThread.sStreamThreadFunction
75303398 +10 kernel32.dll    BaseThreadInitThunk

thread $1a3c: <priority:15>
7785fd6a +00e ntdll.dll       NtDelayExecution
75c331b5 +05f KERNELBASE.dll  SleepEx
75c33a86 +00a KERNELBASE.dll  Sleep
004dd1f1 +191 Armada2.exe     InputThreadFunction
75303398 +010 kernel32.dll    BaseThreadInitThunk

modules:
00400000 Armada2.exe                43.0.0.0           C:Program Files (x86)ActivisionStar Trek Armada II Fleet OperationsData
028b0000 D3DX81ab.dll               8.1.0.0            C:Program Files (x86)ActivisionStar Trek Armada II Fleet OperationsData
02960000 fmodex.dll                 0.4.34.2           C:Program Files (x86)ActivisionStar Trek Armada II Fleet OperationsData
04cd0000 Tunngle.dll                1.0.5.0            C:Program Files (x86)ActivisionStar Trek Armada II Fleet OperationsData
10000000 NetworkManager.dll                            C:Program Files (x86)ActivisionStar Trek Armada II Fleet OperationsData
18000000 binkw32.dll                1.9.16.0           C:Program Files (x86)ActivisionStar Trek Armada II Fleet OperationsData
4a800000 Win2kDisableTaskSwitch.dll 3.2.6.0            C:Program Files (x86)ActivisionStar Trek Armada II Fleet OperationsData
5a800000 FleetOpsHook.dll           3.2.6.0            C:Program Files (x86)ActivisionStar Trek Armada II Fleet Operations
65950000 atiumdag.dll               7.14.10.867        C:Windowssystem32
65d80000 atiumdva.dll               8.14.10.330        C:Windowssystem32
66190000 d3d9.dll                   6.1.7601.17514     C:Windowssystem32
699c0000 DSOUND.dll                 6.1.7600.16385     C:Windowssystem32
6a830000 MSACM32.dll                6.1.7600.16385     C:Windowssystem32
6c950000 midimap.dll                6.1.7600.16385     C:Windowssystem32
6c960000 msacm32.drv                6.1.7600.16385     C:Windowssystem32
6c970000 AUDIOSES.DLL               6.1.7601.17514     C:Windowssystem32
6cc80000 d3dx9_43.dll               9.29.952.3111      C:Program Files (x86)ActivisionStar Trek Armada II Fleet OperationsData
6d2e0000 aticfx32.dll               8.17.10.1099       C:Windowssystem32
6e570000 wdmaud.drv                 6.1.7601.17514     C:Windowssystem32
6e650000 d3d8.dll                   6.1.7600.16385     C:Windowssystem32
6ec60000 AVRT.dll                   6.1.7600.16385     C:Windowssystem32
6ecc0000 ksuser.dll                 6.1.7600.16385     C:Windowssystem32
6f580000 MSVCP60.dll                7.0.7600.16385     C:Windowssystem32
6f5f0000 MSVFW32.dll                6.1.7601.17514     C:Windowssystem32
6fab0000 AVIFIL32.dll               6.1.7601.17514     C:Windowssystem32
6fb80000 d3d8thk.dll                6.1.7600.16385     C:Windowssystem32
6fe40000 MMDevApi.dll               6.1.7601.17514     C:WindowsSystem32
6fed0000 WINMM.dll                  6.1.7601.17514     C:Windowssystem32
6ff90000 atiu9pag.dll               8.14.1.6233        C:Windowssystem32
714d0000 propsys.dll                7.0.7601.17514     C:Windowssystem32
715d0000 uxtheme.dll                6.1.7600.16385     C:Windowssystem32
71770000 fwpuclnt.dll               6.1.7601.17514     C:WindowsSystem32
718a0000 POWRPROF.dll               6.1.7600.16385     C:Windowssystem32
71ac0000 COMCTL32.dll               6.10.7601.17514    C:WindowsWinSxSx86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.7601.17514_none_41e6975e2bd6f2b2
72ba0000 rasadhlp.dll               6.1.7600.16385     C:Windowssystem32
72dc0000 wshtcpip.dll               6.1.7600.16385     C:WindowsSystem32
72de0000 wshbth.dll                 6.1.7601.17514     C:Windowssystem32
72ea0000 WLIDNSP.DLL                7.250.4225.0       C:Program Files (x86)Common FilesMicrosoft SharedWindows Live
72ed0000 winrnr.dll                 6.1.7600.16385     C:WindowsSystem32
72ee0000 DNSAPI.dll                 6.1.7601.17570     C:Windowssystem32
72f30000 mswsock.dll                6.1.7601.17514     C:Windowssystem32
72f70000 pnrpnsp.dll                6.1.7600.16385     C:Windowssystem32
72f90000 napinsp.dll                6.1.7600.16385     C:Windowssystem32
72fa0000 NLAapi.dll                 6.1.7601.17514     C:Windowssystem32
73160000 dwmapi.dll                 6.1.7600.16385     C:Windowssystem32
744b0000 wsock32.dll                6.1.7600.16385     C:Windowssystem32
744c0000 VERSION.dll                6.1.7600.16385     C:Windowssystem32
74d10000 ntmarta.dll                6.1.7600.16385     C:Windowssystem32
74f10000 CRYPTBASE.dll              6.1.7600.16385     C:Windowssyswow64
74f20000 SspiCli.dll                6.1.7601.17725     C:Windowssyswow64
74f80000 SHLWAPI.dll                6.1.7601.17514     C:Windowssyswow64
74fe0000 MSCTF.dll                  6.1.7600.16385     C:Windowssyswow64
750b0000 WLDAP32.dll                6.1.7601.17514     C:Windowssyswow64
75100000 ADVAPI32.dll               6.1.7601.17514     C:Windowssyswow64
751a0000 CFGMGR32.dll               6.1.7601.17621     C:Windowssyswow64
751d0000 urlmon.dll                 9.0.8112.16446     C:Windowssyswow64
752f0000 kernel32.dll               6.1.7601.17651     C:Windowssyswow64
75400000 NSI.dll                    6.1.7600.16385     C:Windowssyswow64
75410000 ole32.dll                  6.1.7601.17514     C:Windowssyswow64
75570000 GDI32.dll                  6.1.7601.17514     C:Windowssyswow64
75690000 WS2_32.dll                 6.1.7601.17514     C:Windowssyswow64
756d0000 IMM32.dll                  6.1.7601.17514     C:Windowssyswow64
75850000 OLEAUT32.dll               6.1.7601.17676     C:Windowssyswow64
758e0000 DEVOBJ.dll                 6.1.7601.17621     C:Windowssyswow64
75900000 IMAGEHLP.dll               6.1.7601.17787     C:Windowssyswow64
75930000 PSAPI.DLL                  6.1.7600.16385     C:Windowssyswow64
75940000 wininet.dll                9.0.8112.16446     C:Windowssyswow64
75a60000 Normaliz.dll               6.1.7600.16385     C:Windowssyswow64
75a70000 msvcrt.dll                 7.0.7601.17744     C:Windowssyswow64
75b20000 LPK.dll                    6.1.7600.16385     C:Windowssyswow64
75b30000 RPCRT4.dll                 6.1.7601.17514     C:Windowssyswow64
75c20000 KERNELBASE.dll             6.1.7601.17651     C:Windowssyswow64
75c70000 SHELL32.dll                6.1.7601.17755     C:Windowssyswow64
768c0000 USP10.dll                  1.626.7601.17514   C:Windowssyswow64
76960000 SETUPAPI.dll               6.1.7601.17514     C:Windowssyswow64
76b30000 iertutil.dll               9.0.8112.16446     C:Windowssyswow64
76cf0000 CLBCatQ.DLL                2001.12.8530.16385 C:Windowssyswow64
76d80000 sechost.dll                6.1.7600.16385     C:WindowsSysWOW64
76e00000 comdlg32.dll               6.1.7601.17514     C:Windowssyswow64
76e80000 USER32.dll                 6.1.7601.17514     C:Windowssyswow64
77840000 ntdll.dll                  6.1.7601.17725     C:WindowsSysWOW64

posted on June 16th, 2012, 8:10 pm
continued...

Code: Select all
processes:
0000 Idle                           0 0   0
0004 System                         0 0   0
0128 smss.exe                       0 0   0
01bc csrss.exe                      0 0   0
0210 wininit.exe                    0 0   0
021c csrss.exe                      1 0   0
0244 services.exe                   0 0   0
024c lsass.exe                      0 0   0
0258 lsm.exe                        0 0   0
02ac winlogon.exe                   1 0   0
02e8 svchost.exe                    0 0   0
0328 TrueSuiteService.exe           0 0   0
0368 svchost.exe                    0 0   0
03d0 atiesrxx.exe                   0 0   0
03f0 svchost.exe                    0 0   0
013c svchost.exe                    0 0   0
01c4 svchost.exe                    0 0   0
0154 stacsv64.exe                   0 0   0
0570 svchost.exe                    0 0   0
05a4 hpservice.exe                  0 0   0
05d4 WUDFHost.exe                   0 0   0
0614 Smc.exe                        0 0   0
0634 svchost.exe                    0 0   0
0688 ccSvcHst.exe                   0 0   0
07cc spoolsv.exe                    0 0   0
04bc svchost.exe                    0 0   0
04e8 svchost.exe                    0 0   0
062c armsvc.exe                     0 0   0
06f0 AESTSr64.exe                   0 0   0
0558 Fuel.Service.exe               0 0   0
082c btwdins.exe                    0 0   0
0860 ezSharedSvcHost.exe            0 0   0
089c HPClientServices.exe           0 0   0
08dc HPDrvMntSvc.exe                0 0   0
08f4 HPWMISVC.exe                   0 0   0
0910 RIconMan.exe                   0 0   0
0934 raysat_3dsmax2012_64server.exe 0 0   0
0a50 sftvsa.exe                     0 0   0
0a8c Rtvscan.exe                    0 0   0
0ac8 WLIDSVC.EXE                    0 0   0
0b4c WLIDSVCM.EXE                   0 0   0
0b64 sftlist.exe                    0 0   0
0c20 CVHSVC.EXE                     0 0   0
0ddc svchost.exe                    0 0   0
0e10 svchost.exe                    0 0   0
0e78 atieclxx.exe                   1 0   0
0a10 svchost.exe                    0 0   0
0f18 HPSA_Service.exe               0 0   0
0d84 wmpnetwk.exe                   0 0   0
0f04 SearchIndexer.exe              0 0   0
0fdc WmiPrvSE.exe                   0 0   0
0488 taskhost.exe                   1 29  21  normal
0b48 dwm.exe                        1 22  2   high
02d0 explorer.exe                   1 892 566 normal
101c SmcGui.exe                     1 183 129 normal
1078 SynTPEnh.exe                   1 89  45  above normal
1094 ipoint.exe                     1 42  52  normal
10a0 sttray64.exe                   1 18  17  normal
11a8 ProtectionUtilSurrogate.exe    1 9   6   normal       C:Program Files (x86)SymantecSymantec Endpoint Protection
11b4 dpupdchk.exe                   1 9   1   normal
1238 Steam.exe                      1 869 104 normal       C:Program Files (x86)Steam
1268 RocketDock.exe                 1 97  61  normal       C:Program Files (x86)RocketDock
129c MSOSYNC.EXE                    1 64  20  normal       C:Program Files (x86)Microsoft OfficeOffice14
1300 SynTPHelper.exe                1 9   3   above normal
1348 BTTray.exe                     1 25  23  normal
13d0 BTStackServer.exe              1 14  9   normal
0e30 RunDll32.exe                   1 19  6   normal       C:WindowsSysWOW64
1080 ccApp.exe                      1 17  9   normal       C:Program Files (x86)Common FilesSymantec Shared
0cd0 RazerNostromoSysTray.exe       1 31  19  normal       C:Program Files (x86)RazerNostromo
12ec HPMSGSVC.exe                   1 35  7   normal       C:Program Files (x86)Hewlett-PackardHP Quick Launch
12b4 HPOSD.exe                      1 19  9   normal       C:Program Files (x86)Hewlett-PackardHP On Screen Display
0a64 DivXUpdate.exe                 1 40  24  normal       C:Program Files (x86)DivXDivX Update
1410 hpqWmiEx.exe                   0 0   0
1458 BluetoothHeadsetProxy.exe      1 12  3   normal       C:Program FilesWIDCOMMBluetooth Software
14d0 jusched.exe                    1 9   2   normal       C:Program Files (x86)Common FilesJavaJava Update
0410 SteamService.exe               0 0   0
0480 chrome.exe                     1 282 130 normal       C:UsersMoAppDataLocalGoogleChromeApplication
1290 chrome.exe                     1 9   1   normal       C:UsersMoAppDataLocalGoogleChromeApplication
061c chrome.exe                     1 12  1   normal       C:UsersMoAppDataLocalGoogleChromeApplication
1010 chrome.exe                     1 10  1   normal       C:UsersMoAppDataLocalGoogleChromeApplication
1828 chrome.exe                     1 661 1   below normal C:UsersMoAppDataLocalGoogleChromeApplication
18b8 chrome.exe                     1 14  5   normal       C:UsersMoAppDataLocalGoogleChromeApplication
18c0 chrome.exe                     1 11  8   normal       C:UsersMoAppDataLocalGoogleChromeApplication
1904 chrome.exe                     1 9   22  normal       C:UsersMoAppDataLocalGoogleChromeApplication
1938 rundll32.exe                   1 90  16  normal       C:WindowsSysWOW64
1940 chrome.exe                     1 26  179 normal       C:UsersMoAppDataLocalGoogleChromeApplication
04f0 unsecapp.exe                   1 9   3   normal
2b10 IELowutil.exe                  1 12  3   below normal C:Program Files (x86)Internet Explorer
2c0c chrome.exe                     1 110 1   below normal C:UsersMoAppDataLocalGoogleChromeApplication
235c RazerOrochiTray.exe            1 26  14  normal       C:Program Files (x86)RazerOrochi
24f8 svchost.exe                    0 0   0
2af8 gimp-2.6.exe                   1 552 792 normal       C:Program Files (x86)GIMP-2.0bin
21b8 script-fu.exe                  1 74  24  normal       C:Program Files (x86)GIMP-2.0libgimp2.0plug-ins
28b8 nusb3mon.exe                   1 21  8   normal       C:Program Files (x86)NEC ElectronicsUSB 3.0 Host Controller DriverApplication
1c08 chrome.exe                     1 10  1   normal       C:UsersMoAppDataLocalGoogleChromeApplication
2148 TnglCtrl.exe                   0 0   0
3188 realsched.exe                  1 12  14  normal       C:Program Files (x86)RealRealPlayerupdate
15f4 FPQEdit.exe                    1 195 82  normal       C:Program Files (x86)ActivisionStar Trek Armada II Fleet OperationsData
2e14 TouchControl.exe               1 20  19  normal       C:Program Files (x86)HP SimplePass 2012
2660 BioMonitor.exe                 1 9   4   normal       C:Program Files (x86)HP SimplePass 2012
1644 wlanext.exe                    0 0   0
3220 conhost.exe                    0 0   0
32f8 chrome.exe                     1 306 1   below normal C:UsersMoAppDataLocalGoogleChromeApplication
2948 audiodg.exe                    0 0   0
2a70 Armada2.exe                    1 9   1   normal       C:Program Files (x86)ActivisionStar Trek Armada II Fleet OperationsData
1dec Armada2.exe                    1 73  51  normal       C:Program Files (x86)ActivisionStar Trek Armada II Fleet OperationsData

stack dump:
0018fa84  00 00 00 00 38 49 7f 05 - 38 49 7f 05 c8 fa 18 00  ....8I..8I......
0018fa94  47 42 43 00 44 0a 00 00 - 38 49 7f 05 a0 48 68 05  GBC.D...8I...Hh.
0018faa4  00 00 80 3f 04 6b f9 45 - 5a c9 24 0a 38 49 7f 05  ...?.k.EZ.$.8I..
0018fab4  c8 fa 18 00 db 7f 43 00 - 00 00 61 44 00 00 00 00  ......C...aD....
0018fac4  00 00 61 44 e0 fa 18 00 - e3 22 43 00 08 d5 ef 0b  ..aD....."C.....
0018fad4  38 49 7f 05 10 7f bd 09 - bc 3c 62 0b f0 fa 18 00  8I.......<b.....
0018fae4  10 eb 42 00 2a 5c 0f 3d - 2a 5c 0f 3d 24 fb 18 00  ..B.*.=*.=$...
0018faf4  61 19 40 00 2a 5c 0f 3d - 23 00 00 00 2a 5c 0f 3d  a.@.*.=#...*.=
0018fb04  00 00 00 00 3d 00 80 3f - 00 00 00 00 00 00 00 00  ....=..?........
0018fb14  38 49 7f 05 6c fb 18 00 - b8 94 69 00 ff ff ff ff  8I..l.....i.....
0018fb24  30 fb 18 00 ec 0d 45 00 - 2a 5c 0f 3d 3c fb 18 00  0.....E.*.=<...
0018fb34  51 e8 44 00 2a 5c 0f 3d - 78 fb 18 00 79 35 48 00  Q.D.*.=x...y5H.
0018fb44  2a 5c 0f 3d a8 50 95 05 - 00 22 68 9a 0e bb 00 00  *.=.P..."h.....
0018fb54  00 00 00 00 01 00 00 00 - 0e bb 00 00 00 00 00 00  ................
0018fb64  01 00 00 00 2a 5c 0f 3d - 9c fd 18 00 88 c0 69 00  ....*.=......i.
0018fb74  ff ff ff ff a8 fd 18 00 - 7f 9b 55 00 7f 03 00 00  ..........U.....
0018fb84  03 00 00 00 30 7b 73 00 - 00 00 00 00 00 00 00 00  ....0{s.........
0018fb94  00 00 00 00 00 00 17 54 - 41 50 53 01 00 00 00 e0  .......TAPS.....
0018fba4  80 00 80 d8 05 00 00 01 - 01 ed 7b f9 45 00 00 00  ..........{.E...
0018fbb4  00 92 95 04 46 00 00 00 - 03 00 00 00 72 02 00 00  ....F.......r...

disassembling:
5a9ad9e8      public FleetOpsFunctionsHook.DebugException_Execute_New:  ; function entry point
5a9ad9e8 4971   push    ebp
5a9ad9e9        mov     ebp, esp
5a9ad9eb        push    0
5a9ad9ed        push    0
5a9ad9ef        push    ebx
5a9ad9f0        push    esi
5a9ad9f1        push    edi
5a9ad9f2        xor     eax, eax
5a9ad9f4        push    ebp
5a9ad9f5        push    $5a9ada93              ; System.@HandleFinally
5a9ad9fa        push    dword ptr fs:[eax]
5a9ad9fd        mov     fs:[eax], esp
5a9ada00 4972   mov     eax, [ebp+8]
5a9ada03 4973   xor     edx, edx
5a9ada05        push    ebp
5a9ada06        push    $5a9ada1d              ; System.@HandleAnyException
5a9ada0b        push    dword ptr fs:[edx]
5a9ada0e        mov     fs:[edx], esp
5a9ada11 4974 > call    eax
5a9ada11
5a9ada13        xor     eax, eax
5a9ada15        pop     edx
5a9ada16        pop     ecx
5a9ada17        pop     ecx
5a9ada18        mov     fs:[eax], edx
5a9ada1b        jmp     loc_5a9ada75
5a9ada1b
5a9ada1b      ; ---------------------------------------------------------
5a9ada1b
5a9ada1d        jmp     -$1a8efe ($5a804b24)   ; System.@HandleAnyException
5a9ada1d
5a9ada22 4976   push    1
5a9ada24        push    0
5a9ada26        push    0
5a9ada28        push    0
5a9ada2a        push    0
5a9ada2c        push    0
5a9ada2e        push    0
5a9ada30        push    0
[...]
posted on June 16th, 2012, 8:36 pm
replacementaction = 3 is not a command

replacementkeepowner = 1 seems somehow wrong here .... (shouldn't cause a crash)

Unfortunately I don't remember how 326 replaceweapon works anymore in this regard, but you should need to define the race it replaces into to avoid a crash (i.e. your utritiumball object should have "race = "XXX"").
posted on June 16th, 2012, 8:49 pm
I will check out the keepowner line, and take out the action(guess it was removed)

But the race isn't the problem. I have one working right now that doesn't have it. :)
posted on June 16th, 2012, 9:57 pm
I tried duplicating my working replaceweapon(used by a uball as well) and it still wont work.(crashing) I have once again attached my odf chain. :pinch:

This should not be so hard. :hmmm:

Attachments

BSG_buy_valkA.zip
(1.26 KiB) Downloaded 227 times
posted on June 17th, 2012, 2:51 am
Ah I see - wasn't quite paying attention before; nothing like a bit of science-juice to perk your brain up ^-^ . I've attached the files you'll need to make the working effect you want. Cheers~

Attachments

BSG_buy_valk.zip
(1.12 KiB) Downloaded 229 times
posted on June 17th, 2012, 3:22 am
Sorry, it is still crashing. :'(

Code: Select all
callstack crc     : $5b290a39, $4e2f33d6, $4e2f33d6
exception number  : 1
exception class   : EAccessViolation
exception message : Access violation at address 5A94513A in module 'FleetOpsHook.dll'. Read of address 00000448.

main thread ($17f8):
5a94513a +2ea FleetOpsHook.dll ReplaceWeapon              1632  +44 ReplaceWeaponClass_loadVars
5a945b25 +021 FleetOpsHook.dll ReplaceWeapon              1742   +6 ReplaceWeaponClass_ReplaceWeaponClass2
5a945b61 +031 FleetOpsHook.dll ReplaceWeapon              1753   +5 ReplaceWeaponClass_BuildClass
00664929 +0d9 Armada2.exe                                           WeaponClass.Find
004ccad2 +652 Armada2.exe                                           GameObjectClass.GameObjectClass
5a93155a +016 FleetOpsHook.dll GameObjectClassEnhancement   98   +4 GameObjectClass_GameObjectClass2_Callback
0053545e +10e Armada2.exe                                           ParameterDB.Get
004bf0c3 +033 Armada2.exe                                           CraftClass.CraftClass
75a79d43 +055 msvcrt.dll                                            malloc
5a932906 +016 FleetOpsHook.dll CraftClassEnhancement       358   +4 CraftClass_CraftClass2_Callback
004c017e +03e Armada2.exe                                           CraftClass.BuildClass
004cd331 +141 Armada2.exe                                           GameObjectClass.Find
5a943836 +6aa FleetOpsHook.dll ReplaceWeapon               985 +214 ReplaceWeapon_Simulate
5a93cc3c +058 FleetOpsHook.dll CannonImp                   242  +12 CannonImp_UpdateTimer
5a93d08f +03b FleetOpsHook.dll CannonImp                   427   +5 CannonImp_Simulate
0066e59b +01b Armada2.exe                                           ToggleWeapon.Simulate
0066eb47 +047 Armada2.exe                                           Weapon.SimulateAll
004835aa +15a Armada2.exe                                           Program.GameProcess
00559b7a +0fa Armada2.exe                                           TransportLocal.GameExecute
00487293 +1b3 Armada2.exe                                           Program.GameDoOne
00486b44 +544 Armada2.exe                                           Program.MainLoop
0047608d +11d Armada2.exe                                           _WinMain@16
5a9ada11 +029 FleetOpsHook.dll FleetOpsFunctionsHook      4974   +3 DebugException_Execute_New
5a9ade6f +26b FleetOpsHook.dll FleetOpsFunctionsHook      5094  +75 A2_WinMain
006734ef +12f Armada2.exe                                           _WinMainCRTStartup
75303398 +010 kernel32.dll                                          BaseThreadInitThunk

thread $11f4:
77861f1f +0b ntdll.dll     NtWaitForWorkViaWorkerFactory
75303398 +10 kernel32.dll  BaseThreadInitThunk

thread $1178:
77860136 +0e ntdll.dll     NtWaitForMultipleObjects
75303398 +10 kernel32.dll  BaseThreadInitThunk

thread $13c0:
77861f1f +0b ntdll.dll     NtWaitForWorkViaWorkerFactory
75303398 +10 kernel32.dll  BaseThreadInitThunk

thread $1514:
77861f1f +0b ntdll.dll     NtWaitForWorkViaWorkerFactory
75303398 +10 kernel32.dll  BaseThreadInitThunk

thread $19d0: <priority:-3>
7785f8aa +0e ntdll.dll       NtWaitForSingleObject
75c30a8b +92 KERNELBASE.dll  WaitForSingleObjectEx
7530118f +3e kernel32.dll    WaitForSingleObjectEx
75301143 +0d kernel32.dll    WaitForSingleObject
75a81323 +67 msvcrt.dll      _endthreadex
75303398 +10 kernel32.dll    BaseThreadInitThunk

thread $27d4: <priority:2>
75303398 +10 kernel32.dll  BaseThreadInitThunk

thread $e90: <priority:2>
7785fd6a +0e ntdll.dll       NtDelayExecution
75c331b5 +5f KERNELBASE.dll  SleepEx
75c33a86 +0a KERNELBASE.dll  Sleep
75a81323 +67 msvcrt.dll      _endthreadex
75303398 +10 kernel32.dll    BaseThreadInitThunk

thread $bf0:
77861f1f +0b ntdll.dll     NtWaitForWorkViaWorkerFactory
75303398 +10 kernel32.dll  BaseThreadInitThunk

thread $31b0:
77861f1f +0b ntdll.dll     NtWaitForWorkViaWorkerFactory
75303398 +10 kernel32.dll  BaseThreadInitThunk

thread $2d30: <priority:1>
7785fd6a +0e ntdll.dll       NtDelayExecution
75c331b5 +5f KERNELBASE.dll  SleepEx
75c33a86 +0a KERNELBASE.dll  Sleep
75a81323 +67 msvcrt.dll      _endthreadex
75303398 +10 kernel32.dll    BaseThreadInitThunk

thread $2a1c: <priority:15>
77860136 +0e ntdll.dll       NtWaitForMultipleObjects
75c30bd7 +fa KERNELBASE.dll  WaitForMultipleObjectsEx
75301a27 +89 kernel32.dll    WaitForMultipleObjectsEx
75304203 +13 kernel32.dll    WaitForMultipleObjects
00463ce7 +57 Armada2.exe     BinkThread.sStreamThreadFunction
75303398 +10 kernel32.dll    BaseThreadInitThunk

thread $1f7c: <priority:15>
7785fd6a +00e ntdll.dll       NtDelayExecution
75c331b5 +05f KERNELBASE.dll  SleepEx
75c33a86 +00a KERNELBASE.dll  Sleep
004dd1f1 +191 Armada2.exe     InputThreadFunction
75303398 +010 kernel32.dll    BaseThreadInitThunk


cpu registers:
eax = 00000000
ebx = 00000000
ecx = 00000000
edx = 04708260
esi = 00000001
edi = 0bc204e8
eip = 5a94513a
esp = 0018f4b0
ebp = 0018f52c

stack dump:
0018f4b0  cc f5 18 00 58 4e 80 5a - 2c f5 18 00 f8 c0 9a 5a  ....XN.Z,......Z
0018f4c0  a8 4e 4e 02 74 f5 18 00 - 00 00 00 00 00 00 00 00  .NN.t...........
0018f4d0  00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ................
0018f4e0  00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ................
0018f4f0  00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ................
0018f500  00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ................
0018f510  00 00 00 00 00 00 00 00 - c8 84 3b 0b 00 00 00 00  ..........;.....
0018f520  00 00 00 00 00 00 00 00 - 00 00 00 00 44 f5 18 00  ............D...
0018f530  2a 5b 94 5a e8 04 c2 0b - 74 f5 18 00 60 f7 18 00  *[.Z....t...`...
0018f540  e8 04 c2 0b 5c f5 18 00 - 66 5b 94 5a d8 ae a1 5a  .......f[.Z...Z
0018f550  74 f5 18 00 e8 04 c2 0b - d8 ae a1 5a d8 f5 18 00  t..........Z....
0018f560  2c 49 66 00 74 f5 18 00 - d8 f8 18 00 27 00 00 00  ,If.t.......'...
0018f570  d8 ed a4 0b 42 53 47 5f - 62 75 79 5f 76 61 6c 6b  ....BSG_buy_valk
0018f580  2e 6f 64 66 00 6f 64 66 - 00 00 29 00 5a 3a 84 55  .odf.odf..).Z:.U
0018f590  42 53 47 5f 48 26 c9 0b - d8 26 c9 0b 38 eb 82 05  BSG_H&...&..8...
0018f5a0  40 06 00 00 b0 04 00 00 - 60 f2 c4 0b 72 65 70 6c  @.......`...repl
0018f5b0  61 63 65 77 65 61 70 6f - 6e 00 18 00 42 00 00 00  aceweapon...B...
0018f5c0  a9 af 8e 5a 10 00 00 00 - 26 00 00 00 74 f7 18 00  ...Z....&...t...
0018f5d0  18 cf 6a 00 ff ff ff ff - 80 f7 18 00 d7 ca 4c 00  ..j...........L.
0018f5e0  60 f7 18 00 d8 f8 18 00 - d8 ed a4 0b d8 f8 18 00  `...............

disassembling:
[...]
5a945104        call    -$ec285 ($5a858e84)    ; SysUtils.IntToStr
5a945104
5a945109        push    dword ptr [ebp-$50]
5a94510c        push    $5a945674              ; 'Condition'
5a945111        lea     eax, [ebp-$4c]
5a945114        mov     edx, 3
5a945119        call    -$13f6de ($5a805a40)   ; System.@LStrCatN
5a945119
5a94511e        mov     edx, [ebp-$4c]
5a945121        lea     ecx, [ebp-$10]
5a945124        mov     eax, [ebp+$c]
5a945127        call    -$63eb0 ($5a8e127c)    ; ArmadaFunctions.TParameterDB.Get
5a945127
5a94512c 1632   mov     eax, [ebp-$10]
5a94512f        push    eax
5a945130        mov     eax, [$5a9e9224]
5a945135        mov     eax, [eax]
5a945137        call    eax
5a945137
5a945139        pop     ecx
5a94513a      > mov     eax, [eax+$448]
5a945140        mov     edx, ebx
5a945142        add     edx, edx
5a945144        mov     ecx, [edi+$254]
5a94514a        mov     [ecx+edx*8], eax
5a94514d 1633   mov     eax, [ebp-$10]
5a945150        push    eax
5a945151        call    -$64a52 ($5a8e0704)    ; ArmadaFunctions.operatorDelete
5a945151
5a945156        pop     ecx
5a945157        jmp     loc_5a94519e
5a945157
5a945157      ; ---------------------------------------------------------
5a945157
5a945159      loc_5a945159:
5a945159 1637   push    0
5a94515b        push    $5a945624              ; 'replacement'
5a945160        lea     edx, [ebp-$58]
5a945163        mov     eax, ebx
5a945165        call    -$ec2e6 ($5a858e84)    ; SysUtils.IntToStr
5a945165
[...]

posted on June 17th, 2012, 3:34 am
Urgh, beer failed me! replacementmode = 0 should be there for BSG_buy_valk.odf; I was testing out race dependencies and forgot to change it back...
1, 2, 3
Reply

Who is online

Users browsing this forum: No registered users and 3 guests