Request for modding. Warmup for characters.

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
User avatar
maroder
Inserter
Inserter
Posts: 47
Joined: Mon Apr 27, 2015 1:02 pm
Contact:

Request for modding. Warmup for characters.

Post by maroder »

What is warmup
This is the delay before the shot. Like character aiming.
It is implemented in the game for units and turrets with animation before spitting.
Two actions are performed: 1) start warmup - stop moving and start animation; 2) end warmup - check for the presence of a target in the spitting area, then a shot.

What is implemented for the character
Two actions are performed: 1) start warmup - ammunition is spent for a shot and the selected weapon is remembered; 2) end warmup - a check is made: the selected weapon is the same, the target is in the shot zone, a shot is fired.
Between steps 1 and 2, a character can do anything:
  • Move at normal speed.
  • Сhoose another weapon and choose another one of the same.
  • Throw the weapon to the ground and then equip it again.
  • Sit in a tank or wagon and fire a shot while sitting in it.
The request itself and what the character will do in the end
1) property like movement_slow_down_factor, only for warmup_state of character.
2) any visual display of warmup_state of character.
3) warmup_state cancellation when player changing weapons, on_player_gun_inventory_changed, on_player_ammo_inventory_changed, on_player_driving_changed_state.
4) You need to remove the charge of ammo when firing, and not when you start aiming.
shooting_wagon.png
shooting_wagon.png (122.97 KiB) Viewed 1413 times
User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12889
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Request for modding. Warmup for characters.

Post by ssilk »

moved to modding interface requests — ssilk
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Rseding91
Factorio Staff
Factorio Staff
Posts: 14345
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Request for modding. Warmup for characters.

Post by Rseding91 »

I think this might already be possible? I remember Klonan did something like this as a test several months/years ago. I think it's just setting "warmup" on the attack parameters.
If you want to get ahold of me I'm almost always on Discord.
User avatar
maroder
Inserter
Inserter
Posts: 47
Joined: Mon Apr 27, 2015 1:02 pm
Contact:

Re: Request for modding. Warmup for characters.

Post by maroder »

Rseding91 wrote: Mon Jan 04, 2021 8:49 pm I think this might already be possible? I remember Klonan did something like this as a test several months/years ago. I think it's just setting "warmup" on the attack parameters.
I described how it works now: "What is implemented for the character"

The description and the screenshot show what can be done while the warmup_status is active.
And below is the request itself, i.e. what to add for more usability.


Edit...

Foreword: Delay, aiming, warmup_state implies the same state of a character.

I mean, it only works by adding a delay before the shot itself. In this case, the delay is set after the removal of the ammo from the inventory. And the character is not limited by anything during this delay.

I will describe the moment of shooting while sitting in the wagon (This is an ordinary vanilla wagon):
1) Set a "warmup" on the weapon in order to easily get into the vehicle after pressing the shot button, for example 120 ticks (2 seconds).
2) Enter the game, pick up this weapon and after the shot get into the wagon.
Solution (request): warmup_state cancellation when player gets into vehicle (on_player_driving_changed_state).

In the same way, after clicking on the shooting, you can throw out the weapon and while there is a delay, equip and select the same (or pick up the thrown one).
Solution (request): warmup_state cancellation when player changing weapons, on_player_gun_inventory_changed, on_player_ammo_inventory_changed.

Ammo is wasted before aiming, so it will be lost when the warmup_state is canceled.
Solution (request): You need to remove the charge of ammo when firing, and not when you start aiming.

Found one more point:
While there is a delay, if the character runs out of ammo, he hits with his hand.
Solution (request): (Prevent the character from hitting with a hand while warmup_state) Or ((You need to remove the charge of ammo when firing, and not when you start aiming.) And (warmup_state cancellation when player changing weapons, on_player_gun_inventory_changed, on_player_ammo_inventory_changed.))

Another crucial moment is the character's running speed with this delay.
Now while there is a delay (aiming), the character runs at normal speed. After firing (reload), you can slow down your running speed.
By adding aiming to a sniper rifle, it is desirable to reduce the character's movement speed (for example, by 60-70%). By adding aiming from RPGs, I want to reduce the character's movement speed even more (for example, 90-100%). There is no such possibility.
Solution (request): Add property like movement_slow_down_factor, only for warmup_state of character.

There is no visual indication of aiming, so it is not clear why it does not shoot and how long it will take.
Solution (request): Add any visual display of warmup_state of character.
For example, the same animation on the weapon as when reloading, only in the opposite direction (so that there is no feeling that it is shooting every other time).
Post Reply

Return to “Modding interface requests”