• Welcome to SC4 Devotion Forum Archives.
 

News:

The SC4 Devotion Forums are no longer active, but remain online in an archived, read-only "museum" state.  It is not possible for regular members to post or use the private messaging system, and no technical support will be provided for any issues pertaining to the forums in their current state.  Attachments (those that still work) are accessible without login.

The LEX has been replaced with SC4Evermore (SC4E), and SC4E maintains an active Discord server.  For traditional forums, we recommend Simtropolis.

Main Menu

Complex Reward Conditions?

Started by Aran, September 15, 2012, 02:12:53 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Aran

How complex can reward conditions be made?  I'd like to have a reward trigger after 25 years, check the population, and then offer one of five lots depending on the pop.  (Ideally, the price would fluctuate based on the pop as well.)

Is this even doable or am I thinking a little too far outside the box?

whatevermind

Reward conditions are a string of boolean statements, and it looks like they can be strung out pretty far.  For example, some of them check for population, mayor rating, previous rewards, funding levels, etc. all in the same command.  Check out the LUA script at TGI 0xca63e2a3,0x4a5e8ef6,0xffa8f301 and you'll see what I mean.

As for the reward offering a variety of lots, the reward statements call the reward by the building exemplar, and Maxis only ever uses one at a time.  You could try adding a second item and see what it does.  However, since you mention tying which one is offered to the population, what you're really creating are five different rewards, that each have the same conditions except for the population.  Then, because each reward condition is tied to the building exemplar of that reward, you can also vary the price of each reward by giving the different buildings unique prices.

So, definitely doable.

FrankU

There is one thing you have to consider. You will probably want a larger reward for a larger poulation. Take care that not all smaller rewards are unlocked the same time as the appropriate one.

Good luck!

Aran

I'm working on a series of buildings in which one and only one will be offered dependent on population (among other factors).  Probably something like 1-5000, 5001-12,500, 12,501-25,000, and 25,001+.  So the pop check will have to figure out which range it falls into.  I haven't had a chance to poke around yet and do any testing.  It'll probably be a few weeks anyway.  RL just slapped me again.