Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
Offline haggis  
#1 Posted : Wednesday, December 9, 2020 12:42:35 AM(UTC)
haggis
Private
Joined: 12/9/2020(UTC)
Posts: 37

Thanks: 20 times
Hi guys,

I'm new to modding Generals so I'm just doing slight tweaks, such as adding/changing weapons without actually making a model for the weapon barrels etc.

The end goal here is to have the supply truck double up as a Katyusha rocket platform in endgame. I basically made a new weapon based on the rocket buggy and that part works fine.

The problem I'm running into is that the rockets are fired in direct-fire mode, and I want them to be launched at a pitch, just like a Katyusha. I Googled a bit and found this thread: http://www.cnclabs.com/f...649_Modifying-Units.aspx

I tried adding the turret AI module to the supply truck, but it crashes the game on launch for me, I think due to some sort of conflict with the supply box AI module.

What do?

As I'm writing this post I think my best bet may be making an addon for it à-la Overlord and its Gatling cannon?

Thanks!

EDIT

Got the turret part to work by copying the turret behavior from inferno cannon (as opposed to the one in the thread I linked), however the supply trucks are now no longer able to gather supplies.

Is there a way for them to keep the supply AI while also having the turret pitch behavior?

Bonus question: how hard would it be to make the rockets fire from the back of the truck? They are firing from the front right now. I've no idea how to add a weapon bone or even what files would need to be edited for this.

Edited by user Wednesday, December 9, 2020 1:26:54 AM(UTC)  | Reason: Not specified

Sponsor
Offline Annihilationzh  
#2 Posted : Wednesday, December 9, 2020 7:35:04 PM(UTC)
Annihilationzh
General
Joined: 8/2/2008(UTC)
Posts: 1,779
United Kingdom

Thanks: 26 times
Was thanked: 475 time(s) in 331 post(s)
Quote:
Got the turret part to work by copying the turret behavior from inferno cannon (as opposed to the one in the thread I linked), however the supply trucks are now no longer able to gather supplies.


Like this?

Code:
  Behavior = SupplyTruckAIUpdate ModuleTag_03
    MaxBoxes = 4
    SupplyCenterActionDelay = 400     ; ms for whole thing (one transaction)
    SupplyWarehouseActionDelay = 1000 ; ms per box (many small transactions)
    SupplyWarehouseScanDistance = 700 ;350 ; Max distance to look for a warehouse, or we go home.  (Direct dock command on warehouse overrides, and no max on Center Scan)
    SuppliesDepletedVoice = SupplyTruckVoiceSuppliesDepleted
    Turret
      TurretTurnRate = 100
      TurretPitchRate = 100
      AllowsPitch = Yes
      FirePitch = 45
      ControlledWeaponSlots = PRIMARY
    End
    AutoAcquireEnemiesWhenIdle = No NotWhileAttacking
  End
  Locomotor = SET_NORMAL SupplyTruckLocomotor


Quote:
Bonus question: how hard would it be to make the rockets fire from the back of the truck? They are firing from the front right now. I've no idea how to add a weapon bone or even what files would need to be edited for this.

It should be a simple matter of duplicating another bone and moving it.
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.
thanks 1 user thanked Annihilationzh for this useful post.
haggis on 12/14/2020(UTC)
Offline haggis  
#3 Posted : Monday, December 14, 2020 10:48:00 AM(UTC)
haggis
Private
Joined: 12/9/2020(UTC)
Posts: 37

Thanks: 20 times
Sorry I didn't see your reply earlier, thought I activated email notification. Blush

Originally Posted by: Annihilationzh Go to Quoted Post

Like this?


Works great thanks! I must have messed up the syntax when I tried it (I tried both adding turret behavior inside the supply block and adding a separate AI block for turret).

1. In general, can I put multiple AI behaviors in the same "block"? Is there a limit?

Originally Posted by: Annihilationzh Go to Quoted Post

It should be a simple matter of duplicating another bone and moving it.


2. Is this in INIZH.big? I can't find it (I'm a total scrub and only took 1 intro programming course in uni).

Also some more questions if you have time:

3. What makes Dragon Tanks and Flashbang Grenades clear civilian buildings? I tried adding "AllowAttackGarrisonedBldgs = Yes" to large caliber weapons (e.g. overlord gun) but it doesn't work. I also changed the dmg type to explosion so I think it's not a dmg vs human armor issue (tank guys have 100hp, overlord does 80 per shot).

4. Is there a way to effectively increase Dragon Tank weapon range? Simply changing the AttackRange and WeaponSpeed values seems not enough, maybe I need to change the projectile files?

5. How do I add custom music to units/events? E.g. it would be cool if I could play a custom song when I launch specific superweapons, if Chinese propaganda towers (both static and on units) played a tune, if Humvees played Fortunate Son and Apaches played Ride of the Valkyries etc.

I think I've located the sound file call for nuke launches (in SoundEffects.ini, AudioEvent NeutronMissileRelease
Sounds = bneutlau) but I can't find the "bneutlau" file in any of the BIG files.

6. Is there a way to implement choosing "random USA", "random China" and "random GLA" in the skirmish setup screen instead of having to choose a specific faction/general?

7. Is there a way to make the camera further from the battlefield, without installing 3rd party things like gentools?

Edited by user Monday, December 14, 2020 10:54:37 AM(UTC)  | Reason: Not specified

Offline Annihilationzh  
#4 Posted : Monday, December 14, 2020 7:54:03 PM(UTC)
Annihilationzh
General
Joined: 8/2/2008(UTC)
Posts: 1,779
United Kingdom

Thanks: 26 times
Was thanked: 475 time(s) in 331 post(s)
Quote:
In general, can I put multiple AI behaviors in the same "block"? Is there a limit?

There are basics that you can include in any AI module. Turrets are one of those things. Supply, Dozer, Assault Transport, et al cannot be combined.

There's a Module List around somewhere on this forum. It tells you what can and can't be included in a module.

Quote:
2. Is this in INIZH.big? I can't find it (I'm a total scrub and only took 1 intro programming course in uni).

Nah you need modelling software for that. There should be a tutorial somewhere. Fair warning, setting it up and figuring out how to use it will take quite a while.

Quote:
3. What makes Dragon Tanks and Flashbang Grenades clear civilian buildings? I tried adding "AllowAttackGarrisonedBldgs = Yes" to large caliber weapons (e.g. overlord gun) but it doesn't work. I also changed the dmg type to explosion so I think it's not a dmg vs human armor issue (tank guys have 100hp, overlord does 80 per shot).

WeaponObjects.ini -> DragonTankFlameProjectile -> MissileAIUpdate -> GarrisonHitKillCount

Quote:
4. Is there a way to effectively increase Dragon Tank weapon range? Simply changing the AttackRange and WeaponSpeed values seems not enough, maybe I need to change the projectile files?

Yup you answered your own question. Weapon speed doesn't apply to projectile weapons.

Quote:
5. How do I add custom music to units/events? E.g. it would be cool if I could play a custom song when I launch specific superweapons, if Chinese propaganda towers (both static and on units) played a tune, if Humvees played Fortunate Son and Apaches played Ride of the Valkyries etc.

I think I've located the sound file call for nuke launches (in SoundEffects.ini, AudioEvent NeutronMissileRelease
Sounds = bneutlau) but I can't find the "bneutlau" file in any of the BIG files.

Sorry but I honestly can't remember. I think it's been more than a decade since I last messed with sounds.

Quote:
6. Is there a way to implement choosing "random USA", "random China" and "random GLA" in the skirmish setup screen instead of having to choose a specific faction/general?

Not that I know of.

Quote:
7. Is there a way to make the camera further from the battlefield, without installing 3rd party things like gentools?

GameData.ini. Change MaxCameraHeight. IIRC CameraHeight doesn't actually do anything.
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.
thanks 1 user thanked Annihilationzh for this useful post.
haggis on 12/14/2020(UTC)
Offline haggis  
#5 Posted : Monday, December 14, 2020 11:58:55 PM(UTC)
haggis
Private
Joined: 12/9/2020(UTC)
Posts: 37

Thanks: 20 times
Originally Posted by: Annihilationzh Go to Quoted Post
Yup you answered your own question. Weapon speed doesn't apply to projectile weapons.


Still can't get it to work... Tried increasing FuelLifetime in DragonTankFlameProjectile, but still the flame seems to hit an invisible wall. I'd order the tank to attack from range, it would stop and fire, and not do any dmg due to the flames not actually reaching target.
Offline Annihilationzh  
#6 Posted : Tuesday, December 15, 2020 11:01:09 AM(UTC)
Annihilationzh
General
Joined: 8/2/2008(UTC)
Posts: 1,779
United Kingdom

Thanks: 26 times
Was thanked: 475 time(s) in 331 post(s)
Play around with it. There are plenty of missiles which work at long range that you can use as a base.

And DragonTankFlameProjectileUpgraded (black napalm) will also need changing.
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.
Offline haggis  
#7 Posted : Wednesday, December 16, 2020 3:14:03 PM(UTC)
haggis
Private
Joined: 12/9/2020(UTC)
Posts: 37

Thanks: 20 times
Got it to work! The problem was not in DragonTankFlameProjectileUpgraded, but in FlamethrowerProjectileStreamUpgraded.

I changed the MaxSegments from 4 to 10 (kept DragonTankFlameProjectileUpgraded FuelLifeTime at the increased value), and it can now properly attack at range.

Now this weapon works properly on Dragon Tank, but the graphics (FX) is all off on an Overlord... the flames shoot diagonally down towards the ground right out of the turret and then travels towards the target at ground level. It's a minor thing but would you know where I should look at to fix this? I looked at the locomotor for the flames but it says "air".

Edited by user Wednesday, December 16, 2020 3:19:41 PM(UTC)  | Reason: Not specified

Offline Annihilationzh  
#8 Posted : Wednesday, December 16, 2020 3:46:35 PM(UTC)
Annihilationzh
General
Joined: 8/2/2008(UTC)
Posts: 1,779
United Kingdom

Thanks: 26 times
Was thanked: 475 time(s) in 331 post(s)
AFAIK you'd need to modify the overlord's model. It's not designed for a flame thrower.

The Contra mod has a dragon overlord FYI. You could steal their model.
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.
thanks 1 user thanked Annihilationzh for this useful post.
haggis on 12/16/2020(UTC)
Offline haggis  
#9 Posted : Thursday, January 7, 2021 2:22:04 AM(UTC)
haggis
Private
Joined: 12/9/2020(UTC)
Posts: 37

Thanks: 20 times
Originally Posted by: haggis Go to Quoted Post

I think I've located the sound file call for nuke launches (in SoundEffects.ini, AudioEvent NeutronMissileRelease
Sounds = bneutlau) but I can't find the "bneutlau" file in any of the BIG files.


In case anyone finds this through Google, the answer was that the file was in the Generals BIG files, not ZH ones. Looks like ZH can call assets from the Generals folder.

Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.