Random thoughts about scripting

Random thoughts about scripting

Discuss game development here, from a distinct game project to an accessible third-party mutator, down to the interaction and design of individual units if you like.

Moderator: Moderators

User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Random thoughts about scripting

Post by KDR_11k »

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.
Last edited by KDR_11k on 24 Apr 2007, 22:11, edited 1 time in total.
User avatar
Snipawolf
Posts: 4357
Joined: 12 Dec 2005, 01:49

Post by Snipawolf »

They all seem like great ideas.
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Post by Pxtl »

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
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

You can tell what hit your unit in 75b1, if you can script the unit to have the bonus you want you can give it out when the weapon hits.
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Post by imbaczek »

you don't even need to hit a unit to have it do something. you can make a custom command and do stuff on its target.

either way, I agree that weapons are the next obvious target for luaification. the only thing needed is 48h long days for trepan.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

I'm not thinking that much about Lua since I got enough languages to learn just for uni homework right now.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

bos scripted gameplay mechanics nuke AIs.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6241
Joined: 29 Apr 2005, 01:14

Post by FLOZi »

Boohoo.

(edit: and, infact, they nuke AIs that attempt to be cross-game which, as spring continues to develop, will become less ideal)
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Post by zwzsg »

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.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Its just that crippling singleplayer in a way AI devs cant work around is a travesty. Imagine if OTA where multiplayer only?
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

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?
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Ais arent restricted to that. NTai can play kernel panic, nanoblobz and EE, and they arent OTA with different models.
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Post by Pxtl »

AF wrote:Ais arent restricted to that. NTai can play kernel panic, nanoblobz and EE, and they arent OTA with different models.
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.

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.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

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.
User avatar
Guessmyname
Posts: 3301
Joined: 28 Apr 2005, 21:07

Post by Guessmyname »

zwzsg wrote:In TA HitByWeapon gave the direction of the point the shot hit, not sure about Spring and about that new HitByWeaponID.
It's HitByWeapID(x,y,id,damage)
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

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.
User avatar
Guessmyname
Posts: 3301
Joined: 28 Apr 2005, 21:07

Post by Guessmyname »

Odd, HitByWeapID works for me, I'm sure...
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6241
Joined: 29 Apr 2005, 01:14

Post by FLOZi »

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.
Actually, it's HitByWeaponId(Z,X,id,damage)

:wink:

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.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

Google even says you're the only person to ever spell it like that.
User avatar
Guessmyname
Posts: 3301
Joined: 28 Apr 2005, 21:07

Post by Guessmyname »

Google says a lot of things
Post Reply

Return to “Game Development”