Just for more clarification, is what I am about to do going to be possible? Thanks.
Adding new weapons is like the first thing every modder learns. (Well apart from the obvious stuff)
I have researched and concluded almost everything there is to know about weapons in YR. So I can help you out or sarcastically link you to ModEnc.
I'll do both.
First things first, in any given unit/building there are two weapons, Primary= and Secondary=. The order for your weapons does not matter except for two things, the DefaultDeathWeapon of the unit and what will shoot the terrain. (For the purposes of this explanation WeaponX rules are left out)
Primary= controls the DefaultDeathWeapon and is the weapon that fires upon terrain when force-firing.
Secondary= is merely the alternative if the Primary cannot shoot it.
As I said, ordering does not matter. If you have two weapons on a unit you can put whichever you like in the Primary= slot and the other in the Secondary=.
NOTE AND WARNING: If your unit does not have a Primary= the game will crash with an Internal Error (IE). Regardless if the Secondary= works or not.
Each weapon when you make it has 4 principle components:
Code:
[YourWeaponNameHere] ;think of names to give your stuff. Note: some maps in retail YR have specifically called for weapons and failing to include them will result in IEs. If you don't plan on using new campaign maps, take this into consideration.
Damage=X ;where X is your amount of damage before any other calculations
ROF=Y ;where Y is your Rate Of Fire (ROF). Measured in frames. (900 frames = 1 minute at medium speed)
Projectile=YourProjectileHere ;Where "YourProjectileHere" is the projectile used for the weapon. Projectiles determine whether a weapon can strike many things such as air and land.
Warhead=YourWarheadHere ;Where "YourWarheadHere" is the warhead used for the weapon/projectile. Warheads are important because they are used to determine the Verses= for each armor type. In addition they also have the impact animation/sound. Weapons without Warheads will pull defaults in Skirmish mode but are highly likely to crash anyways. It is always good practice to make sure each weapon has a valid Warhead.
Everything else such as Report=YourGunshotSoundHere and Anim=YourFiringAnimHere are just fluff and aesthetics. They serve no purpose for targeting and damage.
Now to actually make a new weapon I'll just let the words of DCoder over at the ModEnc tutorial do the rest:
Not true. The engine will always use the Primary for forcefire commands. If you want a unit to destroy trees and walls but don't have the Primary as the weapon that attacks terrain and walls, your unit will forever fruitlessly fire away, doing nothing until you make it stop. QUICK_EDIT
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum