Spaceboy
  • Spaceboy
  • 50.25% (Neutral)
  • Captain Topic Starter
13 years ago
i wanna create some upgrades but dunno how i do it.

for example how i can crate an upgrade who stealth my units like glaV can do it for their rebels?

or how i give a building CamoNetting or china mines?


auto upgrade:

how i can give china & gla hq radar without upgrade?

or how i give a building auto CamoNetting even by bulling process?


what is moduletag like why i need it, where are the scripts vor that?
Sponsor
Annihilationzh
13 years ago

for example how i can crate an upgrade who stealth my units like glaV can do it for their rebels?

or how i give a building CamoNetting or china mines?


They're all done by a module in the units/structures themselves.

how i can give china & gla hq radar without upgrade?


With a GrantUpgradeCreate Module for China. For GLA, I'd suggest adding this:

  StartingUnit1     = GLAVehicleRadarVan

Underneath this:

  StartingUnit0     = GLAInfantryWorker

In the GLA's PlayerTemplate.ini entry.

what is moduletag like why i need it,


A ModuleTag is a unique identifier for a module. If they aren't unique, it causes bugs in game.

where are the scripts vor that?


I'm sorry, I don't understand what you're asking.

However, there is a full module list here:
http://www.gamefront.com/files/13120440/Zero_Hour_Module_List 

If that helps at all.
If you need help, post in the forum. You'll get help a lot faster than if you send me a PM.

I reject all buddy requests. I don't think 'buddy' needs to be made official. It's not like you're marrying me.
Spaceboy
  • Spaceboy
  • 50.25% (Neutral)
  • Captain Topic Starter
13 years ago
i mean a upgade/specalpower use a special moduletag
how i know witch one is needed for witch upgrade/specialpower

can i use any moduletag i want??
i did it sometimes without an error , but usually i keep the moduletag from the specific speclpower. But i wanna crate a new upgrade and make them working, i tried to create toxtunnels who can use camonetting. but after buy the upgrade nothing happend....

if i wanna made an

Grantupgrade for chinas radar
should i use moduletag 14 (chinesradar upgrade)
or some else?


Edit :

A ModuleTag is a unique identifier for a module. If they aren't unique, it causes bugs in game.



means i can write Moduletag_125 if i create a new module, because 125 isn´t used by the game and its all fine?
Annihilationzh
13 years ago

i did it sometimes without an error , but usually i keep the moduletag from the specific speclpower. But i wanna crate a new upgrade and make them working, i tried to create toxtunnels who can use camonetting. but after buy the upgrade nothing happend....


Did you copy both of these modules?
  Behavior = StealthUpdate ModuleTag_17
    StealthDelay                = 2500 ; msec
    StealthForbiddenConditions  = ATTACKING USING_ABILITY TAKING_DAMAGE
    MoveThresholdSpeed          = 3
    InnateStealth               = No ;Requires upgrade first
    OrderIdleEnemiesToAttackMeUponReveal  = Yes
  End

  Behavior = StealthUpgrade ModuleTag_18
    TriggeredBy = Upgrade_GLACamoNetting
  End

means i can write Moduletag_125 if i create a new module, because 125 isn´t used by the game and its all fine?


Yes.

It's a lot more free than most think. You could use ModuleBlue_125, NotATag_125, Module99, or anything reasonable. As long as you don't have illegal characters in it, it will work.
If you need help, post in the forum. You'll get help a lot faster than if you send me a PM.

I reject all buddy requests. I don't think 'buddy' needs to be made official. It's not like you're marrying me.
Spaceboy
  • Spaceboy
  • 50.25% (Neutral)
  • Captain Topic Starter
13 years ago
2 questins.

1:

i tried to create a second building commandset for my dozer, its not working. dunno why.

i used the gla fakebuilding commandsetswitch as draft.

So i created 1 new commanset in the commandset.ini
2 new buttons switch to 1 or to 2.
2 new upgrades for switching
and copied this

Behavior = CommandSetUpgrade ModuleTag_14
TriggeredBy = Upgrade_GLAWorkerFakeCommandSet
RemovesUpgrades = Upgrade_GLAWorkerRealCommandSet
CommandSet = Slth_GLAWorkerFakeBuildingsCommandSet
End

Behavior = CommandSetUpgrade ModuleTag_15
TriggeredBy = Upgrade_GLAWorkerRealCommandSet
RemovesUpgrades = Upgrade_GLAWorkerFakeCommandSet Upgrade_GLAWorkerRealCommandSet
CommandSet = Slth_GLAWorkerCommandSet
End

Behavior = ProductionUpdate ModuleTag_16
MaxQueueEntries = 1; For the command set switching upgrade
End

to the dozer

renamed everything, but if i wanna use the button ingame it says "you can´t buy this upgrade"
miss i anything? where is my mistake?

2: can i do this on a same way for the shortcuts, if i have more then 12 ubilitys?
or can i crate a shortcutbutton who select the commandsenter?
acidbrain
13 years ago
1.Try this:
Used America as an example in the code.


Add this to de Dozer

  CommandSet = AmericaDozerCommandSet-1

  Behavior = ProductionUpdate ModuleTag_ProdUp
    ;No data
  End

  Behavior = CommandSetUpgrade ModuleTag_commandSet1
    CommandSet = AmericaDozerCommandSet-2
    TriggeredBy   = Upgrade_AmericaDozerCommandSet-2
  End

  Behavior = CommandSetUpgrade ModuleTag_commandSet2
    CommandSet = AmericaDozerCommandSet-1
    TriggeredBy   = Upgrade_AmericaDozerCommandSet-1
  End

  ;This releases the object which removes the upgrade(s)
  Behavior = ObjectCreationUpgrade ModuleTag_commandSet3
    UpgradeObject = OCL_AmericaDozerCommandsetSwitch
    TriggeredBy   = Upgrade_AmericaDozerCommandSet-2 Upgrade_AmericaDozerCommandSet-1
  End

System.ini

Object AmericaDozerCommandSetSwitch

  ; ***DESIGN parameters ***
  VisionRange     = 0.0
  EditorSorting   = SYSTEM
  KindOf = NO_COLLIDE IMMOBILE UNATTACKABLE INERT

  ; *** ENGINEERING Parameters ***
  Body = InactiveBody ModuleTag_01
    ;nothing
  End

  Behavior = UpgradeDie  ModuleTag_02
    DeathTypes = ALL
    UpgradeToRemove = Upgrade_AmericaDozerCommandSet-2 ModuleTag_05
  End

  Behavior = UpgradeDie  ModuleTag_03
    DeathTypes = ALL
    UpgradeToRemove = Upgrade_AmericaDozerCommandSet-1 ModuleTag_06
  End

  Behavior = LifetimeUpdate ModuleTag_04
    MinLifetime = 1
    MaxLifetime = 1
  End
End

ObjectCreationList.ini

ObjectCreationList OCL_AmericaDozerCommandsetSwitch
  CreateObject
    Offset = X:0 Y:0 Z:50 
    ObjectNames = AmericaDozerCommandSetSwitch
    IgnorePrimaryObstacle = Yes
    Disposition = LIKE_EXISTING
    Count = 1
    RequiresLivePlayer = Yes
  End
End

Upgrade.ini

Upgrade Upgrade_AmericaDozerCommandSet-1
  DisplayName        = UPGRADE:CommandSetSwitch  ;make string of choice here
  Type               = OBJECT
  BuildTime          = 0.001
  BuildCost          = 0
  ButtonImage        = CSArrowUp  ;pick an image of choice here
End

Upgrade Upgrade_AmericaDozerCommandSet-2
  DisplayName        = UPGRADE:CommandSetSwitch  ;make string of choice here
  Type               = OBJECT
  BuildTime          = 0.001
  BuildCost          = 0
  ButtonImage        = CSArrowDown  ;pick an image of choice here
End

CommandButton.ini

CommandButton Command_AmericaDozerCommandSet-2
  Command          = OBJECT_UPGRADE
  Upgrade          = Upgrade_AmericaDozerCommandSet-2
  TextLabel        = CONTROLBAR:UpgradeAmericaDozerCommandSet ;make this label yourself
  ButtonImage      = CSArrowDown  ;pick an image of choice here
  ButtonBorderType = ACTION ; Identifier for the User as to what kind of button this is
  DescriptLabel    = CONTROLBAR:TooltipUSADozerCommandSet-2  ;make this label yourself
End

CommandButton Command_AmericaDozerCommandSet-1
  Command          = OBJECT_UPGRADE
  Upgrade          = Upgrade_AmericaDozerCommandSet-1
  TextLabel        = CONTROLBAR:UpgradeAmericaDozerCommandSet  ;make this label yourself
  ButtonImage      = CSArrowUp  ;pick an image of choice here
  ButtonBorderType = ACTION ; Identifier for the User as to what kind of button this is
  DescriptLabel    = CONTROLBAR:TooltipUSADozerCommandSet-1  ;make this label yourself
End

CommandSet.ini

CommandSet AmericaDozerCommandSet-1
;Pick the last position for switchbutton
¿=Command_AmericaDozerCommandSet-2
End

CommandSet AmericaDozerCommandSet-2
;Pick the last position for switchbutton
¿=Command_AmericaDozerCommandSet-1
End

When you use one of the the switchbuttons to the second or back to the first commandset an object is released which removes the upgrade so you can use it again.

2. The method as above needs and object to function properly and in the shortcutbuttons at the side of the screen you don't use an object.
I think it's possible but you have to make the switch to another set of shortcuts in a building, for example in the CommandCenter with a button to switch to the second shortcutcommandset and a button to switch back of course.
But maybe someone else has a better solution for it...:P

Hope i was a bit of a help for you..

Greetz, acidbrain
Panem et kirkinses
Annihilationzh
13 years ago
Acidbrain, where did you get that workaround?

It sounds like something from the pre-zero hour era.

renamed everything, but if i wanna use the button ingame it says "you can´t buy this upgrade"
miss i anything? where is my mistake?


Nothing is immediately apparent.

I would have to see the full code to have any idea. I've never had any trouble with switching commandsets before.
If you need help, post in the forum. You'll get help a lot faster than if you send me a PM.

I reject all buddy requests. I don't think 'buddy' needs to be made official. It's not like you're marrying me.
acidbrain
13 years ago

Acidbrain, where did you get that workaround?

It sounds like something from the pre-zero hour era.

Originally Posted by: Annihilationzh 



Used this method in vanilla Generals, didn't use it in ZH yet...that's why...
It works in Generals though...
I din't mod ZH much, only worked with Vanilla Generals...
If you have a better way...do tell...:P
Panem et kirkinses
Annihilationzh
13 years ago
Spotted something suspicious...

2 new upgrades for switching


Never create new upgrades when you can use the existing upgrades. I suspect this might be related to the problem.
If you need help, post in the forum. You'll get help a lot faster than if you send me a PM.

I reject all buddy requests. I don't think 'buddy' needs to be made official. It's not like you're marrying me.
Spaceboy
  • Spaceboy
  • 50.25% (Neutral)
  • Captain Topic Starter
13 years ago

I would have to see the full code to have any idea.]



i deleted the code after i t didn't work, now i wrote it on the same way again and its still working ^^

so 2: is there any way to select HQ witch a shortcut?

off topics:
who i get the name of the images out?
i wanna use the commander in chief picture for random in online mode for my army how i con do it?
GPS pictures, the are 3 with one two and three circle´s. how are they named?

HQ:
can i create a USA HQ witch a nuke sign or tank on it?

Edit:

NapalmMig:

i made new migs the have 5 clips now, but i created 2 new weapons(i wanna use the original by other migs)
so i have this code:
generals.ini


WeaponSet
Conditions = None
Weapon = PRIMARY NapalmMissileWeapon2
; AutoChooseSources = PRIMARY NONE
End
WeaponSet
Conditions = PLAYER_UPGRADE
Weapon = PRIMARY BlackNapalmMissileWeapon2
; AutoChooseSources = PRIMARY NONE
End


and
weapon.ini

Weapon NapalmMissileWeapon2
PrimaryDamage = 75.0
PrimaryDamageRadius = 5.0
SecondaryDamage = 40.0
SecondaryDamageRadius = 30.0
DamageType = JET_MISSILES ; since creates FireField to do the flame damage
DeathType = BURNED
AttackRange = 320.0
MinimumAttackRange = 80.0 ; used to be 100.0, but that was too large for mig/missile speed
ProjectileObject = NapalmMissile
ProjectileExhaust = MissileExhaust
VeterancyProjectileExhaust = HEROIC HeroicMissileExhaust
FireFX = WeaponFX_NapalmMissile
FireSound = MigJetNapalmWeapon
RadiusDamageAffects = ALLIES ENEMIES NEUTRALS NOT_SIMILAR
AcceptableAimDelta = 30
DelayBetweenShots = 300 ; time between shots, msec
ClipSize = 5 ; how many shots in a Clip (0 == infinite)
ClipReloadTime = 2000 ; how long to reload a Clip, msec
AutoReloadsClip = RETURN_TO_BASE ; must return to base to reload this weapon
AntiGround = Yes
ProjectileDetonationFX = WeaponFX_NapalmMissileDetonation
ProjectileDetonationOCL = OCL_FireFieldSmall
DamageDealtAtSelfPosition = Yes
HistoricBonusTime = 3000
HistoricBonusCount = 8
HistoricBonusRadius = 100
HistoricBonusWeapon = FirestormSmallCreationWeapon
ProjectileCollidesWith = STRUCTURES
AntiAirborneVehicle = Yes
AntiAirborneInfantry = No
ShowsAmmoPips = Yes
End

;------------------------------------------------------------------------------
Weapon BlackNapalmMissileWeapon2
PrimaryDamage = 75.0
PrimaryDamageRadius = 5.0
SecondaryDamage = 50.0
SecondaryDamageRadius = 30.0
DamageType = EXPLOSION
DeathType = EXPLODED
AttackRange = 320.0
MinimumAttackRange = 80.0 ; used to be 100.0, but that was too large for mig/missile speed
ProjectileObject = NapalmMissile
ProjectileExhaust = MissileExhaust
VeterancyProjectileExhaust = HEROIC HeroicMissileExhaust
FireFX = WeaponFX_NapalmMissile
FireSound = MigJetNapalmWeapon
RadiusDamageAffects = ALLIES ENEMIES NEUTRALS NOT_SIMILAR
AcceptableAimDelta = 30
DelayBetweenShots = 300 ; time between shots, msec
ClipSize = 5 ; how many shots in a Clip (0 == infinite)
ClipReloadTime = 1500 ; how long to reload a Clip, msec
AutoReloadsClip = RETURN_TO_BASE ; must return to base to reload this weapon
AntiGround = Yes
ProjectileDetonationFX = WeaponFX_BlackNapalmExplosion
ProjectileDetonationOCL = OCL_FireFieldUpgradedSmall
DamageDealtAtSelfPosition = Yes
HistoricBonusTime = 3000
HistoricBonusCount = 8
HistoricBonusRadius = 100
HistoricBonusWeapon = BlackNapalmFirestormSmallCreationWeapon
ProjectileCollidesWith = STRUCTURES
AntiAirborneVehicle = Yes
AntiAirborneInfantry = Yes
ShowsAmmoPips = Yes
End


but my napalm doesn´t burn after hiting 8 times whats frong there

Edit:
i wanna create a specialpower who requires an upgrade. So i wanna see my button after buying the upgrade and my spcialpower & upgrade are still working. But i can´t create a condition for that and i need help again 🙂.

all thies points aren´t so important but i would be nice, if all works =)

Edit :should i create a new thread for offtopics?
Mohsen
  • Mohsen
  • 50.25% (Neutral)
  • Private
6 years ago
UserPostedImage i created a new upgrade in my game pm mod weapon set upgrade
To b2 bomber but the upgrade is unavailable in the bomber
Can you help me with this please?

AdrianeMapMaker
6 years ago
Probably you forgot adding productionupdate module
Iirc it is required on object that use upgrades
A part of ZH worldbuilders map making community
https://discord.gg/tJ6zyGb 

UserPostedImage




Mohsen
  • Mohsen
  • 50.25% (Neutral)
  • Private
6 years ago

Probably you forgot adding productionupdate module
Iirc it is required on object that use upgrades

Originally Posted by: adrianemapmaker 



haw i can add it ?




this is codes i have been add it
;-----------------------------------------------------------
WeaponSet
Conditions = PLAYER_UPGRADE
Weapon = PRIMARY EuKFnukeBombWeapon2B2
PreferredAgainst = PRIMARY VEHICLE STRUCTURE
AutoChooseSources = PRIMARY FROM_PLAYER FROM_SCRIPT FROM_AI
End


Behavior = WeaponSetUpgrade ModuleTag_03
TriggeredBy = Upgrade_EuKFnukeBombWeapon2B2
End

Behavior = CommandSetUpgrade ModuleTag_25
CommandSet = AmericaJetRaptorCommandSet
TriggeredBy = Upgrade_EuKFnukeBombWeapon2B2
End

;--------------------------------------------------------------------
CommandButton Command_EuKFnukeBombWeapon2B2
Command = OBJECT_UPGRADE
Upgrade = Upgrade_EuKFnukeBombWeapon2B2
Options = OK_FOR_MULTI_SELECT NOT_QUEUEABLE
TextLabel = CONTROLBAR:EuKFnukeBombWeapon2B2
ButtonImage = nuclearsymbol
ButtonBorderType = UPGRADE ; Identifier for the User as to what kind of button this is
DescriptLabel = CONTROLBAR:EuKFnukeBombWeapon2B2
End
;----------------------------------------------------------------------
Upgrade Upgrade_EuKFnukeBombWeapon2B2
Type = OBJECT
BuildTime = 50.0
BuildCost = 10000
ButtonImage = nuclearsymbol
UnitSpecificSound = OverlordExpansion
End
;----------------------------------------------------------------------
CommandSet AmericaJetCommandSet
10 = Command_GuardFlyingUnitsOnly
11 = Command_AttackMove
12 = Command_EuKFnukeBombWeapon2B2
13 = Command_Guard
14 = Command_Stop
End
;----------------------------------------------------------------------
AdrianeMapMaker
6 years ago
i am talking about this module - try and copy paste it to your object


Behavior = ProductionUpdate ModuleTag_25
MaxQueueEntries = 1; So you can't build multiple upgrades in the same frame
End
A part of ZH worldbuilders map making community
https://discord.gg/tJ6zyGb 

UserPostedImage




Mohsen
  • Mohsen
  • 50.25% (Neutral)
  • Private
6 years ago
Thanks bro it's my first time doing a new upgrade
AdrianeMapMaker
6 years ago
No problem happy to help
A part of ZH worldbuilders map making community
https://discord.gg/tJ6zyGb 

UserPostedImage