News:

SMF - Just Installed!

Main Menu

Recent posts

#71
Knights Discussion / Re: mod list
Last post by d.healey - August 03, 2017, 05:16:37 PM
Where can I download the multiwand mod?
#72
Knights Discussion / Linux issues
Last post by d.healey - August 02, 2017, 12:37:45 AM
Hi,

I've just recently started playing this game on Windows and I'm really enjoying it. I would like to play it on GNU/Linux, I'm running LinuxMint, unfortunately when I try running it in Wine I get an error message about it being unable to find fonts - I've checked that the correct fonts listed in the text file are installed on my system - I've also tried building and installing from the makefile but I get a segmentation error which as I understand is a memory access error somewhere in the code. Any tips?
#73
Knights Discussion / Re: Knights with Steam Control...
Last post by K9 - January 22, 2017, 03:26:40 AM
Thank you for sharing this information about playing Knights on TV with Steam link, very fascinating.

I'm researching that system and controllers you mentioned, looking forward to more of your settings details if you figure out more, and I wonder if there's anything Stephen could do to make a version of Knights that resolves any of the menu issues you mentioned when playing specifically through a steam link.
#74
Knights Discussion / Knights with Steam Controllers
Last post by Julian - January 15, 2017, 01:27:44 AM
My brother and I have been playing Knights on our TV (through Steam Link) with Steam Controllers. It's fun to play with controllers instead of the keyboard. The only glitches seem to be navigating the menus with the controller is clunky, and Knights stops working if you bring up the Steam Big Picture overlay while Knights is in the menu screens.

You have to select "Add a Non-Steam Game to my Library" to launch it for Steam Link, and you have to deselect "Allow Desktop Configuration in Launcher" to have the controller bindings work. I'll post my Steam Controller bindings file here once I get it perfected.
#75
Knights Discussion / Re: LUA-question
Last post by Stephen - November 08, 2016, 06:22:01 PM
Nice, I like it ;)
#76
Knights Discussion / Re: LUA-question
Last post by ImpassIve - November 07, 2016, 07:55:09 PM
An offtop note:
hey, looks like I've got a personal remote-controlled monster!
#77
Knights Discussion / Re: LUA-question
Last post by Stephen - November 07, 2016, 07:30:48 PM
OK, that mod does sound interesting.

I did once have an idea to make AI controllable from Lua, so that you could write little Lua scripts to control what a monster does. That would be quite a lot of work though.

There's no good reason why ai_fear should be walking monsters only... it just needs to be implemented in the FlyingMonsterAI as well. (The only reason it wasn't implemented, is because it was only needed for zombies at the time.) I guess I could do that sometime.

If I ever make another indie game, I will put the scripting in from the beginning, instead of tacking it on at the end like I did with Knights... that is the cause of most of these problems I think :)
#78
Knights Discussion / Re: LUA-question
Last post by ImpassIve - November 07, 2016, 09:42:25 AM
Hello, Stephen.

We have already changed the concept of the mod, so described questions are not so important anymore...

Anyway, we were planning to make a vampire, who could turn into a special bat (in a similar way, as it was implemented in Rat Riders mod: just replacing old monster with another one) to avoid lethal damage. This bat was supposed to run away from all knights and if it is still alive after XX seconds - it can turn back into a vampire form (fully regenerated, of course).

  1) Since we don't have much control over AI behaviour, we had an idea to fill "ai_fear" field with all possible knight weapons, but... yeah, now I see in the wiki - "ai_fear" is listed in "Walking monsters only" category.

  2) Then we had another idea: FlyingMonsterAI class from the source code has a "run_away_flag" variable, which forces flying creature to run away from the target. It is even possible to set it into "true" state via Lua script, by calling "kts.Damage" with zero amount of damage at each tile (or just frequently enough).

But there were a problem: it cannot be done from inside the "on_move" hook of the monster (see previous post), while other hooks are... not so reliable. Looks like Lua doesn't provide a way to run a function with specific time intervals?

Also, later we realised that a monster with constant "run_away_flag == 1" wouldn't run from the knight - it will run in the direction, pointed by knight's facing, so we had to abandon this concept.

  3) There were a backup plan: in some legends, vampires are turning into fog instead of bats, so we could use (1) case with walking type of monster. But a walking monster can easily be cornered, so this wouldn't add a lot to his survivability.

Anyway, as I mentioned in the beginning of the post, the concept of the mod has been changed and it doesn't require any manipulations over monster's behavious anymore.

EDIT:
Quote from: ImpassIve_rus on November 07, 2016, 09:42:25 AM
Looks like Lua doesn't provide a way to run a function with specific time intervals?

Ah, my bad!
I haven't noticed the "kts.AddTask()" function...
#79
Knights Discussion / Re: LUA-question
Last post by Stephen - November 06, 2016, 10:36:11 PM
Hi,

Sorry for taking so long to reply... I somehow missed your post

I'm a little confused, what are you trying to do exactly?
#80
Knights Discussion / Re: LUA-question
Last post by ImpassIve - October 30, 2016, 04:44:13 PM
That's me again!
Yesterday, Moo and I were discussing some mod ideas and he pointed out the fact "ai_fear" field wouldn't work for bats.

I had to recheck this, and that's true: monsters with "flying" type are ignoring this field - FlyingMonsterAI class constructor doesn't even has a parameter to take this list.
So, the question is:
- Right now, do we have any way to force flying monster to run away from all knights? Originally, I was planning to add all possible weapon types into "ai_fear" list, but maybe indirect manipulation over "run_away_flag" would somehow work? (I don't know, how about constantly hitting a monster with zero damage strikes via script?)
- Otherwise, is there any chance of implementing such a possibility in the future, or should we stick to a walking type of monsters?

Thanks for attention

P.S. I've tried "hitting a monster with zero damage" idea by adding custom "on_move" function, but that didn't worked for this reason:

bat->move(MT_MOVE);  // It moves
bat->runMovementAction(); // It calls "on_move" lua function
bat->clearRunAwayFlag(); // It resets the flag

"on_move" action is called immediately before resetting the flag, so we cannot use it - at least not for the monster, who caused the event.
But if we would find another reliable event generator - I guess, this method may actually work