PDA

View Full Version : New script commands



mefistotelis
September 14th, 2009, 09:22
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:

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:

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:

VAMPIRES_ARISEN
ALL_UNALLIED_DESTROYED

Metal Gear Rex
September 14th, 2009, 19:25
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.

Metal Gear Rex
September 14th, 2009, 19:35
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.

Metal Gear Rex
September 16th, 2009, 13:12
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.

DzjeeAr
September 19th, 2009, 18:02
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.

Metal Gear Rex
October 13th, 2009, 16:44
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.

nebster
October 14th, 2009, 11:18
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

Metal Gear Rex
October 14th, 2009, 12:21
SET_CREATURE_MAX_LEVEL(a,b,c)

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

It already exists in game.

nebster
October 17th, 2009, 11:23
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

Metal Gear Rex
December 9th, 2009, 13:11
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.

mefistotelis
December 9th, 2009, 14:51
ok, but how should we call this new "random"?

Maybe "DYNAMIC_RANDOM" or "DRAND"?

Or maybe you have better name?

Metal Gear Rex
December 9th, 2009, 15:08
DYNAMIC_RANDOM seems a little long, but that sounds good. I can't think of any good name, perhaps VARIABLE_RANDOM but RANDOM already is a variable.

Duke Ragereaver
December 22nd, 2009, 19:55
What about an increase of the portal max after an objective is achieved?

Command:

INCREASE_CREATURES_MAXIMUM(A,B)

A: Player 0 (human),2,3 and 4 (AI), Player good cannot be chosen for obvious reasons.
B: Number of extra creatures the player in question can now attract

For example


REM *** If action point 1 has been reached by player 0 (human) ***
REM *** Increase player 0 portal maximum by 5 ***

IF_ACTION_POINT(1,PLAYER0)
INCREASE_CREATURES_MAXIMUM(PLAYER0,5)
ENDIF

Metal Gear Rex
December 22nd, 2009, 19:58
In level 3, it uses the MAX_CREATURES command in an IF statement, I believe it works.

Duke Ragereaver
December 22nd, 2009, 20:02
In level 3, it uses the MAX_CREATURES command in an IF statement, I believe it works.

You're right, forget about my idea then.

Pizu
November 15th, 2010, 10:46
how about the ability to turn alliance off and on by a simple ",0" and ",1" to the end. (can't remember the CMD :( )

Trotim
November 15th, 2010, 16:58
Is there a command to fake/force the building of a room? Since the AI does it, it can't really be impossible, right? Something like MAKE_ROOM(PLAYER1,BRIDGE,x,y) and also SELL_ROOM?

DragonsLover
February 21st, 2011, 01:01
How about merging: DISPLAY_OBJECTIVE, DISPLAY_INFORMATION, DISPLAY_OBJECTIVE_WITH_POS and DISPLAY_INFORMATION_WITH_POS into one single command?

DISPLAY_MESSAGE([Objective or Information],[Number],[Player to display the message],[Zoom to],[X],[Y])

[Objective or Information] - Either OBJECTIVE or INFORMATION
[Number] - Text ID
[Player to display the message] - Can be PLAYERX or ALL_PLAYERS
[Zoom to] - Can be PLAYERX for a Dungeon Heart, a number for Action Point or Hero Gate, 0 for no zoom and ALL_PLAYERS for following coordinates.
[X] - X coordinate to zoom to (ignored if "Zoom to" isn't ALL_PLAYERS)
[Y] - Y coordinate to zoom to (ignored if "Zoom to" isn't ALL_PLAYERS)

mefistotelis
February 21st, 2011, 07:17
Yeah, I also get an urge to bring some order there.

But the old commands will have to be supported anyway, so that would only make redundant command. I will express my need of order when I'll be designing special map format for KeeperFX - it will support dynamic size of maps and have better scripting.

There's no need to give second name for the same thing.

jomalin
February 22nd, 2011, 18:55
it will support dynamic size of maps

That's good! But bigger levels = more slabs to put things = Limit thing must be increased... Is it not possible to change the fixed value of the Thing limit into a dynamic one? Just like using dynamic memory allocation (malloc in C) and these things?

DragonsLover
February 26th, 2011, 21:43
A member on DK.net suggested these commands:

SET_DAMAGE([Action point],[x]) - This would be to create a damage area where creatures that stand inside the action point bounding would constantly get damage, a bit like if they walk into lava.
[Action point] = Action point
[x] = Damage to inflict per game turn

SET_DUNGEON_DAMAGE([Player],[x]) - This would be to cause damage to the player's dungeon heart each time one of his creatures die.
[Player] = Player
[x] = Damage to inflict to the dungeon heart

SET_HERO_DEFEND([x]) - This is to set the heroes' state to active/passive. Once they're passive, they don't attack any players. This would be a beginning command for patrols.
[x] = 0 for false or 1 for true

USE_SPELL([Player],[x],[y],[Spell],[Power]) - This would simply allow to cast a spell anywhere on the map.
[Player] = Player that cast the spell. ALL_PLAYERS could be for a neutral player.
[x] and [y] = Coordinates
[Spell] = Could be either POWER_CALL_TO_ARMS (except for a neutral player), POWER_SIGHT (except for a neutral player), POWER_CAVE_IN, POWER_LIGHTNING (even for a neutral player if possible) or POWER_DESTROY_WALLS.
[Power] = Power of the spell from 1 to 9.
I have no idea if it would cost gold or not.

Lotex
April 7th, 2011, 01:34
is there a simple command for adding dungeon specials to the level like the ADD_CREATURE_TO_LEVEL command?

DragonsLover
April 7th, 2011, 12:04
While we're on it, a command for adding any"thing"?

Hmm, I'm not sure...

Lotex
April 7th, 2011, 23:12
nah, i mean things like dungeons specials, traps or spells - they're probably placed with the editor, i just wanna know if there's a software solution to do something like that because creatures can be placed with a command line, too

mefistotelis
April 8th, 2011, 04:42
This thread is supposed to be for proposing commands. If you're just asking if there is one like that - no, there isn't.

@DL
I like your previous propositions.

DragonsLover
April 8th, 2011, 12:59
They weren't mines. They came from a member on DK.net.

Zyraen
June 1st, 2011, 02:23
Just some Thoughts

- Destroy_Room - all of the Tiles of a certain type (or All) belonging to Specific Player are immediately destroyed. this can also be used to kill the Dungeon Heart, remove Doors, Traps, and remove (permanently) all Reinforced Walls. you can control what rooms the Player has at different points of gameplay, and at various points in time, make his Dungeon defenceless so he has to deal with the enemies based on the creatures he has, or simply remove Reinforced Walls from play permanently so that Keepers will be able to engage each other

- Remove_Creature - all Creatures of a certain type belonging to a Specific Player are immediately removed from the map. this can be used so that players may "select" specific number of Creatures for a "Commando" style map, and the rest are removed

- Detect_Highest_Level - this checks the highest level Creature for a Keeper. Instead of using Timer-Related Spawns, this can make harder maps more "manageable" for less "hardcore" Players (who won't be playing KeeperFX? lol). It can also be used to constantly keep the Pressure Up even if a Keeper is more efficient than other players.

- OR check in IF. combined with Timer_Expired and Detect_Highest_Level to move to the next event, either when the Keeper is "ready" or when time is up, there are of course a huge number of uses.

- Add_Tunneller_Party_Keeper - this allows you to add an allied Tunneller and his Party belonging to an (enemy) Keeper. The Keeper may not control this Tunneller, who will act as if he was a Hero alignment but claims territory, and MOST crucially, may not be interrupted by the Keeper. This may be used to coordinate simultaneous assaults on the Player. If you don't mind irritating your Player, you could create an allied Tunneller that the Player cannot control which starts digging to the Enemy Keeper's Lair, although use of some spells like Wind, and self-harming spells might spell an end for him.

- Add_Tunneller_Party_Keeper_No_Count - identical to the above, but the Tunneller and his party does not affect the Creature Count of the Keeper.

- Imp_Break_Reinforce_Flag - allows Imps to break reinforced walls of the enemy, even without Destroy Walls

- Tunneller_Break_Reinforce_Flag - allows Tunnellers to break reinforced walls

- Tunneller_Break_Gold_Flag - allows Tunnellers to break Gold

- Mass_Reveal_Map - all Keepers immediately see the whole map, same as Reveal Map. With Destroy Walls, they can drop their Imps on unclaimed territory.

- Path_List - a list of X and Y coordinates for Creatures to move towards. a point will be skipped if it is inaccessible / unreachable by the Creature. a Repeat flag will cause the path to keep looping. this can be used for both Tunnellers and normal Heroes, and is used as a Party Objective

- A general Flag that causes all parties who, when the Leader is killed, the surviving "Leader" will retain the Party Objective instead of carrying on to do the usual thing (typically assault the Dungeon Heart)

Edit : oh dear, how silly. I just realised, you could actually ally the various Enemy Keepers to the Hero Player, yes? The only difference is that of course the Tunneller won't claim tiles for the Keeper.

DragonsLover
June 1st, 2011, 13:17
- Destroy_Room - all of the Tiles of a certain type (or All) belonging to Specific Player are immediately destroyed. this can also be used to kill the Dungeon Heart, remove Doors, Traps, and remove (permanently) all Reinforced Walls. you can control what rooms the Player has at different points of gameplay, and at various points in time, make his Dungeon defenceless so he has to deal with the enemies based on the creatures he has, or simply remove Reinforced Walls from play permanently so that Keepers will be able to engage each other

Surely possible, but I don't think room tiles, doors, traps and reinforced walls are meant to be destroyed for no reason. If it's for multiplayer purposes, then perhaps we could wait to get a game configuration menu which would allow to alter anything?


- Remove_Creature - all Creatures of a certain type belonging to a Specific Player are immediately removed from the map. this can be used so that players may "select" specific number of Creatures for a "Commando" style map, and the rest are removed

Same as above, 'cause players can't "select" stuff while in-game unless they trigger something.


- Detect_Highest_Level - this checks the highest level Creature for a Keeper. Instead of using Timer-Related Spawns, this can make harder maps more "manageable" for less "hardcore" Players (who won't be playing KeeperFX? lol). It can also be used to constantly keep the Pressure Up even if a Keeper is more efficient than other players.

Sounds good. Could be used as a variable as in:
IF(PLAYER0,HIGHEST_CREATURE_LEVEL == 10)
Action
Action
ENDIF


- Add_Tunneller_Party_Keeper - this allows you to add an allied Tunneller and his Party belonging to an (enemy) Keeper. The Keeper may not control this Tunneller, who will act as if he was a Hero alignment but claims territory, and MOST crucially, may not be interrupted by the Keeper. This may be used to coordinate simultaneous assaults on the Player. If you don't mind irritating your Player, you could create an allied Tunneller that the Player cannot control which starts digging to the Enemy Keeper's Lair, although use of some spells like Wind, and self-harming spells might spell an end for him.

Edit : oh dear, how silly. I just realised, you could actually ally the various Enemy Keepers to the Hero Player, yes? The only difference is that of course the Tunneller won't claim tiles for the Keeper.

Yup, you can already assign a tunneller to an enemy Keeper, either with ally with heroes or by giving him the tunneller straight amongst his number of creatures. However, it's just silly to have a hero helping an enemy Keeper imho.


- Add_Tunneller_Party_Keeper_No_Count - identical to the above, but the Tunneller and his party does not affect the Creature Count of the Keeper.

Like an Imp in other words. Then, why not using an Imp instead to lead the party? Would make much more sense.


- Imp_Break_Reinforce_Flag - allows Imps to break reinforced walls of the enemy, even without Destroy Walls

- Tunneller_Break_Reinforce_Flag - allows Tunnellers to break reinforced walls

- Tunneller_Break_Gold_Flag - allows Tunnellers to break Gold

Here, it depends how the game is coded to allow this, but I think it's possible.


- Mass_Reveal_Map - all Keepers immediately see the whole map, same as Reveal Map. With Destroy Walls, they can drop their Imps on unclaimed territory.

REVEAL_MAP_RECT already exists to do the job. Just replace "PLAYER0" with "ALL_PLAYERS".


- A general Flag that causes all parties who, when the Leader is killed, the surviving "Leader" will retain the Party Objective instead of carrying on to do the usual thing (typically assault the Dungeon Heart)

I think there's some work to do with party's AI so perhaps this may be possible.

Zyraen
June 1st, 2011, 15:53
Surely possible, but I don't think room tiles, doors, traps and reinforced walls are meant to be destroyed for no reason. If it's for multiplayer purposes, then perhaps we could wait to get a game configuration menu which would allow to alter anything?
This isn't meant for a multiplayer function, actually. There could be 2 ideas here, the 1st is more easily implementable, but the 2nd is more "realistic"
- the Room / Mechanic stops functioning. eg. the Training Room simply stops working, it can be said that you have a Timer to get everything going, after which everything falls away. Or it could be a Wizard's Magic that if you don't interrupt, disables more and more of your Room Functions.
- the idea of a "decaying" Realm is something I personally find very cool and fitting with DK. That said, this might just make more sense using Action Points, where all structures within a certain (wide) radius of the Action Point gradually is destroyed, and the ground is no longer claimable.


Re : Remove Creature - Same as above, 'cause players can't "select" stuff while in-game unless they trigger something.
Actually, they can. I was planning to put a series of Doors, each with 1 type of Room in front of them - Graveyard, Torture Chamber, Hatchery, Treasure Room, Barracks, Library, etc.
Whichever door you break, gives you 4 types of a previously Neutral Creature (ie you break Graveyard, you get say, 4 Vampires)
After you break say 2 Doors, all the other creatures are removed from the Neutral Player.

Hmm.. I just realised, I could do something of the same, but instead use Rooms. So that the first 2 Rooms claimed, adds exactly 4 of that Creature onto the Player's Dungeon Heart, or say, adds 20 into the Pool, increasing a Flag to say 1. After the 2nd Room is claimed, set the Flag to 2. After that, no more Creatures are added.


Yup, you can already assign a tunneller to an enemy Keeper, either with ally with heroes or by giving him the tunneller straight amongst his number of creatures. However, it's just silly to have a hero helping an enemy Keeper imho.
Yep, I did see the assigning a Tunneller to a Player command, but 2 issues is that - it doesn't add a Party following him, and that he doesn't get interrupted by the Keeper
This I disagree somewhat. I'm actually setting up a framework so you can battle Enemy Hero Keepers, Keepers who use rooms just like you but use Heroes instead of Monsters. The only place I hit a serious Speedbump is with the Imp, I can't quite replace that. In fact, this ties in exactly with...


Like an Imp in other words. Then, why not using an Imp instead to lead the party? Would make much more sense.
Awesome! :) In fact, yeah that would be a lot better. The Question - is it possible to prevent the Imp from being interrupted by the Player? So he can keep going to his objective (your Dungeon)

In fact, it might be nice to simply consider a Player Flag that causes all his imps to appear like Tunnellers or something.
Alternatively, with KeeperFX, it should be possible to replace some rarely used Creature with an Imp, only that it uses a Tunneller Graphic file. The trickier thing is to make the Player AI use say, the Create Tunneller Spell in place of the Create Imp spell. That said, I'm not fully familiar with the scripting for the Keeper, though I have seen stuff like Dig_Gold_Greedy etc. Making the Spell is a little pointless if the AI doesn't use it.
Why not replace Imp with Tunneller? Because both Keepers would either get Tunnellers or Imps, making the Good vs Evil fight not completely right both ways.


REVEAL_MAP_RECT already exists to do the job. Just replace "PLAYER0" with "ALL_PLAYERS".
Nice!

Thanks for your responses :)

Zyraen
June 2nd, 2011, 08:12
Here's some others that might be useful, perhaps as an alternative to Destroy_Rooms

- Enable_Imprison - set to 0 to disable the "Imprison" button. 1 vice versa. If its done mid-map, take care to "uncheck" the button before disabling it
- Enable_Graveyard - set to 0 to disable the ability to raise Vampires and for Imps to pull the bodies along. 1 vice versa
- Enable_Scavenge - set to 0 to disable Scavenging, 1 vice versa

So, why not simply ban the Rooms?
Well, they can be used to attract the Creatures, without which (and if certain "broken" or "useless" spells are removed) makes the Research Chain terribly short. Prisons may not be terribly Popular, but I imagine Keepers might want to attract the Vampire.
For the Prison, you could be allowed to convert / starve creatures initially, but then when time starts you have to use battle Enemies without adding anymore to your horde. Plus it messes up with Torture Chamber, since conversion is very powerful.
(I actually have this in mind in a "Subdue the Dragon" level, where you first capture 4 areas, each with Prison, Torture Chamber, Destroy Walls, lastly the Dragon. after which your Demonspawns can now become Dragons, and you have to beat the Clock to battle off waves of Heroes. Makes no challenge though if you're going to convert the Heroes )

Scavenging, say an Enemy Keeper constantly scavenging your Creatures, you have to survive for a time against invasions, but EVENTUALLY it lets up and you can get down to business.

BTW, these are the 3 rooms I consider "broken" for the potential to give you Creatures waaaaay beyond your Portal Max.
I could live without a Prison or limiting Skeletons to max level 1, or making Vampire summoning a Temple recipe and limiting the ingredients, but a Dungeon without a Graveyard is just...... strange for me.

PS : Given how many of the Deeper Dungeons levels disable most / all of these rooms, I'd be inclined to say that Bullfrog agrees here. There's some levels that offer it as an "incentive" for aggression instead of turtling, ie. Batezek. Deeper Dungeon Research Chains are often very short as well.

MAX_TRAINING_AUTO(Number, Player)
- Creatures of that Player that Auto-Train (Demonspawn, Spiders, Skeletons, Samurai, Orcs, Dark Mistresses, etc) will only Auto-Train up to a particular Level. Usually level 8 or 9.
- Further Training is done by the Player manually throwing them in
- Shouldn't be used for the Enemy Keepers

Very Useful for levels when you're expecting Increase Levels and you have no Workshop and no Guardpost. I thought it would never happen, but I almost wanted to yell in frustration keeping my 5 Spiders from training past level 4 in Dixaroc. I specially built a lair for them near the library, then it I connected up my bridge to lure the Heroes, meaning having to hold 6 Imps as well or they'll zip to doom while repeatedly juggling 5 Spiders back to their Lair.
Even with Guardposts, its pretty irritating at times.

friscmanseby
January 19th, 2013, 17:23
What of those commands are available on FX ver 0.40?
And in the new nightly builds?

dayokay
June 24th, 2013, 19:22
Yes, I'd like to know what new KFX script commands are available. We have the list on page 1 - have any more been implemented? I'm gonna try and convert a DK1 level to a KFX script. Dayo

mefistotelis
June 24th, 2013, 19:58
I can't remember if I added any commands since this post, but all of them can be found in command_desc array here:
https://code.google.com/p/keeperfx/source/browse/trunk/keeperfx/src/lvl_script.c

Variables and other script keywords can be found in subsequent arrays in that file.
Oh, I remember implementing STEAL_SPELLS - it should now really work (hero goes to library, picks up spell and tries to escape).

Duke Ragereaver
June 25th, 2013, 10:16
Oh, I remember implementing STEAL_SPELLS - it should now really work (hero goes to library, picks up spell and tries to escape).

Nice! But can you eleborate on the escape part? Will the hero ignore hostile forces on it's path while performing the task and escaping? And where will he escape to anyway?

mefistotelis
June 25th, 2013, 15:24
Will the hero ignore hostile forces on it's path while performing the task and escaping?

No; he will focus on a fight if enemies are near (unless he have invisibility).


And where will he escape to anyway?

To a random hero gate.
I don't think I made kill_creature() when he reaches the gate, so he will probably stand at the gate and wait forever.

dayokay
June 25th, 2013, 20:07
To use the new commands, I need to put LEVEL_VERSION(1) at the start of the script file. If I do this (and only this) to an existing script, can I assume that this would be an invisible change, or do I need to check that performance is unaffected?

I am attracted to the ability to make the entire map visible using the new KFX script command. Helpful when assessing how computer players are behaving, tunneller parties etc. Just being cautious if that might have unexpected consequences.

I have been playing Nikolai's Castles Campaign, and quite a few enemy keepers have wilted and died without me needing to do anything, so I'm going to focus here.

Dayo

mefistotelis
June 25th, 2013, 20:15
To use the new commands, I need to put LEVEL_VERSION(1) at the start of the script file. If I do this (and only this) to an existing script, can I assume that this would be an invisible change, or do I need to check that performance is unaffected?

KeeperFX changes a few of existing commands; if you use that option:
- RESEARCH() command will act different
- view icon in DISPLAY_* and QUICK_* may act different.

dayokay
June 26th, 2013, 11:48
What is the difference in the Research command then? Is there a document / web-page that I can read? Are there any maps in KFX that use KFX scripting already? Dayo

Metal Gear Rex
June 26th, 2013, 11:59
What is the difference in the Research command then? Is there a document / web-page that I can read? Are there any maps in KFX that use KFX scripting already? Dayo

[Link (http://keeper.lubie.org/dk1_docs/dk_scripting_ref.htm)] <- Clicky.

As for maps that use KFX's new script commands, I'm sure there are some here and there. I don't keep up with FX anymore, so I don't know of any recent maps that include them. But I do know that back when I was making maps for DK1 / FX, I did use some FX Commands when they were available. Unfortunately that was back then, so my maps are kinda dated :P Wasn't nearly as skilled at level designing as I am now, if what I made back then could even be called "skilled".

dayokay
June 26th, 2013, 19:13
That link is for the original scripts, not KeeperFX scripts, isn't it? (a great document though it is). How does the research command differ if I enable KFX scripting?

In an ideal world that document would be updated for KFX scripting, and then all new & modified maps could use it. True?

mefistotelis
June 26th, 2013, 21:16
How does the research command differ if I enable KFX scripting?

From KeeperFX README:

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)

The original RESEARCH command affects order of research. In fact, its first use completely clears the research queue.

The README is here:
http://keeper.lubie.org/html/dk_keeperfx_read.php

dayokay
June 27th, 2013, 12:28
OK I get this now. I need to be wary of a few (quite rarely used) commands which will have unintended consequences if I convert to a KFX script. I get it now! Thanks, and I will be wary, and test any changes I make as thoroughly as is reasonably possible. Dayo

veroba
July 17th, 2013, 21:48
what about setting strengths for one particular creature like im going to make a level with a bunch of fairys n junk and i want to make one fairy significantly stronger than the rest.
how about making a script command to target a creature standing at a specific coordonate to have the effected stat changes, or is there already a possible command to spawn a creature to the map with augmented stats and only that creature recieves this buff. Ex no further spawns of said creature will not recieve the buff and the creatures currently on the map will not recieve it either

Metal Gear Rex
July 17th, 2013, 21:53
what about setting strengths for one particular creature like im going to make a level with a bunch of fairys n junk and i want to make one fairy significantly stronger than the rest.
how about making a script command to target a creature standing at a specific coordonate to have the effected stat changes, or is there already a possible command to spawn a creature to the map with augmented stats and only that creature recieves this buff. Ex no further spawns of said creature will not recieve the buff and the creatures currently on the map will not recieve it either

I don't think that's very easily possible if only due to the engine. Even DKII, which has an engine better built for that sort of thing, doesn't allow that kind of thing.

You're best bet is to have the super Fairy appear last, after all other Fairies are slain, and give her higher Health, etc with the "SET_CREATURE_HEALTH" command.

veroba
July 18th, 2013, 01:55
I don't think that's very easily possible if only due to the engine. Even DKII, which has an engine better built for that sort of thing, doesn't allow that kind of thing.

You're best bet is to have the super Fairy appear last, after all other Fairies are slain, and give her higher Health, etc with the "SET_CREATURE_HEALTH" command.

yes i just tested this out and if i change the stats of the fairy it changes the stats of all fairys, even the ones alrdy present so you are right id have to make sure they would all be dead

mefistotelis
July 18th, 2013, 14:07
Yup, all creatures of given kind have same stat values, and I'm not planning any changes to this.

To support a situation like this, I'm planning to allow adding new types of creatures - so the "super fairy" would be a separate breed, with different stats, and possibly even with different appearence.

veroba
July 18th, 2013, 19:40
Yup, all creatures of given kind have same stat values, and I'm not planning any changes to this.

To support a situation like this, I'm planning to allow adding new types of creatures - so the "super fairy" would be a separate breed, with different stats, and possibly even with different appearence.

=o

Metal Gear Rex
July 18th, 2013, 19:43
To support a situation like this, I'm planning to allow adding new types of creatures - so the "super fairy" would be a separate breed, with different stats, and possibly even with different appearence.

That would mean you're going to allow some sort of pallete swap or sprite editing?

mefistotelis
July 18th, 2013, 23:37
That would mean you're going to allow some sort of pallete swap or sprite editing?

Sprites will be in source form of PNGs, and the build system will generate JTYs out of them.

Actually, this already works for some DAT/TAB and RAW files - there's a tool which automatically computes best palette across a number of 24-bit PNGs, and then another tool converts all PNGs with use of that palette.

All the source PNGs are not commited to SVN, they are available separately under "Sources of graphics files" section here:
http://keeper.lubie.org/html/dk_keeperfx_devel.php

Metal Gear Rex
July 18th, 2013, 23:53
Sprites will be in source form of PNGs, and the build system will generate JTYs out of them.

Actually, this already works for some DAT/TAB and RAW files - there's a tool which automatically computes best palette across a number of 24-bit PNGs, and then another tool converts all PNGs with use of that palette.

All the source PNGs are not commited to SVN, they are available separately under "Sources of graphics files" section here:
http://keeper.lubie.org/html/dk_keeperfx_devel.php

Well, that's great. I was worried my DKII Patch would outclass the DKI Patch by having more units like Heroes. I might be able to turn something interesting out of that. I made some Witch sprites a while back, which is basically just a modified Warlock sprite. Nothing fancy. Just some walking frames only. The face was hell to make properly though.

DragonsLover
July 19th, 2013, 06:38
Very interesting indeed! It could be some kind of a beginning to new creature additions. In the meanwhile, I'm planning to fix some minor graphical errors in the GUI.

UnknownMaster21
October 12th, 2014, 19:39
I have an idea, if it is not implented

TOTAL_ROOMS
PLAYERx(ENTRANCE <=> x)

YourMaster
October 12th, 2014, 20:08
I have an idea, if it is not implented

TOTAL_ROOMS
PLAYERx(ENTRANCE <=> x)

I don't know what this code is supposed to do, or what you want to accomplish with it.

This is something I did in one of my own levels:

IF(PLAYER0,ENTRANCE >= 18)
MAX_CREATURES(PLAYER0,20)
ENDIF

Here if the player has two portals, the player can attract more creatures. Is that what you want to be able to do?

UnknownMaster21
October 12th, 2014, 20:39
Well, not really but that is good one too.

If was about the total amount of portals itself. Like if you own 5 portals, the new objective/specific creatures/win game/any

YourMaster
October 12th, 2014, 21:01
Sure, that's done the same way. The room is called entrance, not portal in the script, and know that you always have a 9 entrance titles per portal. So you can set whatever objectives you like.

UnknownMaster21
October 12th, 2014, 21:02
Sure, that's done the same way. The room is called entrance, not portal in the script, and know that you always have a 9 entrance titles per portal. So you can set whatever objectives you like.

okay, cool! I got an idea right away, but have to solve the other problems till I continue on my own!

Thanks for the info anyway!

UnknownMaster21
November 2nd, 2014, 17:11
Sorry for double post


but how about having a LOSE_GAME, will win the game? I know, sounds like "wtf man you high?" but for having a plot in campaign and so on, it would make awesome. Just a suggestion.


EDIT: I am more exact, having own dungeon destroyed, will win a game


EDIT2: even more exact, losing a game, will go to next realm in campaign, is it possible? "You have been defeated, press space to proceed to next realm!"

YourMaster
November 2nd, 2014, 19:24
I don't think it is possible. What you'd probably want is that you go to level 2a if you win level 1, and go to level 2b when you lose level 1, that can't be done.

What might work is this:

IF(PLAYER0,DUNGEON_DESTROYED == 1)
WIN_GAME
QUICK_OBJECTIVE(1,"You lose and win",PLAYER0)
ENDIF

You could test that.

UnknownMaster21
November 2nd, 2014, 20:16
I don't think it is possible. What you'd probably want is that you go to level 2a if you win level 1, and go to level 2b when you lose level 1, that can't be done.

What might work is this:

IF(PLAYER0,DUNGEON_DESTROYED == 1)
WIN_GAME
QUICK_OBJECTIVE(1,"You lose and win",PLAYER0)
ENDIF

You could test that.

can you then change a mentor quote? You have been defeated would do cool, instead of you have conquered this land. I think these are hardcoded?

YourMaster
November 2nd, 2014, 23:18
There is the 'Play Message' ('https://code.google.com/p/keeperfx/wiki/NewLevelScriptCommands') command, which you probably can use to play the sound you want, but I think the regular sound will also play.

UnknownMaster21
November 3rd, 2014, 12:34
There is the 'Play Message' ('https://code.google.com/p/keeperfx/wiki/NewLevelScriptCommands') command, which you probably can use to play the sound you want, but I think the regular sound will also play.


I will try some point, when I have time, for now I have to re-edit my maps and campaign because several script errors. Also a map error comes from the FX engine, due the reason of thing limits. Ghost monsters and torturing creature swaps a position as mirrored, some objects get disappeared and so on, but that's not a big deal. Though I will some point post an issue if relatively continuing error comes

UnknownMaster21
November 4th, 2014, 17:55
I don't think it is possible. What you'd probably want is that you go to level 2a if you win level 1, and go to level 2b when you lose level 1, that can't be done.

What might work is this:

IF(PLAYER0,DUNGEON_DESTROYED == 1)
WIN_GAME
QUICK_OBJECTIVE(1,"You lose and win",PLAYER0)
ENDIF

You could test that.


btw, it does not work, you get defeated anyway

but I got an idea: Can you have an alternative winning method that eventually if you lose, you still "win" and you get to the next realm anyway?

EDIT: no, no need to have like a or b levels, just next to next, clear as clean

YourMaster
November 4th, 2014, 22:59
Can you be more specific in what you mean,... because losing is that you have no chance of winning anymore. So not just talking script here,... if you can still win you haven't lost.

That tells me you want something specific to happen,... but what and how?

UnknownMaster21
November 5th, 2014, 13:04
I bet I can't make this more simple:

Original

Win = Press space to proceed to next realm
Lose = Press space to restart

Alternative

Lose = Press space to proceed to next realm

YourMaster
November 5th, 2014, 14:55
Don't be more simple, be more specific,... what is really different for the player?

Look at it like this:
A. Accomplish goal x. We call that 'WIN' => Press space to go to the next realm
B. Accomplish goal y. We call that 'Lose' => Press space to go to the next realm

A and B are the same thing to me, yes, a different sound is played, but from a gameplay perspective there is no difference.

Is it simply that you want the 'goal' to be that the players heart is destroyed?
If so, you've tested it, and you say even if you put a win condition on that, the level is still lost. As an alternative, you could put an action point on the player heart, and when player_good triggers that action point, 'win_game' and display an objective that says 'you've lost, press space'.

UnknownMaster21
November 5th, 2014, 19:19
Well, I try my best to be specific:


I want to make a map in my campaign, where is 100% sure for a lose, because in a plot you need to lose. The lose will happen by having your own dungeon heart destroyed by enemy and yes, you can't stop the enemy as in a plot, this should happen. The thing is, you would be able to continue to next realm anyway, but without any rewritten part of required things, I do not think it is possible to go to another realm in campaign when having been defeated, like normally you would do so if you win, but in this case, you should lose.

So, if having a lose, the map will be restarted. I want to change this and having to able to get to another realm, as in plot goes so.

No alternative maps, just next to next - style as originally goes. But having a lose in one of the maps in campaign would be awesome to be included. I have done already few extraordinary maps, what you definitely haven't seen before in anyhow. I am very serious to make one, hopefully it acquires all the requirements to be included in keeper klan, but that is a side mission for me. All what I want to do, is having my own campaign, playable one, not too hard, but challenging and very interesting.

I won't reveal more things. I have revealed few maps, and a bit of plot, so, I am sorry, if I am not enough specific, but I hope it fill your questions of my questions with my good answers, hopefully.

Anyway, thanks a lot in advance. I have learned a lot in these weeks what I have spent in here of my time.


EDIT: Anyway, if this is not possible, I have done already an alternative section of this, but this is a secret, as something new, nothing extraordinary, but something new yes.

EDIT2: Yeah, sorry if it isn't related anything of scripting, but I really thought this would be done with script, altough I am pretty sure it needs the game engine to be rewritten, but at least I can try and ask, if there is an easy solution. I bet not, but surprises might be always happening in behind of corners in our lifetimes.

YourMaster
November 5th, 2014, 19:50
Well, I think that can be done,...

What isn't possible is 'Lose to go to next level', but what is possible is 'Win the map by failing the objective'. Basically like I said in my last post:

* With in game texts, state an objective that can't be reached. Tell the player he must look out for heroes destroying attacking, and he will lose when they reach the heart.
* When the final attack comes, tell the player 'This is it, make sure they don't reach the heart or you will lose'.
* When the heroes reach the room with the heart, they must trigger an action point.
* Playtest how much time the heroes will take to destroy the heart. You can even script out how many heroes still live to get a good estimate. Say, 30 seconds.
* 25 seconds after the hero party triggers the action point, state in the objective: "You have failed, you lost, try again next map, press space", and include the "Win_game" command

Would this work for you?

UnknownMaster21
November 5th, 2014, 20:22
Well, I think that can be done,...

What isn't possible is 'Lose to go to next level', but what is possible is 'Win the map by failing the objective'. Basically like I said in my last post:

* With in game texts, state an objective that can't be reached. Tell the player he must look out for heroes destroying attacking, and he will lose when they reach the heart.
* When the final attack comes, tell the player 'This is it, make sure they don't reach the heart or you will lose'.
* When the heroes reach the room with the heart, they must trigger an action point.
* Playtest how much time the heroes will take to destroy the heart. You can even script out how many heroes still live to get a good estimate. Say, 30 seconds.
* 25 seconds after the hero party triggers the action point, state in the objective: "You have failed, you lost, try again next map, press space", and include the "Win_game" command

Would this work for you?

yes, as long as "you have conquered this realm" - mentor speech won't be included, I haven't tried unfortunately this yet, so it will take couple of days when I will test it. ( if this does not work, I have already an alternative thing to go)

yes, I know speeches will be added, also you did talk about the original speech will be included anyway, but I haven't tested this far, due the being busy.

I go sleep, as tomorrow is working day, back in here in somewhat 3PM, then I might test it completely, if no one else have done it yet.

UnknownMaster21
November 15th, 2014, 14:51
I can gladly to verify that, once you have won the game, you can't lose. No matter if your dungeon heart is destroyed or not. Win is a win, lose is a lose

UnknownMaster21
February 27th, 2015, 21:30
Sorry for double post but:


How about changing health of dugeon heart? Like putting 10 times more or so. With script of couse.

Edwin
June 18th, 2015, 10:36
could some changes be made in the kill creature command?
the addition of good_creatures and evil_creatures in the creatures part of the command
and the player# in the criteria part of the command and perhaps all in the count part.

example

KILL_CREATURE(​[player],​[creature],​[criteria],​[count])
KILL_CREATURE(​player0,​evil_creatures,player0 ,​all)

it could be used in the same way as the creatures_leave_dungeon command when there is no portal available

a new idea for a command could be creatures leaving your dungeon when having to much good creatures.


IF(PLAYER0,GOOD_CREATURES > 8)
CREATURES_LEAVE_DUNGEON(​[PLAYER],​[CREATURE],​[CRITERIA],​[COUNT])
ENDIF

could be useful in a level with weak creatures, and the prison and torture chamber available.
if the player only has spiders and tentacles and the heroes are all but the avatar available in the game in different areas of the level
it could prevent having a ton of powerful creatures.

could the SET_CREATURE_TENDENCIES be used on rooms like the torture chamber, so that it would either convert or torture the victims to dead,
but not always give the player a ghost
or the prison to keep them alive instead of killing them and reverting to skeletons?



SET_ROOM_TENDENCIES([PLAYER],[ROOM],[CRITERIA,[SETTING])
SET_ROOM_TENDENCIES(PLAYER2,TORTURE,TORTURE,1) 0 = NO_GHOST 1 = GHOST 2 = CONVERT

SET_ROOM_TENDENCIES(PLAYER2,PRISON,STARVE,1) 1 = SKELETON 0 = NO_SKELETON

YourMaster
June 18th, 2015, 10:57
could some changes be made in the kill creature command?
the addition of good_creatures and evil_creatures in the creatures part of the command
and the player# in the criteria part of the command and perhaps all in the count part.

example

KILL_CREATURE(​[player],​[creature],​[criteria],​[count])
KILL_CREATURE(​player0,​evil_creatures,player0 ,​all)

What would the player# do when used as a criterion? How does it differ from the first player#? What would this do?
KILL_CREATURE(PLAYER0,BILE_DEMON,PLAYER1,3)

I assume you want when you use 'Evil_creature' or 'good_creature' in this command for the game randomly kill any of those creatures fitting the criterion.

Having 'All' as count wouldn't add much, as you can already enter a number that is larger than the max number of creatures the game supports.



could the SET_CREATURE_TENDENCIES be used on rooms like the torture chamber, so that it would either convert or torture the victims to dead,
but not always give the player a ghost
or the prison to keep them alive instead of killing them and reverting to skeletons?



SET_ROOM_TENDENCIES([PLAYER],[ROOM],[CRITERIA,[SETTING])
SET_ROOM_TENDENCIES(PLAYER2,TORTURE,TORTURE,1) 0 = NO_GHOST 1 = GHOST 2 = CONVERT

SET_ROOM_TENDENCIES(PLAYER2,PRISON,STARVE,1) 1 = SKELETON 0 = NO_SKELETON


I recently made a topic suggesting something like this. Click here ('https://keeperklan.com/threads/4951-Minor-room-balance-changes-would-have-made-DK1-a-far-better-game') for that topic or here (https://code.google.com/p/keeperfx/issues/detail?id=507) for the feature requests I made.

My proposal was a bit different from yours not only on how the command could be formatted, but also giving a chance instead of a yes/no option. For example make 1 in 10 prisoners turn into skeletons instead of non/all.

Edwin
June 18th, 2015, 11:34
What would the player# do when used as a criterion? How does it differ from the first player#? What would this do?
KILL_CREATURE(PLAYER0,BILE_DEMON,PLAYER1,3)

I assume you want when you use 'Evil_creature' or 'good_creature' in this command for the game randomly kill any of those creatures fitting the criterion.



the player# as a criterion would kill the specified creature(s) of that player
lets say that player0 has 10 bile_demons of different levels and combat experience
KILL_CREATURE(​player0,​bile_demons,player0,10 ) would kill all the bile_demons player0 has

the evil_creatures or good_creatures command in the kill_creatures command
would kill all evil_creatures the player# has instead of the most_experienced or the lowest level etc..
not randomly select a creature that fits the criteria.
so you don't need to specify a creature and what criteria it should have, to be killed.

your command would let player0 kill 3 bile_demons of player1
when certain specifics are met, like action points, timers or kills or lost battles
considering that kill_creatures are usually used within an IF command.

YourMaster
June 18th, 2015, 12:03
Seems like you don't fully understand how the command works right now. How can a script command let player0 kill creatures of player1? It is the script that does it.
The current script does what you want:
IF(PLAYER0,SORCEROR >= 10)
KILL_CREATURE(PLAYER1,GHOST,LEAST_EXPERIENCED,255)
ENDIF

This script kills all ghosts of player1 when player0 has at least 10 Warlocks.

When you say that when you use 'EVIL_CREATURES' as criteria you kill all, that doesn't work like that when you only want to kill 3 creatures. I think it would be much better to have the 'EVIL_CREATURES' command be used instead of the [creature] parameter. So you can kill the 3 most experienced creatures (if you have 5 level 10 creatures it would have to randomly select 3 out of those 5 still) or all creatures/heroes if you want to.

I would like to see 'RANDOM' as a criterion, but Mefisto has decided against that. The function is already there but he did not unlock it in the script.

Edwin
June 18th, 2015, 12:30
your command would only kill the least_experienced ghosts, so if you have 3 level 4, 2 level 6 and 1 level 10 ghost it would only kill the level 4 ghosts considering they are least_experienced.
the player# as a criteria would kill the level 4,6 and 10 ghosts.

the idea is that if you convert heroes all your evil_creatures die when reaching the >? limit when not having a portal to run if you could use the Leave_dungeon command

YourMaster
June 18th, 2015, 12:37
your command would only kill the least_experienced ghosts, so if you have 3 level 4, 2 level 6 and 1 level 10 ghost it would only kill the level 4 ghosts considering they are least_experienced.

No it does not. It does what I say it does. If I have two level 3, two level 5 and two level 10 and the command is used to kill the 3 least experienced ghosts I'll end up with two level 10 ghosts and randomly one of the level 5 ghosts.

Edwin
June 18th, 2015, 12:49
aha, so if you would set it to 6 or 7 you lose all your ghosts,
but that would mean that for every creature you would want to kill you must create a separate line in the script

KILL_CREATURE(PLAYER1,EVIL_CREATURES,LEAST_EXPERIE NCED,255)
should theoretically kill all the evil_creatures controlled by player1?

YourMaster
June 18th, 2015, 16:19
aha, so if you would set it to 6 or 7 you lose all your ghosts,
but that would mean that for every creature you would want to kill you must create a separate line in the script

KILL_CREATURE(PLAYER1,EVIL_CREATURES,LEAST_EXPERIE NCED,255)
should theoretically kill all the evil_creatures controlled by player1?

Yes. And you indeed have to add one command for each creature type to make this work, so being allowed to substitute the [creature] parameter with TOTAL/EVIL/GOOD_CREATURES would indeed be a nice addition.
When the RANDOM command (https://code.google.com/p/keeperfx/wiki/NewLevelScriptCommands) will be implemented in KeeperFX as planned (which will not be in a long while) it is possible to accomplish the same thing if you put the command in a loop.

BaukeS
July 1st, 2015, 11:18
is it possible to make a command, that gives the first keeper that reaches an actionpoint some creatures?

Woudo
July 1st, 2015, 18:45
IF_ACTION_POINT(1,PLAYER0)
QUICK_INFORMATION(1,"MY WIFE FOR HIRE",1)
ADD_CREATURE_TO_LEVEL(PLAYER0,ZEALOT,1,1,8,0)
ADD_CREATURE_TO_LEVEL(PLAYER0,ZEALOT,1,2,7,0)
ADD_CREATURE_TO_LEVEL(PLAYER0,ZEALOT,1,1,6,500)
ENDIF


IF_ACTION_POINT(1,PLAYER1)
QUICK_INFORMATION(1,"MY WIFE FOR HIRE",1)
ADD_CREATURE_TO_LEVEL(PLAYER1,ZEALOT,1,1,8,0)
ADD_CREATURE_TO_LEVEL(PLAYER1,ZEALOT,1,2,7,0)
ADD_CREATURE_TO_LEVEL(PLAYER1,ZEALOT,1,1,6,500)
ENDIF


IF_ACTION_POINT(1,PLAYER2)
QUICK_INFORMATION(1,"MY WIFE FOR HIRE",1)
ADD_CREATURE_TO_LEVEL(PLAYER2,ZEALOT,1,1,8,0)
ADD_CREATURE_TO_LEVEL(PLAYER2,ZEALOT,1,2,7,0)
ADD_CREATURE_TO_LEVEL(PLAYER2,ZEALOT,1,1,6,500)
ENDIF


IF_ACTION_POINT(1,PLAYER3)
QUICK_INFORMATION(1,"MY WIFE FOR HIRE",1)
ADD_CREATURE_TO_LEVEL(PLAYER3,ZEALOT,1,1,8,0)
ADD_CREATURE_TO_LEVEL(PLAYER3,ZEALOT,1,2,7,0)
ADD_CREATURE_TO_LEVEL(PLAYER3,ZEALOT,1,1,6,500)
ENDIF



The above will produce;
One level 8 Zealot carrying no gold.
Two level 7 Zealots carrying no gold.
One level 6 Zealot carrying 500 gold.
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. The only problem is it's inefficient in regards to IF's used, but you're probably not at the level where you'll overspend that just yet.

Is there a specific reason you need to do this by a script? You could just use neutral creatures.

abedy
July 1st, 2015, 20:58
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?

Woudo
July 1st, 2015, 21:45
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.

YourMaster
July 1st, 2015, 22:08
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.



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.

Woudo
July 1st, 2015, 22:13
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.

YourMaster
July 1st, 2015, 22:20
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:
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

p_hansson2
July 13th, 2015, 15:25
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.

0etelaer
April 27th, 2016, 10:18
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:

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.


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.


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.


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.



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.


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?


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
Accepts additional XY coordinates of the zoom place.
Obsolete, because who wants to script for another game than Dungeon Keeper.


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.


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.



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.


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:

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.



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.

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




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.

YourMaster
April 27th, 2016, 13:46
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.


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.



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 (https://keeperklan.com/downloads.php?do=file&id=110) 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.



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.




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.



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.



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.



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.



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.



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 (https://keeperklan.com/downloads.php?do=file&id=119) 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.




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.

Woudo
April 27th, 2016, 19:28
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.

trollworkout
May 18th, 2016, 08:04
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.


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)