Quick unit behaviour bugfix request

Quick unit behaviour bugfix request

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
Warlord Zsinj
Imperial Winter Developer
Posts: 3742
Joined: 24 Aug 2004, 08:59

Quick unit behaviour bugfix request

Post by Warlord Zsinj »

If an air unit is given the ability to act as an air repair pad (that is, units will attach themselves to the air unit, and it will repair them while in flight), if the air-repairer is damaged, it will attempt to land on itself, and will fly off into oblivion trying to do so.

Some sort of unit behaviour fix where a unit set as an air repair pad will ignore itself when looking for a repairer would be nice.

Alternatively, an fbi tag that instructs an air unit to never look for an air repair pad might be a more flexible option for other modders. I can imagine someone making a space mod who might have airborne air-repairers who doesn't want big capital ships trying to repair themselves. While this is flexible for other modder's uses, it does mean that my air repairer will never seek out a second air repairer for repairs (if you follow :? ), which it would be nice if it could.

A final method would be to allow modder's the ability to set per unit the 'land at X% health' value. For my solution, it means I can force the air-repairer to always land at 0%. It also means that modders can remove the 'land at X%' button, and simply always force aircraft to attempt to land at a certain health %. Or potentially, set a minimum value that units must land at (meaning that players can not order their aircraft to fight to the death if there is a friendly repair pad).

Any of the above solutions work for me, and I'd appreciate any help here!

edit:
Just spotted this:
- New fbi tag MinAirBasePower

I could probably jerry rig a solution using that, but I suspect that seeing the above solutions would still be ideal for giving more control.
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Re: Quick unit behaviour bugfix request

Post by lurker »

You want to force people to blow up their air pads to make their planes keep fighting? Can you elaborate on that one?
Warlord Zsinj
Imperial Winter Developer
Posts: 3742
Joined: 24 Aug 2004, 08:59

Re: Quick unit behaviour bugfix request

Post by Warlord Zsinj »

Say what now?
User avatar
REVENGE
Posts: 2382
Joined: 24 Aug 2006, 06:13

Re: Quick unit behaviour bugfix request

Post by REVENGE »

Lurker, he's basically saying that setting an air unit to an airbase will cause borked behavior, where the air unit will try to land on itself to do repairs. This is the same reason why Fleet Support Ships were removed from FF when the mod was ported to Spring.

I too, request that this behavior be fixed, along with the [still] present problem of not being able to load air units onto transports reliably (without borked behavior or crashes in general).
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Quick unit behaviour bugfix request

Post by AF »

both the fix and the tag would be preferable.
Warlord Zsinj
Imperial Winter Developer
Posts: 3742
Joined: 24 Aug 2004, 08:59

Re: Quick unit behaviour bugfix request

Post by Warlord Zsinj »

For the record, Revenge, this was also broken in OTA - I tried to do it with SWTA as well, so it would have been broken in the original FF mod too.
YokoZar
Posts: 883
Joined: 15 Jul 2007, 22:02

Re: Quick unit behaviour bugfix request

Post by YokoZar »

Warlord Zsinj wrote:Say what now?
You asked for modders to be able to override "land at x%" -- this means that if I don't want my planes to land and instead keep fighting, I have to self destruct my air repair pads.
Warlord Zsinj
Imperial Winter Developer
Posts: 3742
Joined: 24 Aug 2004, 08:59

Re: Quick unit behaviour bugfix request

Post by Warlord Zsinj »

Oh, I see - I thought that the 'land a x%' value was an attribute of each individual aircraft, not the landing pads?

So that a modder could set the land at x% value via the FBI to be, say, 20% for all fighters. That would mean that either players could set their 'land at' values higher then 20% for their fighters, but never lower, or you just banned what players could set at all, so that all fighters always landed at 20%.
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Re: Quick unit behaviour bugfix request

Post by imbaczek »

try r6371, comment.
Warlord Zsinj
Imperial Winter Developer
Posts: 3742
Joined: 24 Aug 2004, 08:59

Re: Quick unit behaviour bugfix request

Post by Warlord Zsinj »

duh, I just got what the others were saying re: airpads. It's not a function I would use in IW, I was just thinking it could possibly useful in a situation like, maybe s44, if they managed to implement enforced airfields, so that having aircraft and having airfields are mutually inclusive.

Will check out that rev, looks like it'll solve the problem though, thanks :)
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Re: Quick unit behaviour bugfix request

Post by KDR_11k »

You know, you can lua it to make the planes self-destruct if they have no airfield. Fibre does that (though implicitly because Fibre kills all units if their factory is destroyed).
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Re: Quick unit behaviour bugfix request

Post by Pxtl »

I'm starting to think that airfields are one of those things so complex you're going to have to lua most of it. I mean, you could have a mod where there are large airpads for large craft and small airpads for small craft, or a seperate airpad for each type of craft, or something, and the current airpad system won't give you that.
Warlord Zsinj
Imperial Winter Developer
Posts: 3742
Joined: 24 Aug 2004, 08:59

Re: Quick unit behaviour bugfix request

Post by Warlord Zsinj »

Yeah, I can imagine someone like FF using such a function for capital ships that launch bays of fighters, or something like that, too.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Quick unit behaviour bugfix request

Post by AF »

Airfields could be re-implemented as a lua gadget and included in the OTAbase archive with a switch to be overriden in *A mods that want to use different behaviour
Post Reply

Return to “Engine”