:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::
Do you want to advertise at Project Perfect Mod. Find out how to do it HERE.

The time now is Sun Nov 19, 2017 2:32 pm
All times are UTC + 0
 Forum index » Modding Central » Generals Editing Forum » Tutorials Warehouse
How to Make an Unlockable Units With Generals Points
Moderators: Generals Moderators, Global Moderators
Post new topic   Reply to topic Page 1 of 1 [2 Posts] View previous topic :: View next topic
Author Message
DaFool
Defense Minister


Joined: 07 Nov 2006

PostPosted: Mon Mar 09, 2009 2:07 am    Post subject:   How to Make an Unlockable Units With Generals Points
Subject description: Introduction to spending those generals points
Reply with quote

How to Make an Unlockable Units With Generals Points

So you’ve made units before, and maybe you made some really cool units.  So cool, that you might be a little greedy and not want everyone to use it.  Perhaps someone has to “prove” themselves before they can use it, because you just don’t want any average Joe walking the streets to be able to sit down and get the unit right away, right?  Well, if you’re an elitist and you want only the leet to be able to build your unit, than making the unit unlockable via generals points is the perfect option.  This tutorial is your first glimpse into the generals points, and this is probably the most basic thing you can do with them.
This tutorial is for modders who accomplished the basics of generals modding (added a new unit, worked with command button.ini, and worked with commandset.ini).  If you have not done these things, I suggest you go ahead and read those tutorials first.

This tutorial works with the following .INIs:  The object .ini of your choice, command button.ini, commandset.ini and a new .ini; Science.ini.  This process is pretty similar to create a new unit, only with a few extra steps.  So first things first, go make your unit, and get the .inis out and ready to use.

Science.ini
Back already?  Ok, you did good.  Once your units is ingame and working fine, the first thing your going to want to do is make the science entry for purchasing with the general’s point.  Below is an example and is typical of what  you want to do.

Science SCIENCE_Pathfinder
 PrerequisiteSciences = SCIENCE_AMERICA SCIENCE_Rank3
 SciencePurchasePointCost = 1
 IsGrantable = Yes
 DisplayName = SCIENCE:USAPathFinder
 Description = CONTROLBAR:ToolTipUSASciencePathFinder
End

The first line names the entry, and the second is the list of prerequisites required for the science,  As you can see, You need the american generic science and the rank3 science (which tells the game you have reached that rank).  Sometimes you’ll be making something that requires something, sneak attack 3 for example, which requires sneak attack 2.  So once you make a new entry, you can move on.

CommandButton.ini
Now you’ll want to make a button for your new science.  This one again is from the same example, the pathfinder.  It’s pretty self explanatory, just edit it so that it fits your new unit and science.

CommandButton Command_PurchaseSciencePathfinder
 Command           = PURCHASE_SCIENCE
 Science           = SCIENCE_Pathfinder
 Object            = AmericaInfantryPathfinder
 ButtonImage       = SAPathfinder1
 ButtonBorderType  = UPGRADE ; Identifier as to what kind of button this is
End

CommandSet.ini
Next off, you’ll need it so that the player can click your button somewhere.  The command sets use a different setup than normal commandsets, so double check to make sure you have yours aligned up.  They have 3 rows and 5 columns, with buttons 1-15.

CommandSet SCIENCE_AMERICA_CommandSetRank3
 1 = Command_PurchaseSciencePathfinder
 4 = Command_PurchaseScienceParadrop1
 5 = Command_PurchaseScienceParadrop2
 6 = Command_PurchaseScienceParadrop3
 7 = Command_PurchaseScienceA10ThunderboltMissileStrike1
 8 = Command_PurchaseScienceA10ThunderboltMissileStrike2
 9 = Command_PurchaseScienceA10ThunderboltMissileStrike3
 10 = Command_PurchaseScienceEmergencyRepair1
 11 = Command_PurchaseScienceEmergencyRepair2
 12 = Command_PurchaseScienceEmergencyRepair3
END

The Unit
Finally, you’ll need to go back to your unit and change it’s prerequisite so that it reflex’s the new science it requires, as seen below.  This tutorial was simple enough, now go test your stuff ingame!

 Prerequisites
   Object = AmericaBarracks
   Science = SCIENCE_Pathfinder
 End

Key Words: #Tutorials #Modding #Generals #ZeroHour 

_________________
Please, read the signature rules of the forum.

Back to top
View user's profile Send private message
Shadow Hunter
Cyborg Commando


Joined: 30 Aug 2008
Location: Brazil.

PostPosted: Mon Mar 09, 2009 4:01 am    Post subject: Reply with quote

DaFool, you are magic, only you tutorials make me want to code generals ! Smile

Back to top
View user's profile Send private message Send e-mail MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [2 Posts] View previous topic :: View next topic
 Forum index » Modding Central » Generals Editing Forum » Tutorials Warehouse
Jump to:  
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

Wildcard SSL Certificates
[ Time: 0.1029s ][ Queries: 13 (0.0037s) ][ Debug on ]