API of the armed entities. Guided weapons
- regedit2000
- Inserter
- Posts: 20
- Joined: Mon May 23, 2016 4:00 pm
- Contact:
Re: API of the armed entities. Guided weapons
I'm not sure exactly what you're asking for?
If you want to get ahold of me I'm almost always on Discord.
- regedit2000
- Inserter
- Posts: 20
- Joined: Mon May 23, 2016 4:00 pm
- Contact:
Re: API of the armed entities. Guided weapons
I want through the API:
- manage weapons transport (choose from several active for the character).
- choose the ammo for the gun turrets.
- control the guns themselves (turn on/off, change the range and strength of the shot (for lasers)).
Application:
- scenarios
- mods mentioned above.
Why: single / universal management of similar entity capabilities.
Additionally:
- Passengers-number, control (roles: driver/shooter/cargo), access to weapons transport, the ability to use their own guns from the inside
- manage weapons transport (choose from several active for the character).
- choose the ammo for the gun turrets.
Application:
- scenarios
- mods mentioned above.
Why: single / universal management of similar entity capabilities.
Additionally:
- Passengers-number, control (roles: driver/shooter/cargo), access to weapons transport, the ability to use their own guns from the inside
Last edited by regedit2000 on Sat Jan 12, 2019 12:32 am, edited 1 time in total.
Re: API of the armed entities. Guided weapons
I still don't understand. There is no such thing as "weapons transport" in Factorio. Maybe there's a translation issue here.regedit2000 wrote:- manage weapons transport (choose from several active for the character).
You can already do that by just putting different ammo in the gun turrets.regedit2000 wrote:- choose the ammo for the gun turrets.
You can already do that by setting entity.active = true/false and adjusting the technology modifiers for the given lasers.regedit2000 wrote:- control the guns themselves (turn on/off, change the range and strength of the shot (for lasers)).
Turret/gun range can't be adjusted runtime and never will be. There's a massive amount of game logic which assumes it never changes and is built on it never changing once the game is loaded.
If you want to get ahold of me I'm almost always on Discord.
- regedit2000
- Inserter
- Posts: 20
- Joined: Mon May 23, 2016 4:00 pm
- Contact:
Re: API of the armed entities. Guided weapons
============================================================================
vehichle ============================================================================Rseding91 wrote: Fri Jan 11, 2019 10:34 pm I still don't understand. There is no such thing as "weapons transport" in Factorio. Maybe there's a translation issue here.
============================================================================Rseding91 wrote: Fri Jan 11, 2019 10:34 pm You can already do that by just putting different ammo in the gun turrets.
OK. I understoodRseding91 wrote: Fri Jan 11, 2019 10:34 pm You can already do that by setting entity.active = true/false and adjusting the technology modifiers for the given lasers.
Turret/gun range can't be adjusted runtime and never will be. There's a massive amount of game logic which assumes it never changes and is built on it never changing once the game is loaded.
- regedit2000
- Inserter
- Posts: 20
- Joined: Mon May 23, 2016 4:00 pm
- Contact:
Re: API of the armed entities. Guided weapons
I'll try to be more precise.
The LuaEntity class provides the variable selected_gun_index for the type "Character" - I suggest the variable selected_gun_index to use for the type "Vehicle".
I also suggest using the new variable selected_ammo_index for the type "Turret"
The LuaEntity class provides the variable selected_gun_index for the type "Character" - I suggest the variable selected_gun_index to use for the type "Vehicle".
I also suggest using the new variable selected_ammo_index for the type "Turret"
Re: API of the armed entities. Guided weapons
I have implemented selected_gun_index for entities of type Car (which includes tanks) (I have source access). It will be in 0.17.46.
If you want selected_ammo_index for turrets, I suggest making a new topic. I didn't look at implementing it because I don't know how turrets behave when they have multiple ammo slots. It might not be possible, it might be easy.
If you want selected_ammo_index for turrets, I suggest making a new topic. I didn't look at implementing it because I don't know how turrets behave when they have multiple ammo slots. It might not be possible, it might be easy.
- regedit2000
- Inserter
- Posts: 20
- Joined: Mon May 23, 2016 4:00 pm
- Contact:
Re: API of the armed entities. Guided weapons
Thank you very muchBoodals wrote: Thu Jun 06, 2019 12:06 pm I have implemented selected_gun_index for entities of type Car (which includes tanks) (I have source access). It will be in 0.17.46.
If you want selected_ammo_index for turrets, I suggest making a new topic. I didn't look at implementing it because I don't know how turrets behave when they have multiple ammo slots. It might not be possible, it might be easy.