They Are Billions

They Are Billions

Custom Levels for They Are Billions
Add custom levels to They Are Billions by subscribing to these workshop items!
Learn More
KCHP3 7 Dec, 2021 @ 1:55pm
Condition question
Hi, I'm trying to set up a condition on unlocking a tech/research item, if say the LookOutTower is researched then execute unit bonus. The problem I'm running into is that I don't know how to get the Condition to work, the Execute is working fine. My current work around is (Count(LookoutTower)==1) as the condition, this makes it so that if there is 1 look out tower give unit bonus.

Perhaps I'm just not looking properly, or not understanding something.
< >
Showing 1-5 of 5 comments
Hi, here is a work out:
> : rectangles in the block
>> : Block/Give Unit/etc related to the previous block

Create an Event, then switch to execute tab.
Block
>Condition: Count(LookoutTower)=1
>>Give Tech

You can also set the condition in the schedule tab and create a single block with the given tech only in the execute tab.

In order to avoid the player to research the tech:

Create an other Event.
Block
>ExecuteCode: ApplyRules("YourTech GoldCost = 100000");

Hopeflly it will help.
KCHP3 7 Dec, 2021 @ 3:08pm 
hm. So this will give me what I want? i'll post what it looks like on my side. currently

[Scheduling] >ID Optics
Start time 0h
Condition (Count(LookOutTower)==1)

[Script]
{Block}
>ApplyRules:("Sniper WatchRange +3; SniperAttack ActionRange +3; SniperAttackVeteran +3")
>ApplyRules:("Ranger WatchRange +3; RangerAttack ActionRange +3; RangerAttavkVeteran ActionRange +3")
>ActionRules:("SoldierAttack ActionRange +3; SoldierAttackVeteran +3")

this currently makes it so that "If there is 1 LookOutTower built, give Range Bonus to Units(sniper, ranger, soldier)"

I want this: "If LookOutTower research is complete, Give Range Bonus to units). and your work out will do that?
I would suggest you to remove the space after ; and add a space after the symbol +. The game can be sensitive to that.

Here is the spread sheet that Chabz made. This summarizes all the values in the game, hopefully, it will help you.

https://docs.google.com/spreadsheets/d/1rrTvMw9P932Q7kcZXQvS4MMcHfiNbYtEdN4dTRA516Q/edit#gid=1795838926


In your case, maybe Count(TechLookoutTower) = 1 could work. I'm not sure though as I never dealt with the research in the game.
KCHP3 7 Dec, 2021 @ 3:39pm 
@KarEssMoua
Yes, I tabbed the srpeadsheet, it has been helpful.

I'm just following the guide on <Operator><Value>, it isn't spaced (+3).

[condition] (count(TechLookOutTower)=1) does not work, it gives me an "Unknown Variable" popup. same with double '='
I am pretty sure there is something possible to do with the researched tech. However, as I said, I never really tried to create a variable depending the upgrades, so you might have to find the word used to say to the game that this tech is researched.
< >
Showing 1-5 of 5 comments
Per page: 1530 50