Page 2 of 3

Re: Turn-based script possible?

Posted: Sun Dec 09, 2012 3:07 am
by Neikun
ohh you want to enter turn based combat when you spot a monster. -or it spots you- like in Baldur's gate.

Re: Turn-based script possible?

Posted: Sun Dec 09, 2012 3:34 am
by Komag
flatline wrote:I thought Jkos posted the turn-based version some time ago? Or I'm just following these forums too closely... :)
if he did I must have missed it. so does this mean someone is going to make a life size chess board dungeon mod? we could use those big flat game pieces someone made!

Re: Turn-based script possible?

Posted: Sun Dec 09, 2012 3:35 am
by Neikun
Komag wrote:
flatline wrote:I thought Jkos posted the turn-based version some time ago? Or I'm just following these forums too closely... :)
if he did I must have missed it. so does this mean someone is going to make a life size chess board dungeon mod? we could use those big flat game pieces someone made!
It was like the very first thing his LoG framework was used for! xP

Re: Turn-based script possible?

Posted: Sun Dec 09, 2012 11:32 am
by JKos
Rook wrote: One thing I noticed right away was the little delay between turns. For example, When it was my turn, I could easily backstep 10 spaces. Only when I stopped, did the enemy's turn begin. Is there a way to restrict movement to one or two steps? Either block movement completely after second step, or end turn for player on third step.
That's a bug, thanks for reporting it. I'm pretty sure it worked correctly some time ago, but I have made so many modifications to my framework that some of them must have broken it. Haven't tested the turn based combat a while.
Rook wrote: Also, is there a way to begin turn-based with a key press? If you are familiar with Might & Magic, you'll know exactly what I mean. :)
In theory yes but unfortunately the only hookable key is the rest key. When the next patch comes out it could be done with the gui.
Btw. If you are interested to developing the turn based combat further, be my guest. I just don't have the time for it now.

Development tip: make a script entity named turn_based in your dungeon and just copy paste the script from the mod_assets/framework/modules/turn_based.lua in to it. Make sure that you copy paste only the script entity part(enclosed wit double square brackets), not the whole file contents. After that the script is loaded from your dungeon instead of the turn_based.lua file and you can easily edit/debug the script in dungeon editor.

Re: Turn-based script possible?

Posted: Sun Dec 09, 2012 12:12 pm
by JKos
I just tested it and it's completely broken, I'm not sure what has happened but the script is messed up :) I will fix it, shouldn't be that hard.

Re: Turn-based script possible?

Posted: Sun Dec 09, 2012 1:49 pm
by Merethif
Rook wrote:
Merethif wrote: Most likely Assassination skill becomes obsolete because backstabbing would be impossible.
If turn-based was toggle-based. What is stopping you from backstabbing then entering turn-based mode?
Backstabs are used for entire fight, not only at the beginning. It's about outmanoeuvring the monster and backstabbing it again and again. You can't outmanoeuvre a monster if you both have the same movement value.

Side note: In original game it was monsters speed and manoeuvrability that makes backstabbing easy/difficult/nearly impossible. Ogre's slow after-charged recovery makes it easy target, but Shrak Torr with its lightning reflex can't be attacked from behind with similar ease, and so on. I'm afraid that with turn based combat - unless different monsters will have different movement values per turn - there will be no strategical difference between fighting an ogre and Shrak Torr.

Also I can see another two issues worth considering when tweaking turn based combat:

- In your proposed mode you can't shoot and run at the same time - it's either you move or hit, which make kiting with ranged weapons impossible.
In original game I usually move and hit at the same time - for example shooting when back-pedalling.

- What about dodging arrows and spells. Sidestepping stops being an option when a skeleton shoots at you. Maybe accuracy for spells and missiles should be implemented?

Of course nobody said that assassination and kiting with ranged weapon are a must. But if you underpower assassination and ranged combat it may be worth to either scrap rogue class entirely or provide it with some abilities making rogue viable, like dual wielding or debuffing.

Re: Turn-based script possible?

Posted: Sun Dec 09, 2012 2:45 pm
by Asteroth
Yeah, I can definately see turn based combat changing the value of both weapons and classes. Rogues are screwed, depending on how it works slower weapon raise in value. There are a lot of issues.

On the other hand though it may never be as balanced as the main game (itself not perfect), it could make a darn fun mod.

Re: Turn-based script possible?

Posted: Sun Dec 09, 2012 4:31 pm
by JKos
Ok, I fixed it and cleaned up the code a bit. Get it from here https://sites.google.com/site/jkosgrimrock2/

In my turn based mod only the melee combat is turn based (it's activated only when a monster hits you), so you can kite with ranged weapons just like in original game. And you can backstab too if you don't let the monster hit you.

Re: Turn-based script possible?

Posted: Sun Dec 09, 2012 7:16 pm
by Rook
Thanks alot JKos. I shall test out the fixes and tinker with your script. I shall post the results later. :)

Re: Turn-based script possible?

Posted: Sun Dec 09, 2012 8:42 pm
by JKos
Sorry, I accidentally uploaded a non-working version (there was one square bracket comment, which breaks the module loading system), but now it should work.

Looking forward to your tweaks. And if there is anything you can't figure out in that script just ask.