Random thoughts about scripting
Moderator: Moderators
Random thoughts about scripting
I had a few ideas for unit behaviours and now I'm wondering what other people think of them (primarily if they think it's possible).
Idea 1: Throwing loaded units. If releasing an attached unit keeps the velocity it was moving at you coulsd use it to throw stuff. I was thinking about a unit that could grab enemies and toss them around, is that even possible?
Idea 2: Having ammo transporters tell other units about ammo by firing an explosion and having other units respond with a similar explosion if they want to grab some so the ammo transporter's payload would be decreased each time and it runs dry after a few times. Obviously having ammo transporters define a "pecking order" (most likely ID-based) and not responding if a higher priority transport would cover the target already (does HitByWeaponID return the location of the explosion?).
Idea 3: Alternatively have really cheap ammo transporters that explode into a "message" that tells all surrounding units that they get new ammo. This one's definitely possible but I'm wondering what people think about it. Mobile ammo refills are a must but having the transporter carry an infinite amount just means you have one more unit to drag around but still not a supply line.
Idea 1: Throwing loaded units. If releasing an attached unit keeps the velocity it was moving at you coulsd use it to throw stuff. I was thinking about a unit that could grab enemies and toss them around, is that even possible?
Idea 2: Having ammo transporters tell other units about ammo by firing an explosion and having other units respond with a similar explosion if they want to grab some so the ammo transporter's payload would be decreased each time and it runs dry after a few times. Obviously having ammo transporters define a "pecking order" (most likely ID-based) and not responding if a higher priority transport would cover the target already (does HitByWeaponID return the location of the explosion?).
Idea 3: Alternatively have really cheap ammo transporters that explode into a "message" that tells all surrounding units that they get new ammo. This one's definitely possible but I'm wondering what people think about it. Mobile ammo refills are a must but having the transporter carry an infinite amount just means you have one more unit to drag around but still not a supply line.
Last edited by KDR_11k on 24 Apr 2007, 22:11, edited 1 time in total.
I think the problem is more general. There are all manner of effects you could have on friend or foe units, and all manner of logic you'd like to have them choose what their targets are (friend or foe).
Ultimately, the targetting (for both weapons and kamikaze attacks) needs to be more scriptable, and the special effects of the impact needs to be more scriptable too.
After all, ammo isn't the only kind of assistance units would need to provid - like weapons that heal units, weapons that trigger special scripted effects like providing temporary protection, etc. There are all kinds of complex things you could do.
/me really should just shut up and wait for command engine
Ultimately, the targetting (for both weapons and kamikaze attacks) needs to be more scriptable, and the special effects of the impact needs to be more scriptable too.
After all, ammo isn't the only kind of assistance units would need to provid - like weapons that heal units, weapons that trigger special scripted effects like providing temporary protection, etc. There are all kinds of complex things you could do.
/me really should just shut up and wait for command engine
Before, units could also communicate whatever via moving attached unit, yet I know only one unit that used it. So what I mean, is that even if using custom explosion to have inter unit communication could theorically work, it doesn't mean overnight every mod will use overacomplex bos to make use of it.
In TA HitByWeapon gave the direction of the point the shot hit, not sure about Spring and about that new HitByWeaponID.
Oh, and if dropped unit don't keep their velocity, you can still blow them away with concentrated well placed heavy blow explosion, I guess!
As for AI, well, it doesn't seem a good idea to me to severly limit modding possibility just because the AI can't handle anything unusual. Would get boring if mods could be revolutionnary, but had to avoid it just because of AI. And beside, trying to make generic AI ignoring the specifity of each mods always seemed to me like leading to a dead end.
In TA HitByWeapon gave the direction of the point the shot hit, not sure about Spring and about that new HitByWeaponID.
Oh, and if dropped unit don't keep their velocity, you can still blow them away with concentrated well placed heavy blow explosion, I guess!
As for AI, well, it doesn't seem a good idea to me to severly limit modding possibility just because the AI can't handle anything unusual. Would get boring if mods could be revolutionnary, but had to avoid it just because of AI. And beside, trying to make generic AI ignoring the specifity of each mods always seemed to me like leading to a dead end.
Spring effectively is MP only even with AIs. You don't need any complex BOS rules to make it impossible for an AI to follow, Dozerz's self-ding for flag damage is enough and that's done just with fbi, tdf and txt files.
Really, I'm not that worried about AIs, they play every mod like TA (though admittedly many users are just as dumb) and to make them work well you pretty much have to make your mod TA with different graphics. What's the point of modding if you restrict yourself that way?
Really, I'm not that worried about AIs, they play every mod like TA (though admittedly many users are just as dumb) and to make them work well you pretty much have to make your mod TA with different graphics. What's the point of modding if you restrict yourself that way?
All those games are still designed in the context of OTA features. The balance and style is very different, but they are still fundamentally expressable in terms of OTA features. Except for Nanoblobs' sheep's units-building-units, you could even implement 95% of the gameplay in the OTA engine.AF wrote:Ais arent restricted to that. NTai can play kernel panic, nanoblobz and EE, and they arent OTA with different models.
Kernel panic was originally implemented with TA units. The AIs understand concepts like "can only build on geotherm", "construction unit", "artillery-unit", "assault-unit" etc.
However, concepts like "mobile resupply unit" and the behaviours associated with that can't be expressed to AIs.
Because no interface has been provided. There are no UnitDef tags to allow the AIs to use them, no standardized fbi tags to signify its happening that AIs can use, therefore because AIs lack the information they cannot do it.
The issue here is NOT that AIs are designed for OTA and thus cant handle it, its that AIs have no way of knowing what units need this and what units are the mobile supplies, because all the information is in CObB scripts the AI cant read. No data is given to the AI. Its like telling you to walk to your nearest well known shop, oh by the way we've made you blind, deaf, and taken away all your other senses. Thats the issue. Its nto OTA game mechanics. Its lack of information.
Mod XYZ has a lua superweapon that makes the commander summon a gigantic orbital weapon, btut he AI cant use it because:
a: OTA didnt have this, and AIs werent designed for it as a result.
or?
b: The AI doesnt have anyway of knowing the barrage even exists because nobody has programmed interfaces or given any information.
which is it, a or b? As an AI programmer I'm leaning heavily towards b, despite this thread concluding its actually a which is nonsense. Dont underestimate the AIs available to spring.
The issue here is NOT that AIs are designed for OTA and thus cant handle it, its that AIs have no way of knowing what units need this and what units are the mobile supplies, because all the information is in CObB scripts the AI cant read. No data is given to the AI. Its like telling you to walk to your nearest well known shop, oh by the way we've made you blind, deaf, and taken away all your other senses. Thats the issue. Its nto OTA game mechanics. Its lack of information.
Mod XYZ has a lua superweapon that makes the commander summon a gigantic orbital weapon, btut he AI cant use it because:
a: OTA didnt have this, and AIs werent designed for it as a result.
or?
b: The AI doesnt have anyway of knowing the barrage even exists because nobody has programmed interfaces or given any information.
which is it, a or b? As an AI programmer I'm leaning heavily towards b, despite this thread concluding its actually a which is nonsense. Dont underestimate the AIs available to spring.
- Guessmyname
- Posts: 3301
- Joined: 28 Apr 2005, 21:07
Actually, it's HitByWeaponId(Z,X,id,damage)KDR_11k wrote:No, it's HitByWeaponId(x,z,id,damage) and it's case sensitive. Your misspelling caused me quite some trouble when I tried to make it work for the first time.

And yes, I've pointed out that its backwards.
AF: The modder/player knows exactly how those units should be used, if the AI was written specifically for the mod/game it wouldn't matter that it couldn't detect such thingson the fly; this is the point I and zwzsg were alluding to. AIs are just as limited as maps when it comes to supporting ALL mods equally.