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

Notification

Icon
Error

3 Pages123>
Options
Go to last post Go to first unread
Offline haggis  
#1 Posted : Thursday, January 7, 2021 2:19:23 AM(UTC)
haggis
Private
Joined: 12/9/2020(UTC)
Posts: 37

Thanks: 20 times
1. How should I go about implementing OCLs to replace standard unit spawns in a barracks? Say, I want the faction barracks to have a button that spawns 6 rifles and 2 rockets as a standard platoon, in 1 go. I know how to make the OCL, but not how to implement the command button to the barracks' command set (mostly because there is no CommandButton with an OCL that I can copy off of - I tried looking at OverlordGattling but it's an upgrade and not repeatable).

2. Are there any downsides to using regular units instead of faction-specific ones when I use them in my OCLs (e.g. standard China redguards vs Tank General's redguards), if the units are otherwise the same? It would save me quite a few lines of pseudocode.

3. Is it possible to make "free shooting" weapons without resorting to hidden contain modules with custom untrainable infantry? I'd like to add short range AA machine guns to tanks, but don't know how to make them not bound to the direction the tank or the turret is facing.

4. Is it possible to change the size/radius of an explosion FX (e.g. the nuke cannon's explosion)? Or make it fit the radius of the weapon somehow?

Edited by user Friday, January 8, 2021 12:29:02 AM(UTC)  | Reason: Not specified

Sponsor
Offline Annihilationzh  
#2 Posted : Thursday, January 7, 2021 4:21:43 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)
Quote:
1. How should I go about implementing OCLs to replace standard unit spawns in a barracks? Say, I want the faction barracks to have a button that spawns 6 rifles and 2 rockets as a standard platoon, in 1 go. I know how to make the OCL, but not how to implement the command button to the barracks' command set (mostly because there is no CommandButton with an OCL that I can copy off of - I tried looking at OverlordGattling but it's an upgrade and not repeatable).

I would use SpawnBehavior instead of an OCL.

I.E. Create an angry mob that doesn't enslave it's spawns. See the tunnel network for an example of non-slave spawns.

Side note: Without slaves, an angry mob will never despawn - ever. A deletionupdate can fix that.

Quote:
2. Are there any downsides to using regular units instead of faction-specific ones when I use them in my OCLs (e.g. standard China redguards vs Tank General's redguards), if the units are otherwise the same? It would save me quite a few lines of pseudocode.

The differences can be a problem. Upgrades, free veterancy, and similar won't apply.

You could spawn regular rebels as stealth general and they won't have camo - because he ironically doesn't actually have the camouflage upgrade.

Quote:
3. Is it possible to make "free shooting" weapons without resorting to hidden contain modules with custom untrainable infantry? I'd like to add short range AA machine guns to tanks, but don't know how to make them not bound to the direction the tank or the turret is facing.

In Weapon.ini, AcceptableAimDelta allows units to fire without turning. You can also have a second turret via AI modules (AltTurret).

Quote:
4. Is it possible to change the size/radius of an explosion FX (e.g. the nuke cannon's explosion)? Or make it fit the radius of the weapon somehow?

It's handled by FXList.ini and ParticleSystem.ini.

Fair warning here, it can take hours to do even the simplest things with particles. It took me hours just to recolour a nuke into an anthrax gamma bomb.
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 1/8/2021(UTC)
Offline haggis  
#3 Posted : Friday, January 8, 2021 12:34:35 AM(UTC)
haggis
Private
Joined: 12/9/2020(UTC)
Posts: 37

Thanks: 20 times
Thanks ^^

More questions today:

1. Is it possible to make a unit lose stealth when damaged below a threshold (to simulate the loss of stealth coating)?

I tried looking in the ModuleList file, but it doesn't specify what's "status bit types" or "object condition types".

Quote:

StealthUpdate
[This module allows the use of SoundStealthOn and SoundStealthOff parameters on the object and is hardcoded to display MESSAGE:StealthNeutralized when the object has been discovered]
UseRiderStealth = [Yes/No]
StealthDelay = [integer, milliseconds]
MoveThresholdSpeed = [integer]
StealthForbiddenConditions = [Object Condition types]
HintDetectableConditions = [Status Bit types]
FriendlyOpacityMin = [percentage]
FriendlyOpacityMax = [percentage]
PulseFrequency = [integer, milliseconds]
RevealDistanceFromTarget = [real number]
ForbiddenStatus = [Status Bit types]
RequiredStatus = [Status Bit types]
OrderIdleEnemiesToAttackMeUponReveal = [Yes/No]
InnateStealth = [Yes/No]

EnemyDetectionEvaEvent = [Entry from Eva.ini]
OwnDetectionEvaEvent = [Entry from Eva.ini]
GrantedBySpecialPower = [Yes/No]
BlackMarketCheckDelay = [integer, milliseconds]

[Note: This part needs the DISGUISER KindOf defined on the object and
[allows the use of DisguiseStarted and DisguiseRevealedSuccess
[and DisguiseRevealedFailure within UnitSpecificSounds section of the object]
DisguisesAsTeam = [Yes/No]
DisguiseFX = [entry from FXList.INI]
DisguiseRevealFX = [entry from FXList.INI]
DisguiseTransitionTime = [integer, milliseconds]
DisguiseRevealTransitionTime = [integer, milliseconds]
End


2. I tried adding the following ECM behavior to (vanilla China's) ChinaTankOverlordPropagandaTower, but it doesn't work:

Quote:

Behavior = FireWeaponUpdate ModuleTag_23
Weapon = ECMTankMissileJammer
;ExclusiveWeaponDelay = 1000 ; If we fire a real weapon, we turn this module off for this long
End


3. Can I really put *anything* in "ModuleTag_xx"? Like "ModuleTag_Stealth", or "ModuleTag_PropTower"? I wouldn't need to double check the numbers if I just put names on the modules I add.

4. Is there a way to change a weapon into having 2 components? E.g. if I want to add a pistol sidearm to rocket guys and could modify the rocket weapon, I'd need quite a bit less edits than if I went into all 12 factions.

5. How important are KindOf tags? So far I haven't bothered adding any.

Edited by user Friday, January 8, 2021 12:50:06 AM(UTC)  | Reason: Not specified

Offline Annihilationzh  
#4 Posted : Friday, January 8, 2021 4:21:04 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)
Quote:
1. Is it possible to make a unit lose stealth when damaged below a threshold (to simulate the loss of stealth coating)? I tried looking in the ModuleList file, but it doesn't specify what's "status bit types" or "object condition types".

I don't want to say no, because it might be possible with a convoluted workaround. But there is no simple way to do it.

All the kindofs, statusbits, et al are at the bottom of the file.

Quote:
2. I tried adding the following ECM behavior to (vanilla China's) ChinaTankOverlordPropagandaTower, but it doesn't work:

I would guess that's because it's technically garrisoned inside the overlord, but I'm not sure.

In world builder you can place an overlord propaganda tower on the floor by itself. You could see if it works there.

Quote:
3. Can I really put *anything* in "ModuleTag_xx"? Like "ModuleTag_Stealth", or "ModuleTag_PropTower"? I wouldn't need to double check the numbers if I just put names on the modules I add.

Pretty much. MT_PropTower or even just MTPT would work. I'm not sure about really extreme stuff like obscure unicode characters.

Quote:
4. Is there a way to change a weapon into having 2 components? E.g. if I want to add a pistol sidearm to rocket guys and could modify the rocket weapon, I'd need quite a bit less edits than if I went into all 12 factions.

You mean like a two-in-one weapon? You can try but I'm not sure you'd be able to get the pistol to actually look like bullets. The missile would be doing the bullet damage.

Quote:
5. How important are KindOf tags? So far I haven't bothered adding any.

They have various effects. The MOAB plane has kindofs to prevent it from being clicked. Heroes have a kindof to give them a minimap pip. DRONE makes them immune to neutron.

Some of them are only there so they can be identified by other units. Like the bunker needs to know that tanks aren't allowed inside; toxin pools need to only be targeted by cleanup; and it would be awkward if a nuke got shot by an avenger.
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 1/9/2021(UTC)
Offline haggis  
#5 Posted : Saturday, January 9, 2021 2:11:56 AM(UTC)
haggis
Private
Joined: 12/9/2020(UTC)
Posts: 37

Thanks: 20 times
Originally Posted by: Annihilationzh Go to Quoted Post
Quote:
2. I tried adding the following ECM behavior to (vanilla China's) ChinaTankOverlordPropagandaTower, but it doesn't work:

I would guess that's because it's technically garrisoned inside the overlord, but I'm not sure.

In world builder you can place an overlord propaganda tower on the floor by itself. You could see if it works there.


Sadly world builder isn't working for me due to my modding :/ the game launches fine but apparently the world builder is pickier about syntax.

Meanwhile I got more questions:

1. Do weapon ranges account for altitude? E.g. if a plane flies at 100 height and an AA gun had 99 range (or a bit lower than that to account for the unit's height), would it not be able to hit the plane?

2. When do I need to specify AutoChooseSources in weaponsets (beside "none", that one I can see the purpose)?

3. ScatterRadius in Weapon.ini... is there a way to set it to a cone (i.e. smaller radius if short range, larger if long range)? It looks pretty silly when I set a scatter radius and the close range shots look like they've been fired from a blunderbuss.

4. Is there a table for things I should be aware of when adding things? For instance, a custom weapon needs to be referenced in the unit's weaponset. Can I just add new damage types and reference them in armor.ini? New armor types and reference them in units?
Offline Annihilationzh  
#6 Posted : Saturday, January 9, 2021 4:15:48 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)
Quote:
Sadly world builder isn't working for me due to my modding :/ the game launches fine but apparently the world builder is pickier about syntax.

I am horrified that you're not fixing those errors.

Quote:
1. Do weapon ranges account for altitude? E.g. if a plane flies at 100 height and an AA gun had 99 range (or a bit lower than that to account for the unit's height), would it not be able to hit the plane?

AFAIK range ignores altitude - although I've never actually tested it so I could be wrong. Although a high damage explosion on the floor can hit planes.

Quote:
2. When do I need to specify AutoChooseSources in weaponsets (beside "none", that one I can see the purpose)?

I only ever do it when one of the weapons needs a none. I've never had any issues.

Quote:
3. ScatterRadius in Weapon.ini... is there a way to set it to a cone (i.e. smaller radius if short range, larger if long range)? It looks pretty silly when I set a scatter radius and the close range shots look like they've been fired from a blunderbuss.

Not that I know of. The closest would be giving the unit multiple weapons with different ranges, minimum ranges and scatter radius.

Quote:
4. Is there a table for things I should be aware of when adding things? For instance, a custom weapon needs to be referenced in the unit's weaponset. Can I just add new damage types and reference them in armor.ini? New armor types and reference them in units?

Pretty much the only lists/documentation for this game is the module list and what you find in the ini files themselves. We had to learn pretty much everything from trial and error - and world builder's error detection.

One day a major mod team tried to add one too many upgrades and discovered there is an upgrade limit of 128 (IIRC). The devs never told us anything.

Armor.ini tells you what the damage types are, and that's it. That's all you can work with. The rest are hard coded.

Edited by user Saturday, January 9, 2021 5:45:13 AM(UTC)  | Reason: Not specified

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 1/10/2021(UTC)
Offline thanasis92  
#7 Posted : Saturday, January 9, 2021 6:10:47 AM(UTC)
thanasis92
Private
Joined: 1/9/2021(UTC)
Posts: 10

Thanks: 1 times
Hello gentlemen,

I am trying to add some simple mods just for fun to Zero Hour (for example make Tomahawk vehicle available to Laser General). Although I am realy careful with the procedure with the .ini files, following the available tutorials step-by-step, nothing happens in the game.

I have tried also the simplest of all, change the construnction cost of a vehicle or delete a prerequisite with no result! Game runs with the original values.

Any suggestion ?
Offline Annihilationzh  
#8 Posted : Saturday, January 9, 2021 7:19:39 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)
Originally Posted by: thanasis92 Go to Quoted Post
Hello gentlemen,

I am trying to add some simple mods just for fun to Zero Hour (for example make Tomahawk vehicle available to Laser General). Although I am realy careful with the procedure with the .ini files, following the available tutorials step-by-step, nothing happens in the game.

I have tried also the simplest of all, change the construnction cost of a vehicle or delete a prerequisite with no result! Game runs with the original values.

Any suggestion ?

90% you have the files in the wrong place.
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 thanasis92  
#9 Posted : Saturday, January 9, 2021 7:34:15 AM(UTC)
thanasis92
Private
Joined: 1/9/2021(UTC)
Posts: 10

Thanks: 1 times
Originally Posted by: Annihilationzh Go to Quoted Post

90% you have the files in the wrong place.


All the .ini files are extracted to ZeroHour\Data\INI.
Offline Annihilationzh  
#10 Posted : Saturday, January 9, 2021 8:34:52 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)
Originally Posted by: thanasis92 Go to Quoted Post
All the .ini files are extracted to ZeroHour\Data\INI.

That honestly sounds like the most common extraction mistake. But to be sure - what is the full directory of AIData.ini?
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 thanasis92  
#11 Posted : Saturday, January 9, 2021 8:43:55 AM(UTC)
thanasis92
Private
Joined: 1/9/2021(UTC)
Posts: 10

Thanks: 1 times
Originally Posted by: Annihilationzh Go to Quoted Post

That honestly sounds like the most common extraction mistake. But to be sure - what is the full directory of AIData.ini?


I wish to be a simple mistake as that! There are two AIData.ini:

1) C:\Program Files (x86)\CnC Generals\ZeroHour\Data\INI

2) C:\Program Files (x86)\CnC Generals\ZeroHour\Data\INI\Default
Offline Annihilationzh  
#12 Posted : Saturday, January 9, 2021 9:08:02 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)
Well you did not make the common mistake. But I've never seen this before:

C:\Program Files (x86)\CnC Generals\ZeroHour\Data\INI

So does this mean your other files are here?

C:\Program Files (x86)\CnC Generals\ZeroHour\INIZH.big
C:\Program Files (x86)\CnC Generals\ZeroHour\Generals.exe

If yes, you have the right location for the INI files - and we'll have to figure out what else is going wrong.
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 thanasis92  
#13 Posted : Saturday, January 9, 2021 9:12:56 AM(UTC)
thanasis92
Private
Joined: 1/9/2021(UTC)
Posts: 10

Thanks: 1 times
Originally Posted by: Annihilationzh Go to Quoted Post

So does this mean your other files are here?


Of course they are here... (during installation I have changed the original path "Command & Conquer... etc" in order to have smaller path)
Offline Annihilationzh  
#14 Posted : Saturday, January 9, 2021 9:21:44 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)
Sorry, I had to check. Sometimes you get people on here who do the strangest things.

Second thing to consider - your operating system. Windows has been known to stop people from editing program files. You may need to lookup a fix or move the folder.

If it's not that, I'm running out of ideas of what could be going wrong.
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 thanasis92  
#15 Posted : Saturday, January 9, 2021 9:30:32 AM(UTC)
thanasis92
Private
Joined: 1/9/2021(UTC)
Posts: 10

Thanks: 1 times
Originally Posted by: Annihilationzh Go to Quoted Post
Windows has been known to stop people from editing program files. You may need to lookup a fix or move the folder.

My OS is Windows 10. I am aware of that annoying issue, but I am afraid it's not the case; I double check every .ini file after saving, by closing and reopening it, to be sure that the changes are there.
Offline Annihilationzh  
#16 Posted : Saturday, January 9, 2021 9:47:45 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)
Well I'm stumped. Something is stopping the game from reading the INIs and if it's not windows then I have no idea what it could be.
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 thanasis92  
#17 Posted : Saturday, January 9, 2021 9:54:04 AM(UTC)
thanasis92
Private
Joined: 1/9/2021(UTC)
Posts: 10

Thanks: 1 times
Originally Posted by: Annihilationzh Go to Quoted Post
Well I'm stumped. Something is stopping the game from reading the INIs and if it's not windows then I have no idea what it could be.


I have deleted (temporarily) all the .ini files AND the INIZH.big and the game runs smoothly! I give up!
Offline Annihilationzh  
#18 Posted : Saturday, January 9, 2021 10:03:47 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)
I'm still suspicious of windows. I once had the exact issue you're having but in vista. My standing suggestion is to install the game outside of program files.

I keep my games on a different hard drive, and I haven't had this issue in years.
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.
thanasis92 on 1/9/2021(UTC)
Offline thanasis92  
#19 Posted : Saturday, January 9, 2021 10:06:32 AM(UTC)
thanasis92
Private
Joined: 1/9/2021(UTC)
Posts: 10

Thanks: 1 times
Originally Posted by: Annihilationzh Go to Quoted Post
I'm still suspicious of windows. I once had the exact issue you're having but in vista. My standing suggestion is to install the game outside of program files.

I keep my games on a different hard drive, and I haven't had this issue in years.


I have nothing to lose. I will try that now.
Offline thanasis92  
#20 Posted : Saturday, January 9, 2021 11:35:51 AM(UTC)
thanasis92
Private
Joined: 1/9/2021(UTC)
Posts: 10

Thanks: 1 times
Originally Posted by: Annihilationzh Go to Quoted Post
I'm still suspicious of windows.


You had right! I reinstalled the game away from Program Files and finally, any change to .ini file is applied into the game! Thanx General, it's time for some experiments!
Users browsing this topic
Guest
3 Pages123>
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.