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 Sat Nov 30, 2024 9:01 pm
All times are UTC + 0
Upgrades Continued: An introduction to modules [ZH]
Moderators: Generals Moderators, Global Moderators
Post new topic   Reply to topic Page 1 of 1 [3 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
DaFool
Defense Minister


Joined: 07 Nov 2006

PostPosted: Tue Jan 20, 2009 11:11 pm    Post subject:  Upgrades Continued: An introduction to modules [ZH] Reply with quote  Mark this post and the followings unread

Requirements:  A basic understanding of modding generals, and prior work in adding new units and crating upgrades.

Step 1 Creating the upgrade:  If you have not already, read this tutorial (http://www.ppmsite.com/forum/viewtopic.php?t=21740) and create an upgrade of some sort.  Create a button for it and add it some CommandSet that you will be able to access in game.

Step 2 Intro to modules:  Modules are the things in generals which allow units to follow certain behaviors that normal units won’t follow, such as switching weapons, upgrading armour, and a whole slew of things.  However, for this tutorial, I will focus in on some of the common modules used in unit upgrades.  Modules are in the entry of the unit you want to receive the upgrade, and are usually found toward the end of the entry under “Engineering Parameters”.  Each module has a number assigned to it and they must be unique within each object.  Lets look at a basic upgrade for the humvee:

 Behavior = WeaponSetUpgrade ModuleTag_09
   TriggeredBy = Upgrade_AmericaTOWMissile
 End

This module grants the humvee tow missiles.  Or actually it switches the humvee’s weapon set after the tow missile upgrade has been purchased.  Let’s dissect the entry.  The first line contains two important parts.  The first one is the “Behavior =“ which dictates what kind of module it is.  In this case it is “WeaponSetUpgrade” which clearly states what it does*.  The second part of the first line is the modules number.  Just make sure for the given object that no two modules have the same number.  The second line is very important, because it lists the upgrade which is trigger for the module.  Finally the entry is ended with End (how appropriate).  So you got Upgrade, your module, and now what?  It varies according from module to module, but since this one upgrades the weapon set, we have to make sure there is a new weapon set.  With the Humvee there is (duh) but supposing you made a new unit you would have to add one.  What you would do is copy the original weapon set and change the condition from none to PLAYER_UPGRADE.  This tells the game to use this weapon set when the unit is upgraded.  So you mod the new weapon set anyway you see fit.

Another common module is the armor upgrade.  However, instead of changing the armorset, this just adds more health.

 Behavior = MaxHealthUpgrade ModuleTag_09
   TriggeredBy   = Upgrade_AmericaCompositeArmor
   AddMaxHealth  = 100.0
   ChangeType    = ADD_CURRENT_HEALTH_TOO
 End
A very interesting module is the replace object module.  This can be used for a number of things ranging from a GLA hole upgrading itself to a building or even an MCV deploying into a ConYard.

 Behavior = ReplaceObjectUpgrade ModuleTag_12
   ReplaceObject = GLACommandCenter
   TriggeredBy = Upgrade_BecomeRealGLACommandCenter
 End

Well, that concludes this lesson.  The best way to learn more is to experiment!

* do not know of all of the behaviors, but I will try to make a list of them for reference.


Key Words: #Tutorials #Modding #Generals #ZeroHour 

_________________
Please, read the signature rules of the forum.

Back to top
View user's profile Send private message
Dutchygamer
President


Joined: 18 Jun 2005
Location: Dordrecht, the Netherlands

PostPosted: Wed Jan 21, 2009 9:18 am    Post subject: Reply with quote  Mark this post and the followings unread

Something to add to this tutorial: The Moduletag_xx must be unique, but xx may be everything, from 01 to thismoduletagdoesshitforthisroflxd #Tongue

Back to top
View user's profile Send private message Send e-mail Skype Account
The-Light
Grenadier


Joined: 08 Aug 2009
Location: Netherlands

PostPosted: Tue Apr 06, 2010 2:39 pm    Post subject: Reply with quote  Mark this post and the followings unread

One more addition to the list:

Behavior = ArmorUpgrade ModuleTag_Armor01
TriggeredBy = Upgrade_ChinaRadArmor
End

a way to upgrade the armorset Smile

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [3 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.2306s ][ Queries: 11 (0.0083s) ][ Debug on ]