Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow auto targeting mode for turrets only with installed turret control unit #34202

Merged
merged 12 commits into from
Oct 16, 2019
Merged

Allow auto targeting mode for turrets only with installed turret control unit #34202

merged 12 commits into from
Oct 16, 2019

Conversation

Night-Pryanik
Copy link
Contributor

@Night-Pryanik Night-Pryanik commented Sep 23, 2019

Summary

SUMMARY: Features "Allow auto targeting mode for turrets only with installed turret control unit."

Purpose of change

Remove some magic from installed turrets.

I always wondered how it is possible that when I install absolutely ordinary machine gun on a absolutely ordinary turret mount the resulted turret suddenly gains conscience. It suddenly becomes able to understand who is friend and who is foe; how far is this foe; when it's a time to cast away stones, and a time to gather stones together; and other intelligent things.

Describe the solution

  • Added a turret control unit. It must be installed on a tile with turret to allow said turret to engage automatic targeting mode. This unit consists of security camera to see what's going on around the vehicle, complex electronic modules to analyze gathered information, and a motor to rotate the whole set.
  • For now it doesn't spawn anywhere in the game neither as an item nor as a vehicle part. It could only be crafted.
  • Every turret you want to set in an auto targeting mode will require a separate control unit.
  • Essential components required to craft: laptop, AI module, targeting module, weapons system, robotic controls, security camera.
  • Skills to craft: electronic 5, computers 5 and mechanics 3. 2 hours to craft.
  • Skills to install unit on a vehicle: mechanics 3 and electronic 3. 2 hours to install.
  • Every turret control unit consume 250W of energy.
  • On starting a new game (and loading existing save too!) ALL vehicles with turrets will be forcibly set to manual targeting mode. You wouldn't be able to set them to auto mode until you craft and install control unit. Uninstalling control unit from the turret while having auto mode will reset it to manual mode.

Additional context

[CR] because I need to do some more testing and I also because I have questions:

  • Most important question: should it be pre-installed on military vehicles that spawn at the game start? Or should it be survivor's know-how?
  • Should its recipe be autolearnable or require some book to craft?
  • Should it spend epower on use (it's moving, targeting and firing after all)? If yes, should it be toggleable?
  • Should removing turret require removing installed turret control unit first?
  • Skills and required time to craft. Too much, too little? Another skills instead of these?
  • Skills and required time to install unit on a vehicle. Too much, too little? Another skills instead of these?

…nit is present on turret's tile on loading save
… present

Also reworded targeting mode options a bit to reduce confusing.
Also removed a check for MANUAL flag as there is no items or vehicle parts with this flag.
Also reworded reason of why you can't aim automatic turrets and added a missing period.
Also, on removing turret controls forcibly set targeting mode of affected turret to manual.
@Night-Pryanik Night-Pryanik added <Enhancement / Feature> New features, or enhancements on existing [JSON] Changes (can be) made in JSON Vehicles Vehicles, parts, mechanics & interactions [C++] Changes (can be) made in C++. Previously named `Code` labels Sep 23, 2019
@Night-Pryanik Night-Pryanik marked this pull request as ready for review September 23, 2019 18:47
@tinukedaya
Copy link
Contributor

should it be pre-installed on military vehicles that spawn at the game start? Or should it be survivor's know-how?

50/50 ... Maybe put it just on the bigger vehicles and not humvees?

Should its recipe be autolearnable or require some book to craft?

Book. It feels like pretty advanced piece so I'd make it require a book.

Should it spend epower on use (it's moving, targeting and firing after all)? If yes, should it be toggleable?

Yes! Mention the epower usage on selecting the automatic fire-mode.

Should removing turret require removing installed turret control unit first?

No... Yes... No... I don't know, but I'm more inclined to no. I guess it's about how would people envision the mechanics of the mount. I can easily imagine both.

Skills and required time to craft. Too much, too little? Another skills instead of these?

I would add time here. 3-4 hours?

Skills and required time to install unit on a vehicle. Too much, too little? Another skills instead of these?

This is good.

@Night-Pryanik
Copy link
Contributor Author

Night-Pryanik commented Sep 24, 2019

Maybe put it just on the bigger vehicles and not humvees?

What do you mean by "bigger vehicles"?

Book. It feels like pretty advanced piece so I'd make it require a book.

The resulting unit is just a set of advanced electronics banded together. Survivor isn't crafting e.g. AI module or robotic controls by himself - he is just connecting all the pre-fabricated pieces. So I guess it's possible for a highly skilled individual to figure it out how to do it without any specific book.

@tinukedaya
Copy link
Contributor

What do you mean by "bigger vehicles"?

Tanks, maybe APCs but not Humvees.

The resulting unit is just a set of advanced electronics banded together. Survivor isn't crafting e.g. AI module or robotic controls by himself - he is just connecting all the pre-fabricated pieces. So I guess it's possible for a highly skilled individual to figure it out how to do it without any specific book.

Hmmm... looking at that this way you might be right.

@Night-Pryanik
Copy link
Contributor Author

Ok. Made it so if turret's targeting mode is set to automatic, it means that TCU is constantly scanning the surroundings in search for enemies, moving the turret around its axis. Thereby it constantly consumes energy (100W, equal to headlights). If you don't want TCU to consume energy, just shut it down by setting corresponding turret's targeting mode to manual.

@dkargin
Copy link
Contributor

dkargin commented Sep 25, 2019

Don't we need to add additional 'configuration' tool requirement for assembly of a robotic devices? You often need a computer (and sometimes a special tool to upload firmware) to configure similar devices in real life. This applies for smart IP cameras, tracking blocks, servo drivers and so on. You set up object types to be detected, signal types to be emitted when appropriate object has been detected. Then you tell how coordinates from detector apply to ballistic controller and then to servo drives...

Long story short: I guess we need a laptop to assemble target control unit (additionally to other tools). Smartphone could also be sufficient if a vendor for AI Module and targeting system has employed good UI designer (never happens in real life).

Also inreased craft time to 2 hours.
@Night-Pryanik
Copy link
Contributor Author

I guess we need a laptop to assemble target control unit

Done.

@dkargin
Copy link
Contributor

dkargin commented Sep 26, 2019

should it be pre-installed on military vehicles that spawn at the game start? Or should it be survivor's know-how?

Robotic APC certainly should have such system.

Should its recipe be autolearnable or require some book to craft?

Yes. But it should need some mechanics skill as well (mechatronics = mechanical engineering + computers + electronics).

Skills and required time to craft. Too much, too little? Another skills instead of these?

It could need some mechanics as well.

Should it spend epower on use (it's moving, targeting and firing after all)? If yes, should it be toggleable?

10W for IR camera + 90W for all data processing. If we want 50kg shooting thingy to rotate and target quickly, we need 1000W motors (peak load, when we should rotate 90deg in a second). But I guess this case needs more C++, and I am not sure such realism deserves this code. So I'd just increase it to 200-300W.

Should removing turret require removing installed turret control unit first?

Any way is fine.

Skills and required time to install unit on a vehicle. Too much, too little? Another skills instead of these?

Looks fine.

@Night-Pryanik
Copy link
Contributor Author

Robotic APC

This is from some mod, I suppose? Vanilla doesn't have this vehicle IIRC.

Should its recipe be autolearnable or require some book to craft?
Yes.

Yes to autolearn, or yes to book?

Also increased its power consumption from 100W to 250W.
@Night-Pryanik
Copy link
Contributor Author

it should need some mechanics skill

and

So I'd just increase it to 200-300W.

Done.

@dkargin
Copy link
Contributor

dkargin commented Sep 30, 2019

It should be autolearnable.

Everything looks fine. Even if we want to overhaul all the stuff the roboticist can do (proper components, proper skill requirements, proper numbers), it should be separate PR anyway.

@Night-Pryanik Night-Pryanik changed the title [CR] Allow auto targeting mode for turrets only with installed turret control unit Allow auto targeting mode for turrets only with installed turret control unit Oct 14, 2019
@ZhilkinSerg ZhilkinSerg merged commit b914b50 into CleverRaven:master Oct 16, 2019
@Night-Pryanik Night-Pryanik deleted the auto-targeting-mode-for-turrets-only-with-control-unit branch October 16, 2019 06:58
Ramza13 pushed a commit to Ramza13/Cataclysm-DDA that referenced this pull request Oct 22, 2019
…rol unit (CleverRaven#34202)

* Added turret control unit

* Made it craftable (autolearn)

* Added corresponding vehicle part

* Added flag to bitflags set

* Added documentation

* Forcibly set turrets' targeting mode to manual if no turret control unit is present on turret's tile on loading save

* Allow changing turrets' targeting mode only if turret control unit is present

Also reworded targeting mode options a bit to reduce confusing.
Also removed a check for MANUAL flag as there is no items or vehicle parts with this flag.
Also reworded reason of why you can't aim automatic turrets and added a missing period.

* Turret controls must be installed on a turret

Also, on removing turret controls forcibly set targeting mode of affected turret to manual.

* Set turret control unit's state equal to turret's targeting mode

* Increased control unit power draw

* Added a requirement for laptop computer

Also inreased craft time to 2 hours.

* Added mechanics skill req for crafting TCU

Also increased its power consumption from 100W to 250W.
@Soup-de-Loop Soup-de-Loop mentioned this pull request Jan 29, 2020
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[C++] Changes (can be) made in C++. Previously named `Code` <Enhancement / Feature> New features, or enhancements on existing [JSON] Changes (can be) made in JSON Vehicles Vehicles, parts, mechanics & interactions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants