zzc
  • zzc
  • 50.25% (Neutral)
  • Major Topic Starter
9 years ago
Is it possible to increase the level of general ability?

Like making barrage 4 levels from 3?
Sponsor
Zatsupachi
9 years ago
It'd require a new OCL.

ObjectCreationList SUPERWEAPON_ArtilleryBarrage4
... blah blah blah OCL things ...
End
A new science.

Science SCIENCE_ArtilleryBarrage4
... science things ...
End
A new button.
And tinkering with the Command Center.
"It's precision_bomber."
Death Label HAS BEEN RELEASED(go get v0.99):
http://www.moddb.com/mods/death-label/downloads/death-label-ver-099 
Next Episode:
precision_bomber's Zero Hour SCIENCE!
zzc
  • zzc
  • 50.25% (Neutral)
  • Major Topic Starter
9 years ago

It'd require a new OCL.


ObjectCreationList SUPERWEAPON_ArtilleryBarrage4
... blah blah blah OCL things ...
End
A new science.

Science SCIENCE_ArtilleryBarrage4
... science things ...
End
A new button.
And tinkering with the Command Center.

Originally Posted by: Zatsupachi 



OCL


ObjectCreationList SUPERWEAPON_ArtilleryBarrage4

  DeliverPayload
    Transport                       = ChinaArtilleryCannon
    FormationSize                   = 96
    FormationSpacing                = 1.0
    StartAtPreferredHeight          = Yes
    StartAtMaxSpeed                 = Yes
    MaxAttempts                     = 1                   ;max attempts
    DeliveryDistance                = 250                 ;distance from target allowed to start/stop dropping.
    WeaponErrorRadius               = 100                 ; how bad the artillerist is
    DelayDeliveryMax                = 3000                ; his delayed reaction to "Fire!"
    VisibleItemsDroppedPerInterval  = 1                   ;Drops two bombs at a time
    VisibleDropBoneBaseName         = RootTransform       ;The bombs are created and dropped at this bone base
    VisibleSubObjectBaseName        = Bomb                ;The bombs are visible until dropped.
    VisibleNumBones                 = 1                   ;Number of bones.
    VisiblePayloadTemplateName      = ChinaArtilleryBarrageShell  ;Created when payload is dropped.
    VisiblePayloadWeaponTemplate    = ArtilleryBarrageDamageWeapon
    InheritTransportVelocity        = Yes                 ;The bombs will start at transport velocity.
    ExitPitchRate                   = 30                  ;The bomb will pitch down.
    SelfDestructObject              = Yes                 ; so the delivery vehicle goes away 'POP!'
    DeliveryDecalRadius = 125
    DeliveryDecal
      Texture           = SCCArtilleryBarrage_China
      Style             = SHADOW_ALPHA_DECAL
      OpacityMin        = 25%
      OpacityMax        = 50%
      OpacityThrobTime  = 500
      Color             = R:255 G:156 B:0 A:255 
      OnlyVisibleToOwningPlayer = Yes
    End

  End

End



Science

Science SCIENCE_ArtilleryBarrage4
  PrerequisiteSciences = SCIENCE_ArtilleryBarrage3 SCIENCE_Rank5
  SciencePurchasePointCost = 3
  IsGrantable = Yes
  DisplayName = SCIENCE:ChinaArtilleryBarrage3
  Description = CONTROLBAR:ToolTipChinaScienceArtilleryBarrage
End

button

CommandButton Command_PurchaseScienceArtilleryBarrage4
  Command           = PURCHASE_SCIENCE
  Science           = SCIENCE_ArtilleryBarrage4
  ButtonImage       = SSBarrage3
  ButtonBorderType  = UPGRADE ; Identifier for the User as to what kind of button this is
End


commandset


CommandSet SCIENCE_CHINA_CommandSetRank8
  1 = Command_PurchaseScienceEMPPulse
  2 = Command_PurchaseScienceArtilleryBarrage4
END

Anything I missed?
Zatsupachi
9 years ago
You have to find these lines on the China Command Center.


  Behavior           = OCLSpecialPower ModuleTag_17
    SpecialPowerTemplate = SuperweaponArtilleryBarrage
    UpgradeOCL           = SCIENCE_ArtilleryBarrage3 SUPERWEAPON_ArtilleryBarrage3
    UpgradeOCL           = SCIENCE_ArtilleryBarrage2 SUPERWEAPON_ArtilleryBarrage2
    OCL                  = SUPERWEAPON_ArtilleryBarrage1
    CreateLocation       = CREATE_AT_EDGE_FARTHEST_FROM_TARGET
  End

and another UpgradeOCL with the appropriate entries.
ORDER MATTERS, put it before Artillery Barrage 3.

AND to complete with buttons find this button and its FromShortcut counterpart


CommandButton Command_ArtilleryBarrage
  Command           = SPECIAL_POWER
  SpecialPower      = SuperweaponArtilleryBarrage
  Options           = NEED_SPECIAL_POWER_SCIENCE NEED_TARGET_POS CONTEXTMODE_COMMAND
  Science           = SCIENCE_ArtilleryBarrage1 SCIENCE_ArtilleryBarrage2 SCIENCE_ArtilleryBarrage3 ;These will cause the buttons to change icons, nothing more
  TextLabel         = CONTROLBAR:ArtilleryBarrage
  ButtonImage       = SSBarrage
  ButtonBorderType  = ACTION ; Identifier for the User as to what kind of button this is
  DescriptLabel     = CONTROLBAR:TooltipFireArtilleryBarrage
  RadiusCursorType  = ARTILLERYBARRAGE
  InvalidCursorName     = GenericInvalid
End

just put the 4th level after the 3rd with spaces to separate them of course.
...and test!
"It's precision_bomber."
Death Label HAS BEEN RELEASED(go get v0.99):
http://www.moddb.com/mods/death-label/downloads/death-label-ver-099 
Next Episode:
precision_bomber's Zero Hour SCIENCE!
zzc
  • zzc
  • 50.25% (Neutral)
  • Major Topic Starter
9 years ago

You have to find these lines on the China Command Center.


  Behavior           = OCLSpecialPower ModuleTag_17
    SpecialPowerTemplate = SuperweaponArtilleryBarrage
    UpgradeOCL           = SCIENCE_ArtilleryBarrage3 SUPERWEAPON_ArtilleryBarrage3
    UpgradeOCL           = SCIENCE_ArtilleryBarrage2 SUPERWEAPON_ArtilleryBarrage2
    OCL                  = SUPERWEAPON_ArtilleryBarrage1
    CreateLocation       = CREATE_AT_EDGE_FARTHEST_FROM_TARGET
  End

and another UpgradeOCL with the appropriate entries.
ORDER MATTERS, put it before Artillery Barrage 3.

AND to complete with buttons find this button and its FromShortcut counterpart


CommandButton Command_ArtilleryBarrage
  Command           = SPECIAL_POWER
  SpecialPower      = SuperweaponArtilleryBarrage
  Options           = NEED_SPECIAL_POWER_SCIENCE NEED_TARGET_POS CONTEXTMODE_COMMAND
  Science           = SCIENCE_ArtilleryBarrage1 SCIENCE_ArtilleryBarrage2 SCIENCE_ArtilleryBarrage3 ;These will cause the buttons to change icons, nothing more
  TextLabel         = CONTROLBAR:ArtilleryBarrage
  ButtonImage       = SSBarrage
  ButtonBorderType  = ACTION ; Identifier for the User as to what kind of button this is
  DescriptLabel     = CONTROLBAR:TooltipFireArtilleryBarrage
  RadiusCursorType  = ARTILLERYBARRAGE
  InvalidCursorName     = GenericInvalid
End

just put the 4th level after the 3rd with spaces to separate them of course.
...and test!

Originally Posted by: Zatsupachi 



wait now it says science ini is missing... caught by WB

ASSERTION FAILURE: Science name SCIENCE_ArtilleryBarrage3 not known! (Did you define it in Science.ini?)

That was caused by putting level 4 at the top - I do that for easy tracking. Apparently this is not acceptable for science ini file, it has to be in order.
Zatsupachi
9 years ago
Huh.

I think that's caused because of how sciences are all declared at once during game start.

If you try putting ANY SCIENCE above Science_America/Science_China/Science_GLA that requires those sciences, the game crashes.
However if you the science you put does NOT have any required sciences then it's totally fine.

I've experienced this because of my mod's Tech Tree.
I put the Tech Trees below the Default Intrinsic Sciences but above all other sciences since my mod has 3 whole sets of Sciences for the new factions.
"It's precision_bomber."
Death Label HAS BEEN RELEASED(go get v0.99):
http://www.moddb.com/mods/death-label/downloads/death-label-ver-099 
Next Episode:
precision_bomber's Zero Hour SCIENCE!
zzc
  • zzc
  • 50.25% (Neutral)
  • Major Topic Starter
9 years ago
yea thats what I did, putting it right on top. Thats how I track my modded units,weapons,buildings, etc. Newest entry at top of the file.

Science ini is the exception apparently....
klingondragon
9 years ago
I always put things at the bottom. Even though it shouldn't matter it's always safest like that. Also if you have something twice it will either take the second one or the game will glitch and break so bottom is best for that (50/50 break or work instead of 33/33/33 break do nothing or work) too. But only in the same file

zzc
  • zzc
  • 50.25% (Neutral)
  • Major Topic Starter
9 years ago
Well I make sure to give my modded things a different name, even if its just adding "2" at the end.
klingondragon
9 years ago
Even so, putting things at the end just makes sense. You are adding to the game after all so it really should be at the bottom.