HDIAndrew / EFS

12 stars 0 forks source link

Cargo types #118

Open Luxor70 opened 1 year ago

Luxor70 commented 1 year ago

Description:

I'd like to suggest to implement a way to differentiate between cargo types. Carriers should load fighters/bombers only, while haulers should carry troops/resources. It could be achieved by adding a tag to each unit to set it as the cargo type and the transporter type (mutually exclusive) it is and then with a new .DAT file we could define the type of cargo that transporters can load.

Commit hash:

1.5

Why is it good for the game?:

It would give more depth to the game.

Matt-Caspermeyer commented 1 year ago

This idea has been brought up previously - I'm not certain how much real value it adds to the game while dramatically increasing its complexity.

I think I'd be for it if we could figure out a simple and elegant solution to implement.

If anyone else has some ideas in this regard please post.

@Luxor70, if you have a good idea how you'd want to implement it, you can layout your ideas here in more detail...

Luxor70 commented 1 year ago

Well, I thought about it. I came up with a simple (I think) way of implementing this. Let's add two new columns in unit.dat file: cargo type and transport type. Make them integer type. When you check if a unit can be loaded into a transport, check values in the two columns (cargo type for unit being loaded and transport type for transport unit). If the two values are equal, the unit can be loaded, otherwise not.

In this way, for example, we could have 3 transport types, for troops, resources, and space fighters/bombers.

The difficult part here is to have AI being able to handle this.