Modderecke > Coding

Marci_99's Fragenthread

<< < (4/47) > >>

Turin Turumbar:

--- Zitat von: Marci_99 am 15. Apr 2014, 12:22 ---Ist es möglich das Originale Object aus der Datei zu löschen und in ne fortress.ini
zu packen?

PS: Oben genanntes Problem besteht weiterhin

--- Ende Zitat ---
Ist es, mach es aber besser nicht, ansonsten hast du eventuell noch falsche Zuweisungen. Ich  verstehe sowieso nicht, warum du nicht einfach ein neues Object mit den selben Daten machst. Ist am saubersten, du versaust dir deine Originaldaten, musst hier bedenken, dass das Objekt wahrscheinlich auch auf Maps genutzt wird, und du kannst problemlos ohne weiterreichende Konsequenzen daran weiterarbeiten.
Also: Neues Object mit selben Inhalt erstellen!

Marci_99:
Hab nochmal mit einem ChildObject von vorne begonnen, es klappt auch fast
lasse ich nur das Gebäude ohne den Unpack Code laufen klappt alles die Festung
ist anklickbar besitzt Leben und ich verlier nicht.
Der Funktionierende Code:

--- Code: ---//------------------------------------------------------------------------------
// This is the magic thing in the .bse file that tells how to center the base layout compared to the game position of the fortress
ChildObject NoldorFortress GBGHGenBudF

    // ***DESIGN parameters ***
    Side                    = Noldor

    ;// *** ENGINEERING Parameters *** 
    RadarPriority       = STRUCTURE
    KindOf              = STRUCTURE SELECTABLE IMMOBILE BASE_FOUNDATION MP_COUNT_FOR_VICTORY BASE_SITE CAN_SEE_THROUGH_STRUCTURE LIVING_WORLD_BUILDING_MIRROR

    //We can now take damage and die but only during construction.  The castle system will make us invulnerable when construction completes.
    Body                        = StructureBody ModuleTag_05
        MaxHealth                     = ELVEN_FORTRESS_HEALTH       
    End

End

--- Ende Code ---
Will ich das Unpacken Hinzufügen klappt es nicht nach meinen Beobachtungen
tauchen alle Sachen auch die Bauplätze für türme um die Festung sofort auf,
aber die Festung fehlt meistens taucht sie kurz nachdem man verloren hat
auf und man kann sie noch kurz im Verloren Bildschirm sehen.
Mein Code mit Unpack:

--- Code: ---//------------------------------------------------------------------------------
// This is the magic thing in the .bse file that tells how to center the base layout compared to the game position of the fortress
ChildObject NoldorFortress GBGHGenBudF

    // ***DESIGN parameters ***
    Side                    = Noldor

    ;// *** ENGINEERING Parameters *** 
    RadarPriority       = STRUCTURE
    KindOf              = STRUCTURE SELECTABLE IMMOBILE BASE_FOUNDATION MP_COUNT_FOR_VICTORY BASE_SITE CAN_SEE_THROUGH_STRUCTURE LIVING_WORLD_BUILDING_MIRROR

    //We can now take damage and die but only during construction.  The castle system will make us invulnerable when construction completes.
    Body                        = StructureBody ModuleTag_05
        MaxHealth                     = ELVEN_FORTRESS_HEALTH       
    End

    Behavior = CastleBehavior ModuleTag_castle
        CastleToUnpackForFaction    = Elves noldorfestung
        CastleToUnpackForFaction    = Dwarves noldorfestung
        CastleToUnpackForFaction    = Men noldorfestung
        CastleToUnpackForFaction    = Wild noldorfestung
        CastleToUnpackForFaction    = Isengard noldorfestung
        CastleToUnpackForFaction    = Mordor noldorfestung
        CastleToUnpackForFaction    = Imladris noldorfestung
        CastleToUnpackForFaction    = Noldor noldorfestung

        ;//Anything that does not fit this filter will be given to the neutral player, so the template can have rocks and props.
        FilterValidOwnedEntries        = ANY +STRUCTURE +WALK_ON_TOP_OF_WALL +BASE_FOUNDATION +TACTICAL_MARKER       

        MaxCastleRadius             = 130.0
        InstantUnpack                = Yes 

    End

End

--- Ende Code ---
Hier nochmal die ganze Mod falls es jemand testen will / reproduzieren will.

http://www.file-upload.net/download-8820660/____First_Age_Data.big.html

Vielen Dank für die bisherige Hilfe, ich finde es toll das ihr mir so gut Helft!
Mit Freundlichen Grüßen Marci_99 und das restliche First Age Team.

Turin Turumbar:
1. Das Object ist eine Festung, ein nicht unwesentlicher Teil des Volkes. Meinst du, dass es da sinvoll ist ein ChildObject zu nehmen? Eher nicht oder?
2. Mach das Objekt nocheinmal komplett neu. Kopier die ini einer der anderen Festungen und änder einfach das Modell. Die Chance, dass das funktioniert ist deutlich größer. Diesmal auch als eigenes Objekt, kein ChildObject.
3. Trotzdem hört sich der Fehler für mich nach nem Fehler an der .bse Datei an. Hast du alle Objekte richtig definiert? Wenn du das nicht weißt, öffne eine original .bse Datei und vergleiche!

Marci_99:
Ich finde in der .bse keinen fehler evtl. kannst du dir das ja mal anschauen
ist alles in der big die ich als Link reingestellt habe

Habe Außerdem festgestellt das bei den edain bse Dateien Wasser drum rum
ist hat das einen Grund?


Mit Freundlichen Grüßen Marci_99

Edit: Habe nun alles so gemacht wie du es sagtest meine Neue Datei:

--- Code: ---;//------------------------------------------------------------------------------
;// This is the magic thing in the .bse file that tells how to center the base layout compared to the game position of the fortress
Object NoldorFortressCenterGeneric

    SelectPortrait = BPEFortress
    
    Draw = W3DScriptedModelDraw ModuleTag_01

        DefaultModelConditionState
              Model = None
        End
        
        ModelConditionState = WORLD_BUILDER
            Model = NBasePin
        End
    End
    
    Side            = Noldor
    EditorSorting   = STRUCTURE
    KindOf          = IMMOBILE BASE_FOUNDATION CASTLE_CENTER
  
    Behavior = CastleBehavior ModuleTag_castle
        ;//Anything that does not fit this filter will be given to the neutral player, so the template can have rocks and props.    
        FilterValidOwnedEntries = ANY +STRUCTURE +WALK_ON_TOP_OF_WALL +BASE_FOUNDATION +TACTICAL_MARKER                
    End  
End



Object NoldorFortress

    SelectPortrait = BRLothgaladhon

    Draw    = W3DScriptedModelDraw ModuleTag_01        
        OkToChangeModelColor    = Yes
        StaticModelLODMode        = Yes // Will append M or L to the skin name depending on GameLOD
        
        DefaultModelConditionState
            Model           = None
        End

        ;dummy idle animation state for audio
        IdleAnimationState
            ;StateName    =    STATE_Idle
        End    

        ;//Need this since the default condition is none
        ModelConditionState = WORLD_BUILDER
            Model = GBGHGenBudF
        End

        ;//Phantom structure when placing a new building to be build
        ModelConditionState = BUILD_PLACEMENT_CURSOR
            Model    = None    //EBFortress
        End

        ;//Structure that stays where you will be building until the porter reaches the place to start building.
        ModelConditionState =  PHANTOM_STRUCTURE
            Model    = GBGHGenBudF
        End

        ModelConditionState = RUBBLE
            Model        = GBGHGenBudF
        End

        AnimationState    = RUBBLE
            Animation    = Fortress_Rubble
                AnimationName        = lbtreehouse2_d3.lbtreehouse2_d3
                AnimationMode        = ONCE                
            End            
            EnteringStateFX    = FX_FortressCollapse
        End
        
        ModelConditionState = ACTIVELY_BEING_CONSTRUCTED SNOW
            Model            = GBGHGenBudF
            ;Texture    = EBFortress.tga EBFortress_U_Snow.tga
        End
        ModelConditionState = ACTIVELY_BEING_CONSTRUCTED
            Model            = GBGHGenBudF
        End

        AnimationState = ACTIVELY_BEING_CONSTRUCTED
            Animation                    = UpAndStill
                AnimationName            = lbtreehouse2.lbtreehouse2
                AnimationMode            = MANUAL
            End
            ParticleSysBone = NONE BuildingContructDustCastles FollowBone:YES
            ParticleSysBone = NONE FortressElven FollowBone:YES
            StateName = BeingConstructed
            BeginScript
                CurDrawablePlaySound("GondorBarracksBeginConstruction")
            EndScript
        End
    End

      ArmorSet
        Conditions        = None
          Armor             = FortressArmor
          ;//DamageFX          = StructureDamageFXNoShake
      End

    Side                = Noldor
    EditorSorting       = STRUCTURE

    PlacementViewAngle = -270 ;// A -90 makes the door of the base face natural south.  0 would have it to the East.
    
    BuildCost           = ELVEN_FORTRESS_BUILDCOST
    BuildTime           = ELVEN_FORTRESS_BUILDTIME  //0

    DisplayName         = OBJECT:ElvenFortress

    ; *** AUDIO Parameters ***
    #include "..\..\..\Includes\StandardBuildingEvaEvents.inc"

    VoiceFullyCreated                = EVA:FortressComplete-Builder-Elf
    VoiceSelect                        = ElfFortressSelect
    VoiceSelectUnderConstruction    = BuildingGoodVoiceSelectUnderConstruction

    SoundOnDamaged                    = BuildingLightDamageStone
    SoundOnReallyDamaged            = BuildingHeavyDamageStone

    UnitSpecificSounds
        UnderConstruction            = BuildingBigConstructionLoop  ; Built first time
        ; UnderRepairFromDamage        = NoSound                    ; Repaired No animation on the building, so don't bother playing sound
        UnderRepairFromRubble        = BuildingBigConstructionLoop    ; Repaired from completely destroyed (not used???)
    End

    ClientBehavior = ModelConditionAudioLoopClientBehavior ModuleTag_PlayCollapseSound
        ModelCondition = REQUIRED:RUBBLE Sound:BuildingSink
    End

    // *** AUTO RESOLVE DATA ***
    ; When fighting an auto-resolve battle, a World Map castle actually becomes this unit
    AutoResolveUnitType = AutoResolveUnit_Fortress
    
        AutoResolveBody = AutoResolve_ElvenFortressBody
    
        AutoResolveArmor
            Armor = AutoResolve_ElvenFortressArmor
        End

        AutoResolveWeapon
            Weapon = AutoResolve_ElvenFortressWeapon
        End


    ;// *** ENGINEERING Parameters ***  
    RadarPriority       = STRUCTURE
    KindOf              = STRUCTURE SELECTABLE IMMOBILE BASE_FOUNDATION MP_COUNT_FOR_VICTORY BASE_SITE CAN_SEE_THROUGH_STRUCTURE LIVING_WORLD_BUILDING_MIRROR
    
    //We can now take damage and die but only during construction.  The castle system will make us invulnerable when construction completes.
    Body                        = StructureBody ModuleTag_05
        MaxHealth                     = ELVEN_FORTRESS_HEALTH        
    End

    Behavior = CastleBehavior ModuleTag_castle
        CastleToUnpackForFaction    = Noldor noldorfestung
        CastleToUnpackForFaction    = Elves noldorfestung
        CastleToUnpackForFaction    = Dwarves noldorfestung
        CastleToUnpackForFaction    = Men noldorfestung
        CastleToUnpackForFaction    = Wild noldorfestung
        CastleToUnpackForFaction    = Isengard noldorfestung
        CastleToUnpackForFaction    = Mordor noldorfestung
        CastleToUnpackForFaction    = Imladris noldorfestung
        ;//Anything that does not fit this filter will be given to the neutral player, so the template can have rocks and props.
        FilterValidOwnedEntries        = ANY +STRUCTURE +WALK_ON_TOP_OF_WALL +BASE_FOUNDATION +TACTICAL_MARKER        

        MaxCastleRadius             = 130.0
        InstantUnpack                = Yes        
        KeepDeathKillsEverything    = Yes

        EvaEnemyCastleSightedEvent = EnemyFortressSighted        
    End

    Behavior                  = StructureCollapseUpdate ModuleTag_06
        MinCollapseDelay        = 000
        MaxCollapseDelay        = 000
        CollapseDamping         = .5
        MaxShudder              = 0.6
        MinBurstDelay           = 250
        MaxBurstDelay           = 800
        BigBurstFrequency       = 4
        FXList                  = INITIAL   FX_FortressCollapse
        ;FXList                  = ALMOST_FINAL  FX_FortressCollapse
        DestroyObjectWhenDone    = Yes
        CollapseHeight            = 120
    End

    Behavior            = GettingBuiltBehavior ModuleTag_GettingBuiltBehavior
        WorkerName    = ElvenWorkerNoSelect
        SpawnTimer    = DEFAULT_STRUCTURE_HEALDELAY
    End

    Behavior = AIUpdateInterface ModuleTag_AI
        AILuaEventsList        =    FortressFunctions
    End
    
    Geometry                = BOX
    GeometryMajorRadius        = 50.0    
    GeometryMinorRadius        = 20.0    
    GeometryHeight            = 180.0
    GeometryOffset            = X:0 Y:0 Z:0

    AdditionalGeometry        = BOX
    GeometryMajorRadius        = 20.0    
    GeometryMinorRadius        = 54.0    
    GeometryHeight            = 180.0
    GeometryOffset            = X:0 Y:0 Z:0
    
    GeometryIsSmall            = No
        
    Shadow                    = SHADOW_VOLUME

End



--- Ende Code ---

Habe auch im World Builder die Gebäude Priorität hochgestellt von 40 auf 60
Ich sehe das Gebäude nun verliere aber trotzdem das Spiel

http://www.file-upload.net/download-8821584/____First_Age_Data.big.html



Azaril:
Heißt das "Hauptgebäude" deiner Base zufällig NoldorFortress?
Dann funktioniert es nicht, weil NoldorFortress dem Code nach, den du gepostet hast, eine bse entpackt und somit sich selbst. Die eigentliche Festung besitzt kein CastleBehavior, diesen hat nur die "Entpackungsfestung".
Daher gibt es z.B. bei den Nebelbergen WildFortress(als Startgebäude und vom Baumeister baubar, dient nur zum Entpacken der Base) und WildFortressCitadel(die Festung, welche sich in der bse befindet).

Navigation

[0] Themen-Index

[#] Nächste Seite

[*] Vorherige Sete

Zur normalen Ansicht wechseln