Project Perfect Mod Forums
:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::


The time now is Fri Apr 19, 2024 4:31 pm
All times are UTC + 0
Adding a new weapon; is it possible?
Moderators: Global Moderators, Red Alert 2 Moderators
Post new topic   Reply to topic Page 1 of 1 [9 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
ConMan
Tiberian Beast


Joined: 16 Dec 2008
Location: Toronto, Canada

PostPosted: Fri Apr 03, 2009 10:20 pm    Post subject:  Adding a new weapon; is it possible? Reply with quote  Mark this post and the followings unread

I wanna add a weapon thats basically like aegis missiles but can also shoot land + air targets.

But I ready in http://www.ppmsite.com/forum/viewtopic.php?t=2675 thats impossible due to hardcoding

Just for more clarification, is what I am about to do going to be possible? Thanks.

Back to top
View user's profile Send private message
Javier
My Rank Will Never Change


Joined: 24 Oct 2008
Location: Wars World!!! Posts: -99999999

PostPosted: Fri Apr 03, 2009 11:05 pm    Post subject: Reply with quote  Mark this post and the followings unread

Yup. It's pretty easy. Unless if you're talking about SUPERweapon.

_________________
Awesome banner made by m-.. I mean AltomareXD!

MY MOOOOOOOOD!!!!!!11!!1!!1111!!!11!!!1

Back to top
View user's profile Send private message
Team SomeGuy
General


Joined: 18 Aug 2006

PostPosted: Fri Apr 03, 2009 11:54 pm    Post subject: Re: Adding a new weapon; is it possible? Reply with quote  Mark this post and the followings unread

ConMan wrote:
I wanna add a weapon thats basically like aegis missiles but can also shoot land + air targets.

But I ready in http://www.ppmsite.com/forum/viewtopic.php?t=2675 thats impossible due to hardcoding

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:

http://www.modenc.renegadeprojects.com/Weapons

Good luck and happy modding.

Back to top
View user's profile Send private message
MRMIdAS
Energy Commando


Joined: 17 Jul 2008

PostPosted: Sat Apr 04, 2009 12:49 am    Post subject: Reply with quote  Mark this post and the followings unread

Pimary and secondary do matter.

if both weapons can fire at a target, primary will fire regardless.

this can be controlled in the VERSES section of your warhead.

_________________
MIdAS - Turning wages into beer since 2002

Back to top
View user's profile Send private message
Team SomeGuy
General


Joined: 18 Aug 2006

PostPosted: Sat Apr 04, 2009 1:04 am    Post subject: Reply with quote  Mark this post and the followings unread

True. But if you are building your weapons to target separate targets, your warheads will take into account what is shooting whom.

In that regard if your warheads and projectiles are done right, order truly does not matter.

Back to top
View user's profile Send private message
Dark Templar X
Commander


Joined: 26 Feb 2009

PostPosted: Sat Apr 04, 2009 3:08 am    Post subject: Reply with quote  Mark this post and the followings unread

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.

Back to top
View user's profile Send private message
Team SomeGuy
General


Joined: 18 Aug 2006

PostPosted: Sat Apr 04, 2009 3:39 am    Post subject: Reply with quote  Mark this post and the followings unread

I mentioned that really early. Does nobody read?

I wrote earlier (Cut+Paste):

Quote:

The order for your weapons does not matter except for two things, the DefaultDeathWeapon of the unit and what will shoot the terrain


I might not be wording it the most effectively but I do know these things.

Back to top
View user's profile Send private message
Allied General
General


Joined: 19 Mar 2004
Location: United Kingdom

PostPosted: Sat Apr 04, 2009 7:03 pm    Post subject: Reply with quote  Mark this post and the followings unread

Why not just use edit find functions?

You will figure out Aegis uses projectile coded

; Aircraft-only heatseeker for the Aegis
[MedusaProjectile]
Arm=1
High=yes
Shadow=no
AA=yes
AG=no
;AN=no
Image=MEDUSA
CourseLockDuration=15
ROT=20
Scalable=yes
SubjectToCliffs=no
SubjectToElevation=no
SubjectToWalls=no
; -------------------------------------------------------------------------------

The important tag is AA=yes (anti-aircraft) AG=no (anti-ground)

So logically if you change AG=yes it will target ground targets.

If you want to preserve the Medusa projectile, simply copy and paste e.g.

; my new missile
[mynewmissile]
Arm=1
High=yes
Shadow=no
AA=no ;no aa
AG=yes ;yes ag ability
;AN=no
Image=MEDUSA
CourseLockDuration=15
ROT=20
Scalable=yes
SubjectToCliffs=no
SubjectToElevation=no
SubjectToWalls=no

Then in your [NewWeapon]

you use Projectile=mynewmissile

Note that a lot of modding in RA2/YR is case sensitive.

_________________

Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID Facebook Profile URL Twitter Channel URL
Dark Templar X
Commander


Joined: 26 Feb 2009

PostPosted: Sat Apr 04, 2009 8:03 pm    Post subject: Reply with quote  Mark this post and the followings unread

Except AA=yes by itself isn't enough. Rolling Eyes

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [9 Posts] Mark the topic unread ::  View previous topic :: View next topic
 
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
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


Powered by phpBB © phpBB Group

[ Time: 0.1774s ][ Queries: 11 (0.0086s) ][ Debug on ]