Turn-based script possible?

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
User avatar
Neikun
Posts: 2457
Joined: Thu Sep 13, 2012 1:06 pm
Location: New Brunswick, Canada
Contact:

Re: Turn-based script possible?

Post by Neikun »

ohh you want to enter turn based combat when you spot a monster. -or it spots you- like in Baldur's gate.
"I'm okay with being referred to as a goddess."
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
  • Message me to join in!
User avatar
Komag
Posts: 3659
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

Re: Turn-based script possible?

Post 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!
Finished Dungeons - complete mods to play
User avatar
Neikun
Posts: 2457
Joined: Thu Sep 13, 2012 1:06 pm
Location: New Brunswick, Canada
Contact:

Re: Turn-based script possible?

Post 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
"I'm okay with being referred to as a goddess."
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
  • Message me to join in!
User avatar
JKos
Posts: 464
Joined: Wed Sep 12, 2012 10:03 pm
Location: Finland
Contact:

Re: Turn-based script possible?

Post 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.
- LoG Framework 2http://sites.google.com/site/jkoslog2 Define hooks in runtime by entity.name or entity.id + multiple hooks support.
- cloneObject viewtopic.php?f=22&t=8450
User avatar
JKos
Posts: 464
Joined: Wed Sep 12, 2012 10:03 pm
Location: Finland
Contact:

Re: Turn-based script possible?

Post 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.
- LoG Framework 2http://sites.google.com/site/jkoslog2 Define hooks in runtime by entity.name or entity.id + multiple hooks support.
- cloneObject viewtopic.php?f=22&t=8450
User avatar
Merethif
Posts: 274
Joined: Tue Apr 24, 2012 1:58 pm
Location: Poland

Re: Turn-based script possible?

Post 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.
User avatar
Asteroth
Posts: 471
Joined: Wed Oct 24, 2012 10:41 am
Location: Eastern U.S.

Re: Turn-based script possible?

Post 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.
I am the God of darkness and corruption.
viewtopic.php?f=14&t=4250
User avatar
JKos
Posts: 464
Joined: Wed Sep 12, 2012 10:03 pm
Location: Finland
Contact:

Re: Turn-based script possible?

Post 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.
- LoG Framework 2http://sites.google.com/site/jkoslog2 Define hooks in runtime by entity.name or entity.id + multiple hooks support.
- cloneObject viewtopic.php?f=22&t=8450
User avatar
Rook
Posts: 71
Joined: Thu Dec 06, 2012 5:48 pm
Location: Belfast, UK

Re: Turn-based script possible?

Post by Rook »

Thanks alot JKos. I shall test out the fixes and tinker with your script. I shall post the results later. :)
User avatar
JKos
Posts: 464
Joined: Wed Sep 12, 2012 10:03 pm
Location: Finland
Contact:

Re: Turn-based script possible?

Post 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.
- LoG Framework 2http://sites.google.com/site/jkoslog2 Define hooks in runtime by entity.name or entity.id + multiple hooks support.
- cloneObject viewtopic.php?f=22&t=8450
Post Reply