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 Thu Apr 18, 2024 12:43 pm
All times are UTC + 0
Stopping Upgrades from Activating
Moderators: Global Moderators
Post new topic   Reply to topic Page 1 of 1 [16 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
Darkwander
Medic


Joined: 18 Jan 2005
Location: Australia

PostPosted: Thu Mar 20, 2008 3:49 pm    Post subject:  Stopping Upgrades from Activating
Subject description: when Research complete.
Reply with quote  Mark this post and the followings unread

Greetings,

I have added a research item called Ascension, i have also added a function on my "Pre-Ascended Beings" called Ascend, however when the research is complete the "Pre Ascended Beings" automatically Ascend to Ascended Beings.

I was wanting it so that you have to click on them, then click the Ascend option before they ascend, as they are now, they are Automatically Ascending.

Anyone know where that option is to turn it off ?

Back to top
View user's profile Send private message Skype Account
Golan
Flamethrower


Joined: 21 Nov 2007

PostPosted: Thu Mar 20, 2008 4:01 pm    Post subject: Reply with quote  Mark this post and the followings unread

Make a second, object-based upgrade that requires the initial ascension upgrade. Then, change the trigger of th ascension to the new upgrade.

Back to top
View user's profile Send private message
Darkwander
Medic


Joined: 18 Jan 2005
Location: Australia

PostPosted: Thu Mar 20, 2008 4:26 pm    Post subject: Reply with quote  Mark this post and the followings unread

Golan wrote:
Make a second, object-based upgrade that requires the initial ascension upgrade. Then, change the trigger of th ascension to the new upgrade.


Yea, i have an Upgrade called "PurchaseUpgradeAscension" and i have a ability called "UseAscension"

However some reason it is activating the trigger when the Research is complete.

Back to top
View user's profile Send private message Skype Account
Golan
Flamethrower


Joined: 21 Nov 2007

PostPosted: Thu Mar 20, 2008 4:33 pm    Post subject: Reply with quote  Mark this post and the followings unread

Code please.

Back to top
View user's profile Send private message
Darkwander
Medic


Joined: 18 Jan 2005
Location: Australia

PostPosted: Thu Mar 20, 2008 4:42 pm    Post subject: Reply with quote  Mark this post and the followings unread

AncientPreAscended.xml

Code:
<!-- Asecension -->
         <ReplaceSelfUpgrade
            id="ModuleTag_ReplaceSelf"
            NewObjectUnpackTime="0.5s">
            <TriggeredBy>Upgrade_AncientAscension</TriggeredBy>
            <ReplacementTemplate>AncientAscended</ReplacementTemplate>
         </ReplaceSelfUpgrade>


UpdateLogicCommandSet.xml

Code:
   <LogicCommandSet
      id="AncientPreAscendedCommandSet">
      <Cmd>Command_StanceDrillDown</Cmd>
      <Cmd>Command_AncientCallForTransportInfantry</Cmd>
      <Cmd>Command_UseAscension</Cmd>
      <Cmd>Command_AttackMove</Cmd>
   </LogicCommandSet>


Code:
   <LogicCommandSet
      id="AncientResearchLabCommandSet">
      <Cmd>Command_UpgradeAncientCompositeArmor</Cmd>
      <Cmd>Command_UpgradeAncientPersonalShield</Cmd>
      <Cmd>Command_PurchaseUpgradeAscension</Cmd>
      <Cmd>Command_TogglePower</Cmd>
      <Cmd>Command_SelfRepair</Cmd>
      <Cmd>Command_Sell</Cmd>
   </LogicCommandSet>


UpdateLogicCommand.xml

Code:
   <LogicCommand
      Type="PLAYER_UPGRADE"
      id="Command_PurchaseUpgradeAscension">
      <Upgrade>Upgrade_AncientAscension</Upgrade>
   </LogicCommand>
   <LogicCommand
      Type="SPECIAL_POWER"
      id="Command_UseAscension">
      <SpecialPower>SpecialPower_UseAscension</SpecialPower>
   </LogicCommand>


UpdateUnitAbilityButtonTemplates.xml

Code:
         <PlayerUpgradeButton
            Id="Command_PurchaseUpgradeAscension">
            <State
               Image="Button_AbilityAscension"
               Title="NAME:UpgradeAscension"
               Description="DESC:UpgradeAscension" />
         </PlayerUpgradeButton>

         <TargetedSpecialPowerButton
            Id="Command_UseAscension">
            <State
               Image="Button_AbilityAscension"
               Title="NAME:AbilityAscension"
               Description="DESC:AbilityAscension"
             />
         </TargetedSpecialPowerButton>


Updateupgrade.xml

Code:
   <UpgradeTemplate
      id="Upgrade_AncientAscension"
      DisplayName="UpgradeName:AncientAscension"
      AcquireHint="UpgradePrereq:Ascension"
      TypeDescription="UpgradeType:Ascension"
      Description="UpgradeDesc:Ascension"
      Type="PLAYER"
      BuildTime="1s"
      BuildCost="2000"
      IconImage="Button_AbilityAscension">
   </UpgradeTemplate>


UpdateSpecialPowerTemplates.xml

Code:
   <SpecialPowerTemplate
      id="SpecialPower_UseAscension"
      TargetType="NONE"
      InitiateSound="ALI_ShockTrooper_Blink"
   />

Back to top
View user's profile Send private message Skype Account
ccgx
Medic


Joined: 12 Aug 2007

PostPosted: Thu Mar 20, 2008 4:52 pm    Post subject: Reply with quote  Mark this post and the followings unread

Golan wrote:
Make a second, object-based upgrade that requires the initial ascension upgrade. Then, change the trigger of th ascension to the new upgrade.

Darkwander: just do this.

_________________



Back to top
View user's profile Send private message
Darkwander
Medic


Joined: 18 Jan 2005
Location: Australia

PostPosted: Thu Mar 20, 2008 4:54 pm    Post subject: Reply with quote  Mark this post and the followings unread

ccgx wrote:
Golan wrote:
Make a second, object-based upgrade that requires the initial ascension upgrade. Then, change the trigger of th ascension to the new upgrade.

Darkwander: just do this.


Isnt that what i have done ?

Back to top
View user's profile Send private message Skype Account
ccgx
Medic


Joined: 12 Aug 2007

PostPosted: Thu Mar 20, 2008 4:57 pm    Post subject: Reply with quote  Mark this post and the followings unread

no. you need a PLAYER upgrade to enable your button and with this button you trigger a specialpower who grants an OBJECT upgrade.

_________________



Back to top
View user's profile Send private message
Darkwander
Medic


Joined: 18 Jan 2005
Location: Australia

PostPosted: Thu Mar 20, 2008 5:03 pm    Post subject: Reply with quote  Mark this post and the followings unread

* Deleted

Last edited by Darkwander on Thu Mar 20, 2008 5:05 pm; edited 1 time in total

Back to top
View user's profile Send private message Skype Account
Golan
Flamethrower


Joined: 21 Nov 2007

PostPosted: Thu Mar 20, 2008 5:03 pm    Post subject: Reply with quote  Mark this post and the followings unread

If you want to use a special power, you will also have to add a behavior for the special power, otherwise it doesn´t have any function.

The problem is that the ReplaceSelfUpgrade has <TriggeredBy/> set to Upgrade_AncientAscension - this is exactly what you don´t want.
First, create a new upgrade that is object based so that it can be applied to each unit individually. It should look something like this:
Code:
   <UpgradeTemplate
      id="Upgrade_SuperSizeMe"
      Type="OBJECT"/>

Change the ReplaceSelfUpgrade to be triggered by this new upgrade.
Code:
      <ReplaceSelfUpgrade
         id="ModuleTag_SuperSizeSelf"
         NewObjectUnpackTime="0.5s">
            <TriggeredBy>Upgrade_SuperSizeMe</TriggeredBy>
            <ReplacementTemplate>AncientAscended</ReplacementTemplate>
         </ReplaceSelfUpgrade>


Now modify the SpecialPowerTemplate so that it requires the ascension upgrade to be triggered:
Code:
   <SpecialPowerTemplate
      id="SpecialPower_UseAscension"
      TargetType="NONE"
      InitiateSound="ALI_ShockTrooper_Blink">
      <GameDependency>
         <NeededUpgrade>Upgrade_AncientAscension</NeededUpgrade>
      </GameDependency>
   </SpecialPowerTemplate>


Finally, add the required SpecialPower modules to the unit´s behaviors so that the object upgrade may be triggered:
Code:
   <SpecialPower
      id="ModuleTag_SuperSizeMe"
      SpecialPowerTemplate="SpecialPower_UseAscension"
      UpdateModuleStartsAttack="true"
   />
   <GiveOrRestoreUpgradeSpecialPower
      id="ModuleTag_Yessir"
      SpecialPowerTemplate="SpecialPower_UseAscension"
      UpgradeToGive="Upgrade_SuperSizeMe"
   />

Last edited by Golan on Thu Mar 20, 2008 5:23 pm; edited 2 times in total

Back to top
View user's profile Send private message
Darkwander
Medic


Joined: 18 Jan 2005
Location: Australia

PostPosted: Thu Mar 20, 2008 5:11 pm    Post subject: Reply with quote  Mark this post and the followings unread

You need to turn off the following options on the post,

"Disable HTML in this post" and "Disable Smilies in this post"

Back to top
View user's profile Send private message Skype Account
Golan
Flamethrower


Joined: 21 Nov 2007

PostPosted: Thu Mar 20, 2008 5:18 pm    Post subject: Reply with quote  Mark this post and the followings unread

Yeah, I know, but that doesn´t change the fact that the forum deleted the bits of code that weren´t posted.

€dit
That should do the trick.

Back to top
View user's profile Send private message
Darkwander
Medic


Joined: 18 Jan 2005
Location: Australia

PostPosted: Thu Mar 20, 2008 5:29 pm    Post subject: Reply with quote  Mark this post and the followings unread

kool, i am trying it now..

Do you like the show Stargate ?


It sorta works, however when you click the button, it comes up on the cusor as a little red box, if you click on another unit it then activates, however if you don't click the mouse, it waits, i think it is the

Code:
Type="OBJECT"/>


That is causing the problem, i think it is waiting for you to select an object.

Back to top
View user's profile Send private message Skype Account
Stygs
Cyborg Cannon


Joined: 27 Nov 2005
Location: Germany

PostPosted: Thu Mar 20, 2008 5:56 pm    Post subject: Reply with quote  Mark this post and the followings unread

No. Type="Object" means its only an upgrade for a single unit, not for the entire player.

The problem is the TargetedSpecialPowerButton, which allways requires a target (hence TARGETEDSpecialPowerButton).

Simplye use a normal SpecialPowerButton...

_________________

Back to top
View user's profile Send private message Skype Account
Darkwander
Medic


Joined: 18 Jan 2005
Location: Australia

PostPosted: Thu Mar 20, 2008 5:59 pm    Post subject: Reply with quote  Mark this post and the followings unread

Darkwander wrote:
kool, i am trying it now..

Do you like the show Stargate ?


It sorta works, however when you click the button, it comes up on the cusor as a little red box, if you click on another unit it then activates, however if you don't click the mouse, it waits, i think it is the

Code:
Type="OBJECT"/>


That is causing the problem, i think it is waiting for you to select an object.



Simply change the coding on Updateupgrade.xml to the following and it fixes it...

Code:
   <UpgradeTemplate
      id="Upgrade_Ascension2"
      Type="PLAYER"/>

Back to top
View user's profile Send private message Skype Account
Darkwander
Medic


Joined: 18 Jan 2005
Location: Australia

PostPosted: Thu Mar 20, 2008 6:00 pm    Post subject: Reply with quote  Mark this post and the followings unread

Golan wrote:
Yeah, I know, but that doesn´t change the fact that the forum deleted the bits of code that weren´t posted.

€dit
That should do the trick.


Thanks alot man, i really do thank you for the help...

Back to top
View user's profile Send private message Skype Account
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [16 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
Quick Reply
Username:


If you are visually impaired or cannot otherwise answer the challenges below please contact the Administrator for help.


Write only two of the following words separated by a sharp: Brotherhood, unity, peace! 

 
You can post new topics in this forum
You can 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.1628s ][ Queries: 11 (0.0110s) ][ Debug on ]