Quick Reply
Search this Thread
Forum Resident
Original Poster
#1 Old 10th May 2025 at 5:29 AM
Default Referencing a non-existent BCON, what happens?
I'm planning a bit of career expanding, and I want to introduce a couple of extra details to some careers. One is a check for a new token to get promoted to some levels (for some careers), and another is a pop-up offering a switch to a different career on a particular promotion (inspired by the career "branches" in TS3).

I know I could do this by essentially inserting a bit of code that says "is the career GUID X?" and if so look up whether it's supposed to check more details/offer the alternative promotion etc. But if I can get this all working I'd rather like to be able to repeat the whole project for other careers, and have an option for others to incorporate this for their own career editing projects - and that gets annoying if you have to make sure you've checked all the right careers.

So... it would be really handy to be able to introduce a new BCON to the careers that I'm adding this stuff to, with a 0 or 1 for each level depending on what needs to happen, and write the code to say if BCON 1099:level is >0 then... - but of course most careers won't have a BCON 1099 (or whatever number I pick that isn't currently used). So what happens? If this throws an error, is there any way to say "is there a BCON 1099 for this group?" and act accordingly?

Many thanks for any help.
Top Secret Researcher
#2 Old 10th May 2025 at 10:03 AM
Bcons are usually more trouble than they are worth. Maybe use a private behavior function with tree by name. You can pick any CT name from the existing global list that is used in entirely different contexts. You can find something that makes a bit of sense, like for example "display balloon" to display a dialog. If if the behavior function doesn't exist, it will return false. If you really love constants, you can read data from them by this CT.
Back to top