logo   login
right
Home Forums Downloads Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Forum Info
Forum Members: 18,581
Total Threads: 8,668
Posts: 94,537

Administrators:
DeeZire, Redemption

There are currently 52 users online.
Partner Links

Free Credit Repair

Learn the Ticket Broker Secrets
Advertisements


Generals & Zero Hour Editing Discuss any modding related issues to do with Generals and Zero Hour here.

Reply
 
LinkBack Thread Tools
Old 04-12-2003, 09:57 PM   #1 (permalink)
Senior Member
 
Join Date: Jan 2003
Location: Santa Barbara
Posts: 107
Send a message via ICQ to Chronosfera Send a message via AIM to Chronosfera
Default help topic: price fluctuation.

This is not a tutorial. I am posting this because I need help. I will try to keep this concise.

Objective: To make unit costs fluctuate as a function of time. Think about the Dune2 starport.

Here are the steps I came through:

-> Noticed the cost reduction module in the tech oil refinery, triggered by an upgrade that the building also grants.
Code:
  Behavior         = GrantUpgradeCreate ModuleTag_04
    UpgradeToGrant = Upgrade_CostReduction
  End
  Behavior       = CostModifierUpgrade ModuleTag_05
    TriggeredBy  = Upgrade_CostReduction
    EffectKindOf = VEHICLE
    Percentage   = -10%
  End
-> The first test I conducted was to make two different units have this same module, triggered by different upgrades of their own. I simply tagged the needed upgrades to some of the already existing object upgrades I have on the units. The result worked, I was able to have cost modification twice by upgrading the two different units.

-> Next step I created an unselectable object (that if working will be made invisible) that is a starting unit. It auatomatically grants an upgrade called Upgrade_Price1, and it has the price modification module triggered by that upgrade. It also has a lifetime/ deletion time module that removes it in one minute. For safety I made use of the remove upgrade module as found in the drones too, to disable the cost reduction after 60 seconds. The result is that it worked just as I liked. In the first 60 seconds of the game price was reduced by some percentage that is beyond the player's control. And after 60 seconds price changed back to normal, again beyond the player's own control.

-> By some simple reasoning I would have thought that combining the two would make a cycle of changes beyond the player's control. What I added was to make the death of that first object create another similar object, with another upgrade called Upgrade_Price2 that triggers its own cost reduction module (with a different reduction percentage). However this time it does not work. After the first object's deletion (although the second object was created), the cost returned to normal but was not changed for a second time. Looking at the wording of GrantUpgradeCreate module makes me wonder if that upgrade was never granted because of that the second object was not 'created' in a favourable way. in order to make the second object appear upon the demise of the first, I tried on the first object both ObjectCreationDie as well as the OCL in SlowDeathBahavior, or even letting a structure spawn the second object. None worked.

Of course I can (and will need to) let the side starts with the second object instead of the first to deduce that it is the way it appears that stops the second unit from working, but I hope someone could shed some light on what other step could I take next, or is there any other way to achieve the same objective. Price fluctuation is a very integral part of a fully functional starport (limited to what we are talking about, as in the Dune series, of course), and is not something I would love to give up trying so easily.
Chronosfera is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-12-2003, 10:23 PM   #2 (permalink)
Senior Member
 
Join Date: Dec 2002
Location: England
Posts: 228
Send a message via ICQ to Shadow Send a message via AIM to Shadow Send a message via MSN to Shadow Send a message via Yahoo to Shadow
Default

I would also try using a FireWeaponWhenDeadBehavior module and a FireOCL

then again, you could try using an OCLUpdate module that ties in with the lifetime
Shadow is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
A little off-topic... but... Stross Generals & Zero Hour Editing 27 08-21-2006 02:15 AM
Request [Off topic] CaveTroll Generals & Zero Hour Editing 0 07-23-2005 06:40 AM
Off topic (Sorry) Savrille Red Alert 2 & Yuri's Revenge Editing 17 08-30-2004 06:46 AM
Cloning a YR cd (remember old topic) Daedalus Red Alert 2 & Yuri's Revenge Editing 2 01-19-2004 07:46 PM
Delete this topic... Kuja Generals & Zero Hour Editing 20 09-07-2003 02:54 PM


All times are GMT -4. The time now is 07:39 AM.


Design By: Miner Skinz.com
Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.