deestar12 / keeperfx

Automatically exported from code.google.com/p/keeperfx
0 stars 0 forks source link

Computer Player to use prison #311

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Rival Keepers never turn imprisonment on, and therefore never manage to benefit 
from heroes they defeat.

They should provide a better challenge if they were to capture heroes or rival 
creatures.

After which the behavior may be as follows:
* Throw creatures who can cast heal into torture chamber after a certain time 
period
* Else throw creatures without a human-skeleton into the torture chamber 
straight away
* Keep the rest so they become skeletons

Original issue reported on code.google.com by Loobinex on 3 Jun 2014 at 11:23

GoogleCodeExporter commented 8 years ago
There's a KeeperFX script command which makes a creature imprison defeated 
enemies

SET_CREATURE_TENDENCIES(PLAYER2,IMPRISON,1)

only works if the player has a prison, obviously. It generates skeletons for 
the appropriate creatures, but others either die or live on in the jail forever.

Original comment by dayoka...@gmail.com on 4 Jun 2014 at 5:34

GoogleCodeExporter commented 8 years ago
I've tried using it, without effect.

I've included this piece of script to test the effect:

IF(PLAYER0,PRISON > 0)
    SET_CREATURE_TENDENCIES(PLAYER0,IMPRISON,1)
ENDIF

Then build a prison, and saw imprisonment remain disabled. Had the same script 
for computer players as well, and it seemed ineffective as well.

Original comment by Loobinex on 19 Jun 2014 at 10:47

GoogleCodeExporter commented 8 years ago
1. Make sure you have LEVEL_VERSION command, and the log file doesn't inform of 
script errors.
2. Now as you mentioned it, it's possible that using this for human player will 
enable the imprison option, but leave the GUI button in its previous state. 
That needs to be tested - in case this happens, I must somehow fix it.

Original comment by mefistotelis on 19 Jun 2014 at 10:53

GoogleCodeExporter commented 8 years ago
I can confirm a few things:

* My mistake was indeed not using the LEVEL_VERSION command
* With the level version command, imprisonment is turned on
* Using it on human player does not toggle the GUI button, but does turn 
imprisonment on

That being said, there are some very strange side effects:
* Creatures started coming through the portal that should not be there. When I 
just claimed a portal the first creature I got was a hellhound, not much later 
I received a vampire.
* The imps would not pickup the defeated creature.

Attached log, saves, and the modified level 15. I was trying to see what kind 
of boost the keepers needed for the level to be played out as intended.

Original comment by Loobinex on 20 Jun 2014 at 11:29

Attachments:

GoogleCodeExporter commented 8 years ago
Too many issues at once,... split it up and reported them seperately.

I think the not-picking-up-prisoners needs to be tested again seperately as 
well, not possible in current build.

Original comment by Loobinex on 21 Jun 2014 at 12:52

GoogleCodeExporter commented 8 years ago
In the files I delivered for Issue #190 I included the below script were 
prudent:

IF(PLAYER1,PRISON >= 9)
    SET_CREATURE_TENDENCIES,PLAYER1,IMPRISON,1
ENDIF

Original comment by Loobinex on 7 Sep 2014 at 4:15

GoogleCodeExporter commented 8 years ago
For now I didn't commited your changes regarding IMPRISON for computers. I'm 
not sure if it's a good idea. We should test how it affects gameplay - it may 
lead to computer player losing all imps very easily.

Maybe when computer player loses part of his army, the imprison should disable?

Original comment by mefistotelis on 8 Sep 2014 at 8:11

GoogleCodeExporter commented 8 years ago
ok.

I've already did a full campaign run with imprisonment on (and even updated 
levels with prisons) and did not find an issue with too many imps charging into 
battle,.. they flee from fights anyway and don't draw agro.

But in fact, the effect isn't that big at all, it mostly is useful for them if 
they hit the occasional hero pocket. He might end up with a few skeletons.
When a keeper fights the red keeper, he is usually dead anyway,...

I think disabling imprisonment when losing his army could be problematic, 
because if the fight would end up in the keepers favor the stunned heroes would 
not get dragged to prison.

If in fact we notice the AI can't handle imprisonment anyway, it would be the 
best approach to tweak the AI. I feel it does add a lot for the player to see 
his creatures in an enemy prison, or some heroes. Especially in level 5.

Original comment by Loobinex on 8 Sep 2014 at 8:41

GoogleCodeExporter commented 8 years ago
You've convinced me. I will commit these changes.

Original comment by mefistotelis on 8 Sep 2014 at 9:06

GoogleCodeExporter commented 8 years ago

Original comment by mefistotelis on 9 Sep 2014 at 9:56