samoja
  • samoja
  • 58.25% (Neutral)
  • Private Topic Starter
14 years ago
Hello, i am new to this and i would like someone to explain to me how to do certain stuff of point me to the right tutorial I played several mission maps made by people here and i wanted to try making some myself. I want to make a remake of Strike series with ZH world editor.

Here are things i will need:
first and foremost, Supercomanche, main character of the series, this are the specs:
for simplicity i decided to use stock Comanche model, it would have twice as much ordinance (8 rockets) and 4 additional(twice as strong) that you can switch to the way ranger can switch between rifle and grenade. It would also have 6 passenger seats.

Second, i want to make rebels and scorpions able to fire in the air like AA units, albeit with less damage then real AA units.

Third, how do you make landed vacant helicopter(the one you need to enter to fly) i saw a few in other maps (Black hawk down for example)

Fourth, how do i make so that killing the guards frees POWs(transfers them to your control once the soldiers around them are dead)it is essential as in strike series rescuing POWs was one of crucial parts of a game, it would also be nice if i can make so that bringing POWs back to base would take them off your control and give you money that you could use for repairs(by selecting a Dozer at base which would take away certain amount of dollars and restore you to full health)

And one more thing if it can be done, i would like to make a button that will land the helicopter and exit the pilot(in fact spawn a new one and kill the current so the helicopter is once again vacant) i ask it because it would allow the player to temporarily take control of other vehicles in accordance with mission objectives.

If i succeed in this i will certainly have more questions but i believe this will be quite enough challenge for now, thanks in advance
Sponsor
NewNightmare
14 years ago
as far as I am aware:
1st, second and fifth involve coding inside the 'map.ini' file, which has to be added to the map folder, I recommend acquiring FinalBIG software and exploring INIZH.big file in ZH main directory to see how the game code looks like, then AnihilationZH, as well as dozens of other forum members has already started and explained a quadrillion of threads about map.ini from which you can learn the basics on how to edit units. Editing in map.ini will become easier this way in future.
All I can tell you from my point of view - which is parmanent mods (rather than map dependant ones) - is that for the comanche you will have to make new Weapon (codes for all can be found in INIZH.big>Data>INI>Weapon.ini), edit the original one, re-make the unit's weaponset (1 unit is theoretically limited to 3 weapons), add transport code, and make 2 additional buttons and commandsets (set of buttons, all can be found in same location as the weapon.ini). All of that inside the mentoned map.ini file (it is simply used to overwrite origianal code for the map it is attached to)
As for the Rebels and scorpions, it's probably editing/adding weapons and weaponsets only, and for landing the helicopter... hmmm... GLA bike has a similar behavior except it is destroyed. This is actually quite a complicated one I guess.
you could probably use GLA Bike's passanger code as well I think.


third and fourth on the other hand stay within the worldbuilder (WB) and require some scipting. You gave an example map, I don't remember the exact script, so you could browse therough the Black Hawk Down scripts, and look for one that makes the heli unmanned.
Similarly, you get to rescue POWs in 3rd USA mission in the campaign dont you? you could extract the map(s) from Maps.big to your Documents>Zero hour data>Maps folder, and then open the maps in WB and again, browse through all scripts and find the POW ones.

P.S good luck ! and don't edit the code within the FinalBIG program, extract the code somewhere and use Notepad for that, much simpler.

samoja
  • samoja
  • 58.25% (Neutral)
  • Private Topic Starter
14 years ago
Thanks man, i already learned how to make landed helicopter(it was simple really once i saw mission script, and it was operation Irene II by the way, they got very similar backstory) and i believe i have pretty good idea how to make Rebels and Scorpions fire at airborne targets(i just don't know how ill do it without affecting the game overall) and about the POWs, yes i know that you can save them, but how about the rest i said, gaining money and buying repairs on dozer? And is there any way to avoid 3 wpn limit? Colonel Burton has atleast 4 if we do not count detonate the charges.
NewNightmare
14 years ago
here's burton's weaponset:

  WeaponSet
    Conditions          = None 
    Weapon              = PRIMARY     ColonelBurtonSniperRifleWeapon
    Weapon              = SECONDARY   ColonelBurtonKnifeWeapon
    AutoChooseSources   = PRIMARY     FROM_PLAYER FROM_SCRIPT FROM_AI
    AutoChooseSources   = SECONDARY   NONE
  End
He only uses 2 weapons, rest are special abilitites.
these are button-only, dont take up a slot.
and from what I think,Kindof = Portable_structure units have independant weaponset from their parents. so you can have more than 30 on one unit overall, but this is only a theory of mine.
NewNightmare
14 years ago
for the scorpions and rebels, map.ini does not affect the game, only the map you use it with. so squeezing all the stuff needed inside that file will do the trick, the only problem is that map.ini coding is slightly different to modding in general, and i'm not into it really. It should be fairly easy though.
as for gaining money, a script would do I guess,
***IF*** 
unit x // team x or how you want to set it out is owned by player 'Player'
***Then***
'Player' is given xxx cash

or

***IF***
unit x // team x or how you want to set it out is owned by player 'Player'
***Then***
Spawn a unit 'Dollar crate from civilian>misc_man_made' at point x which is outside map border, with a building owned by player at that location. 
the repair bit might be a challange though. It works in C&C 3, but here? you don't buy generals powers on ZH, so you probably would have to do something like a building for the dozer (a toolbox?? :D) which then radiates an AOE repair aura for a certain type of unit (structure/infa etc) and give it a LifetimeUpdate module to kill it after certain amount of time.
samoja
  • samoja
  • 58.25% (Neutral)
  • Private Topic Starter
14 years ago

[code]***IF***
(a toolbox?? :D) which then radiates an AOE repair aura for a certain type of unit (structure/infa etc) and give it a LifetimeUpdate module to kill it after certain amount of time.



Would that work with Helicopter? There are many different ways units and structures heal, dozer, ambulance, rank, some structures even have self repair, would it be possible to give a Helicopter one of those for limited amount of time?

map.ini does not affect the game


Yes i noticed some maps have that one, but some(including mine) dont, how do i make editor create one? or do i have to create one manually? If yes how?
Annihilationzh
14 years ago
Notepad to create and edit a txt file.
Windows explorer to change it from txt to ini.
INI modding experience so you know what you're doing.
http://www.cnclabs.com/forums/default.aspx?g=posts&t=10478 
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.
samoja
  • samoja
  • 58.25% (Neutral)
  • Private Topic Starter
14 years ago


INI modding experience so you know what you're doing.

Annihilationzh wrote:



Whell this may be a problem. But you can only gain experience by trial and error anyway.
samoja
  • samoja
  • 58.25% (Neutral)
  • Private Topic Starter
14 years ago
OK here is how the script for missile defender weapon looks like:


Weapon MissileDefenderMissileWeapon
PrimaryDamage = 40.0
PrimaryDamageRadius = 5.0
ScatterRadiusVsInfantry = 10.0 ;When this weapon is used against infantry, it can randomly miss by as much as this distance.
AttackRange = 175.0
DamageType = INFANTRY_MISSILE
DeathType = NORMAL
WeaponSpeed = 600
ProjectileObject = MissileDefenderMissile
ProjectileExhaust = MissileDefenderMissileExhaust
VeterancyProjectileExhaust = HEROIC HeroicMissileDefenderMissileExhaust
ProjectileDetonationFX = WeaponFX_RocketBuggyMissileDetonation
FireFX = FX_BuggyMissileIgnition
RadiusDamageAffects = ALLIES ENEMIES NEUTRALS
ScatterRadius = 0 ; This weapon will scatter somewhere within a circle of this radius, instead of hitting someone directly
DelayBetweenShots = 1000 ; time between shots, msec
ClipSize = 0 ; how many shots in a Clip (0 == infinite)
ClipReloadTime = 0 ; how long to reload a Clip, msec
AutoReloadsClip = Yes
FireSound = MissileDefenderWeapon
WeaponBonus = PLAYER_UPGRADE DAMAGE 125%
AntiAirborneVehicle = Yes
AntiAirborneInfantry = Yes
ProjectileCollidesWith = STRUCTURES
End




Here is how the script for Rebel gun looks like:

Weapon GLARebelMachineGun
PrimaryDamage = 5.0
PrimaryDamageRadius = 0.0 ; 0 primary radius means "hits only intended victim"
AttackRange = 100.0
DamageType = SMALL_ARMS
DeathType = NORMAL
WeaponSpeed = 999999.0 ; dist/sec (huge value == effectively instant)
ProjectileObject = NONE
FireFX = WeaponFX_GenericMachineGunFire
VeterancyFireFX = HEROIC WeaponFX_GenericMachineGunFireWithRedTracers ; Heroic rebels get different FireFX
FireSound = RebelWeapon
RadiusDamageAffects = ALLIES ENEMIES NEUTRALS
DelayBetweenShots = 100 ; time between shots, msec
ClipSize = 3 ; how many shots in a Clip (0 == infinite)
ClipReloadTime = 700 ; how long to reload a Clip, msec
WeaponBonus = PLAYER_UPGRADE DAMAGE 125% ; AP weapon upgrade
End



Here is how it should look like to suit my needs:

Weapon GLARebelMachineGun
PrimaryDamage = 5.0
PrimaryDamageRadius = 0.0 ; 0 primary radius means "hits only intended victim"
AttackRange = 100.0
DamageType = SMALL_ARMS
DeathType = NORMAL
WeaponSpeed = 999999.0 ; dist/sec (huge value == effectively instant)
ProjectileObject = NONE
FireFX = WeaponFX_GenericMachineGunFire
VeterancyFireFX = HEROIC WeaponFX_GenericMachineGunFireWithRedTracers ; Heroic rebels get different FireFX
FireSound = RebelWeapon
RadiusDamageAffects = ALLIES ENEMIES NEUTRALS
DelayBetweenShots = 100 ; time between shots, msec
ClipSize = 3 ; how many shots in a Clip (0 == infinite)
ClipReloadTime = 700 ; how long to reload a Clip, msec
WeaponBonus = PLAYER_UPGRADE DAMAGE 125% ; AP weapon upgrade
AntiAirborneVehicle = Yes
AntiAirborneInfantry = Yes
End



Here is how the Scorpion tank gun looks like


Weapon ScorpionTankGun
PrimaryDamage = 20.0
PrimaryDamageRadius = 5.0
ScatterRadiusVsInfantry = 10.0 ;When this weapon is used against infantry, it can randomly miss by as much as this distance.
AttackRange = 150.0
MinTargetPitch = -15 ; we may not target anything outside of this pitch range
MaxTargetPitch = 15 ; ditto
DamageType = ARMOR_PIERCING
DeathType = NORMAL
WeaponSpeed = 400 ; dist/sec
WeaponRecoil = 5 ; angle to deflect the model when firing
ProjectileObject = ScorpionTankShell
FireFX = WeaponFX_GenericTankGunNoTracerSmall
VeterancyFireFX = HEROIC WeaponFX_HeroicGenericTankGunNoTracerSmall
;Commented out to show it has been moved to ScorpionTankGunFXWeapon,
;because the art for the Toxin shell version incorporates the normal explosion.
; ProjectileDetonationFX = WeaponFX_GenericTankShellDetonation
FireSound = ScorpionTankWeapon
RadiusDamageAffects = ALLIES ENEMIES NEUTRALS
DelayBetweenShots = 1000 ; time between shots, msec
ClipSize = 0 ; how many shots in a Clip (0 == infinite)
ClipReloadTime = 0 ; how long to reload a Clip, msec


; note, these only apply to units that aren't the explicit target
; (ie, units that just happen to "get in the way"... projectiles
; always collide with the Designated Target, regardless of these flags
ProjectileCollidesWith = STRUCTURES WALLS
End



And here is how it should look like to suit my needs

Weapon ScorpionTankGun
PrimaryDamage = 20.0
PrimaryDamageRadius = 5.0
ScatterRadiusVsInfantry = 10.0 ;When this weapon is used against infantry, it can randomly miss by as much as this distance.
AttackRange = 150.0
MinTargetPitch = -15 ; we may not target anything outside of this pitch range
MaxTargetPitch = 15 ; ditto
DamageType = ARMOR_PIERCING
DeathType = NORMAL
WeaponSpeed = 400 ; dist/sec
WeaponRecoil = 5 ; angle to deflect the model when firing
ProjectileObject = ScorpionTankShell
FireFX = WeaponFX_GenericTankGunNoTracerSmall
VeterancyFireFX = HEROIC WeaponFX_HeroicGenericTankGunNoTracerSmall
;Commented out to show it has been moved to ScorpionTankGunFXWeapon,
;because the art for the Toxin shell version incorporates the normal explosion.
; ProjectileDetonationFX = WeaponFX_GenericTankShellDetonation
FireSound = ScorpionTankWeapon
RadiusDamageAffects = ALLIES ENEMIES NEUTRALS
DelayBetweenShots = 1000 ; time between shots, msec
ClipSize = 0 ; how many shots in a Clip (0 == infinite)
ClipReloadTime = 0 ; how long to reload a Clip, msec
AntiAirborneVehicle = Yes
AntiAirborneInfantry = Yes


; note, these only apply to units that aren't the explicit target
; (ie, units that just happen to "get in the way"... projectiles
; always collide with the Designated Target, regardless of these flags
ProjectileCollidesWith = STRUCTURES WALLS
End



Please explain how do i do that with ini file.


EDIT

i also made primary and secondary weapon for Supercomanche using original comanche antitank template:


Weapon SupercomancheAntiTankMissileWeapon1
PrimaryDamage = 50
PrimaryDamageRadius = 5.0
SecondaryDamage = 30.0
SecondaryDamageRadius = 25.0
ScatterRadiusVsInfantry = 20.0 ;When this weapon is used against infantry, it can randomly miss by as much as this distance.
AttackRange = 200.0
MinimumAttackRange = 0.0 ;100.0 ; this is to allow for a little "lead" for the helicopter targeting
DamageType = JET_MISSILES ;not so good against base defenses and some other units.
DeathType = EXPLODED
WeaponSpeed = 99999
ProjectileObject = ComancheAntiTankMissile
ProjectileExhaust = MissileExhaust
VeterancyProjectileExhaust = HEROIC HeroicComancheMissileExhaust
RadiusDamageAffects = ALLIES ENEMIES NEUTRALS
DelayBetweenShots = 500 ; time between shots, msec
ClipSize = 8 ; how many shots in a Clip (0 == infinite)
AutoReloadsClip = Yes
ClipReloadTime = 15000 ; how long to reload a Clip, msec
AutoReloadWhenIdle = 15100 ; If I haven't fired in this long, I will reload on my own (rather than only after the last one is fired)
FireSound = ComancheMissileWeapon
FireFX = None
ProjectileDetonationFX = WeaponFX_ComancheAntiTankMissileDetonation
ProjectileCollidesWith = STRUCTURES
AntiAirborneVehicle = No
AntiAirborneInfantry = No
ShowsAmmoPips = Yes
End




Weapon SupercomancheAntiTankMissileWeapon2
PrimaryDamage = 100
PrimaryDamageRadius = 5.0
SecondaryDamage = 30.0
SecondaryDamageRadius = 25.0
ScatterRadiusVsInfantry = 20.0 ;When this weapon is used against infantry, it can randomly miss by as much as this distance.
AttackRange = 200.0
MinimumAttackRange = 0.0 ;100.0 ; this is to allow for a little "lead" for the helicopter targeting
DamageType = JET_MISSILES ;not so good against base defenses and some other units.
DeathType = EXPLODED
WeaponSpeed = 99999
ProjectileObject = ComancheAntiTankMissile
ProjectileExhaust = MissileExhaust
VeterancyProjectileExhaust = HEROIC HeroicComancheMissileExhaust
RadiusDamageAffects = ALLIES ENEMIES NEUTRALS
DelayBetweenShots = 500 ; time between shots, msec
ClipSize = 4 ; how many shots in a Clip (0 == infinite)
AutoReloadsClip = Yes
ClipReloadTime = 15000 ; how long to reload a Clip, msec
AutoReloadWhenIdle = 15100 ; If I haven't fired in this long, I will reload on my own (rather than only after the last one is fired)
FireSound = ComancheMissileWeapon
FireFX = None
ProjectileDetonationFX = WeaponFX_ComancheAntiTankMissileDetonation
ProjectileCollidesWith = STRUCTURES
AntiAirborneVehicle = No
AntiAirborneInfantry = No
ShowsAmmoPips = Yes
End




EDIT 2

I had an idea how i could maybe, but just maybe avoid 3 wpn constraint, the key is in Combat cycle again, it is actually 6 units in one, and changing a driver changes units properties, now if i could make it so those two button in fact switched between two distinct units, like with infantry mounted bike and terror bike, in which everything is the same save for secondary weapon, it may do the trick, yet Combat cycle coding is extremely complex, it is taking considerably more space then other units for each of subunits.
NewNightmare
14 years ago
I've no time to check the code at (maths in 2 weeks time), but:
I can tell you that the range of weapons is 2 small considering the unit is meant to fire @ aircraft (Gattlings and quads have 350 I think), and the weapon itself should be in a separate slot (e.g. quad cannon has a standard weapon, as well as an air one, and fires each at different targets, described in the weaponset).
You also have to consider the animation, the tank won't aim at the flying plane if you don't allow the turretpitch, which has to be added in the draw module, and the turret code (without it tank will aim in the direction of the plane, but it won't lift the barrel)
same for the rebel, although it's much more of a challange as they use a lot of animation files.
Users browsing this topic