Page 9 of 9 FirstFirst ... 789
Results 81 to 90 of 90

Thread: New script commands

  
  1. #81

    Default Re: New script commands

    Sorry for stealing topic. One of the maps I've played some time ago had good creatures above lvl 10. The was no lvl displayed however it was shown as a petel. Not sure if this make sense to you however I had not luck of finding this map. Is this achievable somehow?

  2. #82

    Default Re: New script commands

    As far as i'm aware this can't happen; probably a bug or a misunderstanding. Either way i'd like to see this map.

  3. #83

    Default Re: New script commands

    Quote Originally Posted by abedy View Post
    Sorry for stealing topic. One of the maps I've played some time ago had good creatures above lvl 10. The was no lvl displayed however it was shown as a petel. Not sure if this make sense to you however I had not luck of finding this map. Is this achievable somehow?
    I don't see this happening. What is possible is training thieves above level 10, they will grow up into knights like demon spawn turn into dragons.

    Quote Originally Posted by Woudo View Post
    Code:
    IF_ACTION_POINT(1,PLAYER0)
    IF_ACTION_POINT(1,PLAYER1)
    IF_ACTION_POINT(1,PLAYER2)
    IF_ACTION_POINT(1,PLAYER3)
    For whoever hits it first. Action points need to be reset using the RESET_ACTION_POINT trigger so once any one of those scripts has been run, the others won't activate.
    Have you tested this? I have not, but my guess is that all players would be able to trigger the action point.

  4. #84

    Default Re: New script commands

    That's a good question and I actually think you're right. It's more likely that the IF block is consumable than the action point.

  5. #85

    Default Re: New script commands

    Quote Originally Posted by Woudo View Post
    That's a good question and I actually think you're right. It's more likely that the IF block is consumable than the action point.
    Adding neutral creatures to the map would be the way to go, but if you want to script it, this is the way:
    Code:
    IF(PLAYER_GOOD,FLAG1 == 0) 
    	IF_ACTION_POINT(1,PLAYER0)
    		QUICK_INFORMATION(1,"WOUDO'S WIFE FOR RED KEEPER",1)
    		ADD_CREATURE_TO_LEVEL(PLAYER0,BUG,1,1,1,0)
    		SET_FLAG(PLAYER_GOOD,FLAG1,1)
    	ENDIF
    ENDIF
    
    IF(PLAYER_GOOD,FLAG1 == 0) 
    	IF_ACTION_POINT(1,PLAYER1)
    		QUICK_INFORMATION(1,"WOUDO'S WIFE FOR BLUE KEEPER",1)
    		ADD_CREATURE_TO_LEVEL(PLAYER1,BUG,1,1,1,0)
    		SET_FLAG(PLAYER_GOOD,FLAG1,1)
    	ENDIF
    ENDIF

  6. #86

    Default Re: New script commands

    In latest nightly build experimental AI is enabled using 1337 as computer model in COMPUTER_PLAYER command, e.g.

    COMPUTER_PLAYER(PLAYER1,1337)
    If you just want to try it, you can also run with command line option -newdig to force this AI for all computer players on every map without modifying anything.

    Because this computer has a lot of bugs, I don't recommend using it in general, but if you have a problem where computer doesn't appear to mine at all it can be worth trying it. The aim for this AI is especially to be a stronger skirmish player than the standard AI, to make the multiplayer maps more fun in -1player. We're not quite there yet but it already plays stronger in some aspects.
    Last edited by p_hansson2; July 13th, 2015 at 15:29.

  7. #87

    Default Re: New script commands

    I folks want these new commands, their choice, but I hope KeeeperFX than will get the option to switch to original Dungeon Keeper, including the bugs. Several maps, made by me and others, use the bugs as properties in their maps, and I like several bugs that I noticed while playing. For example, imps doing strange things, as if they are playing hide an seek around some pillar, a vampire that will not do anything any more after he missed 3 pay days, and things in the games that just don't work and look like half way finished. One room place is not filled, a bug that every one sees every time he or she plays the game. It brings the game alive, it is one of the charms of the original game.

    This about these new commands:
    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)
    Obsolete. You can just throw in a weak level 1 creature in an action point there, an script that amount of gold in it's pocket.
    If there is 3 Bily's level 2 in that room, it will not live long.

    Code:
    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
    Obsolete. You can put level 1 creatures from Player0 in that place, and it will show that area for the rest of the game.
    This is done in several maps that way. A fly level 1 will not survive a trap, an imp will quickly be killed by any opponent there, if it can't flee, but the area becomes visible.

    Code:
     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.
    We are talking two games now. If KeeperFX is another game, it should also get a new name. It will get lots of problems with copyright laws, because of the sprites, textures and sounds. KeeperFX should be an enhancement for the existing game of Dungeon Keeper, not a new game.

    Code:
    PLAY_MESSAGE
      Allows to play any SOUND or SPEECH from the game.
      Example: PLAY_MESSAGE(PLAYER0,SPEECH,107)
    Again we are discussing a new game, where folks are supposed to make new sounds for a game.
    If folks want to do that, have fun but don't name it Dungeon Keeper.


    Code:
    QUICK_INFORMATION
      These works same as in Deeper Dungeons, but allows message
      length up to 1024 characters. There are 50 quick message
      slots.
    Longer messages? If map builders want that, i would suggest they go write a book, and find a publisher.
    Or start as a blogger. There are many hosting initiatives where you can start your own blog.
    There are already existing information and objective scripts in the original game, writing books there will even more divert from the game.

    Code:
    QUICK_OBJECTIVE
      Same as in DD, but allows longer messages and more control
      over zoom button (like in DISPLAY_OBJECTIVE).
    With zoom? Loosing the ability to just delete any text message, when irritated by them?

    Code:
     QUICK_INFORMATION_WITH_POS
    The stories about Keepers in the original game are not in any way describing reality. This Keeper called "whatever", it's just a creature, we want to make traps, doors, rooms, train creatures, not be bothered by text messages even more than before. "build a lair" What? Must I build a lair? How stupid does this game believe the user is?!

    Code:
    QUICK_OBJECTIVE_WITH_POS
      Accepts additional XY coordinates of the zoom place.
    Obsolete, because who wants to script for another game than Dungeon Keeper.

    Code:
     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.
    Obsolete. If AI can imprison, this was not left out for noting by the original designers. Flee can be created by increasing SET_CREATURE_FEAR(​[creature],​[a]) and using the fear of the original creatures. Orcs for example, I see them flee a lot of times in the game. They will flee, if there is to many troops approaching. A creature that has set max fear in the original code. it will flee for every fight. And must be hunted to take out. Imprisoning gives the problem of getting to many creatures on the map, because portals will keep on spawning new folk. Another problem, if an AI starts to imprison a creature by the Player0, will that creature than see all the Dungeon of the AI? Note, AI is not that smart, if their dungeon design is shown, it will have a very hard time defending against spawning Vampires.

    Code:
    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)
    Same as having an imp there.


    Code:
     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)
    What for? An imp placed before a boulder will do the trick with more ease, than scrip testing such an obsolete command.

    Code:
     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)
    This looks like an effort to repair a "bug". The bug there is in fact not in the game, but in the script reference guide from the Bullfrog Dungeon Keeper editor. There are many ways to influence these timings, one off them being, finding a spell some where on the map, opposed to scripting a time. In fact, all research times are defined in the Bullfrog manual, and can be used as triggers. The bug is this one:
    Code:
    RESEARCH(​[player],​[research type],​[room or spell],​[a])
    This command allows you to adjust the research value for individual rooms or spells and even for a specific player.
    That doesn't work. But who needs it, when there is some many ways to influence research? Taking a library, scripting AVAILABLE,1,1 when ever the map maker decides, and so forth. Obsolete.


    Code:
    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.
    I published a map today on the forum, where the research order of the rooms was messed up, using the original commands. Only difference there, is that the question mark is not visible. It was off course not my purpose to mess up the order, but to reward the player for some things, making new rooms available for research. Maybe posting that script here will proof also that command obsolete.
    Code:
     IF_AVAILABLE(PLAYER0,GRAVEYARD==1)
        ROOM_AVAILABLE(PLAYER0,BRIDGE,1,0)
    	ROOM_AVAILABLE(PLAYER0,TEMPLE,1,0)
    ENDIF
    
    IF_AVAILABLE(PLAYER0,BRIDGE==1)
        ROOM_AVAILABLE(PLAYER0,GUARD_POST,1,0)
    	ROOM_AVAILABLE(PLAYER0,BARRACKS,1,0)
    ENDIF
    
    IF_AVAILABLE(PLAYER0,BARRACKS==1)
        ROOM_AVAILABLE(ALL_PLAYERS,WORKSHOP,1,0)
    	ROOM_AVAILABLE(PLAYER0,SCAVENGER,1,0)
    ENDIF
    
    IF_AVAILABLE(PLAYER0,SCAVENGER==1)
    	ROOM_AVAILABLE(PLAYER0,PRISON,1,0)
    ENDIF
    
    IF(PLAYER0,GARDEN>=20)
    	ROOM_AVAILABLE(PLAYER0,GARDEN,1,0)
    ENDIF


    Code:
    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.
    From what I understood, this command was already in the original game.
    If not so, please take that bug from http://keeper.lubiki.pl/dk1_docs/dk_scripting_ref.htm and rename it to /KFX_scripting_ref.htm
    ADD_CREATURE_TO_POOL((RANDOM,1,2),20), if that was not in the original.

  8. #88

    Default Re: New script commands

    I think the name 'Dungeon Keeper Fan Expansion' is very appropriate, as the game features many additions by a fan. New scripting possibilities are such additions which I think are very nice. The Level_Version command makes sense, as without it the script is interpreted as the classic DK script, with it it can handle new script commands unique to the expansion.

    Unrelated to scripts, bug fixes in KeeperFX are usually very nice, for example that the workshop no longer fills up or that the AI knows how to respond when his heart is attacked. And KeeperFX features a classic-bug mode where old bugs that are preserved for maps that revolve around them. Play the ancient keeper campaign and notice all the bugs are still there.

    There are some other issues in KeeperFX as well, but I think non of them have any relation to new script commands. Most of the problems are non-intentional and keep in mind Mefisto is not finished, his plan is to rewrite the entire game to be open source, and in the process he will introduce as many bugs as he will fix, which he then also has to fix.
    I might be missing something, but the only problems I can remember that are plainly questionable design choices are some of changed creature spells introduced by DragonsLover and the new fear mechanic.

    Quote Originally Posted by 0etelaer View Post
    One room place is not filled, a bug that every one sees every time he or she plays the game. It brings the game alive, it is one of the charms of the original game.
    I don't know what you mean here.

    Quote Originally Posted by 0etelaer View Post
    This about these new commands:
    ADD_GOLD_TO_PLAYER
    Obsolete. You can just throw in a weak level 1 creature in an action point there, an script that amount of gold in it's pocket.
    If there is 3 Bily's level 2 in that room, it will not live long.
    If the map would otherwise work on DK yes spawning a creature with gold could be a workaround. If you build a keeperfx map anyway it's much nicer to just give the gold through the script. I use this on the Death Clock map for example, where the player first has to complete a first person segment before he gets gold to build stuff.

    Also, with this command you can take gold away from a player, which is not possible any other way. That can be really useful in getting the AI to move out, if you take his gold away he will dig towards gold so you can time when he becomes active.

    Quote Originally Posted by 0etelaer View Post
    DISPLAY_OBJECTIVE
    Obsolete. You can put level 1 creatures from Player0 in that place, and it will show that area for the rest of the game.
    This is done in several maps that way. A fly level 1 will not survive a trap, an imp will quickly be killed by any opponent there, if it can't flee, but the area becomes visible.
    Ignoring the fact that you just have a limited amount of commands and that it is totally strange to just drop friendly creatures somewhere, this command is not about revealing the map but about using the Eye-icon on messages so you can zoom to what the message is talking about.


    Quote Originally Posted by 0etelaer View Post
    PLAY_MESSAGE
    Again we are discussing a new game, where folks are supposed to make new sounds for a game.
    You can play the sounds and speeches that come with the game through the script, no need to make your own sounds.

    Quote Originally Posted by 0etelaer View Post
    QUICK_OBJECTIVE
    With zoom? Loosing the ability to just delete any text message, when irritated by them?
    No, again this is enabling the user to click the eye icon to move the screen to the location the message is talking about.

    Quote Originally Posted by 0etelaer View Post
    QUICK_INFORMATION_WITH_POS
    The stories about Keepers in the original game are not in any way describing reality. This Keeper called "whatever", it's just a creature, we want to make traps, doors, rooms, train creatures, not be bothered by text messages even more than before. "build a lair" What? Must I build a lair? How stupid does this game believe the user is?!

    QUICK_OBJECTIVE_WITH_POS
    Obsolete, because who wants to script for another game than Dungeon Keeper.
    I have no idea idea what you are talking about here, but you do not seem to understand these commands. It's not about another game or modifying make trap messages, it is about map objective/information written by the mapmaker. Most old maps just start without an objective or reuse objectives from the campaign which is not nice at all. Now the mapmaker can write his own message and activate the zoom button when he wants to indicate the location of the objective.

    Quote Originally Posted by 0etelaer View Post
    SET_CREATURE_TENDENCIES
    Obsolete. If AI can imprison, this was not left out for noting by the original designers. Flee can be created by increasing SET_CREATURE_FEAR(​[creature],​[a]) and using the fear of the original creatures. Orcs for example, I see them flee a lot of times in the game. They will flee, if there is to many troops approaching. A creature that has set max fear in the original code. it will flee for every fight. And must be hunted to take out. Imprisoning gives the problem of getting to many creatures on the map, because portals will keep on spawning new folk. Another problem, if an AI starts to imprison a creature by the Player0, will that creature than see all the Dungeon of the AI? Note, AI is not that smart, if their dungeon design is shown, it will have a very hard time defending against spawning Vampires.
    The player will continue having a massive advantage on skirmish maps if the AI does not imprison and convert creatures. I've already played trial builds where the computer successfully manages to capture and convert heroes or your creatures. The reason why the original developers did not include this is because DK is a very rushed and incomplete game filled with bugs and design flaws.

    Quote Originally Posted by 0etelaer View Post
    REVEAL_MAP_RECT
    Same as having an imp there.

    REVEAL_MAP_LOCATION
    What for? An imp placed before a boulder will do the trick with more ease, than scrip testing such an obsolete command.
    Not at all. The imp can move so the player can posses and explore more than you want to show. This is a very nice piece of code to help direct the player somewhere.

    Quote Originally Posted by 0etelaer View Post
    RESEARCH
    This looks like an effort to repair a "bug". The bug there is in fact not in the game, but in the script reference guide from the Bullfrog Dungeon Keeper editor. There are many ways to influence these timings, one off them being, finding a spell some where on the map, opposed to scripting a time. In fact, all research times are defined in the Bullfrog manual, and can be used as triggers. The bug is this one:
    That doesn't work. But who needs it, when there is some many ways to influence research? Taking a library, scripting AVAILABLE,1,1 when ever the map maker decides, and so forth. Obsolete.

    RESEARCH_ORDER

    I published a map today on the forum, where the research order of the rooms was messed up, using the original commands. Only difference there, is that the question mark is not visible. It was off course not my purpose to mess up the order, but to reward the player for some things, making new rooms available for research. Maybe posting that script here will proof also that command obsolete.
    A lot you can try to script out in other ways yes - using more of the limited amount of commands you can use, but not everything. These commands are a very simple way to change the order in which rooms and spells are researched and how much time they take. I made a map for example where you start out with just two bile demons that also have to do some research, if you kept the original values it would have taken very long to complete but now it was an acceptable wait.


    Quote Originally Posted by 0etelaer View Post
    RANDOM
    From what I understood, this command was already in the original game.
    RANDOM was already in the original game yes, but it functioned in just very few situations. In old versions of KeeperFX it functioned in more places.
    However, like in the original game the random value is determined at the start of the map, making it almost useless as where you want to use it most of all is to use it in loops spawning hero parties from random locations.
    In the latest version of KeeperFX - but only when you enable keeperfx specific script - there's the new DRAWFROM command which is much more useful that replaced the RANDOM command. And planned is to recreate RANDOM to be truly random and work in loops.
    Last edited by YourMaster; April 27th, 2016 at 13:48.

  9. #89

    Default Re: New script commands

    I ain't reading all that shit, but the new commands are legitimately useful. Dropping a level 1 dwarfa with 10k in his pocket is a good WORKAROUND for giving the player money, but it's exactly that, a cheap workaround. 10k going straight to the bank is a lot less awkward than having the player manually pick up a small hoard of treasure bags from a dwarf that just popped out of their dungeon heart.

  10. #90

    Default Re: New script commands

    Some command ideas:


    MAX_CREATURE_TYPE(PLAYER, TYPE, MAX)
    Limits the maximum number of a specific creature type for a player/players from ALL sources. By all sources I mean it will also work un undead raising AND Temple sacrifices.


    MAX_CREATURE_TYPE(PLAYER0, HORNY, 1)
    MAX_CREATURE_TYPE(ALL_PLAYERS, VAMPIRE, 3)

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

    HIDE_MAP(PLAYER0)
    This command will reset map fog for player.


    HIDE_MAP(ALL_PLAYERS)

    Reset fog every 100 game turns.
    Code:
    SET_TIMER(PLAYER0,TIMER0)
    
    IF(PLAYER0,TIMER0 >= 100)
           NEXT_COMMAND_REUSABLE
           HIDE_MAP(ALL_PLAYERS)
           NEXT_COMMAND_REUSABLE
           SET_TIMER(PLAYER0,TIMER0)
    ENDIF
    ----------------------

    ADD_UNIQUE_CREATURE_TO_LEVEL(PLAYER, CREATURE, ACTION POINT, UNIQUE NAME, EXPERIENCE LEVEL, GOLD, STATS BOOST % )
    Adds unique named and boosted creature to the game at specific action point. Is pretty much same as regular command except instead of number you have an unique name and is always 1 creature plus you have a stat boost at the end. The name must be 1 alphanumeric word


    Can be used to make unique named bosses .For example add a unique Archer named JIMMY that is has all it's attributes 20% higher than regular Archers. Sadly the name will only show up when you convert them but is used internally for next command.
    ADD_UNIQUE_CREATURE_TO_LEVEL(PLAYER_GOOD,ARCHER,5, JIMMY, 3,300, 20)

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

    SET_CREATURE_JOB(PLAYER, CREATURE, JOB)
    Assigns a specific job to a specific type of creature for a specific player overriding their primary jobs and bypassing all job checks.


    SET_CREATURE_JOB(PLAYER0, BILE DEMON, TAKE_SLEEP)

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

    SET_UNIQUE_CREATURE_JOB(PLAYER, CREATURE NAME, JOB)


    SET_CREATURE_JOB(PLAYER0, JIMMY, SEEK_THE_ENEMEY)
    Set the creature job for a named creature. Only works with creatures added via ADD_UNIQUE_CREATURE_TO_LEVEL

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

    DEAD_CREATURES_RETURN_TO_POOL_WITH_LEVEL(0/1, LEVEL DIFFERENCE)
    Adds dead creatures back to pool but remembers their level + a difference.

    DEAD_CREATURES_RETURN_TO_POOL_WITH_LEVEL(1, -2)
    Adds the dead creature to pool with a level difference of + -2 up to a minimum of 1 and maximum of 10


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

    MAGIC_SINGLE_USE(PLAYER, SPELL)
    Makes a spell useable only once then it needs to be researched again

    MAGIC_SINGLE_USE(ALL_PLAYERS, POWER_CHICKEN)
    Last edited by trollworkout; May 18th, 2016 at 09:27.

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
  •