Results 1 to 9 of 9

Thread: Limiting creature types via SCRIPT for each player for more fair game

  
  1. #1
    Fly
    Join Date
    May 2016
    Posts
    86

    Default Limiting creature types via SCRIPT for each player for more fair game

    Create a fair and balanced game map by limiting player creatures of each type.

    For each creature type and for each player you need to kill the lowest level one if they go over the number you wish to have.


    For example each player can only have 4 Warlocks in the script below. The pool can contain 60 Warlocks but only 4 per player will be allowed.
    Code:
    IF(PLAYER0,SORCEROR > 4)
       NEXT_COMMAND_REUSABLE
       KILL_CREATURE(PLAYER0,SORCEROR,LEAST_EXPERIENCED,1)
    ENDIF
    
    IF(PLAYER1,SORCEROR > 4)
       NEXT_COMMAND_REUSABLE
       KILL_CREATURE(PLAYER1,SORCEROR,LEAST_EXPERIENCED,1)
    ENDIF


    Why do this?

    Because you don't want 20 Flies or 10 Beetles and the other player getting all the Dragons and Mistresses. By limiting creature types per player you can set a quota of specific creatures making sure everyone gets similar creatures just perhaps not in the same order. The creature pool size no longer maters and players can no longer throw away their crappy creatures to get better ones.


    This can also fix the infinite Vampire, Ghost and Skeleton issue in multiplayer maps. With this script any Vampires created OVER a certain amount are automatically killed.


    I propose adding a new script command that does this without killing them simply removing that unit from being added into the game for that specific player. Will no longer waste precious portal time.

    MAX_CREATURE_TYPE(Player0, Warlock, 4)


    What do you think?

  2. #2
    Fly
    Join Date
    May 2016
    Posts
    86

    Default Re: Limiting creature types via SCRIPT for each player for more fair game

    This incidentally also limits Graveyard/Jail/Torture/Scavanger rooms from disrupting the game.

    Any creature you get over the allotted limit kills the lowest level of that same type .

    This is more desirable for multiplayer games .

  3. #3

    Default Re: Limiting creature types via SCRIPT for each player for more fair game

    Code:
    IF(PLAYER0,SORCEROR >= 4)
       NEXT_COMMAND_REUSABLE
       CREATURE_AVAILABLE(PLAYER0,SORCEROR,0,0)
    ENDIF

  4. #4

    Default Re: Limiting creature types via SCRIPT for each player for more fair game

    Quote Originally Posted by Woudo View Post
    Code:
    IF(PLAYER0,SORCEROR >= 4)
       NEXT_COMMAND_REUSABLE
       CREATURE_AVAILABLE(PLAYER0,SORCEROR,0,0)
    ENDIF
    You should also turn it back on again:

    Code:
    IF(PLAYER0,SORCEROR >= 4)
       NEXT_COMMAND_REUSABLE
       CREATURE_AVAILABLE(PLAYER0,SORCEROR,0,0)
    ENDIF
    IF(PLAYER0,SORCEROR <= 3)
       NEXT_COMMAND_REUSABLE
       CREATURE_AVAILABLE(PLAYER0,SORCEROR,1,0)
    ENDIF
    This is much better then killing a creature, which is silly. Now you just won't get any more.

    Jail/torture room can be much better accomplished by disabling imprisonment, see this map for the script.

  5. #5
    Fly
    Join Date
    May 2016
    Posts
    86

    Default Re: Limiting creature types via SCRIPT for each player for more fair game

    Thanks guys that makes a lot of sense. Perfect. Then you can turn it on again.

    there is no ELSE type function in DK scripting right?

  6. #6
    Fly
    Join Date
    May 2016
    Posts
    86

    Default Re: Limiting creature types via SCRIPT for each player for more fair game

    NVM Not perfect

    This system does not account for creatures that you get via Torture, Prison, Temple sacrifice, and Make Hero.



    Here is a hybrid system that does both and does not wastes portal time and enforces the killing of any unit that you acquire over a set limit.


    This is an improved version that almost acts as a MIN - MAX type system. You get a MIN 4 and a MAX of 8. Making second nested if > 4 makes MIN 4 - MAX 4

    This can replace the available creatures section in a map's script


    Code:
    IF(PLAYER0,SORCEROR < 4)
       NEXT_COMMAND_REUSABLE
       CREATURE_AVAILABLE(PLAYER0,SORCEROR,1,0)
    ENDIF
    IF(PLAYER0,SORCEROR >= 4)
       NEXT_COMMAND_REUSABLE
       CREATURE_AVAILABLE(PLAYER0,SORCEROR,0,0)
       IF(PLAYER0,SORCEROR > 8)
          NEXT_COMMAND_REUSABLE
          KILL_CREATURE(PLAYER0,SORCEROR,LEAST_EXPERIENCED,1)
       ENDIF
    ENDIF
    Last edited by trollworkout; May 18th, 2016 at 19:01.

  7. #7

    Default Re: Limiting creature types via SCRIPT for each player for more fair game

    That's right, the script provided only accounts for creatures coming from the portal. I think most people wouldn't like to play maps where creatures suddenly die for no reason, but your script would work.
    However, if you want to do this for every creature you will run into problems with the game limitations, you can only have 48 if-statements per map, if you use 3 per unit-type and want an actual playable level on top of that you will go over this number.

  8. #8
    Fly
    Join Date
    May 2016
    Posts
    86

    Default Re: Limiting creature types via SCRIPT for each player for more fair game

    Yeah I was just about to say

    Only 48 IF statements are allowed and there are 30 creatures in the game. Yeah. Not even 256 IF can cover it.


    OK that's cool!

    A new approach is needed.

    Going back to my original method


    ALL MAPS

    Limit kill Vampire, Ghost or Skeletons via my first method for each playable keeper 12 IF


    MULTIPLAYER MAPS

    Limit kill only Dragon, Knight, Mistress, Samurai, Bile Demon, Giant for multiplayer for each playable keepers. 12 IF

    EDIT: Reason this is 12 is because you only account for the faction they are in
    Player0 = Good then only limits Samurai, Giant and Knight that is 3

    Hybrid method would require 3 times that 36 IF meaning it would cover all 48 IF leaving none for other script functions but would make it so regular creatures don't die out randomly.



    This leaves 24 IF statements for other commands
    Last edited by trollworkout; May 18th, 2016 at 19:54.

  9. #9

    Default Re: Limiting creature types via SCRIPT for each player for more fair game

    But to answer your original question,.... I think new script commands are always nice and I would find this one useful. Personally I would rather have it only work on the portal though, and have other methods of reducing torture/prison/graveyard effectiveness. I already made some suggestions for those I won't repeat them here.

    As a player, when I capture a unit when I've unknowingly already reached the limit for that type, I would find it very strange if I could not convert it.

    I think the best approach now for multiplayer maps would be to set a very slow portal time and a high creature limit and a big pool, with possibly a few starting creatures. When the game is over before you've reached your portal limit you would not have benefited from throwing away weaker creatures because they have not been replaced yet by any other creatures and you would simply have a numerical disadvantage.

Similar Threads

  1. Dragons are the worst creature in game
    By YourMaster in forum KeeperFX
    Replies: 35
    Last Post: April 26th, 2015, 16:01
  2. Kill all creatures from specific player? Script any?
    By UnknownMaster21 in forum KeeperFX
    Replies: 14
    Last Post: February 25th, 2015, 01:37
  3. Game can't handle 4-player
    By Auxin in forum KeeperFX
    Replies: 14
    Last Post: May 14th, 2014, 23:25
  4. Map Types
    By Metal Gear Rex in forum Dungeon Keeper 1
    Replies: 6
    Last Post: November 7th, 2009, 23:25

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •