Skip to content

An illegal flyer has been detected (implement organisation raids)#998

Merged
FilmBoy84 merged 13 commits intoOpenApoc:masterfrom
idshibanov:implement-organization-raids
Mar 1, 2021
Merged

An illegal flyer has been detected (implement organisation raids)#998
FilmBoy84 merged 13 commits intoOpenApoc:masterfrom
idshibanov:implement-organization-raids

Conversation

@idshibanov
Copy link
Collaborator

@idshibanov idshibanov commented Feb 22, 2021

Related to #1002. Bug should be fixed now, extra suggestions can be done later.

Refactored Organisation missions to split into two types to support new code. Now AI will fight with each other. I tried to keep the logic (timers, chance %) very close to the original.

Base defense event will be launch if they "Raid" or "Storm" player owned building with a base.

Added a building attack ammo check to avoid vehicles hanging for too long.

@idshibanov idshibanov added the Not Yet Implemented This fix or feature is not yet implemented or merged with trunk label Feb 22, 2021
@idshibanov idshibanov self-assigned this Feb 22, 2021
@FilmBoy84
Copy link
Collaborator

FilmBoy84 commented Feb 22, 2021

Fantastic work!

Just going through the code now whilst I make a build

Couple of questions regarding the vehicles sent on missions
I notice that you have int attack_vehicle_count = 2; under organisationsraid.h
Is this ALWAYS two vehicles in the OG?
Or should the number vary with manpower and finances?

I also note that you have under organisations.cpp several vehicles that the organisations pick according to manpower (which is great)

state.organisation_raid_rules.attack_vehicle_types = {
	    {&state, "VEHICLETYPE_PHOENIX_HOVERCAR"},
	    {&state, "VEHICLETYPE_HOVERBIKE"},
	    {&state, "VEHICLETYPE_VALKYRIE_INTERCEPTOR"},
	    {&state, "VEHICLETYPE_HAWK_AIR_WARRIOR"}};

Are raids in the OG always airborne?
Do they ever send ground vehicles such as Griffons, Bikes or Stormdogs?

What considerations are in place for MegaPol?
Should they raid with Police Hovercars and Police Cars in greater numbers (as police generally do) with the Valkyrie and Hawk as support?

@Skin36
Copy link
Contributor

Skin36 commented Feb 22, 2021

in OG
attack_vehicle_count = (bld_count+veh_in_org-1)/bld_count
max(attack_vehicle_count) = 5

@FilmBoy84
Copy link
Collaborator

Thanks for finding out for us Skin36

So it does indeed vary with a maximum value

I also note that it is dependant on number of owned vehicles in the organisation - are we currently tracking this in OpenApoc?

@idshibanov
Copy link
Collaborator Author

Couple of questions regarding the vehicles sent on missions
I notice that you have int attack_vehicle_count = 2; under organisationsraid.h
Is this ALWAYS two vehicles in the OG?
Or should the number vary with manpower and finances?

This variable should be exposed for modding.
In OG in practice it almost always two vehicles and limited by what's available in the randomly picked building.
Right now in OpenApoc organisations don't spend money on vehicles, we can add a check later

Are raids in the OG always airborne?
Do they ever send ground vehicles such as Griffons, Bikes or Stormdogs?

Yes, it specifically looking for flyers and priority order is how I wrote it down. If you manually remove smaller vehicles (edit savegame) from organisation's vehicle park then they will start sending Hawks.

What considerations are in place for MegaPol?
Should they raid with Police Hovercars and Police Cars in greater numbers (as police generally do) with the Valkyrie and Hawk as support?

This is interesting. In fact Megapol does send 'Illegal vehicles', but it's always Police Hovercars and those doesn't trigger the event, they are just silently ignored. Raids currently happen without sending a vehicle over (as in OG); we can make it happen later.

@idshibanov
Copy link
Collaborator Author

I also note that it is dependant on number of owned vehicles in the organisation - are we currently tracking this in OpenApoc?

Yes, vehicles are distributed in Organisation::updateVehicleAgentPark call. Organisations don't buy new vehicles though, that's a TODO.

@FilmBoy84
Copy link
Collaborator

Thanks for the responses Shellstorm
I have opened issues #999 and #1000 to keep track of the To-Do stuff
I shall continue trying to break things in my build
Otherwise, LGTM so far
Pending any bugs between now and play tomorrow, I'm happy to merge if @JonnyH is happy with the code

@makus82
Copy link
Contributor

makus82 commented Feb 24, 2021

Strange but during whol game week i not get any alert about "Unautorized vehicle detected"

@idshibanov
Copy link
Collaborator Author

Strange but during whol game week i not get any alert about "Unautorized vehicle detected"

It depends on game's difficulty and random chance. Without Alien control only Psyke, Diablo and Osiron will send illegal flyers, have to piss off one of those.

@makus82
Copy link
Contributor

makus82 commented Feb 25, 2021

there was Nutrivend or something was under control of aliens after day 1 or 2)...
got it thx

@FilmBoy84
Copy link
Collaborator

Thanks for updates Shellstorm
Will make a build and check out
I'm clear to merge by the way if noone finds any more issues :)

@FilmBoy84 FilmBoy84 merged commit feab68c into OpenApoc:master Mar 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Not Yet Implemented This fix or feature is not yet implemented or merged with trunk

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants