Fuse Building

Fuse Building

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

Fuse Building

Post by Guessmyname »

Zwzsg has brought this up numerous times, and I agree that being able to fuse units together would open up a lot of possibilities.

How it could work
The "main" unit would basically be a builder.

In the script, QueryFuseBuildPiece1(piecenum) to say... 16 ought to be enough (bearing in mind that you can attach another 16 units to the next piece and so on and so forth)

ie

QueryFBPiece1(piecenum) //FB Stands for Fuse-Build
{
piecenum=FBP1;
}

Also, a QueryFBNanoPoint1(piecenum) for where the nano spray comes from.

Using special queries like above allows for the use of fuse and normal building (in other words a factory that has fuse points for legs/wings/whatever)

When the unit is destroyed anything below the unit in the FB hierarchy would go with it.

Corpses that are still fused to the units and block the FB points would be good, though an in-corpse tag that makes it fall off instead would also be useful for large pieces that probably wouldn't be able to stay on the component slot.

Obviously, when a FBPiece is occupied (by either a unit or a corpse) it will become unavailable.

How many FBPoints there are can be determined by how many FB queries there are in the script (with a max limit of 16)

Selecting Fuse built units
When you select a unit all units below its hierarchy is also selected. Of the group, individual units can also be selected using a screen similar to what you get when you select multiple units in Dawn of War.

Fuse-built units as addons

One of the main uses for fuse-building would be to create addon components such as radars and jammers. It could also be used to add extra engines and whatnot to increase speed. The best way to incorporate this would be to treat all the fused units as one (possibly with a group ai). The max speeds, accelerations and brakerates of all units linked together would be totalled. As engine components are lost in battle the speed, brakerate etc would decrease. Speed-based tags are the only ones I can think of that need to apply to all the linked units (On further thought: Cloaking! If a cloakable unit is present it should cloak all units in the hierarchy. If multiple cloaking units are attached then, using the group ai, only one is active. When that is destroyed another is activated - possibly after a delay). Health, radars and all that can stay unit specific. You also have addons that slow the unit down (armour for instance)

Some uses for Fuse Building
This is basically me brainstorming ideas for fuse building. Feel free to skip it if you want.

Fine-tuning footprints:
With spherical collision models large units have some difficulty. Splitting the unit up can lessen this somewhat

Mobile Factories:
1 Factory + a fuse-built mobility (tracks, legs, wings, propellers etc) added.

These below examples are primary to do with space mods, as they have the most to gain from fuse building.

Main Chassis units:
The basics. The one with all the slots. To solve some problems main chassis pieces should be handled differently. The best way to do that would be with a chassis-spefic group ai that automatic adds things to slots on the unit's construction

All component slots would have a unit automatically built into it. These are like component units (see below) but with only one slot. The advantage of doing this is that you have selectable component points (useful if you have underside/side slots where units built there would have to be rotated for it to look right - saves on coding work). This also allows the modder to restrict what each one builds. ie component slots on the rear could be engine only.

For larger ships two main chassis units could be used (front and rear perhaps). Not only would this allow you to disable ship's engines completely (and blow ships in half) but would also mean 17+ component slots could be available.

Individual unit-specific group-ais that build addons automatically would also be used for creating "pre-fab" units, ie fighter - a small chassis + component slots + weapons, engines and armour - all automated for ease of use (who wants to go through each fighter individually eh? It'd take forever to amass a large number of them...)

Engines:
The main body of a unit would be insanely slow, requiring the addition of engine components. This could include a strategic element: More speed or more weapons / armour / equipment?

Armour:
Basically a unit that soaks up incoming fire instead of whatever unit its protecting. With component slots that can be idividually selected, and therefore have individual build menus, area-specific armour can be done

Component unit:
Basically a unit that itself has four or so FBPieces. For balance purposes, only additional equipment (radar, los extenders etc) should be FB-able onto there. This would invoke a strategic element too: use a component unit to house all equipment - allowing for more weapons, armour and speed - at the risk of losing them all at once if destroyed, or sacrifising armour and weapon slots to make all that stuff harder to take out. See also: Main chassis units above

Weapons:
Can be whatever weapons you like. Due to the fact that bombs always fall from the origin of the unit, this can be used as a slightly hacky way of adding multiple bomb bays / controlling where the bombs fall out from.

Additional Equipment:
Shields (A: repulsors or B: Large units that cover everything to soak up incoming fire - tags to make it unselectable and that friendly fire goes straight through it would be necessary for that though), Radar, Radar Jammers, Cloaking devices, LOS extenders, Solar Panels, Metal Makers, Storage Devices etc

Self-Repair points:
Nano pieces that can repair components / other units and reclaim wreckage blocking FBPoints

Hangars: Bits that can transport other units. Just a thought: Fuse building will allow for multiple air repair pads too.

Discuss!
renrutal
Posts: 84
Joined: 28 Apr 2005, 16:45

Post by renrutal »

I have a bad feeling this will bring Dragon Ball Z mods to Spring :)

And probably all the old mecha series... Voltron anyone?
User avatar
Maelstrom
Posts: 1950
Joined: 23 Jul 2005, 14:52

Post by Maelstrom »

Strange idea:

The base unit is a ball. Nothing more than that. It has about 8 slots around it. From each slot you can build:
1) A Leg. Make it move faster
2) A Gun. Make it shoot.
3) For a large cost, a specialised peice, like a radar, cloaking device, jammer, big gun ect.

THen you can make an amry of whatever you wanted. Scouts, with lots of legs. Heavy tanks, with lots of guns. Asault, with a mix of legs and guns. ndles possibilities!
User avatar
Ace07
Posts: 348
Joined: 21 Apr 2005, 20:46

Post by Ace07 »

These ideas of fusing remind me of....perimeter, and that game sucked. The problem with perimeter is that the advantage of combining units was almost none. The economy of it didn't add up very well. You would build all of these units and combine them, but they wouldn't be too useful at all. Towers were so much better than all the units you could build in that game. :P

Doesn't mean it couldn't work for spring, but this is what mods are for people! If you want your idea to be implimented, make a mod of it.
User avatar
Decimator
Posts: 1118
Joined: 24 Jul 2005, 04:15

Post by Decimator »

This would make an interesting premise for a mod. Have the commander be upgradable with all sorts of weaponry and nanolathes and basically have all units constructable by other units. Would make for cool "army ant" style play.
User avatar
Nemo
Spring 1944 Developer
Posts: 1376
Joined: 30 Jan 2005, 19:44

Post by Nemo »

This would help me out a bit for my idea/5% completed mod.

I've been looking for a way to let certain units load weapons (and only a specific amount of ammo for them..blah, blah, against TA ideology, chill, I know.)

This would work quite well...have the unit load an upgrade that fired the weapon I want it to.
Torrasque
Posts: 1022
Joined: 05 Oct 2004, 23:55

Post by Torrasque »

It would be very cool for a Warhammerr 40k mod where a simple tank can have a tons of different upgarde/cannon.
(having 12 tanks with just some variations is weird)
User avatar
Guessmyname
Posts: 3301
Joined: 28 Apr 2005, 21:07

Post by Guessmyname »

Well, I'm thinking of starting a space mod...

I've modelled one unit already. Its a cruiser, with fuse-building implemented as in the examples in mind.

Another thought: When fuse-built gun turrets / radars or whatever are destroyed, their death sound could be "We've lost radar!" or something
User avatar
SwiftSpear
Classic Community Lead
Posts: 7287
Joined: 12 Aug 2005, 09:29

Post by SwiftSpear »

I posted about this in the other thread as well. In my opinion fused units are one of the big deal development steps this engine just has to take at some point. Expecially with a more powerfull scripting engine the addition of a fused unit system just blows apart what is possible in this game. Imagine massive units that you can shoot the guns off of, or bases that build themselfs by slowly stretching out attaching one fused part onto another to form the base masterstructure. Fused units are one of the things I absolutly want to see spring supporting.
User avatar
Min3mat
Posts: 3455
Joined: 17 Nov 2004, 20:19

Post by Min3mat »

Well, I'm thinking of starting a space mod...
Have u seen G/E/M by Caydr? give up now mate
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Hmm

Post by Pxtl »

I disagree about the "auto select child units" approach, or the "selection screen".

1) fused units should be large enough that you can select all the parts individually from the main gameplay screen. We're not talking about pee-wees with fused arms here, we're talking about giving the WarLord a fused aircraft plant. You can click on the fuselage, you can click on the plant, or you can drag-select them both.

Having child units treated as slaves of the parent creates problems. It requires extra GUI code, it causes problems with units (if I tell my mobile-factory to move, will it send the children) and in the case of turrets, it defeates the purpose - I want my fused-version of Abel to allow me to easily have the front artillery target one base while the rear artillery targets another, while I give the fuselage marching orders.

Imho, go for the simplest behaviour possible - the units behave as they do today. Want the factory? Click the factory. Want the body? Click the body. Want both? Drag a box. The "Fuse" just means (a) they're stuck together, with child moving with the parent, and (b) child unit does not have it's own health - hits on child are transferred to parent.

That's it. Simple. No muss no fuss. Trivially, you could optionally allow the child-unit to take it's own damage, thus opening the way for targettable sub-objects.
User avatar
Dragon45
Posts: 2883
Joined: 16 Aug 2004, 04:36

Post by Dragon45 »

It depends on the implementation of what you want the fused units to do though.


Lets say I have a World Devastator. It's a Star Wars massive uber-unit that can build more sections onto itself as it gets bigger.

Well, a fully developed world devastator will have many dozens of laser turrets and missile turrets and a couple of droid factories. To make it all selectable would be a pain.

Ideally, if i select the Devastator, I want to select the *devastator*, not its numerous little turbolaser turrets, or its indiviudal factories. I dont want to be able to select anything else at all. However, the unit build pics would still be a part of the Devastator's menu, so i could still click on the units i want to build, and have them be cranked out.
User avatar
krogothe
AI Developer
Posts: 1050
Joined: 14 Nov 2005, 17:07

Post by krogothe »

That probably wouldnt make a very popular mod, but hell it would be fun, even if for just a while!
I second that!
User avatar
SwiftSpear
Classic Community Lead
Posts: 7287
Joined: 12 Aug 2005, 09:29

Re: Hmm

Post by SwiftSpear »

Pxtl wrote:I disagree about the "auto select child units" approach, or the "selection screen".

1) fused units should be large enough that you can select all the parts individually from the main gameplay screen. We're not talking about pee-wees with fused arms here, we're talking about giving the WarLord a fused aircraft plant. You can click on the fuselage, you can click on the plant, or you can drag-select them both.

Having child units treated as slaves of the parent creates problems. It requires extra GUI code, it causes problems with units (if I tell my mobile-factory to move, will it send the children) and in the case of turrets, it defeates the purpose - I want my fused-version of Abel to allow me to easily have the front artillery target one base while the rear artillery targets another, while I give the fuselage marching orders.

Imho, go for the simplest behaviour possible - the units behave as they do today. Want the factory? Click the factory. Want the body? Click the body. Want both? Drag a box. The "Fuse" just means (a) they're stuck together, with child moving with the parent, and (b) child unit does not have it's own health - hits on child are transferred to parent.

That's it. Simple. No muss no fuss. Trivially, you could optionally allow the child-unit to take it's own damage, thus opening the way for targettable sub-objects.
Units should be able to be fused both as master slave and conjoined twins, depending on the needs of the unit or function. Obviously units that build things such as mobile factory beds and constructor mounts probably need to be conjoined fusion. But fusing a gun onto a body or a radar onto some totally different unit should be done master slave. I'll never have a reason to click on the specific radar if it's attached to the master body, I will only ever need to know what the master is doing.
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Post by Pxtl »

Yes, but a fused radar would only be useful if (a) the radar is destroyable, in which case it needs to be selectable as a target, or (b) the radar is constructed after the unit exists. For the base case (unit is built with radar that is part of it) using fuse is unnecesary.
User avatar
SwiftSpear
Classic Community Lead
Posts: 7287
Joined: 12 Aug 2005, 09:29

Post by SwiftSpear »

Pxtl wrote:Yes, but a fused radar would only be useful if (a) the radar is destroyable, in which case it needs to be selectable as a target, or (b) the radar is constructed after the unit exists. For the base case (unit is built with radar that is part of it) using fuse is unnecesary.
a) units could be set to autotarget weaponary or radar mounts rather then superunit bodies. Xwings don't shoot at the deathstar, they shoot at the turrets on the deathstar, because they understand that thier damage potential can't acctually obliterate the whole, but only attack function.

b) that sounds useful to me. Maby not for all mods, but definately for some.
Post Reply

Return to “Engine”