PDA

View Full Version : First map - some varied questions



Woudo
May 26th, 2014, 18:33
I only recently found out DK actually has a map editor so I got straight into it. I'm talking about ADiKted, not whatever the 'official' editor is.

--

1. Do I need to assign gems as computer-controlled for them to pay attention to it?
2. Looking at map20 in thing mode, why does the center castle have large white rings around it?
3. If I wanted to make a map where the player needs to claim X number of Y rooms predetermined on the map, is there a way I can foolproof it so if the player sells the room, it doesn't lock them out of the victory objective?
4. I tried to read the creature.txt earlier to look at some of the HP values (specifically how much health/defense Beetles have at level 10), but it was an unreadable mess. Does anyone have a better organized version?
5. How can I stop a computer player from digging around the place? I, for the most part, want them to stay in their base and only make aggressive movements. I don't want them to tag gold around the nearby player dungeon and cause imp wars early on.
6. The ADiKted scripting reference mentions an example map200, but I don't have it in my levels folder. I have maps from 1-150, map1000, and my own unfinished map.

Since I haven't scripted anything yet, I haven't had a chance to test the level so question 5 might not actually be a problem. It just seems like the AI would place gold at a higher preference than gems since gold generates faster cashflow.

YourMaster
May 26th, 2014, 19:38
Have you considered making it for KeeperFX, you'll have some additional options?

1. No
3. I do believe this can be accomplished through the level script
4. It is not an unreadable mess,... For KeeperFX you could simply open 'bug.cfg'. For vanilla it is a CSV file, so make sure you import it as data in excel or something and you'll have nice columns.
5. In keeperfx you can select a keeperai, but even the most defensive ai's will still dig to close gold if it is too close. Perhaps also possible with the script in vanilla, not sure.
6. It's on the DK Gold disk with the level editor

Woudo
May 26th, 2014, 20:49
Ah, so that's why I can't find it, I don't actually have it in the first place.
When you say "consider making it for KeeperFX" what do you mean?

I thought the map making scene for Dungeon Keeper 1 was non-existent and the campaigns in KeeperFX were the only few ever made. Apparently not, there seem to be many more scattered around on these forums.
I gotta ask though, how did the ones bundled with KeeperFX get chosen? No finger-pointing, but a few of them are of questionable quality.
It's hard to say that last line without sounding like a huge wanker.

Either way, i've finished building the map and unless scripting does my head in, I should be done by some time tomorrow. I thought making a single level would be a week-long arduous task but ADiKtEd was a lot quicker and easier to use than I expected.

YourMaster
May 26th, 2014, 23:13
There are quite a few maps: http://keeper.lubiki.pl/html/dk1_maps_list.php

I have no idea how the campaigns got chosen,... my guess would be that all campaigns that were made and uploaded got included.

As for what I mean,... by the fact that you mentioned the creatures.txt I noticed you use the original keeper, not FX. Maps technically work in both of course, although FX has included additional script commands. However, there have been bugfixes, balance changes and AI improvements that make maps on FX play out differently than on vanilla. So when you'll do the balance testing if matters in which application you run it.

Woudo
May 27th, 2014, 02:52
I did a GoG install of DK and just dumped KeeperFX over top of it. I also had to dump ADIKtEd in the main folder due to an issue with saving maps so uh, my DK folder is pretty bloated with unnecessary files at the moment. I didn't even notice the creatrs folder, I just went straight for the data folders thinking that'd be the place to find it.

So bug.cfg lists health as a flat base value of 250 and I can't see any kind of additional HP per level. It also lists an "Armor" value as well as a "Defence" value. I don't understand, I know for sure monsters get more HP per level.
Maybe it's a random diceroll on level-up rather than a set value? If that were so there should still be something saying what range their bonus stats should vary between.

--
I'm assuming spawning heroes with an action point is when it looks as if they fall through the floor/roof?


DIG TO GREEDY GOLD
Greedly dig for gold. Computer uses this process when it ran out of gold, or is ready to attack. The search range can be far longer here.
I imagine this is defined either by how close the gold is to claimed territory or how close it is to the dungeon heart. Do you know which is correct?

--
If I wanted to make it appear as if an enemy keeper is sending waves of creatures (like hero waves but with a keeper colour), can I achieve that without gimping their AI or having them manipulate the creatures? Imagine a standard keeper that can manipulate his own pool of creatures while also having waves of generated creatures akin to a hero party but all under the same keeper banner. It'd be useful for open water maps to 'force' large fly/hound harrass from enemy keepers.

--
I'm looking at some of the original Dungeon Keeper scripts and it lists POWER_SLAP and POWER_HAND. I thought the player had these by default and I wasn't required to list them?

--
Had some issues i've fixed.
Some doors with heroes behind were on Neutral land despite being listed as Hero. Purple didn't even get a chance. Fixed it by just deleting it with impenetrable rock and replacing.
Couldn't figure out how to lock doors. Turns out the 1 in the tutorial was actually a lowercase L. Whoops.
I somehow wrote every spell as SPELL_AVAILABLE rather than MAGIC_AVAILABLE.

For the most part i'm done with my first level. Just a basic multiple keepers, a small area with some locked away heroes and some raiding party heroes. Nothing too much, but I have a great idea for the second level. My issue is I still don't have my head around how to script invading hero parties and my new idea would be HUGELY focused on that.

Can you guys tell me what's wrong with my code below and why the hero parties just never rock up?



################################################## ##################################
################################################## ##################################


REM ##### Setup flag required for Hero gates #####
SET_FLAG(PLAYER0,FLAG0,0)



REM ##### As soon as the player has #####
REM ##### atleast 10 creatures #####
REM ##### start hero spawns #####
IF(PLAYER0,TOTAL_CREATURES >= 2)
SET_FLAG(PLAYER0,FLAG0,1)

ENDIF



REM ##### Left-side attacking hero party #####
CREATE_PARTY(DORF_SQUAD_LEFT)
ADD_TO_PARTY(DORF_SQUAD_LEFT,DWARFA,4,0,STEAL_GOLD ,0)
ADD_TO_PARTY(DORF_SQUAD_LEFT,DWARFA,4,0,STEAL_GOLD ,0)
ADD_TO_PARTY(DORF_SQUAD_LEFT,TUNNELLER,8,0,STEAL_G OLD,0)
ADD_TO_PARTY(DORF_SQUAD_LEFT,TUNNELLER,8,0,STEAL_G OLD,0)



REM ##### Right-side attacking hero party #####
CREATE_PARTY(DORF_SQUAD_RIGHT)
ADD_TO_PARTY(DORF_SQUAD_RIGHT,DWARFA,4,0,STEAL_GOL D,0)
ADD_TO_PARTY(DORF_SQUAD_RIGHT,DWARFA,4,0,STEAL_GOL D,0)
ADD_TO_PARTY(DORF_SQUAD_RIGHT,TUNNELLER,8,0,STEAL_ GOLD,0)
ADD_TO_PARTY(DORF_SQUAD_RIGHT,TUNNELLER,8,0,STEAL_ GOLD,0)

################################################## ###################################
################################################## ###################################


REM ##### Flies harassing gems #####
IF(PLAYER0,FLAG0==1)
IF(PLAYER0,TIMER0>=1000)
NEXT_COMMAND REUSABLE
ADD_CREATURE_TO_LEVEL(PLAYER4,FLY,-2,8,5,0)
NEXT_COMMAND_REUSABLE
SET_TIMER(PLAYER0,TIMER0)
ENDIF
ENDIF

REM ##### Synchronized Dwarven raiding parties from left and right #####
IF(PLAYER0,FLAG0==1)
IF(PLAYER0,TIMER0>=2500)
NEXT_COMMAND_REUSABLE
ADD_PARTY_TO_LEVEL(PLAYER4,DORF_SQUAD_LEFT,-1,1)
NEXT_COMMAND_REUSABLE
ADD_PARTY_TO_LEVEL(PLAYER4,DORF_SQUAD_RIGHT,-3,1)
NEXT_COMMAND_REUSABLE
SET_TIMER(PLAYER0,TIMER1)
ENDIF
ENDIF


REM ##### Win condition #####
IF(PLAYER0,ALL_DUNGEONS_DESTROYED == 1)
WIN_GAME


I'm certain i've done the timer wrong. SET_TIMER(PLAYER0,TIMER1) doesn't really achieve anything. I want it to reset the clock and repeat infinitely, effectively dumping the hero parties in repeatedly every X minutes (i'll figure that part out later).

YourMaster
May 27th, 2014, 17:57
I have no help on your script,...
I also don't know it is possible to get the enemy keeper to attack with specific waves, I don't think so. I believe you could force specific creatures to join the enemy keeper though, but I don't know how to get them to attack.

Look in the imp.cfg for explanations about all the stats.

All stats grow a percentage each levelup, the same for all creatures. Don't know the number top of mind, but all stats are roughly 4 times as high on level 10 as on level 1.

The distance to gold is counted from the hearth.

Spawning heroes just drops them in.

Woudo
May 27th, 2014, 20:58
Fixed it by lifting code similar to what I wanted from map11 and modifying it. I'd done things somewhat wrong but the kicker was I referred to the hero player as Player4 (as they're Player4 in ADiKtED) but scripting wanted me to refer to them as PLAYER_GOOD.



REM ##### Fly harass at gems #####
IF(PLAYER_GOOD,GAME_TURN >= 250)
SET_TIMER(PLAYER_GOOD,TIMER1)
ENDIF

IF(PLAYER_GOOD,FLAG0 == 0)
IF(PLAYER_GOOD,TIMER1 > 500)
NEXT_COMMAND_REUSABLE
ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,FLY,-2,8,5,0)
NEXT_COMMAND_REUSABLE
SET_TIMER(PLAYER_GOOD,TIMER1)
ENDIF
ENDIF



REM ##### Left-side Dwarven raiding party #####
IF(PLAYER_GOOD,FLAG0 == 0)
IF(PLAYER_GOOD,TIMER1 > 500)
NEXT_COMMAND_REUSABLE
ADD_PARTY_TO_LEVEL(PLAYER_GOOD,DORF_SQUAD_LEFT,-1,1)
NEXT_COMMAND_REUSABLE
SET_TIMER(PLAYER_GOOD,TIMER1)
ENDIF
ENDIF

REM ##### Right-side Dwarven raiding party #####
IF(PLAYER_GOOD,FLAG0 == 0)
IF(PLAYER_GOOD,TIMER1 > 500)
NEXT_COMMAND_REUSABLE
ADD_PARTY_TO_LEVEL(PLAYER4,DORF_SQUAD_RIGHT,-3,1)
NEXT_COMMAND_REUSABLE
SET_TIMER(PLAYER_GOOD,TIMER1)
ENDIF
ENDIF

Still have some issues to iron out but I doubt it's something you would be able to help me with.

Despite using ADD_PARTY_TO_LEVEL and not ADD_TUNNELER_PARTY_TO_LEVEL, the tunnelers in the group still tunnel. I was hoping to have them as a weaker dwarf of sorts. I'm thinking the only way I could get around it was if I somehow made them lose party leadership to something else but i'll probably just scrap the idea altogether.
Secondly, the flies that I have set to harass the gems are for some reason getting stuck in the water. They can't figure out how to elevate themselves a tiny fraction to clear the half-block where a water tile meets a dirt-path/claimed-land tile.

Either way, i'll try to fix these things in the morning.

YourMaster
May 27th, 2014, 22:32
I know you can modify creature stats of specific named creatures, perhaps this includes the skills they have. If so, you could take away the digging-skill of the tunnelers you don't want tunneling.

Woudo
May 28th, 2014, 14:12
Actually, can you tell me how i'd go about doing that? I'm probably going to change the three spawns on the first level to just generic hero spawns instead, but for the second level, I need to engineer a way of stopping fly/spider infighting.

I mean, I could delete the line in the fly/spider .cfg but... that's a bit extreme. I only want it to take effect for the one level and revert back to normal afterwards.

- - - -

So I noticed a bunch of scripts similar to;


SET_CREATURE_FEAR(​[creature],​[a])

And looked for the line in the fly/spider cfg;

LairEnemy = SPIDER
LairEnemy = FLY

and figured maybe I could just poop out something similar and it'd work.



SET_CREATURE_LAIRENEMY(FLY,TROLL)
SET_CREATURE_LAIRENEMY(PLAYER0,FLY,TROLL)
SET_CREATURE_LAIR_ENEMY(FLY,TROLL)
SET_CREATURE_LAIR_ENEMY(PLAYER0,FLY,TROLL)

SET_CREATURE_LAIRENEMY(SPIDER,TROLL)
SET_CREATURE_LAIRENEMY(PLAYER0,SPIDER,TROLL)
SET_CREATURE_LAIR_ENEMY(SPIDER,TROLL)
SET_CREATURE_LAIR_ENEMY(PLAYER0,SPIDER,TROLL)


It did not.

YourMaster
May 29th, 2014, 00:00
For that, can't you just make sure there are multiple lairs and a proper dungeon layout?

Woudo
May 29th, 2014, 07:38
It's for the AI player unfortunately. Even if I give them multiple lairs, they're not going to keep the flies/spiders separated.
I'm just going to hope the flies spend more time training or attacking the player than they do sleeping.

YourMaster
May 29th, 2014, 09:56
I think creatures will pick lairs without lair enemies if given the chance. The computer player doesn't need to do anything for that.
Just make sure there is enough lair space and they don't need to cross lairs to go someplace.

Where it could fall apart is if the flies decide to 'explore' their own dungeon.

Woudo
May 29th, 2014, 12:05
I have multiple sets of lairs and hatcheries set up for the AI but the high majority (~80%) of creatures beeline straight to the Lair closest to the heart/portal while ignoring the other two a bit further away. It's disappointing but there's not much else that can be done. I've been testing and retesting the level to make sure everything is functioning correctly, and every time I glance over the super-populated AI lair, there are fly corpses laying around.

I have bigger issues anyway. Flies spawned in from Hero Gates are having trouble exiting the water. I don't think it's something i've done wrong, but rather a problem with DK/KeeperFX.

---

This guy appears to be having the same problem;
http://keeperklan.com/threads/4702-Technical-issues

Going to finish up testing, move onto map 3 and just deep-six this map until the Flyer pathfinding gets fixed.

Ecarus
May 30th, 2014, 17:26
I have bigger issues anyway. Flies spawned in from Hero Gates are having trouble exiting the water. I don't think it's something i've done wrong, but rather a problem with DK/KeeperFX.

If you mean that sometimes flies keeps in one tiles going around it, i think is a common bug because it happens to me a lot of times.

About what did you ask first:

1.- No.
2.- LOL? I have to check that.
3.- No.
4.- Isnt unreadeable, is just confusing. Download keeperFX is better than vanilla dk1, you can use adikted with it and you can easily mod creatures as you want to.
5.- You cant, the ai will always dig to gold, even if he had gems he will continue digging for gold.
6.- Comes with DKG and KeeperFX.


I think creatures will pick lairs without lair enemies if given the chance.

I never have saw that, so i think that doesnt happens, otherwise shouldnt be a problem have, for example, flies and spiders. In my opinion is a mistake and that should be fixed, because if you hate someone why you should sleep at his side?

YourMaster
May 30th, 2014, 20:02
I never have saw that, so i think that doesnt happens, otherwise shouldnt be a problem have, for example, flies and spiders. In my opinion is a mistake and that should be fixed, because if you hate someone why you should sleep at his side?

If you build a dungeon with a lot of lairs, creatures will do some separation by type all by themselves. This way a good dungeon layout is rewarded. You'll still have fights if lair space becomes scares and if creatures have to cross lairs to get to other rooms. E.g. if you have to cross a lair to get to the treasury, on payday there is mayhem.

And on top of that, flies have the 'explore' job, which causes them to just fly around like idiots, and if they fly into a lair with a sleeping spider a fight will break out.

Woudo
May 31st, 2014, 11:42
I've already begun work on the level talked about in question 3,

3. If I wanted to make a map where the player needs to claim X number of Y rooms predetermined on the map, is there a way I can foolproof it so if the player sells the room, it doesn't lock them out of the victory objective?

I've yet to start the scripting for it but i'm assuming I can just use;


IF(PLAYER_GOOD,GARDEN == 0)
WIN_GAME
ENDIF

as the victory condition so no more problems there.


2. Looking at map20 in thing mode, why does the center castle have large white rings around it?
The white circles I spoke of ended up being the effect range of some lights, which I initially didn't even see in the editor.

Either way, i've got three maps done (although with that fly issue, some may need changing) out of I can't say how many.
I estimate the campaign will have maybe 7-8 maps overall.
I'll have some other questions further down the line when I have the levels done. Stuff like, how do you set a world as the 'secret' world? How would you import custom campaign backgrounds for the 'overworld'? Getting one of those is going to be a pain, I can't draw for beans.

I have a great idea for a secret world, but since it's a slap in the face to how DK normally plays, I can't just dump it in with the rest in case a person can't get past it.

Woudo
June 14th, 2014, 20:15
Alright, I need more help. I have a map with three separate keepers, all of which can be taken on in any order. When a keeper dies, a hero wave spawns. How can I do this using their dungeon heart?

I tried;



IF(TOTAL_DUNGEONS_DESTROYED == 1)
ADD_PARTY_TO_LEVEL(PLAYER_GOOD,BEEFSQUAD,-2,1)
ENDIF

################################################## #######################################

IF(TOTAL_DUNGEONS_DESTROYED == 2)
ADD_PARTY_TO_LEVEL(PLAYER_GOOD,BULKSQUAD,-2,1)
ENDIF

################################################## #######################################

IF(TOTAL_DUNGEONS_DESTROYED == 3)
ADD_PARTY_TO_LEVEL(PLAYER_GOOD,BEARSQUAD,-2,1)
ENDIF


But unfortunately "TOTAL_DUNGEONS_DESTROYED" isn't actually a thing.

Closest stuff available is;


DUNGEON_DESTROYED - Whether that players Dungeon Heart has been destroyed (0 if still active, 1 if destroyed)
ALL_DUNGEONS_DESTROYED - Whether all the players Dungeon Hearts has been destroyed (0 if still active, 1 if destroyed) (player independent)


The problem is, I have scaling parties per number of hearts killed so I can't just used DUNGEON_DESTROYED to spawn BEEFSQUAD for purple, in case the player kills yellow first and spawns BEARSQUAD (the hardest wave) 15 minutes in.


Also some other smaller stuff;

I don't need to REM my lines of ############# right? It doesn't seem to make a difference.
Is there a way to script tile changes? Like turning impenetrable rock into dirt/path? I remember something like that happening in DK2.

Woudo
June 15th, 2014, 13:41
Fixed the victory condition issue.




REM ##### FIRST LOTL PARTY #####
IF(PLAYER1,DUNGEON_DESTROYED == 0)
IF(PLAYER2,DUNGEON_DESTROYED == 0)
IF(PLAYER3,DUNGEON_DESTROYED == 1)
ADD_PARTY_TO_LEVEL(PLAYER_GOOD,BEEFSQUAD,-2,1)
ENDIF
ENDIF
ENDIF

IF(PLAYER1,DUNGEON_DESTROYED == 1)
IF(PLAYER2,DUNGEON_DESTROYED == 0)
IF(PLAYER3,DUNGEON_DESTROYED == 0)
ADD_PARTY_TO_LEVEL(PLAYER_GOOD,BEEFSQUAD,-2,1)
ENDIF
ENDIF
ENDIF

IF(PLAYER1,DUNGEON_DESTROYED == 0)
IF(PLAYER2,DUNGEON_DESTROYED == 1)
IF(PLAYER3,DUNGEON_DESTROYED == 0)
ADD_PARTY_TO_LEVEL(PLAYER_GOOD,BEEFSQUAD,-2,1)
ENDIF
ENDIF
ENDIF


REM ################################################## #######################################
REM ################################################## #######################################


REM ##### SECOND LOTL PARTY #####
IF(PLAYER1,DUNGEON_DESTROYED == 1)
IF(PLAYER2,DUNGEON_DESTROYED == 1)
IF(PLAYER3,DUNGEON_DESTROYED == 0)
ADD_PARTY_TO_LEVEL(PLAYER_GOOD,BULKSQUAD,-2,1)
ENDIF
ENDIF
ENDIF

IF(PLAYER1,DUNGEON_DESTROYED == 0)
IF(PLAYER2,DUNGEON_DESTROYED == 1)
IF(PLAYER3,DUNGEON_DESTROYED == 1)
ADD_PARTY_TO_LEVEL(PLAYER_GOOD,BULKSQUAD,-2,1)
ENDIF
ENDIF
ENDIF

IF(PLAYER1,DUNGEON_DESTROYED == 1)
IF(PLAYER2,DUNGEON_DESTROYED == 0)
IF(PLAYER3,DUNGEON_DESTROYED == 1)
ADD_PARTY_TO_LEVEL(PLAYER_GOOD,BULKSQUAD,-2,1)
ENDIF
ENDIF
ENDIF


REM ################################################## #######################################
REM ################################################## #######################################


REM ##### FINAL LOTL PARTY ####
IF(PLAYER1,DUNGEON_DESTROYED == 1)
IF(PLAYER2,DUNGEON_DESTROYED == 1)
IF(PLAYER3,DUNGEON_DESTROYED == 1)
ADD_PARTY_TO_LEVEL(PLAYER_GOOD,BEARSQUAD,-2,1)
ENDIF
ENDIF
ENDIF


Heroes appear to be flawless now.

BIG ISSUES with the keepers. They vye for control of the players gems and gold making the early stages of the game a nightmare of constant imp wars. I don't know what I can do to stop them doing this.

Additionally, enemy keepers seem to generate LAND instead of building a bridge.

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

I filled all of their treasuries with tier 5 gold hoards and it delayed them for a bit since they wouldn't dig with a full treasury. Still became very interested in the gems very far away despite having their own much, much closer. The player area is a mess of imps from all four factions running all over the place. I originally added hero parties to harass the players gems but LITTLE DID I KNOW, the AI keepers were going to do it for me. Makes me wish for a trap ala Sentry/Lightning/Fear from DK2 that is specifically made to deal with annoying imps.

I feel like I made a mistake giving the keepers pre-built dungeons. They butcher it with <9 tile rooms all over the place, desperately trying to find somewhere to build. Having pre-built dungeons means they gobble up all the good-tier early game creatures like dragons/biles as well as lategame creatures the player won't see for ~10 minutes like mistresses and orcs. I'm going to replace all of their dungeons with dirt, maybe expand them a bit and place gold around their gems to hopefully keep them preoccupied for a while.

mefistotelis
June 15th, 2014, 16:30
I believe this one was never answered:


2. Looking at map20 in thing mode, why does the center castle have large white rings around it?

These are ranges of effect of static lights. In 'thing' mode, static lights are visible as "L" letters.

EDIT: oh, it was answered, sorry.


I gotta ask though, how did the /campaigns/ bundled with KeeperFX get chosen? No finger-pointing, but a few of them are of questionable quality.

These were the campaigns for which people offered to make land views and record mentor introductions. I'd agree not all of them are good.


enemy keepers seem to generate LAND instead of building a bridge.

I've seen that once too; it's a strange bug..
But to fix that, I'd need a saved game which reproduces the problem, created BEFORE it happened.

Woudo
June 17th, 2014, 17:40
Alright guys, i've hit a snag on my 4th? map.

The player has to kill two keepers.
The map has a sub-objective of saving ten Tentacles scattered around the map and "returning" them to their village.
I got to thinking. It would be pretty cool if when the player found the Tentacle, they actually went back to their village instead of just being given to the player.

So, Option A.
(if [Player] tentacle count == X, add_creature_to_level for the village, tentacle).
That can be done with script.
As far as I know though, there is no way to force a players creature out of the game through script. While I can definitely check if the player has saved a tentacle, and I can add one to the allied keeper, I can't get rid of the one the player owns. Is there some kind of kill/remove command I can specify for creatures? It'll be weird for the tentacle to poof into red dust or just straight up die, and the player probably wouldn't even notice the tentacle walk out of the allied keepers dungeon heart so they'd be a bit confused, but at least it'd be functional.

Option B.
A give/cede command would be a direct answer to this problem.

Option C - The already functional but boring answer that'd require me to redo my map aesthetic.
Rebuild the dilapidated prisons so the Tentacles are actually imprisoned, and rather than being neutral, are owned by the allied keeper. When the player claims the prison, they should walk back to base by themselves.


This being said, I tested the phrase "TOTAL_CREATURE,(creature)" in game and it actually works. I'm using the Adikted scripting reference and it doesn't list this as being a valid command. Is there something more up to date that I can read from?


IF(PLAYER0,TOTAL_CREATURE,TENTACLE >= 1)
QUICK_INFORMATION(1,"dickbutt")
ENDIF

mefistotelis
June 17th, 2014, 20:48
I'm using the Adikted scripting reference and it doesn't list this as being a valid command. Is there something more up to date that I can read from?

I don't know what you're using, but the only compete reference (though complete for original DK, not including KeeperFX extensions) is here:

http://keeper.lubiki.pl/dk1_docs/dk_scripting_ref.htm

Woudo
June 18th, 2014, 03:53
That's exactly what i'm using, v1.3 and all. Somehow I only saw TOTAL_CREATURES_LEFT and not TOTAL_CREATURES. That + it came with Adikted so the thought it may have been outdated was sitting at the back of my mind the entire time. My mistake.

Originally the lost tentacles were in derelict prisons with collapsed roofs/walls and skeleton guards. It was supposed to show they had been gone for some time. Once the player rescued all the tentacles, the keeper would become an ally and help the player.

I've had to make some adjustments;
- Skeletons changed to regular humans. 'Story' changed to reflect that.
- Base has been repaired.
- Neutral Tentacles changed to imprisoned Keeper(AI) Tentacles.
- Allied Keeper portal removed.

My issue now is, how do I check if the player has rescued the tentacles? There's nothing that looks at 'Imprisoned' creatures, and they start off as the Keeper's(AI) so I can't use TOTAL_CREATURES.
I'm thinking i'll have to bottleneck the keeper base and add an action point that counts the number of times a Tentacle walks over it. Tentacles already in the base won't really wander around, they should just sleep most of the time, so it should only count the tentacles that are released from Prison and making their way back home.

But.. what if an enemy keeper instigates a fight and pulls a bunch of tentacles over the action point.
Or the friendly Keeper picks up a Tentacle that's been released from prison before it goes over the action point.
uh
I need to think about this.

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

Well that was quick.

I'll just use;


IF(PLAYER_GOOD,PRISON == 0)

since it can be assumed all tentacles have been rescued if all prisons have been claimed.

mefistotelis
June 18th, 2014, 17:32
My issue now is, how do I check if the player has rescued the tentacles? There's nothing that looks at 'Imprisoned' creatures, and they start off as the Keeper's(AI) so I can't use TOTAL_CREATURES.

Actually, you can.

I doubt it was like this from original DK, but in current KeeperFX, TOTAL_CREATURES counts only the creatures a player controls. Creatures kept by enemy (either in prison or torture chamber) are substracted from the amount.

Also - I don't think you could imprison a creature by putting it into a room at start in original DK. I fixed that just a few days ago.

Woudo
June 18th, 2014, 18:12
Well i'm going through final testing of the level right now.


I originally had some archers on guard posts out by the river-side. Normally heroes with a direct path to a dungeon heart will attack it, but those archers stayed on the guard posts... somewhat. I had to remove them because any creature that got close enough for them to aggro no, 'woke them up'. I'm not sure if it was seeing the creature that woke them up or if it was them stepping off the guard post, but after that happened they'd stop guarding and seek out the player heart.

I'll quickly bum-rush the checking regarding the imprisoned tentacles.

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

Definitely worked. They were even making the adorable neck-waving motions from being imprisoned.

You said "A few days ago". I'm not using the nightly builds of Keeper FX which I guess would be why.

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

And uh, while you're here. There's a SET_ALLY option to make keepers friends. How do I undo that? For the most part the map is done, but I don't know how to unally one keeper from the other.

dayokay
June 19th, 2014, 17:35
Have a look here for instructions in switching alliances on & off:

https://code.google.com/p/keeperfx/wiki/NewLevelScriptCommands

Dayo

Woudo
June 22nd, 2014, 03:50
Okay so what I have is;


ALLY_PLAYERS(PLAYER1,PLAYER2)
ALLY_PLAYERS(PLAYER1,PLAYER3)
ALLY_PLAYERS(PLAYER2,PLAYER3)
ALLY_PLAYERS(PLAYER0,PLAYER2)


P1,P2,P3 are all allied.
P1,P2 are allied.

But I should be writing;


REM ## Initial Alliance ##
ALLY_PLAYERS(PLAYER1,PLAYER2,1)
ALLY_PLAYERS(PLAYER1,PLAYER3,1)
ALLY_PLAYERS(PLAYER2,PLAYER3,1)
ALLY_PLAYERS(PLAYER0,PLAYER2,1)




REM ## War was declared ##
IF(WATER == WET)
ALLY_PLAYERS(PLAYER3,PLAYER1,0)
ALLY_PLAYERS(PLAYER3,PLAYER2,0)
ENDIF


Solves the problem, thanks m8.