yairm210 / Unciv

Open-source Android/Desktop remake of Civ V

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RFC: Fly-by observations (and mini-bugs) concerning Espionage

SomeTroglodyte opened this issue · comments

One for @tuvus , maybe even @ravignir if still listening, but any voice welcome (and sorry for the label mix - this is a mixed bag):

UX

  • A spy in surveillance will pop the mandatory espionage screen visit every darn turn
  • Notifications could open the espionage screen, might be nicer
  • Column "spy present" for the "hideout" row could show idling spy(spies)
  • Those Move buttons are F A R too big
  • Which spy is to be moved could be clearer
  • Spy icon could indicate rank
  • Interaction on city name - show on map?

Rules / bugs

  • National Intelligence Agency gives the extra new spy two ranks not one
  • If a spy fails and is killed during a tech spy attempt - the tech is rewarded anyway without notice
  • Tech steal success rate seems too high - because minimum rank already shifts probs???
  • Cannot station spy for counter-intelligence
  • Fixing that - they do "establish network" for the same duration as abroad which maybe they shouldn't

I'm currently partitioning into readable commits - but any input would be nice on:

  • establish network duration: I changed it to 3 for abroad 1 domestic - could be zero? as in just 1 turns in the moving state when going from hideout to counter-intelligence??? The fandom wiki is not clear - someone got other sources?
  • Success/fail probabilities: I haven't coded or tested it - but I'd tend to make rank 0 have zero "skill modifier", shifting outcome to 0% unnoticed success | 33% noticed but unrecognized success | 33% victim-knows-whodunnit success | 33% fail+kill. Unnoticed success chance is then directly proportional to levelups, capping at ~20% overall, and fail+kill chance is never virtually zero, an overall ~13% remaining at rank 3 without counteragents. Yes, Oscar's math is linear throughout, and I haven't checked the DLL sources on whether that general model is even close to the original - playable it certainly is.
  • Vague idea - show modifiers from uniques somehow. The numbers are easy, but their effect and thus presentation is not. Rank influences tech steal success rate while Uniques influence tech steal speed, completely independent from each other - unintuitive by definition. "Success modifier: X%, speed modifier: Y%"??? Maybe, but effect on other tasks is entirely different......
appetizer

image

Related Issue Links

#11557, #11077, #7665... And the mothership: "Implementation of Espionage - Roadmap #7610" - some of these checkboxes could be toggled by now via tuvus's work, and one half by my upcoming PR.

Oh - forgot one: How to operate that screen via Keyboard... Do we need "cursors", a moveable highlight depending on context??? Or is there some easier way?

Another one: I guess spies are ordered by age on the left side, initially, but deaths keep their place and are filled in - is that for the best?

Replies

If a spy fails and is killed during a tech spy attempt - the tech is rewarded anyway without notice

Oops, I though that I had fixed that in one of my PRs.

establish network duration: I changed it to 3 for abroad 1 domestic

I believe counter-intelligence should commence immediately, so that would mean 0 domestic.

Feel free to change the chances. I think I took the stealTech() random chance from the DLL but might have guessed at a few numbers.

Notifications could open the espionage screen, might be nicer

I meant to do this and it looks like I forgot.

A spy in surveillance will pop the mandatory espionage screen visit every darn turn

That was mostly intentional, although on second thought it might not be as good. What should the solution to this be? There is a notification if the spy no longer has tech to steal.

Spy icon could indicate rank

Do we want to make the spy rank moddable? In that case an image might not be as good.

Interaction on city name - show on map?

I was thinking about this. If we add an alternative move button that allows the player to select cities on the map instead of using the table.

Another one: I guess spies are ordered by age on the left side, initially, but deaths keep their place and are filled in - is that for the best?

I haven't touched that yet. Xander Lenstra did a lot of the foundation work.

Oh - forgot one: How to operate that screen via Keyboard... Do we need "cursors", a moveable highlight depending on context??? Or is there some easier way?

I use espionage on my phone and it doesn't seem to have any problems if that is what you are wondering.

Also I think we need to keep in mind that the move to button associated with each city will need to open a panel which allows the player to choose which action the spy will take. Moving a spy to a city-state for example would have the options of rigging the election and executing a coup which happens immediately (we might want to change that to be next turn for save scumming reasons). The coup option needs to show a success rate percent I think.

How much of this were you planning to fix? (So we don't double fix a problem)

How much of this were you planning to fix

Anything above "but any input would be nice on" is already done

choose which action

Yesssssss..... Methinks that model is extensible enough. There's enough screen room1... Either combo a Radio option group into a button wrapper widget or refactor the class Thing : Button into a class Thing : HorizontalGroup<Button>. Complicates keyboard op even further of course.

Footnotes

  1. Oops, didn't even test extreme portrait orientations

Oh, that was a <details> up there - all right!

But in the meantime I created console civ addpolicy, gave the Iroquous Police State, then modded a "[+50]% spy effectiveness [in all cities]" onto my China. Now a Spy in Onondaga could display...

image

(No I didn't update French.properties for those new lines)

... and yes +50% and -25% makes exactly +12.5%... 1.5f * 0.75f == 1.125f ...but that will probably not be a welcome sight 🙈 🦧 .

Oops, I though that I had fixed that in one of my PRs.

And I didn't check your outstanding ones... No, https://github.com/yairm210/Unciv/pulls/tuvus none sounds like there's spies in

counter-intelligence should commence immediately

OK

What should the solution to this be?

isIdle ignores Surveillance -> you do get the guidance on new spies only, or if you keep 'em in their hideout still once per turn. feels right in play IMHO.

alternative move button that allows the player to select cities on the map

Too much hassle. screenStack, dangling callbacks need clearing on unusual reactions, hell. Fine if you can go look at the situation from in there, as simple as can be and helps maybe a tiny bit.

I use espionage on my phone and it doesn't seem to have any problems

Good mocking. I meant physical keyboard connected and what can we do to make that screen as well-usable without touch or mouse as, say, save or load... Idea brainstorm... So far: Needs some visual feedback option to make arrow keys navigate spies, and so far that's a Scene2D stack that doesn't go to the effort to highlight. Straightforward to do but a lot of drudgery to code.

I haven't touched that yet.

Sure, but I meant - does some intuitive sorting come to mind, better than what will seem after a few deaths like randomness? Me no like alphabetic, boring. Seniority would be cute, but necessitate changing killSpy to remove and re-add - or keep an additional field. Or... ?????

Xander Lenstra did

...May his studies progress smoothly and his interest soar above such trivialities as kotlin games.

(I said) but I'd tend to make rank 0 have zero "skill modifier"

I meant the lowest rank and it just hit me that's no good at all - it would make an "undefended" city the same as one defended by a rank 1 spy. Will need to rethink before I push that branch... maybe write down all edge case probabilities using the original formula and go from there. Later, much later. I still think an unexperienced spy against an undefended city should have zero chance for "undetected" - see how all that scales on the kill end.

Or maybe switch to a classic D20 RPG model with critical successes at 20 and critical fails at 1? Then animate those 3D dice on the Gdx surface...

Chances for steal tech results with current formula. Each cell is (undetected success, detected success, recognized success, killed for failure). Diplomatic repercussions incurred on third and last result (but AI afaik ignores them).

D: None D: Rank 1 D: Rank 2 D: Rank 3
A: Rank 1 10%/33%/33%/23% 00%/33%/33%/33% 00%/23%/33%/43% 00%/13%/33%/53%
A: Rank 2 20%/33%/33%/13% 10%/33%/33%/23% 00%/33%/33%/33% 00%/23%/33%/43%
A: Rank 3 30%/33%/33%/03% 20%/33%/33%/13% 10%/33%/33%/23% 00%/33%/33%/33%

So, what do we want the extremes to be - those I marked bold? That would be an option: Decide on desired edge case statistics and tweak formula to match - the rest will fall in place.

Next - speed. Depends on tech cost, tech output of the city the spy is in, with two spy ranks mostly making up for all available defense - Constabulary + Police station + National Intelligence Agency = 65% defense vs. 66% bonus for 2 ranks. Only available in one city rest get 50%. So they can steal roughly as fast as you can research - per spy. Against 3 AI in the Modern era you will have zero tech lead within 10 turns, using all countermeasures available. Gets a little better when you manage to build the Great Firewall first - down to 8/3 turns per spy per tech minus kill rate - which is only good if you got <=spy_count cities... Or crank science output to zero in all cities you can't station one of your spies in. Can't imagine original Civ5 was that bad.

I think that looks good, A rank 1 spy has a %76 chance of success with no defender. While at the same time having a defending spy has value so players should want to defend their biggest cities.

Next - speed

This seems like you are calculating an extreme case here. From what I read each Constabulary, Police station, National Intelligence Agency should cancel out a single spy level.

Also, the AI isn't very good at scouting right now so it isn't as good at finding city-centers to put spies in later.