Jump to content


Photo

Tiberium spike resource generation code


  • Please log in to reply
12 replies to this topic

#1 Boomerang Python

Boomerang Python

    Only War Mod Leader

  • Hosted
  • 2,370 posts
  • Location:Umeå, Sweden
  • Projects:Only War, Only War 2
  •  Colonel-Commissar

Posted 05 August 2009 - 12:21 PM

Yeah it's me again, with another problem.. :p

Uh so, I'm trying to add the tiberium spike's money generating behaviour to one of our factions structures

However when I grab this code:

CODE
<AutoDepositUpdate
InitialCaptureBonus="750"
DepositInterval="1s"
DepositAmount="25"
GiveNoXP="true"
Flags="ACTIVE_WHEN_REPAIRING"/>


It causes me some major critical error, maybe it has something to do with that particular flag, I dunno? I also tried taking that code and this at the same time but it still caused me a critical error:

CODE
KindOf="STRUCTURE SELECTABLE IMMOBILE CAN_CAST_REFLECTIONS FS_TECHNOLOGY NOT_AUTOACQUIRABLE IGNORE_FOR_VICTORY NOT_SELLABLE NEUTRAL_TECH TIBERIUM_BASED"



And I cant understand why really, I mean I can't spot any other pieces of code in there that I might need to steal aswell..

Any ideas?

Edited by Boomerang Python, 05 August 2009 - 12:22 PM.

My DeviantArt - Check it out.
Posted Image
My Wii code: 6472 3114 4930 8707

"Om du kan stå, när alla andra sviktar
och sen klandras du för att just du står rak
Om du kan tro på ditt när andra riktar
sitt välbekanta tvivel mot din sak

Om var minut av nitti sen kan fyllas
med verk av dig som giltigt räknats ner
min vän, som jordens konung ska du hyllas
men du är också man, och det är mer."

#2 Boomerang Python

Boomerang Python

    Only War Mod Leader

  • Hosted
  • 2,370 posts
  • Location:Umeå, Sweden
  • Projects:Only War, Only War 2
  •  Colonel-Commissar

Posted 08 August 2009 - 12:45 PM

Still haven't figured this one out, however i managed to find some topic that touched on this subject so i added an id tag to the thing aswell but that still didnt make it work, still causes a critical error when i try to launch.

In the modbuilder it says:

"Critical: Bad XML: unexpected AutoDepositUpdate in GameObject"

here's all the code for the structures, see if you(whoever) can spot any oddities/things ive forgotten? Cheers.



Nevermind, kind of fixed it.. However, it still doesn't generate any money, but the game launches and i can build the structure properly, it just wont start generating the moolah!

See if you spot anything, cheers.

CODE
<?xml version="1.0" encoding="utf-8"?>
<AssetDeclaration xmlns="uri:ea.com:eala:asset" xmlns:xi="http://www.w3.org/20...2001/XInclude">
<Tags></Tags>
<Includes>
<Include
type="all"
source="ART:IBShrine.w3x" />
<!-- Base Object -->
<Include
type="instance"
source="DATA:BaseObjects/BaseStructure.xml" />
</Includes>
<GameObject
id="ImperialGuardShrine"
inheritFrom="BaseStructure"
Side="ImperialGuard"
EditorSorting="STRUCTURE"
BuildCost="500"
BuildTime="5"
SelectPortrait="Portrait_MissingCameo"
ButtonImage="Portrait_MissingCameo"
EnergyProduction="0"
CommandSet="ImperialGuardShrineCommandSet"
KindOf="STRUCTURE SELECTABLE IMMOBILE CAN_CAST_REFLECTIONS FS_TECHNOLOGY NEED_BASE_FOUNDATION"
RadarPriority="STRUCTURE"
PlacementViewAngle="225d"
BuildCompletion="PLACED_BY_PLAYER"
ProductionQueueType="MAIN_STRUCTURE"
BuildPlacementTypeFlag="MAIN_STRUCTURE"
EditorName="ImperialGuardShrine"
Description="Desc:ImperialGuardShrine"
TypeDescription="Type:ImperialGuardShrine">
<DisplayName
xai:joinAction="Replace" xmlns:xai="uri:ea.com:eala:asset:instance">Name:ImperialGuardShrine</DisplayName>
<ArmorSet
Armor="GDIBarracksArmor"
DamageFX="FactionStructureDamageFX" />

<GameDependency>
<RequiredObject>ImperialGuardMunitorum</RequiredObject>
</GameDependency>

<SkirmishAIInformation
BaseBuildingLocation="FRONT" />
<Draws>
<scriptedModelDraw
id="ModuleTag_Draw"
OkToChangeModelColor="true"
UseStandardModelNames="true"
StaticModelLODMode="true">
<ModelConditionState
ParseCondStateType="PARSE_DEFAULT">
<Model
Name="IBShrine" />
</ModelConditionState>
<!-- BUILD UP -->
<ModelConditionState
ParseCondStateType="PARSE_NORMAL"
ConditionsYes="STRUCTURE_UNPACKING">
<Model
Name="IBShrine" />
</ModelConditionState>
<ModelConditionState
ParseCondStateType="PARSE_NORMAL"
ConditionsYes="RUBBLE">
<Model
Name="IBShrine" />
</ModelConditionState>
<ModelConditionState
ParseCondStateType="PARSE_NORMAL"
ConditionsYes="REALLYDAMAGED">
<Model
Name="IBShrine" />
</ModelConditionState>
<ModelConditionState
ParseCondStateType="PARSE_NORMAL"
ConditionsYes="DAMAGED">
<Model
Name="IBShrine" />
<Texture
Original=""
New="" />
</ModelConditionState>
<AnimationState
ParseCondStateType="PARSE_DEFAULT">
<Animation
AnimationName="IBShrine"
AnimationMode="LOOP" />
</AnimationState>



<AnimationState
ParseCondStateType="PARSE_NORMAL"
ConditionsYes="RUBBLE"
StateName="STATE_Rubble"
Flags="START_FRAME_LAST">
<Animation
AnimationName="IBShrine"
AnimationMode="MANUAL" />
<script>
Prev = CurDrawablePrevAnimationState();
if Prev ~= "STATE_Rubble" and Prev ~= "TRANS_IntoRubble" then
CurDrawableSetTransitionAnimState("TRANS_IntoRubble")
end
</Script>
<ParticleSysBone
BoneName="NONE"
FXParticleSystemTemplate="Des_Medium"
FollowBone="false" />
</AnimationState>
<AnimationState
ParseCondStateType="PARSE_NORMAL"
ConditionsYes="REALLYDAMAGED"
StateName="STATE_ReallyDamaged"
Flags="START_FRAME_LAST">
<Animation
AnimationName="IBShrine"
AnimationMode="MANUAL" />
<script>
Prev = CurDrawablePrevAnimationState();
if Prev ~= "STATE_ReallyDamaged" and Prev ~= "TRANS_IntoReallyDamaged" then
CurDrawableSetTransitionAnimState("TRANS_IntoReallyDamaged")
end
</Script>
</AnimationState>
<AnimationState
ParseCondStateType="PARSE_TRANSITION"
StateName="TRANS_IntoReallyDamaged">
<Animation
AnimationName="IBShrine"
AnimationMode="ONCE"
AnimationBlendTime="0" />
</AnimationState>
<AnimationState
ParseCondStateType="PARSE_TRANSITION"
StateName="TRANS_IntoRubble">
<Animation
AnimationName="IBShrine"
AnimationMode="ONCE"
AnimationBlendTime="0" />
</AnimationState>
</ScriptedModelDraw>

</Draws>
<Behaviors>
<BuildingBehavior
id="ModuleTag_BuildingBehavior"
NightWindowObject="LIGHT_01" />


<AutoDepositUpdate
id="AutoDepositUpdate"
InitialCaptureBonus="0"
DepositInterval="4s"
DepositAmount="15"
GiveNoXP="true"
Flags="ACTIVE_WHEN_REPAIRING"/>





<SlowDeath
id="ModuleTag_Death"
SinkDelay="3.0s"
SinkRate="4.0"
DestructionDelay="8.0s">
<Sound Type="INITIAL" List="HumanFaction_MediumBuilding_DieMS" />
<DieMuxData
DeathTypes="ALL" />
</SlowDeath>
<FXListBehavior
id="ModuleTag_FXList">
<DieMuxData
DeathTypes="ALL" />
<Event
Index="onTransitionToDamaged"
FX="FX_BuildDamaged_Medium" />
<Event
Index="onTransitionToReallyDamaged"
FX="FX_BuildDamaged_Medium" />
<Event
Index="onTransitionToRubble"
FX="FX_BuildRubble_Medium" />
</FXListBehavior>
<StructureUnpackUpdate
UnpackTime="1.5s" />
<xi:include
href="DATA:Includes/GenericBuildingRepair.xml" />
<xi:include
href="DATA:Includes/GenericEngineerContain.xml" />
<xi:include
href="DATA:Includes/GenericGDIBuildingDestruction.xml" />
<xi:include
href="DATA:Includes/GenericGDIBuildingSuicide.xml" />
<StancesBehavior
id="ModuleTag_Stance"
StanceTemplate="Generic" />
</Behaviors>





<AI>
<AIUpdate
id="ModuleTag_SoWeCanUseWeapon"
AutoAcquireEnemiesWhenIdle="NO" />
</AI>
<Body>
<ActiveBody
id="ModuleTag_05"
MaxHealth="3000" />
</Body>
<Geometry>
<Shape
Type= "BOX"
MajorRadius = "14.0229"
MinorRadius = "17.3374"
Height = "7.64887" >
<Offset
x = "-33.5405"
y = "24.9809"
z = "0.0" />
</Shape>
<Shape
Type= "BOX"
MajorRadius = "7.29192"
MinorRadius = "9.36221"
Height = "19.2751" >
<Offset
x = "-33.5405"
y = "24.9809"
z = "0.0" />
</Shape>
<Shape
Type= "BOX"
MajorRadius = "26.0409"
MinorRadius = "39.7707"
Height = "3.0" >
<Offset
x = "8.40857"
y = "4.57858"
z = "0.0" />
</Shape>
<Shape
Type= "BOX"
MajorRadius = "26.0409"
MinorRadius = "15.1129"
Height = "11.64" >
<Offset
x = "8.40857"
y = "24.9945"
z = "0.0" />
</Shape>
<Shape
Type= "BOX"
MajorRadius = "26.0409"
MinorRadius = "10.8813"
Height = "17.9256" >
<Offset
x = "8.40857"
y = "24.9945"
z = "0.0" />
</Shape>
<Shape
Type= "BOX"
MajorRadius = "26.0409"
MinorRadius = "15.1129"
Height = "11.64" >
<Offset
x = "8.40856"
y = "-16.6119"
z = "-1.81867e-006" />
</Shape>
<Shape
Type= "BOX"
MajorRadius = "26.0409"
MinorRadius = "10.8813"
Height = "17.9256" >
<Offset
x = "8.40856"
y = "-16.6119"
z = "-1.81867e-006" />
</Shape>
<Shape
Type= "BOX"
MajorRadius = "32.2907"
MinorRadius = "5.87588"
Height = "3.58512" >
<Offset
x = "4.31382"
y = "-36.3315"
z = "23.3332" />
</Shape>
<Shape
Type= "BOX"
MajorRadius = "1.56245"
MinorRadius = "4.78775"
Height = "25.0958" >
<Offset
x = "33.6345"
y = "-36.3315"
z = "-2.68064e-006" />
</Shape>
<Shape
Type= "BOX"
MajorRadius = "1.56245"
MinorRadius = "4.78775"
Height = "25.0958" >
<Offset
x = "-24.3959"
y = "-36.3315"
z = "-2.68064e-006" />
</Shape>
<ContactPoint>
<Pos x= "-14.7758" y = "-24.9922" z = "0.0" />
</ContactPoint>
<ContactPoint>
<Pos x= "29.2522" y = "-24.9922" z = "17.6454" />
</ContactPoint>
<ContactPoint>
<Pos x= "29.2522" y = "39.9894" z = "0.0" />
</ContactPoint>
<ContactPoint>
<Pos x= "-14.7758" y = "39.9894" z = "17.6454" />
</ContactPoint>
<ContactPoint>
<Pos x= "-14.7758" y = "-24.9922" z = "17.6454" />
</ContactPoint>
<ContactPoint>
<Pos x= "29.2522" y = "-24.9922" z = "0.0" />
</ContactPoint>
<ContactPoint>
<Pos x= "29.2522" y = "39.9894" z = "17.6454" />
</ContactPoint>
<ContactPoint>
<Pos x= "-14.7758" y = "39.9894" z = "0.0" />
</ContactPoint>
</Geometry>
<AudioArrayVoice>
<AudioEntry
Sound="AudioEvent:GDI_BarracksSelect"
AudioType="voiceSelect" />
</AudioArrayVoice>
<AudioArraySound>
<AudioEntry Sound="HumanFaction_MediumBuilding_LightDamageMS" AudioType="soundOnDamaged" />
<AudioEntry Sound="HumanFaction_MediumBuilding_HeavyDamageMS" AudioType="soundOnReallyDamaged" />
</AudioArraySound>
<ShadowInfo
Type="VOLUME" />
<VisionInfo
VisionRange="160"
ShroudClearingRange="400" />
<ProjectedBuildabilityInfo
Radius="10.0"
BuildPlacementTypes="MAIN_STRUCTURE OTHER_STRUCTURE" />
</GameObject>
</AssetDeclaration>

Edited by Boomerang Python, 08 August 2009 - 01:13 PM.


#3 GodSun666

GodSun666

    Marching Trough The Eternal Fields Of Chaos!

  • Banned
  • 1,439 posts
  • Location:The Netherland @ Nod HQ!
  • Projects:Fast Fun And Crazy for Red Alert 3

Posted 08 August 2009 - 04:35 PM

Flags="ACTIVE_WHEN_REPAIRING"/> ..... maybe change this to something is else or is this directly copied?
для матери Россия! Советский Союз победит! Америка может облизывать мои яйца
Posted Image
Posted Image

#4 OmegaBolt

OmegaBolt

    Lost In The New Real

  • Hosted
  • 6,273 posts
  • Location:London, England
  • Projects:Red-Resurrection
  •  O'Bolt

Posted 08 August 2009 - 05:25 PM

Maybe it's InitialCaptureBonus, try deleting it. Now I dont mod C&C3 but seems logical. :p

Edited by OmegaBolt, 08 August 2009 - 05:25 PM.

Posted Image

Posted ImagePosted ImagePosted ImagePosted Image


#5 Boomerang Python

Boomerang Python

    Only War Mod Leader

  • Hosted
  • 2,370 posts
  • Location:Umeå, Sweden
  • Projects:Only War, Only War 2
  •  Colonel-Commissar

Posted 10 August 2009 - 02:41 PM

@Godsun666: Yeah I was thinking it might have something to do with that but that's how it was in the Tiberium Spike code so..
EDIT: I checked the schema and it said the possible flags were either "NONE" or "ACTIVE_WHEN_REPAIRING" i tried the other one but there was no change..

@OmegaBolt: That's what I thought too but alas it didn't do anything :good:

Edited by Boomerang Python, 10 August 2009 - 03:27 PM.

My DeviantArt - Check it out.
Posted Image
My Wii code: 6472 3114 4930 8707

"Om du kan stå, när alla andra sviktar
och sen klandras du för att just du står rak
Om du kan tro på ditt när andra riktar
sitt välbekanta tvivel mot din sak

Om var minut av nitti sen kan fyllas
med verk av dig som giltigt räknats ner
min vän, som jordens konung ska du hyllas
men du är också man, och det är mer."

#6 GodSun666

GodSun666

    Marching Trough The Eternal Fields Of Chaos!

  • Banned
  • 1,439 posts
  • Location:The Netherland @ Nod HQ!
  • Projects:Fast Fun And Crazy for Red Alert 3

Posted 11 August 2009 - 08:20 AM

Could you post all the code from the tiberium spike? I don't have C&C3 installed and i would love to help.
для матери Россия! Советский Союз победит! Америка может облизывать мои яйца
Posted Image
Posted Image

#7 Boomerang Python

Boomerang Python

    Only War Mod Leader

  • Hosted
  • 2,370 posts
  • Location:Umeå, Sweden
  • Projects:Only War, Only War 2
  •  Colonel-Commissar

Posted 13 August 2009 - 10:09 AM

Uh sure, here goes:

CODE
<?xml version="1.0" encoding="utf-8"?>
<AssetDeclaration xmlns="uri:ea.com:eala:asset" xmlns:xsi="http://www.w3.org/20...chema-instance" xmlns:xi="http://www.w3.org/20...2001/XInclude">
<Tags></Tags>
<Includes>
<Include
type="all"
source="ART:TBTibSpk_AN.w3x" />
<Include
type="all"
source="ART:TBTibSpk_SK.w3x" />
<Include
type="all"
source="ART:TBTibSpk_SN.w3x" />
<Include
type="all"
source="ART:TBTibSpk_D1.w3x" />
<Include
type="all"
source="ART:TBTibSpk_D2.w3x" />
<Include
type="all"
source="ART:TBTibSpk_D3.w3x" />
<Include
type="instance"
source="DATA:BaseObjects/BaseTechStructure.xml" />
</Includes>
<GameObject
id="TiberiumSpike"
inheritFrom="BaseTechStructure"
SelectPortrait="Portrait_NeutralTiberiumSpike"
ButtonImage="Portrait_NeutralTiberiumSpike"
Side="Neutral"
BuildTime="15"
EditorSorting="STRUCTURE"
CommandSet="TibSpikeCommandSet"
KindOf="STRUCTURE SELECTABLE IMMOBILE CAN_CAST_REFLECTIONS FS_TECHNOLOGY NOT_AUTOACQUIRABLE IGNORE_FOR_VICTORY NOT_SELLABLE NEUTRAL_TECH TIBERIUM_BASED"
RadarPriority="STRUCTURE"
EditorName="TiberiumSpike"
Description="Desc:TechBuildingTiberiumSpike">
<DisplayName
xai:joinAction="Replace" xmlns:xai="uri:ea.com:eala:asset:instance">Name:TechBuildingTiberiumSpike</DisplayName>
<ArmorSet
Armor="TechStructureArmor"
DamageFX="GenericStructureDamageFX" />
<Draws>
<scriptedModelDraw
id="ModuleTag_Draw"
OkToChangeModelColor="true">
<ModelConditionState
ParseCondStateType="PARSE_DEFAULT">
<Model
Name="TBTibSpk_SN" />
</ModelConditionState>
<ModelConditionState
ParseCondStateType="PARSE_NORMAL"
ConditionsYes="RUBBLE">
<Model
Name="TBTibSpk_D3" />
</ModelConditionState>
<ModelConditionState
ParseCondStateType="PARSE_NORMAL"
ConditionsYes="REALLYDAMAGED">
<Model
Name="TBTibSpk_D2" />
</ModelConditionState>
<ModelConditionState
ParseCondStateType="PARSE_NORMAL"
ConditionsYes="DAMAGED">
<Model
Name="TBTibSpk_D1" />
</ModelConditionState>
<AnimationState
ParseCondStateType="PARSE_DEFAULT"
Flags="RESTART_ANIM_WHEN_COMPLETE DO_NOT_PLAY_WHEN_UNPOWERED"
StateName="STATE_bored">
<Animation
AnimationName="TBTibSpk_AN"
AnimationMode="ONCE"
AnimationPriority="10" />
</AnimationState>
<AnimationState
ParseCondStateType="PARSE_NORMAL"
ConditionsYes="RUBBLE"
StateName="STATE_Rubble"
Flags="START_FRAME_LAST">
<Animation
AnimationName="TBTibSpk_D3"
AnimationMode="MANUAL" />
<script>
Prev = CurDrawablePrevAnimationState();
if Prev ~= "STATE_Rubble" and Prev ~= "TRANS_IntoRubble" then
CurDrawableSetTransitionAnimState("TRANS_IntoRubble")
end
</Script>
</AnimationState>
<AnimationState
ParseCondStateType="PARSE_NORMAL"
ConditionsYes="REALLYDAMAGED"
StateName="STATE_ReallyDamaged"
Flags="START_FRAME_LAST">
<Animation
AnimationName="TBTibSpk_D2"
AnimationMode="MANUAL" />
<script>
Prev = CurDrawablePrevAnimationState();
if Prev ~= "STATE_ReallyDamaged" and Prev ~= "TRANS_IntoReallyDamaged" then
CurDrawableSetTransitionAnimState("TRANS_IntoReallyDamaged")
end
</Script>
</AnimationState>
<AnimationState
ParseCondStateType="PARSE_TRANSITION"
StateName="TRANS_IntoReallyDamaged">
<Animation
AnimationName="TBTibSpk_D2"
AnimationMode="ONCE"
AnimationBlendTime="0" />
</AnimationState>
<AnimationState
ParseCondStateType="PARSE_TRANSITION"
StateName="TRANS_IntoRubble">
<Animation
AnimationName="TBTibSpk_D3"
AnimationMode="ONCE"
AnimationBlendTime="0" />
</AnimationState>
</ScriptedModelDraw>
</Draws>
<Behaviors>
<CreateObjectDie
id="ModuleTag_CreateObjectDie"
CreationList="TiberiumSpikeOCL">
<DieMuxData
DeathTypes="ALL"
DeathTypesForbidden="SUICIDED" />
</CreateObjectDie>
<AutoDepositUpdate
InitialCaptureBonus="750"
DepositInterval="1s"
DepositAmount="25"
GiveNoXP="true"
Flags="ACTIVE_WHEN_REPAIRING"/>
<SlowDeath
id="ModuleTag_Death"
SinkDelay="4s"
SinkRate="3.0"
DestructionDelay="8.0s">
<Sound Type="INITIAL" List="HumanFaction_MediumBuilding_DieMS" />
<DieMuxData
DeathTypes="ALL" />
</SlowDeath>
<xi:include
href="DATA:Includes/GenericEngineerContain.xml" />
<xi:include
href="DATA:Includes/GenericBuildingRepair.xml" />
</Behaviors>
<AI>
<AIUpdate
id="ModuleTag_AI"
AutoAcquireEnemiesWhenIdle="NO"
AILuaEventsList="BuildingPowerFunctions">
</AIUpdate>
</AI>
<Body>
<ActiveBody
id="ModuleTag_Body"
MaxHealth="10000.0" />
</Body>
<Geometry
IsSmall="false">
<Shape
Type="CYLINDER"
MajorRadius="10.3081"
MinorRadius="10.3081"
Height="124.951">
<Offset
x="-0.102257"
y="0.291839"
z="0.0" />
</Shape>
<Shape
Type="CYLINDER"
MajorRadius="25.7703"
MinorRadius="25.7703"
Height="20.2843">
<Offset
x="-0.102257"
y="0.29184"
z="0.0" />
</Shape>
<ContactPoint>
<Pos
x="-5.92092"
y="-6.06962"
z="0.0" />
</ContactPoint>
<ContactPoint>
<Pos
x="4.93066"
y="-6.06961"
z="119.205" />
</ContactPoint>
<ContactPoint>
<Pos
x="4.93066"
y="4.78196"
z="0.0" />
</ContactPoint>
<ContactPoint>
<Pos
x="-5.92092"
y="4.78197"
z="119.205" />
</ContactPoint>
<ContactPoint>
<Pos
x="-5.92092"
y="-6.06961"
z="119.205" />
</ContactPoint>
<ContactPoint>
<Pos
x="4.93066"
y="-6.06962"
z="0.0" />
</ContactPoint>
<ContactPoint>
<Pos
x="4.93066"
y="4.78197"
z="119.205" />
</ContactPoint>
<ContactPoint>
<Pos
x="-5.92092"
y="4.78196"
z="0.0" />
</ContactPoint>
</Geometry>
<AudioArrayVoice>
<AudioEntry
Sound="TiberiumSpike_Select"
AudioType="voiceSelect" />
</AudioArrayVoice>
<AudioArraySound>
<AudioEntry Sound="HumanFaction_MediumBuilding_LightDamageMS" AudioType="soundOnDamaged" />
<AudioEntry Sound="HumanFaction_MediumBuilding_HeavyDamageMS" AudioType="soundOnReallyDamaged" />
</AudioArraySound>
<ShadowInfo
Type="VOLUME" />
<VisionInfo
VisionRange="100"
ShroudClearingRange="200" />
<ProjectedBuildabilityInfo
Radius="0.0"
BuildPlacementTypes="MAIN_STRUCTURE OTHER_STRUCTURE" />
</GameObject>
</AssetDeclaration>


Still can't understand what the sod im missing...

Edited by Boomerang Python, 13 August 2009 - 10:09 AM.

My DeviantArt - Check it out.
Posted Image
My Wii code: 6472 3114 4930 8707

"Om du kan stå, när alla andra sviktar
och sen klandras du för att just du står rak
Om du kan tro på ditt när andra riktar
sitt välbekanta tvivel mot din sak

Om var minut av nitti sen kan fyllas
med verk av dig som giltigt räknats ner
min vän, som jordens konung ska du hyllas
men du är också man, och det är mer."

#8 Golan

Golan
  • Members
  • 120 posts
  •  Off-Duty

Posted 21 August 2009 - 06:21 AM

Give the module an ID, else it will crash when given to an object that already has an ID-less module. Most combat units lack an ID on their weaponset, structures usually miss the ID on their unpack module.

Posted Image


#9 Boomerang Python

Boomerang Python

    Only War Mod Leader

  • Hosted
  • 2,370 posts
  • Location:Umeå, Sweden
  • Projects:Only War, Only War 2
  •  Colonel-Commissar

Posted 17 December 2009 - 07:09 PM

Picking up where I left off 3 months ago.. I've tried adding an ID to the module, but it did absolutely nothing..

Now, if there's still any coding wizards lurking revora.. would you please have a looksie through this piece of garbage code for what I might be missing?

CODE
<?xml version="1.0" encoding="utf-8"?>
<AssetDeclaration xmlns="uri:ea.com:eala:asset" xmlns:xi="http://www.w3.org/20...2001/XInclude">
<Tags></Tags>
<Includes>
<Include
type="all"
source="ART:IBShrine.w3x" />
<!-- Base Object -->
<Include
type="instance"
source="DATA:BaseObjects/BaseStructure.xml" />
</Includes>
<GameObject
id="ImperialGuardShrine"
inheritFrom="BaseStructure"
Side="ImperialGuard"
EditorSorting="STRUCTURE"
BuildCost="500"
BuildTime="5"
SelectPortrait="Portrait_MissingCameo"
ButtonImage="Portrait_MissingCameo"
EnergyProduction="0"
CommandSet="ImperialGuardShrineCommandSet"
KindOf="STRUCTURE SELECTABLE IMMOBILE CAN_CAST_REFLECTIONS FS_TECHNOLOGY NEED_BASE_FOUNDATION"
RadarPriority="STRUCTURE"
PlacementViewAngle="225d"
BuildCompletion="PLACED_BY_PLAYER"
ProductionQueueType="MAIN_STRUCTURE"
BuildPlacementTypeFlag="MAIN_STRUCTURE"
EditorName="ImperialGuardShrine"
Description="Desc:ImperialGuardShrine"
TypeDescription="Type:ImperialGuardShrine">
<DisplayName
xai:joinAction="Replace" xmlns:xai="uri:ea.com:eala:asset:instance">Name:ImperialGuardShrine</DisplayName>
<ArmorSet
Armor="GDIBarracksArmor"
DamageFX="FactionStructureDamageFX" />

<GameDependency>
<RequiredObject>ImperialGuardMunitorum</RequiredObject>
</GameDependency>

<SkirmishAIInformation
BaseBuildingLocation="FRONT" />
<Draws>
<scriptedModelDraw
id="ModuleTag_Draw"
OkToChangeModelColor="true"
UseStandardModelNames="true"
StaticModelLODMode="true">
<ModelConditionState
ParseCondStateType="PARSE_DEFAULT">
<Model
Name="IBShrine" />
</ModelConditionState>
<!-- BUILD UP -->
<ModelConditionState
ParseCondStateType="PARSE_NORMAL"
ConditionsYes="STRUCTURE_UNPACKING">
<Model
Name="IBShrine" />
</ModelConditionState>
<ModelConditionState
ParseCondStateType="PARSE_NORMAL"
ConditionsYes="RUBBLE">
<Model
Name="IBShrine" />
</ModelConditionState>
<ModelConditionState
ParseCondStateType="PARSE_NORMAL"
ConditionsYes="REALLYDAMAGED">
<Model
Name="IBShrine" />
</ModelConditionState>
<ModelConditionState
ParseCondStateType="PARSE_NORMAL"
ConditionsYes="DAMAGED">
<Model
Name="IBShrine" />
<Texture
Original=""
New="" />
</ModelConditionState>
<AnimationState
ParseCondStateType="PARSE_DEFAULT">
<Animation
AnimationName="IBShrine"
AnimationMode="LOOP" />
</AnimationState>



<AnimationState
ParseCondStateType="PARSE_NORMAL"
ConditionsYes="RUBBLE"
StateName="STATE_Rubble"
Flags="START_FRAME_LAST">
<Animation
AnimationName="IBShrine"
AnimationMode="MANUAL" />
<script>
Prev = CurDrawablePrevAnimationState();
if Prev ~= "STATE_Rubble" and Prev ~= "TRANS_IntoRubble" then
CurDrawableSetTransitionAnimState("TRANS_IntoRubble")
end
</Script>
<ParticleSysBone
BoneName="NONE"
FXParticleSystemTemplate="Des_Medium"
FollowBone="false" />
</AnimationState>
<AnimationState
ParseCondStateType="PARSE_NORMAL"
ConditionsYes="REALLYDAMAGED"
StateName="STATE_ReallyDamaged"
Flags="START_FRAME_LAST">
<Animation
AnimationName="IBShrine"
AnimationMode="MANUAL" />
<script>
Prev = CurDrawablePrevAnimationState();
if Prev ~= "STATE_ReallyDamaged" and Prev ~= "TRANS_IntoReallyDamaged" then
CurDrawableSetTransitionAnimState("TRANS_IntoReallyDamaged")
end
</Script>
</AnimationState>
<AnimationState
ParseCondStateType="PARSE_TRANSITION"
StateName="TRANS_IntoReallyDamaged">
<Animation
AnimationName="IBShrine"
AnimationMode="ONCE"
AnimationBlendTime="0" />
</AnimationState>
<AnimationState
ParseCondStateType="PARSE_TRANSITION"
StateName="TRANS_IntoRubble">
<Animation
AnimationName="IBShrine"
AnimationMode="ONCE"
AnimationBlendTime="0" />
</AnimationState>
</ScriptedModelDraw>

</Draws>
<Behaviors>
<BuildingBehavior
id="ModuleTag_BuildingBehavior"
NightWindowObject="LIGHT_01" />


<AutoDepositUpdate
id="AutoDepositUpdateOW2"
DepositInterval="4s"
DepositAmount="15"
GiveNoXP="true"
Flags="ACTIVE_WHEN_REPAIRING"/>





<SlowDeath
id="ModuleTag_Death"
SinkDelay="3.0s"
SinkRate="4.0"
DestructionDelay="8.0s">
<Sound Type="INITIAL" List="HumanFaction_MediumBuilding_DieMS" />
<DieMuxData
DeathTypes="ALL" />
</SlowDeath>
<FXListBehavior
id="ModuleTag_FXList">
<DieMuxData
DeathTypes="ALL" />
<Event
Index="onTransitionToDamaged"
FX="FX_BuildDamaged_Medium" />
<Event
Index="onTransitionToReallyDamaged"
FX="FX_BuildDamaged_Medium" />
<Event
Index="onTransitionToRubble"
FX="FX_BuildRubble_Medium" />
</FXListBehavior>
<StructureUnpackUpdate
UnpackTime="1.5s" />
<xi:include
href="DATA:Includes/GenericBuildingRepair.xml" />
<xi:include
href="DATA:Includes/GenericEngineerContain.xml" />
<xi:include
href="DATA:Includes/GenericGDIBuildingDestruction.xml" />
<xi:include
href="DATA:Includes/GenericGDIBuildingSuicide.xml" />
<StancesBehavior
id="ModuleTag_Stance"
StanceTemplate="Generic" />
</Behaviors>





<AI>

</AI>

<Body>
<ActiveBody
id="ModuleTag_05"
MaxHealth="3000" />
</Body>
<Geometry>
<Shape
Type= "BOX"
MajorRadius = "14.0229"
MinorRadius = "17.3374"
Height = "7.64887" >
<Offset
x = "-33.5405"
y = "24.9809"
z = "0.0" />
</Shape>
<Shape
Type= "BOX"
MajorRadius = "7.29192"
MinorRadius = "9.36221"
Height = "19.2751" >
<Offset
x = "-33.5405"
y = "24.9809"
z = "0.0" />
</Shape>
<Shape
Type= "BOX"
MajorRadius = "26.0409"
MinorRadius = "39.7707"
Height = "3.0" >
<Offset
x = "8.40857"
y = "4.57858"
z = "0.0" />
</Shape>
<Shape
Type= "BOX"
MajorRadius = "26.0409"
MinorRadius = "15.1129"
Height = "11.64" >
<Offset
x = "8.40857"
y = "24.9945"
z = "0.0" />
</Shape>
<Shape
Type= "BOX"
MajorRadius = "26.0409"
MinorRadius = "10.8813"
Height = "17.9256" >
<Offset
x = "8.40857"
y = "24.9945"
z = "0.0" />
</Shape>
<Shape
Type= "BOX"
MajorRadius = "26.0409"
MinorRadius = "15.1129"
Height = "11.64" >
<Offset
x = "8.40856"
y = "-16.6119"
z = "-1.81867e-006" />
</Shape>
<Shape
Type= "BOX"
MajorRadius = "26.0409"
MinorRadius = "10.8813"
Height = "17.9256" >
<Offset
x = "8.40856"
y = "-16.6119"
z = "-1.81867e-006" />
</Shape>
<Shape
Type= "BOX"
MajorRadius = "32.2907"
MinorRadius = "5.87588"
Height = "3.58512" >
<Offset
x = "4.31382"
y = "-36.3315"
z = "23.3332" />
</Shape>
<Shape
Type= "BOX"
MajorRadius = "1.56245"
MinorRadius = "4.78775"
Height = "25.0958" >
<Offset
x = "33.6345"
y = "-36.3315"
z = "-2.68064e-006" />
</Shape>
<Shape
Type= "BOX"
MajorRadius = "1.56245"
MinorRadius = "4.78775"
Height = "25.0958" >
<Offset
x = "-24.3959"
y = "-36.3315"
z = "-2.68064e-006" />
</Shape>
<ContactPoint>
<Pos x= "-14.7758" y = "-24.9922" z = "0.0" />
</ContactPoint>
<ContactPoint>
<Pos x= "29.2522" y = "-24.9922" z = "17.6454" />
</ContactPoint>
<ContactPoint>
<Pos x= "29.2522" y = "39.9894" z = "0.0" />
</ContactPoint>
<ContactPoint>
<Pos x= "-14.7758" y = "39.9894" z = "17.6454" />
</ContactPoint>
<ContactPoint>
<Pos x= "-14.7758" y = "-24.9922" z = "17.6454" />
</ContactPoint>
<ContactPoint>
<Pos x= "29.2522" y = "-24.9922" z = "0.0" />
</ContactPoint>
<ContactPoint>
<Pos x= "29.2522" y = "39.9894" z = "17.6454" />
</ContactPoint>
<ContactPoint>
<Pos x= "-14.7758" y = "39.9894" z = "0.0" />
</ContactPoint>
</Geometry>
<AudioArrayVoice>
<AudioEntry
Sound="AudioEvent:GDI_BarracksSelect"
AudioType="voiceSelect" />
</AudioArrayVoice>
<AudioArraySound>
<AudioEntry Sound="HumanFaction_MediumBuilding_LightDamageMS" AudioType="soundOnDamaged" />
<AudioEntry Sound="HumanFaction_MediumBuilding_HeavyDamageMS" AudioType="soundOnReallyDamaged" />
</AudioArraySound>
<ShadowInfo
Type="VOLUME" />
<VisionInfo
VisionRange="160"
ShroudClearingRange="400" />
<ProjectedBuildabilityInfo
Radius="10.0"
BuildPlacementTypes="MAIN_STRUCTURE OTHER_STRUCTURE" />
</GameObject>
</AssetDeclaration>

My DeviantArt - Check it out.
Posted Image
My Wii code: 6472 3114 4930 8707

"Om du kan stå, när alla andra sviktar
och sen klandras du för att just du står rak
Om du kan tro på ditt när andra riktar
sitt välbekanta tvivel mot din sak

Om var minut av nitti sen kan fyllas
med verk av dig som giltigt räknats ner
min vän, som jordens konung ska du hyllas
men du är också man, och det är mer."

#10 Madin

Madin

    title available

  • Hosted
  • 686 posts

Posted 17 December 2009 - 08:28 PM

I agree with what you said about this community not helping each other, so I decided to do a test myself.
There is nothing wrong with your code, it's just a question of understanding game mechanic's.

You cannot begin to gain the auto deposit if you do not have a capacity to store money (Tiberium).
The starting point for money storage is a tiberium refinery (Even the Scrin, who have massive Tiberium storage in their refinery, must 1st build one in order to gain auto deposit benefits).
This is why on maps with tiberium spikes that are close to a players starting position, good players delay their engineer until their refinery is finished, if they did not, they'd lose the intial capture bonus and any due credits until the refinery is placed.

The code I added to my building:
<AutoDepositUpdate id="ModuleTag_Money" DepositInterval="1s" DepositAmount="25" GiveNoXP="true" Flags="ACTIVE_WHEN_REPAIRING" xmlns="uri:ea.com:eala:asset" />
A typical refinery money storage code:
<DistributedMoney id="ModuleTag_DistributedMoney" Capacity="2000" OnDieSpawnPercentage="25" xmlns="uri:ea.com:eala:asset" />

A refinery also has a 'FS_MONEY_STORAGE' kind of.

Edited by Madin, 17 December 2009 - 08:33 PM.


#11 Hostile

Hostile

    Benefitting Humanity Simply by Showing Up!

  • Veterans
  • 9,551 posts
  • Location:Washington DC
  •  T3A Founder
  • Division:Revora
  • Job:Global Administrator
  • Donated
  • Association

Posted 17 December 2009 - 08:33 PM

Now THAT, I did not know. About having to have a tiberium silo in order to get the initial bonus.

#12 Boomerang Python

Boomerang Python

    Only War Mod Leader

  • Hosted
  • 2,370 posts
  • Location:Umeå, Sweden
  • Projects:Only War, Only War 2
  •  Colonel-Commissar

Posted 18 December 2009 - 11:25 AM

I actually figured all this out myself yesterday :p

It was working all along, i just had too much starting money for it to actually be able to generate any more money... stupid stupid stupid!

Thanks for the response though!
Appreciate the effort.
My DeviantArt - Check it out.
Posted Image
My Wii code: 6472 3114 4930 8707

"Om du kan stå, när alla andra sviktar
och sen klandras du för att just du står rak
Om du kan tro på ditt när andra riktar
sitt välbekanta tvivel mot din sak

Om var minut av nitti sen kan fyllas
med verk av dig som giltigt räknats ner
min vän, som jordens konung ska du hyllas
men du är också man, och det är mer."

#13 Mighty BOB!

Mighty BOB!

    Deranged Weasel

  • Members
  • 419 posts
  • Location:California, USA

Posted 10 January 2010 - 09:53 PM

lol, great to hear that it finally worked out for you.
WOL nick: migtybob

We are living in a post-common sense society.



Back to Tiberium Wars Editing


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users