Jump to content
Sign in to follow this  
Ravendark

grant upgrade create + triggered?

Recommended Posts

a bit of explanation:

 

The idea behind my GDI'ish side of my mod is that several of their units can become extremely powerfull by the lategame through the upgrade system aswell as the veterancy system. My GDI'ish side > any other side in a one-one comparrison in unit strength. I am thinking of balancing this through cost of upgrades + existing units dont auto get those upgrades but have to be manually upgraded near the warfactory/servicedepot, but new units get the upgrade on create tho.

 

So the idea is:

1. upgrades cost cash when researched (normal upgrade system basicly)

2. Existing units can be upgraded/updated but will cost extra cash ontop of the previous research cost, but they keep their veterancy without becoming obsolete.

3. New units build from the warfactory(or airdropped specialpower or such) will come with the new upgrades without the extra cost from 2. but they ofc start of as rookie lvl.

 

For point 2 i was thinking of letting existing units upgrade when they are near a sevicedepot/warfactory through a aura or broadcastevent coding that enables a modelcodition that triggers a commandsetupgrade wich holds the respective upgrades + extra bit of costs.

 

But the actuall question:

 

Lets say i have a rocketpod upgrade for my tank. Upgrade_Global_LaserGuided_Rockets

 

I want that after the upgrade research is done that the following happens:

Any new tank build now gets build with the rocket pods. Existing tanks dont (remember they need to be manualy updated near a service depot - using a normal upgrade will update existing units aswell automaticly..i dont want that)

If i use the grantupgradecreate i can have a unit spawn with a upgrade: Upgrade_NewBorn_LaserGuided_Rockets

But i cant have it trigger without the Global upgrade being done first.

 

Would the following work?

<UpgradeTemplate
        id="Upgrade_NewBorn_LaserGuided_Rockets"
        Type="OBJECT"
        >
        <GameDependency
            NeededUpgrade="Upgrade_Global_LaserGuided_Rockets"/>           /** would this work as a trigger or delay for my needs? **/
    </UpgradeTemplate>

<GrantUpgradeCreate
    id="ModuleTag_GrantUpgradeCreate_Upgrade_NewBorn_LaserGuided_Rockets"
    UpgradeToGrant="Upgrade_NewBorn_LaserGuided_Rockets"
/>
 

 

Or are there better/easier ways to achieve this?

Edited by Ravendark

Share this post


Link to post

This is actually the best way. Though you can leave out the newborn. The unit upgrade should be the same regardless if it's achieved through grantupgrade or manually purchasing it.

You can also just add the RequiredObjectStatusAny attribute to the gamedependency of your unit upgrade so you don't need a commandset switch.

Share this post


Link to post

Ok thanks,

 

About the commandset upgrades...i want/need to have the upgrades in a different commandset because probably some units will allready have a full default commandset (call for transport, transports themself and some specialpowers), so it could be that extra upgrades wont have space(only 4 slots in the unit ui is a pain). So if the unit switches commandsets to a upgrades commandset that might be preferable.

 

The idea behind the initiative's MBT is:

 

Heavy armor(directional armor coding, heavy in the front, less on the sides, weak in the rear).

Default from the warfactory:

1 default cannon

2 passenger loading capacity (cant fire out, but Tank will use Garrisoned status to probably enable the use of a turret mounted remote controled mg turret..maybe not sure on that yet)

1 specialpower: sonic concussion round needs zocom upgrade to enable

1 call for transport ability, needs commandcenter or maybe vtolpad build

 

Upgrades for the MBT are:

(note: the idea is to select a specialisation option (think generals strategy center bombardment switch etc more or less) between Zocom and Steel Talons, altho im undecided betwwen making it a command togle with a long cooldown or a permanent specialisation choice)

Zocom:Missilepods, armor and treads upgrade (basicly turning the MBT into the mammoth over the course of all the upgrades), sonic concussion shell specialpower = does aoe explosion dmg, better dmg vs structures and infantry + vibrations disable for a second or 2.

 

Steel Talons: no upgrades for the MBT because they probably will deploy titans instead

Share this post


Link to post

I'm actually plan to work on an UI this week with more slots, maybe without a limit like player power buttons or construction yard constructs. I'm hoping of having a release on the weekend.

Share this post


Link to post

Ye there are alot of things i could diss generals/zh about, but atleast that ui had room for more options.

Atm i've started to use the Main_Structure buildqueue for ALL buildings in my design of my mod and using the Other_Structure buildqueue for dummy objects that have the grantupgradecreate module, and i use that for Player upgrades, leaving Object upgrades on the actuall units and buildings...by using the dummy object you can even have the ai get the upgrades as you can tell it to build the dummy units. i was thinking of having a togglebutton for a second or third commandset, but never figured out how i would get a ai to work with such a toggle system...so hence the other system...also ill prob have the ai cheat when it comes to upgrades like the mbt mention above...where the player has to do the upgrades themselfs, the ai might get them automaticly depending on ai difficulty....i think.

 

The most anoying part imo with the current ui comes with transports....anything more then 4 slots works clunky.

 

Does this mean you updated your aptui tool?

Edited by Ravendark

Share this post


Link to post

The AI can actually use any button in the commandset, even the ones which cannot be displayed (for reference see the reinforcement bays in the campaign).

 

I've progressed a little further, yes, I want to do the addition of the command set buttons as a decompile/compile test for it before working on the ui, also it's a highly wanted thing.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×