SpaceAlertMissionGenerator icon indicating copy to clipboard operation
SpaceAlertMissionGenerator copied to clipboard

New frontiers support

Open Golem666 opened this issue 2 years ago • 13 comments

Would it be possible to add into the settings new frontiers tickbox to allow the mission generator to spawn two threats on the same time?

Golem666 avatar Mar 06 '22 15:03 Golem666

Hi @Golem666 sorry i don't have the expansion so would be hard for me to add and know it works, but i am open to PR's if someone else wants to do it.

nibuen avatar Mar 06 '22 17:03 nibuen

My mission generator (which is used by this software) should support "New Frontier". I am unsure if it can spawn two threats at the same time - was this the case in New Frontier? I guess, one could tweak the maximum white noise spacing between threats a bit to get this effect.

mkalus avatar Mar 07 '22 15:03 mkalus

I don't mean it like spawning then in the same alert, but in the same time fraction (sorry I don't know the term from game, I don't have rules in English), like that you can get both threat in T+4 in blue and in white zone

Dne po 7. 3. 2022 16:30 uživatel Max @.***> napsal:

My mission generator (which is used by this software) should support "New Frontier". I am unsure if it can spawn two threats at the same time - was this the case in New Frontier? I guess, one could tweak the maximum white noise spacing between threats a bit to get this effect.

— Reply to this email directly, view it on GitHub https://github.com/nibuen/SpaceAlertMissionGenerator/issues/50#issuecomment-1060813620, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJPUZMYEYOZEOEEX3WGTKBLU6YOJ7ANCNFSM5QBITGMA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

Golem666 avatar Mar 07 '22 19:03 Golem666

Ah, yes, this has not been implemented, see https://github.com/mkalus/JSpaceAlertMissionGenerator (see readme wishlist "double action mission generation"). Good question, I have not worked on the project in years, so I am unsure how to implement it :grin:

mkalus avatar Mar 07 '22 21:03 mkalus

Ah, okay, I have no skill in Java and just skimmed through the files quickly, but couldn't it be done by adding a boolean settings double-actions and then creating (around line 400 in MissionImpl) the arrays phases, internalphases by adding each part twice if the setting would be turned on? Again this is just suggestion coming from someone who never wrote anything in java, so don't feel pressured into doing it.

Dne po 7. 3. 2022 22:53 uživatel Max @.***> napsal:

Ah, yes, this has not been implemented, see https://github.com/mkalus/JSpaceAlertMissionGenerator (see readme wishlist "double action mission generation"). Good question, I have not worked on the project in years, so I am unsure how to implement it 😁

— Reply to this email directly, view it on GitHub https://github.com/nibuen/SpaceAlertMissionGenerator/issues/50#issuecomment-1061174273, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJPUZM3BVU6HBAW5OFUA4PLU6Z3ERANCNFSM5QBITGMA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

Golem666 avatar Mar 08 '22 14:03 Golem666

I will see what I can do :smile: I have to find my rules again - somewhere burried after my last move.

mkalus avatar Mar 16 '22 20:03 mkalus

Ah, ok, I have dug out my game and also had a look at the scenario cards at https://czechgames.com/en/downloads/ - double threats only occur as internal and external threat, right? All right, that should be doable.

mkalus avatar Mar 18 '22 22:03 mkalus

I they can occur as both of them as the same type (mission S4-6, time T+8 for example)

Dne pá 18. 3. 2022 23:18 uživatel Max @.***> napsal:

Ah, ok, I have dug out my game and also had a look at the scenario cards at https://czechgames.com/en/downloads/ - double threats only occur as internal and external threat, right? All right, that should be doable.

— Reply to this email directly, view it on GitHub https://github.com/nibuen/SpaceAlertMissionGenerator/issues/50#issuecomment-1072860356, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJPUZM66WPC3W3WUE5B75XLVAT6J7ANCNFSM5QBITGMA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

Golem666 avatar Mar 20 '22 20:03 Golem666

All right, rewrote the whole mission generation section - oh man, 10 year old code and this one was not really elegant 🙄

But I did it!

@nibuen: The option is enableDoubleThreats - this will generate one double threat for the mission.

To test, start the program using the following command line options: -p text --allow-double-threats -D -l 10 -u 2 -i 2 -I 4 --max-time-serious-external 8 --max-time-normal-internal 8

This will create "normal" hard missions. To have the really wild ones with threat level 12, set -l 12

mkalus avatar Mar 20 '22 22:03 mkalus

Thanks @mkalus can you link the PR/delta from your repo so I can look at adding to app please.

nibuen avatar Mar 20 '22 23:03 nibuen

I see it here actually https://github.com/mkalus/JSpaceAlertMissionGenerator/pull/14 will fork it in for now, maybe someday will move to a common library =)

nibuen avatar Mar 20 '22 23:03 nibuen

Wow, thank you very much

Dne ne 20. 3. 2022 23:39 uživatel Max @.***> napsal:

All right, rewrote the whole mission generation section - oh man, 10 year old code and this one was not really elegant 🙄

But I did it!

@nibuen https://github.com/nibuen: The option is enableDoubleThreats - this will generate one double threat for the mission.

To test, start the program using the following command line options: -p text --allow-double-threats -D -l 10 -u 2 -i 2 -I 4 --max-time-serious-external 8 --max-time-normal-internal 8

— Reply to this email directly, view it on GitHub https://github.com/nibuen/SpaceAlertMissionGenerator/issues/50#issuecomment-1073363024, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJPUZMYEYVCXOEZ564HSA3DVA6SJPANCNFSM5QBITGMA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

Golem666 avatar Mar 21 '22 08:03 Golem666

Sorry long delay on this one, i still feel like there might be some bad fitting cases and hope to get back to it when work calms down a bit.

nibuen avatar May 12 '22 17:05 nibuen