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

Notification

Icon
Error

3 Pages<123
haggis Offline
#41 Posted : Tuesday, January 19, 2021 2:23:40 AM(UTC)
Haggis
Private
Joined: 12/9/2020(UTC)
Posts: 36

Thanks: 19 times
Sorry for double post, another question...

How does one make historic weapon OCLs work?

I tried to follow the trail of FirestormSmallCreationWeapon. The weapon leads to OCL_FirestormSmall, the OCL leads to an Object named FirestormSmall, but the Object I can't find in WeaponObjects, nor anywhere else.

Then I tried following the trail of DirtyNukeCreationWeapon; it leads thru the OCL to an Object named CargoTruckNuke, which from the code looks like a carbon copy of the nuclear missile. I tried using its template to make my own historic OCL, but it doesn't work at all.
Annihilationzh Offline
#42 Posted : Tuesday, January 19, 2021 5:37:43 AM(UTC)
Annihilationzh
General
Joined: 8/2/2008(UTC)
Posts: 1,766
United Kingdom

Thanks: 26 times
Was thanked: 469 time(s) in 326 post(s)
Quote:
I... don't quite get it. Don't most units use all their weapons?

The comanche fires the PRIMARY machine gun at everything. But it won't fire it's SECONDARY missiles at infantry because it's not told to in the code.

If you make the missiles the PRIMARY weapon they'll shoot at infantry.

Quote:
Also, unlike the Dozer (who just sits there and attacks with what's basically an infantry rifle just like an infantry unit would), it will shoot 1 shot of its rifle (it has a clip of 3) and immediately turn away. So even that part of the weapon does not work.

I don't remember ever coming across that before. They do have a weapon - mine removing. It's possible that code is messing with it.

Quote:
I tried to follow the trail of FirestormSmallCreationWeapon. The weapon leads to OCL_FirestormSmall, the OCL leads to an Object named FirestormSmall, but the Object I can't find in WeaponObjects, nor anywhere else.

You're looking for System.ini

Historic is handled entirely by the weapon. When the shot threshold is reached the weapon fires on the ground where it happened.

Have you tested the dirty nuke? I have a vague memory that says something is wrong with 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.
 1 user thanked Annihilationzh for this useful post.
haggis on 1/19/2021(UTC)
haggis Offline
#43 Posted : Tuesday, January 19, 2021 6:21:01 PM(UTC)
Haggis
Private
Joined: 12/9/2020(UTC)
Posts: 36

Thanks: 19 times
Originally Posted by: Annihilationzh Go to Quoted Post
The comanche fires the PRIMARY machine gun at everything. But it won't fire it's SECONDARY missiles at infantry because it's not told to in the code.

If you make the missiles the PRIMARY weapon they'll shoot at infantry.


Is that due to the lines

PreferredAgainst = PRIMARY INFANTRY
AutoChooseSources = PRIMARY FROM_PLAYER FROM_SCRIPT FROM_AI

Or is it some other part of the code?

The thing is, I got the molotov cocktail working on Minigunners working with the fake turret (copied from Comanche), not with weaponset stuff.

Anyhow my specific issue is resolved, just trying to understand how this all works.

Quote:
I don't remember ever coming across that before. They do have a weapon - mine removing. It's possible that code is messing with it.


Oh I meant the SupplyTrucks with their arty weapon I added, sorry if it wasn't clear.

I'm fairly sure that it's a weapon range issue now. Is it impossible to have a functional unit with 2 weapons that have non-overlapping ranges? (in this case I had 100-300 and 0-100)

Quote:
You're looking for System.ini


If I were to make a new weapon object, should it go to WeaponObjects.ini or System.ini?

Intuition says WeaponObjects, but I did just try that and it didn't work and there's this FirestormSmall that sits in System.ini and works.

Quote:
Have you tested the dirty nuke? I have a vague memory that says something is wrong with it.


I just tested it as a historic bonus on the Inferno Cannon (since I know for a fact that the Inferno Cannon's historic bonus works fine). It works great actually!

Two other historic bonus weapons did not work great, however:

1. I tried BlackNapalmFirestormSmallCreationWeapon on my Katyusha launchers since I know it works for other weapons and has a very distinctive look, it did not trigger at all. My code looks like this:

Quote:
Weapon KatyushaWeapon
PrimaryDamage = 10.0
PrimaryDamageRadius = 10.0
ScatterRadiusVsInfantry = 20.0 ;When this weapon is used against infantry, it can randomly miss by as much as this distance.
SecondaryDamage = 5.0
SecondaryDamageRadius = 20.0
AttackRange = 350.0
MinimumAttackRange = 100.0 ;150.0 ; Rockets take some distance to target, and you don't want them to blow up in your face.
MinTargetPitch = -90
MaxTargetPitch = 79
DamageType = EXPLOSION ; ignored for projectile weapons
DeathType = EXPLODED
WeaponSpeed = 200 ; ignored for projectile weapons
ProjectileDetonationFX = WeaponFX_RocketBuggyMissileDetonation
ProjectileObject = InfernoTankShell ; KatyushaRocket TomahawkMissile InfernoTankShell RocketBuggyMissile
ProjectileExhaust = MissileExhaust
VeterancyProjectileExhaust = HEROIC HeroicMissileExhaust
RadiusDamageAffects = ALLIES ENEMIES NEUTRALS
ScatterRadius = 100 ; This weapon will scatter somewhere within a circle of this radius, instead of hitting someone directly
DelayBetweenShots = 100 ; time between shots, msec
ClipSize = 48 ; how many shots in a Clip (0 == infinite)
ClipReloadTime = 12000 ; how long to reload a Clip, msec
AutoReloadsClip = Yes
AutoReloadWhenIdle = 12100 ; If I haven't fired in this long, I will reload on my own (rather than only after the last one is fired)
FireFX = FX_BuggyMissileIgnition
FireSound = RocketBuggyWeapon
ProjectileCollidesWith = STRUCTURES
MissileCallsOnDie = Yes

HistoricBonusTime = 5000
HistoricBonusCount = 3
HistoricBonusRadius = 30
HistoricBonusWeapon = BlackNapalmFirestormSmallCreationWeapon
End


My guess is that the scatter makes it never proc due to the condition not being met? Not sure.

2. I tried Nuke_NuclearTankDeathWeapon as historic weapon on the Inferno Cannon, doesn't work at all... What's causing this?

Extra question:

3. Can I make a unit not fire a specific weapon while contained? Molotov cocktails are nice and all but look kinda silly when thrown out of a Troop Crawler.



Annihilationzh Offline
#44 Posted : Tuesday, January 19, 2021 7:15:55 PM(UTC)
Annihilationzh
General
Joined: 8/2/2008(UTC)
Posts: 1,766
United Kingdom

Thanks: 26 times
Was thanked: 469 time(s) in 326 post(s)
Quote:
Is that due to the lines

PreferredAgainst = PRIMARY INFANTRY
AutoChooseSources = PRIMARY FROM_PLAYER FROM_SCRIPT FROM_AI

Or is it some other part of the code?

No. IIRC that doesn't actually do anything. The primary weapon will always fire. It's this part:
Code:
    PreferredAgainst    = SECONDARY   VEHICLE STRUCTURE

It tells the missiles when to fire. Otherwise they just won't fire at all.

Quote:
I'm fairly sure that it's a weapon range issue now. Is it impossible to have a functional unit with 2 weapons that have non-overlapping ranges? (in this case I had 100-300 and 0-100)

Have you tried giving the secondary weapon a PrefferedAgainst VEHICLE INFANTRY STRUCTURE?

Quote:
If I were to make a new weapon object, should it go to WeaponObjects.ini or System.ini?

Intuition says WeaponObjects, but I did just try that and it didn't work and there's this FirestormSmall that sits in System.ini and works.

Doesn't matter. You can put them anywhere in the object folder. Even XXX.ini

Quote:
1. I tried BlackNapalmFirestormSmallCreationWeapon on my Katyusha launchers since I know it works for other weapons and has a very distinctive look, it did not trigger at all. My code looks like this:

Does it work if you increase the radius to match the scatter? I don't know how the count works in the hard code, but I'm thinking it might be reset when a lot of projectiles land outside of the radius.

Quote:
2. I tried Nuke_NuclearTankDeathWeapon as historic weapon on the Inferno Cannon, doesn't work at all... What's causing this?

I honestly don't know. I've never seen this before.

Quote:
3. Can I make a unit not fire a specific weapon while contained? Molotov cocktails are nice and all but look kinda silly when thrown out of a Troop Crawler.

I don't think so. I could be misremembering though.
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.
haggis Offline
#45 Posted : Tuesday, January 19, 2021 11:27:00 PM(UTC)
Haggis
Private
Joined: 12/9/2020(UTC)
Posts: 36

Thanks: 19 times
Originally Posted by: Annihilationzh Go to Quoted Post
Have you tried giving the secondary weapon a PrefferedAgainst VEHICLE INFANTRY STRUCTURE?


Just tried the rocket launcher on PRIMARY, and the service rifle on SECONDARY Preferred Against INFANTRY, nope doesn't work.

Quote:
Doesn't matter. You can put them anywhere in the object folder. Even XXX.ini


Omg... Does this mean I could'a put all my new things (weapons, OCLs etc) into something called haggis.ini? Well 1 for each folder that is...

Quote:
Does it work if you increase the radius to match the scatter? I don't know how the count works in the hard code, but I'm thinking it might be reset when a lot of projectiles land outside of the radius.


Just tried it, nope doesn't work.

I tried commenting out MissileCallsOnDie = Yes... the only other line that doesn't usually appear on vanilla weapons with historic bonus. What does that line even do? Anyhow whether it's commented out doesn't change anything.

I have 3 hypothesis remaining... Either it just plain doesn't work on weapons with Scatter (but why?), or the amount of crap I'm generating is too much so the historic weapon is skipped (also unlikely... I have generated more crap before than this playing the vanilla game), or something funky is happening due to the vehicle firing the weapon (since I have problems with the vehicle too... maybe I missed something on the SupplyTruck).

Quote:
So that's called WeaponMuzzleFlash in the draw module.

The simplest and quickest solution is to remove the muzzle flash entirely with HideSubObject.

However, It might stop doing that if you make the gun/cannon and muzzle flash the secondary weapon. I'm not sure.


Btw I finally got around to testing this out, and it totally works when I swap the main gun with its muzzle flash (and all the other PRIMARY weapon draw modules) to SECONDARY.

Also, I haven't had another crash despite running Overlords with ECM behavior and the full 3 weapons. Maybe my earlier crash was due to something else?

Another question:

Is it possible to make a unit have a range A with its weapon, and a range B with its weapon if the fog of war is cleared by another unit? Maybe implemented as a special power with a separate weapon?
Adjiesman Offline
#46 Posted : Wednesday, January 20, 2021 4:41:16 AM(UTC)
Adjiesman
Private
Joined: 12/9/2020(UTC)
Posts: 5
Indonesia

Originally Posted by: haggis Go to Quoted Post
Omg... Does this mean I could'a put all my new things (weapons, OCLs etc) into something called haggis.ini? Well 1 for each folder that is...


yes, you can do it, but it has to be in order, me thinks.

Annihilationzh Offline
#47 Posted : Wednesday, January 20, 2021 11:49:19 AM(UTC)
Annihilationzh
General
Joined: 8/2/2008(UTC)
Posts: 1,766
United Kingdom

Thanks: 26 times
Was thanked: 469 time(s) in 326 post(s)
Quote:
Omg... Does this mean I could'a put all my new things (weapons, OCLs etc) into something called haggis.ini? Well 1 for each folder that is...

I've never actually tried it with weapons or ocls.

Quote:
Is it possible to make a unit have a range A with its weapon, and a range B with its weapon if the fog of war is cleared by another unit? Maybe implemented as a special power with a separate weapon?

The game kinda does that already with artillery. They can't see very far so other units have to scout for them. But you can enhance range with drone spotting.
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.
Users browsing this topic
Guest
3 Pages<123
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.

Powered by YAF 1.9.6.1 | YAF © 2003-2021, Yet Another Forum.NET
This page was generated in 0.879 seconds.