 |
Forum Info
|
 |
Forum Members: 18,643
Total Threads: 8,744
Posts: 95,518
Administrators:
DeeZire, Redemption
There are currently 30 users online.
|
 |
Partner Links
|
 |
 |
Advertisements
|
 |
|
| Generals & Zero Hour Editing Discuss any modding related issues to do with Generals and Zero Hour here. |
06-08-2003, 03:45 PM
|
#1 (permalink)
|
|
Senior Member
Join Date: Apr 2003
Location: Canada
Posts: 968
|
Cluster Bomb
I need help with creating a clusterbomb. I currently have the B52 drop a Daisy Cutter type bomb then release 4 GenericTankShells when it explodes. For some reason it crashes when the bigger bomb explodes.
Heres the crash log:
Release Crash at Thu Jun 05 18:43:26 2003
; Reason Uncaught Exception in GameEngine::update
Last error:
Exception is access violation
WinMain at 4017e0
Error code: EXCEPTION_ACCESS_VIOLATION
Description: The thread tried to read from or write to a virtual address for which it does not have the appropriate access.
Access address:00000004 was read from.
Stack Dump:
<Unknown>(-1) : <Unknown> 0x0062DAE0
Details:
Register dump...
Eip:0062DAE0 Esp:0012F5F0 Ebp:00000000
Eax:00000000 Ebx:00000000 Ecx:0012F604
Edx:0089AED4 Esi:1ABF14B8 Edi:1ABF14CC
EFlags:00010246
CS:001b SS:0023 DS:0023 ES:0023 FS:003b GS:0000
EIP bytes dump...
Bytes at CS:EIP (0062DAE0) : 8B 48 04 3B CD 74 05 E8 D4 F9 E1 FF 8A 88 F9 00 00 00 84 C9 75 59 8B 5F F4 39 6B 08 74 51 8B 4F
Current stack:
And heres my code in CommandButton.INI:
CommandButton Command_UKClusterBomb
Command = SPECIAL_POWER
SpecialPower = SuperweaponUKClusterBomb
Options = NEED_SPECIAL_POWER_SCIENCE NEED_TARGET_POS CONTEXTMODE_COMMAND
TextLabel = CONTROLBAR:UKClusterBomb
ButtonImage = SACDaisyCutter
ButtonBorderType = ACTION
DescriptLabel = CONTROLBAR:TooltipUKClusterBomb
RadiusCursorType = DAISYCUTTER
InvalidCursorName = GenericInvalid
End
CommandButton Command_UKClusterBombFromCommandCenter
Command = SPECIAL_POWER_FROM_COMMAND_CENTER
SpecialPower = SuperweaponUKClusterBomb
Options = NEED_SPECIAL_POWER_SCIENCE NEED_TARGET_POS CONTEXTMODE_COMMAND
TextLabel = OBJECT:UKClusterBomb
ButtonImage = SACDaisyCutter
DescriptLabel = CONTROLBAR:TooltipUKClusterBomb
RadiusCursorType = DAISYCUTTER
InvalidCursorName = GenericInvalid
End
CommandButton Command_PurchaseScienceUKClusterBomb
Command = PURCHASE_SCIENCE
Science = SCIENCE_UKClusterBomb
ButtonImage = SACDaisyCutter
ButtonBorderType = UPGRADE ; Identifier for the User as to what kind of button this is
End
Heres the code in ObjectCreationList.INI:
; ------------------------------------------------------------------------------------
; Creates a cluster of explosives
; ------------------------------------------------------------------------------------
ObjectCreationList OCL_UKClusterBombExplode
CreateObject
ObjectNames = GenericTankShell
Count = 4
Disposition = SEND_IT_FLYING
DispositionIntensity = 1.5
End
End
; -----------------------------------------------------------------------------
; UK Cluster Bomb super weapon
; -----------------------------------------------------------------------------
ObjectCreationList SUPERWEAPON_UKClusterBomb
DeliverPayload
Transport = AmericaJetB52
StartAtPreferredHeight = Yes
StartAtMaxSpeed = Yes
MaxAttempts = 1
DropOffset = X:0 Y:0 Z:-10
Payload = UKClusterBomb
DeliveryDistance = 140
DeliveryDecalRadius = 100
DeliveryDecal
Texture = SCCFuelAirBomb_USA
Style = SHADOW_ALPHA_DECAL
OpacityMin = 25%
OpacityMax = 50%
OpacityThrobTime = 500
Color = R:255 G:0 B:0 A:255
OnlyVisibleToOwningPlayer = Yes
End
End
End
Heres the code in Sciene.INI:
Science SCIENCE_UKClusterBomb
PrerequisiteSciences = SCIENCE_AMERICA
SciencePurchasePointCost = 1;5
IsGrantable = Yes
DisplayName = SCIENCE:UKClusterBomb
Description = CONTROLBAR:ToolTipUKClusterBomb
End
Heres the code in SpecialPowe.INI:
;-----------------------------------------------------------------------------
SpecialPower SuperweaponUKClusterBomb
Enum = SPECIAL_DAISY_CUTTER
ReloadTime = 360000 ; in milliseconds
RequiredScience = SCIENCE_UKClusterBomb
PublicTimer = No
SharedSyncedTimer = Yes
ViewObjectDuration = 30000 ; Lifetime of a Look done belonging to the firing player
ViewObjectRange = 250 ; And how far it can see
RadiusCursorRadius = 100
End
Heres the code in FactionUnit.INI under the B52:
Behavior = OCLSpecialPower ModuleTag_12
SpecialPowerTemplate = SuperweaponUKClusterBomb
OCL = SUPERWEAPON_UKClusterBomb
CreateLocation = USE_OWNER_OBJECT
End
Heres the code for the ClusterBomb object in FactionUnit.INI:
;------------------------------------------------------------------------------
Object UKClusterBomb
; *** ART Parameters ***
Draw = W3DModelDraw ModuleTag_01
OkToChangeModelColor = Yes
DefaultConditionState
Model = AVBomber_B
End
End
; ***DESIGN parameters ***
DisplayName = OBJECT:UKClusterBomb
EditorSorting = SYSTEM
TransportSlotCount = 10 ;how many "slots" we take in a transport (0 == not transportable)
VisionRange = 300.0
ShroudClearingRange = 0
ArmorSet
Conditions = None
Armor = ProjectileArmor
DamageFX = None
End
; *** AUDIO Parameters ***
SoundFallingFromPlane = DaisyCutterWeapon
; *** ENGINEERING Parameters ***
KindOf = PROJECTILE
Body = ActiveBody ModuleTag_02
MaxHealth = 100.0
InitialHealth = 100.0
End
Behavior = CreateObjectDie ModuleTag_03
CreationList = OCL_UKClusterBombExplode
End
Behavior = FXListDie ModuleTag_04
;nothing
End
Behavior = DestroyDie ModuleTag_05
;nothing
End
Behavior = AIUpdateInterface ModuleTag_06
End
Locomotor = SET_NORMAL None
Behavior = PhysicsBehavior ModuleTag_07
Mass = 75.0
AerodynamicFriction = 1 ; this is now friction-per-sec
ForwardFriction = 33 ; this is now friction-per-sec
CenterOfMassOffset = 2 ; Default of 0 means nothing tips as it falls. Positive tips forward, negative tips back
End
Behavior = HeightDieUpdate ModuleTag_08
TargetHeight = 50.0
TargetHeightIncludesStructures = Yes
End
Behavior = SpecialPowerCompletionDie ModuleTag_09
SpecialPowerTemplate = SuperweaponUKClusterBomb
End
Geometry = Sphere
GeometryIsSmall = Yes
GeometryMajorRadius = 12.0
End
Please help :S
|
|
|
06-09-2003, 09:04 AM
|
#2 (permalink)
|
|
Senior Member
Join Date: Feb 2003
Location: UK
Posts: 164
|
bump!
|
|
|
06-09-2003, 02:03 PM
|
#3 (permalink)
|
|
Senior Member
Join Date: Feb 2003
Location: UK
Posts: 164
|
Come on someone must know?
|
|
|
06-09-2003, 02:28 PM
|
#4 (permalink)
|
|
Administrator
Join Date: Dec 2002
Posts: 1,913
|
Let me get this right - what you want is to get a plane to drop a big bomb that 'fragments' into 4 smaller bombs in mid-air?
Ill have to look at your code in more detail but your stack and register dumps are pointing to ObjectCreationList.INI and FactionUnit.INI, everything else is fine.
What I think is the problem is the fact that youre using the GenericTankShell object for your smaller bombs - this object has the DumbProjectileBehavor module which renders it inappropriate for the use you have there - the mathematics involved would cause your crash.
Try making a new object that uses a HeightDie module and a FireWeaponWhenDead behavior instead.
__________________
|
|
|
06-09-2003, 02:40 PM
|
#5 (permalink)
|
|
Senior Member
Join Date: Dec 2002
Posts: 1,031
|
Ok, so if I understand correctly, you would have to use a NukeShell from the Nukecannon, and edit its settings for right damage effects, correct?
|
|
|
06-09-2003, 04:10 PM
|
#6 (permalink)
|
|
Administrator
Join Date: Dec 2002
Posts: 1,913
|
Yup, something like that, without toying with it myself I couldnt say for sure but Phoibs idea sounds good 
__________________
|
|
|
06-09-2003, 04:34 PM
|
#7 (permalink)
|
|
Senior Member
Join Date: Jan 2003
Location: uk
Posts: 186
|
Quote:
|
Originally Posted by DeeZire
your stack and register dumps are pointing to ObjectCreationList.INI and FactionUnit.INI, everything else is fine.
|
Could you share how you could tell that from the error log?
|
|
|
06-09-2003, 06:11 PM
|
#8 (permalink)
|
|
Senior Member
Join Date: Apr 2003
Location: Canada
Posts: 968
|
Thanks a lot a lot guys. I had narrowed it down to the GenericTankShell by commenting out bits of code, but I had know idea why. Thanks DZ.
|
|
|
06-09-2003, 06:29 PM
|
#9 (permalink)
|
|
Senior Member
Join Date: Apr 2003
Location: Canada
Posts: 968
|
Quote:
|
Originally Posted by Phoib
Ok, so if I understand correctly, you would have to use a NukeShell from the Nukecannon, and edit its settings for right damage effects, correct?
|
I tried using the exact NukeCanonShell for the smaller boms and it crashed as well. It uses the DumbProjectile behavior. Heres the crash log (probably the same :P ):
Release Crash at Mon Jun 09 20:52:44 2003
; Reason Uncaught Exception in GameEngine::update
Last error:
Exception is access violation
WinMain at 4017e0
Error code: EXCEPTION_ACCESS_VIOLATION
Description: The thread tried to read from or write to a virtual address for which it does not have the appropriate access.
Access address:0000004C was read from.
Stack Dump:
<Unknown>(-1) : <Unknown> 0x004AEAE0
<Unknown>(-1) : <Unknown> 0x04C84664
<Unknown>(-1) : <Unknown> 0x00521280
Details:
Register dump...
Eip:004AEAE0 Esp:0012A5AC Ebp:1715ED14
Eax:00000000 Ebx:00000000 Ecx:00000000
Edx:00000000 Esi:01661358 Edi:1715EB00
EFlags:00010246
CS:001b SS:0023 DS:0023 ES:0023 FS:003b GS:0000
EIP bytes dump...
Bytes at CS:EIP (004AEAE0) : 8B 41 4C 83 F8 06 74 05 83 F8 16 75 0F 8B 87 80 00 00 00 F6 C4 08 0F 85 21 01 00 00 6A 20 8B CF
Current stack:
|
|
|
06-09-2003, 09:11 PM
|
#10 (permalink)
|
|
Senior Member
Join Date: Apr 2003
Location: Canada
Posts: 968
|
I got it to work using your tips Deezire. Thanks 
I used:
Behavior = PhysicsBehavior ModuleTag_04
Mass = 30.0
AerodynamicFriction = 1 ; this is now friction-per-sec
ForwardFriction = 20 ; this is now friction-per-sec
CenterOfMassOffset = 1 ; Default of 0 means nothing tips as it falls. Positive tips forward, negative tips back
End
[EDIT]Never mind. I just made the mass=5 and gave it a disposition intensity of 2 in the OCL.INI[/EDIT]
Behavior = FireWeaponWhenDeadBehavior ModuleTag_05
DeathWeapon = BombTruckDefaultBombDamage
StartsActive = Yes
End
Behavior = HeightDieUpdate ModuleTag_06
TargetHeight = 1.0
TargetHeightIncludesStructures = No
End
If I made TargetHeightIncludesStructures does that mean it will collide with structures? Also do you think those are good physics for a tumbling bomb?
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -4. The time now is 05:30 AM.
|