Jump to content


Photo

Castle Gate Door make the game crash


Best Answer amit5530, 09 September 2020 - 09:21 PM

At first glance I can't spot anything. I assume this started as a copy of the Rohan gate. Did you make any changes to it, except for changing the names?

This is always a good article to check in these cases: https://www.the3rdage.net/item-45

 

Apparently, The gate object was outside the castle area limits, so the game throws  an access violation exception

 

I wonder how I can tell what is the limit of a castle size..

Go to the full post


  • Please log in to reply
2 replies to this topic

#1 amit5530

amit5530
  • Members
  • 114 posts
  • Location:Israel

Posted 09 September 2020 - 12:51 PM

Hi, I have the following Object

;------------------------------------------------------------------------------------------
Object EBCastleDoor

SelectPortrait = BPRohanCastleGate

  ; *** ART Parameters ***

  Draw = W3DScriptedModelDraw ModuleTag_Draw
    OkToChangeModelColor  = Yes
    UseStandardModelNames = Yes

    DefaultModelConditionState  
      Model = EBCastGate
    End

	ModelConditionState   = ACTIVELY_BEING_CONSTRUCTED 
		Model             = EBCastGate
		ParticleSysBone   = DUSTBONE BuildingContructDust
	End
	AnimationState        = ACTIVELY_BEING_CONSTRUCTED 
		StateName				= STATE_None
			Animation           = RBCASTDOOR_A
				AnimationName   = RBCASTDOOR_A.RBCASTDOOR_A
				AnimationMode   = MANUAL
			End
		Flags					= START_FRAME_FIRST
    End


	ModelConditionState  = RUBBLE DOOR_1_OPENING
		Model         = None  
	End
    AnimationState = RUBBLE DOOR_1_OPENING
    End
    
	AnimationState = DOOR_1_OPENING
		StateName = STATE_Open   
		Animation = Open 
			AnimationName	=	EBCastGate.EBCastGate
			AnimationMode	=	ONCE 
			AnimationBlendTime = 0
		End
		Flags = START_FRAME_LAST
		BeginScript
			Prev = CurDrawablePrevAnimationState()
			if Prev == "STATE_Closed" then CurDrawableSetTransitionAnimState("TRANS_Closed_To_Open") end
		EndScript
    End
    TransitionState = TRANS_Closed_To_Open
		Animation = Open 
			AnimationName	=	EBCastGate.EBCastGate
			AnimationMode	=	ONCE 
		End
    End
        
	AnimationState = DOOR_1_CLOSING 
		StateName = STATE_Closed 
		Animation = Close 
			AnimationName	=	EBCastGate.EBCastGate
			AnimationMode	=	ONCE_BACKWARDS 
			AnimationBlendTime = 0
		End
		Flags = START_FRAME_FIRST
		BeginScript
			
			Prev = CurDrawablePrevAnimationState()
			if Prev == "STATE_Open" then CurDrawableSetTransitionAnimState("TRANS_Open_To_Closed") end
		EndScript
    End
    TransitionState = TRANS_Open_To_Closed
		Animation = Open 
			AnimationName	=	EBCastGate.EBCastGate
			AnimationMode	=	ONCE_BACKWARDS 
		End
		Flags = START_FRAME_LAST
    End

  End

  ; *** AUDIO Parameters ***

	VoiceSelect		= GateSelect

	SoundOnDamaged		= BuildingLightDamageStone
	SoundOnReallyDamaged	= BuildingHeavyDamageStone


  ; ***DESIGN parameters ***

  DisplayName      = OBJECT:RohanCastleDoor
  Side = Elves
  EditorSorting   = STRUCTURE
  ThreatLevel = 1.0
	BuildTime           = 180.0           ; in seconds
        BuildCost           = 1000

  VisionRange         = 400.0          ; Shroud clearing distance

  ArmorSet
    Conditions        = None
    Armor             = CastleGateArmor
    DamageFX          = GateDamageFX
  End

	CommandSet = CastleGateCommandSet


	; *** ENGINEERING Parameters ***  
	KindOf					= STRUCTURE IMMOBILE SELECTABLE BLOCKING_GATE MADE_OF_STONE
	RadarPriority			= NOT_ON_RADAR
	KeepSelectableWhenDead	= Yes


	Body                  = ActiveBody ModuleTag_02
		MaxHealth       = 3000.0
	End

  ; Note that structures with "RUBBLE" states should not use DestroyDie; such buildings are 
  ; never truly destroyed, even when reduced to zero health. Also note that garrisonable
  ; buildings automatically stick around because GarrisonContain has it's own DieModule
  Behavior = KeepObjectDie ModuleTag_IWantRubble
  End

	ClientBehavior = AnimationSoundClientBehavior ModuleTag_AnimAudioBehavior
		MaxUpdateRangeCap = 800
		AnimationSound = Sound: MinisTirithGateDie Animation:GBMgatedoorSKL.GBMgatedoorA3 Frames: 1 
	End

	Behavior = GettingBuiltBehavior ModuleTag_GettingBuilt
	    SelfBuildingLoop = BuildingConstructionLoop ; Only played if we DON'T spawn a worker
		SelfRepairFromDamageLoop  = NoSound         ; This doesn't cause an animation, so don't bother playing a sound
		SelfRepairFromRubbleLoop  = BuildingConstructionLoop
		SpawnTimer = -1.0 ; Negative means no 'autoheal'
		RebuildTimeSeconds = 120 ;30
	End

	Behavior = TransitionDamageFX ModleTag_hideBustedDoors
		PristineShowSubObject		RBCASTDRR RBCASTDRL
		PristineHideSubObject		RBCASTDRR_D1 RBCASTDRR_D2 RBCASTDRL_D1 RBCASTDRL_D2
		DamagedShowSubObject		RBCASTDRR_D1 RBCASTDRL_D1
		DamagedHideSubObject		RBCASTDRR_D2 RBCASTDRL_D2 RBCASTDRR RBCASTDRL
		ReallyDamagedShowSubObject	RBCASTDRR_D2 RBCASTDRL_D2
		ReallyDamagedHideSubObject  RBCASTDRR_D1  RBCASTDRL_D1 RBCASTDRR RBCASTDRL
        DamagedFXList1 = Loc: X:0 Y:0 Z:0			FXList:FX_BasicSevereScreenShake
 	    ReallyDamagedFXList1 = Loc: X:0 Y:0 Z:0		FXList:FX_BasicSevereScreenShake
 	    RubbleFXList1 = Loc: X:0 Y:0 Z:0			FXList:FX_HelmsDeepGateRubble
	End

	Behavior = GateOpenAndCloseBehavior ModuleTag_GATE
		ResetTimeInMilliseconds = 10500 ;important! this must be longer than the gates animation, ir it will twitch
		OpenByDefault = Yes
		PercentOpenForPathing = 50
		SoundOpeningGateLoop = GateOpenStart
		SoundClosingGateLoop = GateCloseStart
		SoundFinishedOpeningGate = GateOpenEnd
		SoundFinishedClosingGate = GateCloseEnd
		TimeBeforePlayingOpenSound = 9500
		TimeBeforePlayingClosedSound = 9500
	End

    Behavior = CastleMemberBehavior ModuleTag_CMB
		CountsForEvaCastleBreached = Yes
    End 

	Geometry              = BOX
	GeometryMajorRadius   = 58.4
	GeometryMinorRadius   = 7.2
	GeometryHeight        = 61.0
	GeometryOffset		  = X:0 Y:-27 Z:0	
	GeometryName          = Closed
	GeometryIsSmall       = No
	
	
	AdditionalGeometry    = BOX
	GeometryMajorRadius   = 3.0
	GeometryMinorRadius   = 25.0
	GeometryHeight        = 61.0	
	GeometryOffset		  = X:56 Y:-42 Z:0
	GeometryName          = OpenLeft
	
	AdditionalGeometry    = BOX
	GeometryMajorRadius   = 3.0
	GeometryMinorRadius   = 25.0
	GeometryHeight        = 61.0	
	GeometryOffset		  = X:-56 Y:-42 Z:0
	GeometryName          = OpenRight
	
	GeometryContactPoint = X:27 Y:-56 Z:0 Ram 
    GeometryContactPoint = X:14 Y:-56 Z:60
	GeometryContactPoint = X:0  Y:-56 Z:0
	GeometryContactPoint = X:0  Y:-25 Z:60
	GeometryContactPoint = X:3  Y:  0 Z:1 Ram 
	GeometryContactPoint = X:0  Y: 25 Z:60
	GeometryContactPoint = X:0  Y: 56 Z:0
	GeometryContactPoint = X:14 Y: 56 Z:60
	GeometryContactPoint = X:27 Y: 56 Z:0 Ram
	
	Shadow                = SHADOW_VOLUME
End

For some reason if I add this to my base, as soon as the skirmish finish loading the game crash with EXCEPTION ACCESS VIOLATION

 

anyone knows why?

 



#2 Echo

Echo

    T3A:Online

  • T3A Staff
  • 1,069 posts
  • Location:Germany
  • Projects:Lot3A
  •  ~~
  • Division:BFME
  • Job:T3A Moderator
  • Donated

Posted 09 September 2020 - 06:40 PM

At first glance I can't spot anything. I assume this started as a copy of the Rohan gate. Did you make any changes to it, except for changing the names?

This is always a good article to check in these cases: https://www.the3rdage.net/item-45


26285.png


#3 amit5530

amit5530
  • Members
  • 114 posts
  • Location:Israel

Posted 09 September 2020 - 09:21 PM   Best Answer

At first glance I can't spot anything. I assume this started as a copy of the Rohan gate. Did you make any changes to it, except for changing the names?

This is always a good article to check in these cases: https://www.the3rdage.net/item-45

 

Apparently, The gate object was outside the castle area limits, so the game throws  an access violation exception

 

I wonder how I can tell what is the limit of a castle size..






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users