This is an AITriggerTypes line.
I know, in TS, that number in the place where it's the "-1":
0 means: enemy owns a thing
1 means: AI owns a thing
So WTF means "-1"? Don't say it means "nothing" nor "no condition" and that it's for pool teams, as most pool teams have a "1", and this code line isn't from a pool team either.
-1 means ignore the condition and just create the team I think. I've seen it used most on recruiter teams. _________________ KGR | AT
AZUR
Discord: theastronomer1836
Steam QUICK_EDIT
probably because you can't have a "null" or "nothing" condition and an empty condition string might cause more trouble, than a specific -1 for using no condition. _________________ SHP Artist of Twisted Insurrection: Nod buildings
You know, WW didn't always coded the inis 100% perfect as well.
They didn't knew how to code correct
-tiberium debris
-nuke silo anims
-activeanims (often use wrong zadjust, forgot keys like Start= etc)
-used keys which doesn't exist (e.g. IsBase) and mixed up Names (e.g. they used on the Owner key, which accepts Houses, the Name "Civilian" which is a side instead of "Neutral" which is the house)
-etc etc
WW, was like "If it works, don't think further about it and keep it that way". _________________ SHP Artist of Twisted Insurrection: Nod buildings
Maybe this is a bit off topic, but I'm feeling like clearing this up someday: Dutchy made the AI for TI Public Beta 1 but didn't write a single line of AI code for Public Beta 2; instead I took the job for it. After PB2's release Dutchy has again continued the work from the base which I did for PB2.
I believe the conclusion which pretty much all more experienced and active AI coders have come to is that -1 means no condition. Even if it wouldn't mean that, it's best to use it as such and use other numbers for the condition stuff. _________________ CnCNet Client | CnCNet TS patches | More Quality-of-Life Improvements for RA Remastered
Joined: 18 Jun 2005 Location: Dordrecht, the Netherlands
Posted: Fri Oct 14, 2011 7:15 pm Post subject:
To quote from my PM:
Quote:
-1: This Player's enemy owns (the enemy of the AI)
1: This player owns (the AI)
This is at least what I know from TI AI. I use 1 so the AI respects their prerequisites. From what I saw TS uses a lot of -1 in their standard teams. I always assumed that this means that the AI's enemy must own something. Of course, this is all assumptions; as I want my AI to respect their prerequisites, I mostly use triggers with 1. QUICK_EDIT
I use 0 and "enemy owns" works... So maybe 0 and -1 are the same? Hmmm.. in original AI.ini the "-1" it's in triggers with some buildings, ENGINEER and <none> as condition...
According to the original Absturz's AI Guide 0 and -1 are the same, but I haven't seen other proof for it other than WW's coding (and like LKO said, the quality of that is questionable -- especially with AI coding). If it's true, I think it still makes the files cleaner if you use -1 for no-condition triggers. _________________ CnCNet Client | CnCNet TS patches | More Quality-of-Life Improvements for RA Remastered
-1 AI pool team trigger (autocreated thus not attached to the AIGenerals)
0 trigger when enemy owns the Unit Type or Tech Type
1 trigger when computer owns the Unit Type or Tech Type
2 trigger when enemy has low power (power is in Yellow)
3 trigger when enemy has low power (power is in Red)
4 trigger based on number of Credits held by enemy
5 trigger when Iron Curtain is charged to amount specified by AIMinorSuperReadyPercent= in RULES.INI
6 trigger when Chronosphere is charged to amount specified by AIMinorSuperReadyPercent= in RULES.INI
7 trigger when neutral owns the Unit Type or Tech Type
From Dee's INI Guide. -1 does have some significance as in being a special case. Westwood had tons of those. _________________ KGR | AT
AZUR
Discord: theastronomer1836
Steam QUICK_EDIT
Thanks for your post, but It's not relevant in this topic the Deezire's guide. Why? Because in TS's original AI.ini, "-1" isn't used for pool teams, in fact, they all use "1", plus, Dutchygamer uses "-1" for "enemy owns"... _________________ Inactive Projects >> Tiberian Sun: Tech Level War http://www.ppmsite.com/forum/index.php?f=843
Download the latest beta: http://www.moddb.com/mods/cc-tiberian-sun-tech-level-war QUICK_EDIT
I use -1 for pool teams, 0 for enemy owns X and 1 for AI owns X. I'm not sure if -1 has any significance other than "autocreate this and ignore conditions."
[EDIT] However, I write AI stuff for RA2 rather than TS, but it shouldn't be all that different. _________________ KGR | AT
AZUR
Discord: theastronomer1836
Steam QUICK_EDIT
I do that and it works, but I have the teams do things like miner hunt. I know Westwood does the same thing in TS, but not RA2. _________________ KGR | AT
AZUR
Discord: theastronomer1836
Steam QUICK_EDIT
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum