Lua Script help to simulate retreating planes/ ships

Post new mods and scenarios here.

Moderator: MOD_Command

Post Reply
TYHo
Posts: 67
Joined: Tue May 17, 2016 2:37 pm

Lua Script help to simulate retreating planes/ ships

Post by TYHo »

Hi guys,

Need help to simulate retreating planes/ ships using Lua... The trigger is the computer oppoinent plane/ ship is 50% damage, but how do I make the plane/ ship disengage and retreat? Thanks!
Rory Noonan
Posts: 2418
Joined: Thu Dec 18, 2014 1:53 am
Location: Brooklyn, NY

RE: Lua Script help to simulate retreating planes/ ships

Post by Rory Noonan »

With aircraft damage on, an aircraft will automatically disengage and head home if it suffers significant damage. It looks like the threshold is ~25%

With ships all you need to do is a set a port as a home base for the ship, then change the doctrine 'withdraw' settings to whatever threshold you want.

Lua isn't necessary for this behaviour [:)]
Image
DrYorgashReeksPhD
Posts: 3
Joined: Mon Aug 28, 2017 6:22 pm
Location: Columbus, Ohio

RE: Lua Script help to simulate retreating planes/ ships

Post by DrYorgashReeksPhD »

Why is it that the developers of this game (Mike especially) seem to think the majority of its players are computer programmers or have a big interest in that? Speaking for myself, I did not purchase this game to learn LUA in order to create scenarios. Streamline the process somehow for those of us who want to utilize the military and geopolitical features of the game and not learn LUA and code in the process.
Rory Noonan
Posts: 2418
Joined: Thu Dec 18, 2014 1:53 am
Location: Brooklyn, NY

RE: Lua Script help to simulate retreating planes/ ships

Post by Rory Noonan »

Er... What part of 'Lua isn't necessary for this behaviour' feeds into that argument?

You don't need Lua to make scenarios. You can make very complex and entertaining scenarios without any Lua whatsoever. See the 'Standalone Scenarios' and Gunner98's early Northern Fury series for some excellent examples.
Image
TYHo
Posts: 67
Joined: Tue May 17, 2016 2:37 pm

RE: Lua Script help to simulate retreating planes/ ships

Post by TYHo »

set a port as a home base for the ship

Thanks! This is what I need...
thewood1
Posts: 10103
Joined: Sun Nov 27, 2005 6:24 pm
Location: Boston

RE: Lua Script help to simulate retreating planes/ ships

Post by thewood1 »

ORIGINAL: DrYorgashReeksPhD

Why is it that the developers of this game (Mike especially) seem to think the majority of its players are computer programmers or have a big interest in that? Speaking for myself, I did not purchase this game to learn LUA in order to create scenarios. Streamline the process somehow for those of us who want to utilize the military and geopolitical features of the game and not learn LUA and code in the process.

Unfortunately enough people don't read all the documentation and practice using the features to know a lot can be done without Lua.

You can play this game fine without lua. The game went for a couple years without it. I am sure the devs would be more than happy to remove lua access if you can get enough of your fellow games to vote on removing lua as a feature. Because, you know, the devs forcing you to use it really is against all that is good and holy.

btw, good first post to introduce yourself and build relationships.
Post Reply

Return to “Mods and Scenarios”