Page 1 of 9 123 ... LastLast
Results 1 to 10 of 90

Thread: New script commands

  
  1. #1
    KeeperFX Author mefistotelis's Avatar
    Join Date
    Sep 2009
    Location
    Poland
    Posts
    1,235

    Default New script commands

    This thread should be continued, so I'm starting it again.

    KeeperFX can implement new script commands; please post your ideas of new commands here.

    Commands implemented/changed so far:
    Code:
     ADD_GOLD_TO_PLAYER
      Allows to add some off-map gold as a reward to a player.
      Example: ADD_GOLD_TO_PLAYER(PLAYER0,5000)
     DISPLAY_OBJECTIVE
      The 2nd parameter can now have the following values:
      - 'PLAYERx' - zoom to player's dungeon heart
      - positive integer - zoom to Action Point of given number
      - negative integer - zoom to Hero Gate of given number
      - 'ALL_PLAYERS' - zoom button will be inactive
     LEVEL_VERSION
      Lets the game know if the level was designed specially for
      KeeperFX. To use new script commands, you must start the
      script with LEVEL_VERSION(1). Without it, the new commands
      will not work properly.
     PLAY_MESSAGE
      Allows to play any SOUND or SPEECH from the game.
      Example: PLAY_MESSAGE(PLAYER0,SPEECH,107)
     QUICK_INFORMATION
      These works same as in Deeper Dungeons, but allows message
      length up to 1024 characters. There are 50 quick message
      slots.
     QUICK_OBJECTIVE
      Same as in DD, but allows longer messages and more control
      over zoom button (like in DISPLAY_OBJECTIVE).
     QUICK_INFORMATION_WITH_POS
     QUICK_OBJECTIVE_WITH_POS
      Accepts additional XY coordinates of the zoom place.
     SET_CREATURE_TENDENCIES
      Allows to set tendencies: IMPRISON and FLEE, for a player's
      creatures. Example: SET_CREATURE_TENDENCIES(PLAYER2,FLEE,1)
      Note that a player must have prison when IMPRISON command
      is trigered; otherwise it won't make any change.
     REVEAL_MAP_RECT
      Reveals rectangular map area for given player. Requires
      coordinates of area center point, and rectangle dimensions.
      Numbers are scaled in subtiles (range is 1..254).
      Example: REVEAL_MAP_RECT(PLAYER0,132,96,13,11)
     REVEAL_MAP_LOCATION
      Reveals square area of subtiles around given location.
      Location meaning is identical to the one in DISPLAY_OBJECTIVE.
      For example, to reveal Hero Gate no.1:
      REVEAL_MAP_LOCATION(PLAYER0,-1,11)
     RESEARCH
      Changes amount of research points needed to discover an item
      in library. It doesn't affect research order, only amount
      of points. If the item never was in research list, it's added
      at end. Example: RESEARCH(PLAYER1,MAGIC,POWER_CHICKEN,10000)
     RESEARCH_ORDER
      When this command is first called, the research list for
      specified players is cleared. Using it you may create
      a research list from beginning. Note that if you won't place
      an item on the list, it will not be possible to research it.
      So if you're using this command, you must add all items
      available on the level to the research list. Example:
       RESEARCH_ORDER(ALL_PLAYERS,ROOM,SCAVENGER,50000)
       [...] - more RESEARCH_ORDER commands should follow.
     RANDOM
      It's not a command, but may be used instead of most parameters.
      If used instead of a number, then should look like:
       RANDOM(min,max)
      but may also be used instead of any other value. Examples:
        MAX_CREATURES(PLAYER0,RANDOM(12,19))
        ADD_CREATURE_TO_POOL(RANDOM,20)
      Note that when used instead of player name, RANDOM may return
      ALL_PLAYERS. Also, the command shouldn't be used in multiplayer
      maps, as it will lead to synchronization problems.
      Value represented by RANDOM is selected at start of a map,
      and never changes during the gameplay.
    Other ideas so far:
    -------------

    commands:
    Code:
    SET_CREATURE_DATA
    SET_CREATURE_JOBS
    SET_CREATURE_ANNOYANCE
    SET_CREATURE_SPELLS
    SET_CREATURE_TRAIN
    GENERATE_CREATURE
    KILL_CREATURE
    DIG_TOWARD
    MAP_SLAB_CHANGE
    COMPUTER_ATTACK_PLAYER
    variables/other:
    Code:
    VAMPIRES_ARISEN
    ALL_UNALLIED_DESTROYED

  2. #2
    Awakening Game Master Metal Gear Rex's Avatar
    Join Date
    Sep 2009
    Posts
    5,624

    Default Re: New script commands

    I'm not sure how this command would work as it doesn't seem to be in DK1's engine but what if we do something like ADD_CREATURE but we add a flag to him.

    EX.

    ADD_CREATURE(Player,Creature,a,f,l,g)

    a-Action Point/Hero Door/Dungeon Heart
    f-Flag name, sort of like Party Name
    l-Level
    g-Gold Value

    I didn't include number of creatures as that might get too complicated, but this could work differently as well. I'll put it at the end of another possibility.

    Basically this is useless ALONE. What it can be used for, however, is to make that creature do certain tasks when the commands are met. Something like DK2's abilties.

    IF_CREATURE(Flagname,variable>=n)

    Variable could be a number of things...

    Level
    Health
    Health_Percentage
    Kills

    You get the idea.

    From there it could affect the map. But I also had another idea. It could also affect that creature.

    EX.

    SET_SELF_STAT

    Something like that would work like the Creature manipulation commands but would only modify that creature. It could also set a destination for that creature, or set a job for that creature to follow (Both which I find very useful) as well as a fight flag which would be like setting its Fighting Style to 0 which would be a Non-Fighter and ignore such actions.

    ----------------------------

    My other possibility idea for this command were for it to work with Hero Parties, due to the name you give to the Hero Parties. Though I think if this idea were used, it should be used as well as the other style for this command because this fashion holds the potential to rely on the settings of mulible creatures.

    EX.

    If there were a hero party of two Barbarians, then the IF_CREATURE (Checking health) would either wait til both Barbarians meet the requirements or if one of them meets it. Plus, this will result in certain complications if it is supposed to be a keeper's creature, or a 'normal' hero without specific action. The latter of these problems could be solved in my next post of an idea.

    ---------------------------------
    EDIT-
    ---------------------------------

    This idea seems quite difficult to do based on the game engine. And because of that, I dare say to challange mefistotelis to accomplishing it. Although I will still need time to create all the possibilities for the newer creature variables and ifs.

    ---------------------------------
    EDIT2-
    ---------------------------------

    For the if... (IF_CREATURE(Flagname,variable>=n))

    Variables...

    Health
    Experiance
    Level
    Annoyance Level
    Kill Count

    And here is an unlikey to be used list of variables that usually would be equal to 1/0 for obvious reasons...

    Well, instead of providing a list, I will round it out with a single statement.
    Jobs
    It will check if the creature does a certain job.
    View
    0 if you want them out of view, 1 if you want them in view.

    ---

    Now here is a list of the creature commands that could be given.

    SET_SELF_STAT(flag,stat,value)

    Flag is the name of the flag given to the creature. This will be the same for the rest of the commands.
    Stat is the stat type (STRENGTH,ARMOR,exc...) (Also uses the custom stats)
    Value depends on Stat, so as you can see there can be multible amounts of values.

    CREATURE_HEALTH(flag,value)

    Value would be the number of health -lost/+given.

    SET_CREATURE_HEALTH(flag,value)

    Similar but it sets the health to a specific value.

    CREATURE_LEVEL(flag,value)

    Sort of like a self increase level. Again, negative or posative for losing levels and giving levels.

    SET_CREATURE_LEVEL(flag,value)

    Again, the same similiarities as the set health command.

    SET_CREATURE_TASK(flag,value)

    Sets the creature's job. Could be numbers or actual names. Does overide HATE_JOBS. It would be SET_CREATURE_JOB but that name is going to be used for another command.

    SET_CREATURE_EVIL_TASK(flag,value)

    Same thing but works with Anger jobs, and will force them to fufill them immidiately.

    SET_CREATURE_DESTINATION(flag,x,y)

    Uses x/y cordinates. Does use the 9x9 tile part. This will be a tricky command.

    SET_CREATURE_FIGHT(flag,value)

    Try 0,1,2 for the different fighting styles. 0 would be a completely ignore fights fighting style.

    Well, that's all I can think of at the moment, as well as all I feel like writing. I'll come back with more but I think everything is covered. Sorry mefistotelis for the long list.
    Last edited by Metal Gear Rex; September 15th, 2009 at 02:48.

  3. #3
    Awakening Game Master Metal Gear Rex's Avatar
    Join Date
    Sep 2009
    Posts
    5,624

    Default Re: New script commands

    My next idea, now, is for the Hero Parties.

    This first one seems quite simple to do, it is a Hero Party Job. Perhaps we could call it NULL. This will set the hero parties to have no preticular job and will wander around aimlessly like normal heroes until a Dungeon Keeper's heart is attackable.

    I thought of scrapping this idea when I came up with it, but decided it still has its uses. It would be nice for the second format of my previous idea, but also has another function.

    It didn't seem to good because it would be sort of like ADD_CREATURE_TO_LEVEL but use a few extra commands, but then I realized that if you have a group of creatures in that party, then they will not stray away from each other and wander around together. When they attack, they will be united, and thus you see my point.

    However, even as I type this, I have doubts. Pretty much is the same as ATTACK_DUNGEON_HEART, but being too lazy to edit what is already typed, I will state another possibility for this command.

    Perhaps NULL could just be the wander, they won't attack you but just wander.

    -----------------------------

    My next idea is perhaps an extra variable in the Hero Parties. This new variable doesn't need to exist to allow the hero party to function (Problem solved if you add this to a game not meant to use it) but if you do then you can set the health of the creature. If left 0, they will simply die. You can set it to any value and the creature will have that health. Don't forget that to leave it with the default health, not to include the last variable.

  4. #4
    Awakening Game Master Metal Gear Rex's Avatar
    Join Date
    Sep 2009
    Posts
    5,624

    Default Re: New script commands

    Thought of another one. This one's easy, or easier.

    SET_FLAG(Player,Flag,Timer)

    This sets the flag to equal a timer.

    I also think there should be a...

    ADD_FLAG(Player,Flag,a)

    a=number added, -a for subtracting numbers.

    Perhaps there could also be a...

    SET_VARIABLE_FLAG(Player,Flag,Player2,Variable)

    The Player2 and the variable tell what variable under what player the flag will equal.

  5. #5

    Default Re: New script commands

    I'm not sure if you can somehow add this, it might be hardcoded, but if anyone can find a way to do it it would be you.

    The one thing I've missed most in mapmaking is a way to make hero creatures NOT move towards your dungeon heart the moment a path is available - instead leave them wandering where they started. I've found ways to work around it, but it's still an obstacle in my opinion.

  6. #6
    Awakening Game Master Metal Gear Rex's Avatar
    Join Date
    Sep 2009
    Posts
    5,624

    Default Re: New script commands

    Wow, has everyone forgotten about this?

    I have another idea (Surprise) but I'm not sure if it is possible. Is it possible to create something like a REBEL_CREATURE command? I got the idea from the Tentacle, and can probably be done if looking at the JOIN_ENEMY anger job.
    Dungeon Keeper 2 Patch: With More Balance and Pie [Hiatus]
    Forever Hiatus. Probably. Latest Version: 3.5 w/Levels 1-11 Revised.

    The Awakening: GM Powers Activate!
    Tesonu is napping!

    LOL, WFTO

  7. #7

    Default Re: New script commands

    What about freeze experience? Just so you can create a level where no creature can level up so it's all based on strategy or something like that

  8. #8
    Awakening Game Master Metal Gear Rex's Avatar
    Join Date
    Sep 2009
    Posts
    5,624

    Default Re: New script commands

    SET_CREATURE_MAX_LEVEL(a,b,c)

    a=Player name
    b=Creature name
    c=Constant that sets max level.

    It already exists in game.
    Dungeon Keeper 2 Patch: With More Balance and Pie [Hiatus]
    Forever Hiatus. Probably. Latest Version: 3.5 w/Levels 1-11 Revised.

    The Awakening: GM Powers Activate!
    Tesonu is napping!

    LOL, WFTO

  9. #9

    Default Re: New script commands

    Quote Originally Posted by Metal Gear Rex View Post
    SET_CREATURE_MAX_LEVEL(a,b,c)

    a=Player name
    b=Creature name
    c=Constant that sets max level.

    It already exists in game.
    I mean, so that you are given 3 level 5 warlocks, 1 level 7 warlock and 1 level 10 biledemon. Something like that. So it's possible to pause experience. Or so it could be made saying that you have 10 minutes to train your creatures, then exp gets frozen

  10. #10
    Awakening Game Master Metal Gear Rex's Avatar
    Join Date
    Sep 2009
    Posts
    5,624

    Default Re: New script commands

    Hmm, how about a new RANDOM command? If I use Random to generate when a hero party will come, and it repeats itself, (Meaning I use the Next Command Reusable) the generated random number is used again. Can you make a new command so it randomly generates numbers? A new command sounds good because in case someone liked using the same number for whatever reason.
    Dungeon Keeper 2 Patch: With More Balance and Pie [Hiatus]
    Forever Hiatus. Probably. Latest Version: 3.5 w/Levels 1-11 Revised.

    The Awakening: GM Powers Activate!
    Tesonu is napping!

    LOL, WFTO

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
  •