Would it be possible to implement fake-turn based combat? Similar to Dragon Age: Journeys / Heros of Might & Magic / jRPGs. Every time someone/thing in the playable party has no actions, pause is activated and that character is selected.
Hypothetical: Turn-based combat?
Débuté par
Primogenitor
, déc. 16 2009 04:05
#1
Posté 16 décembre 2009 - 04:05
#2
Posté 16 décembre 2009 - 07:52
I'd think you could script that. How's it going Primo?
#3
Posté 16 décembre 2009 - 07:54
Well, everything just stands around if it has nothing in its action queue. All combat is script based. Pause is controlable by scripting. You can fire animations off the scripting, so you can make the characters freeze rather than just stand around. Or assign actions then execute the animations. Also welcome back
#4
Posté 17 décembre 2009 - 04:18
So it could be as an on-heartbeat script; see if anyone in the players party has an empty action queue and is in combat, and if so select them and pause.
Any more elegant ideas? I havn't had time to properly poke around yet, need the Christmas holidays!
(And Thank You both
)
Any more elegant ideas? I havn't had time to properly poke around yet, need the Christmas holidays!
(And Thank You both
#5
Posté 17 décembre 2009 - 04:26
I don't know if it is possible, but perhaps it could be integrated as a custom tactics option? That would make it easy to turn off and on and it would also make it possible to use turn-based only for some characters, not all.
I would be very interested in something like that, so if you get into it please let me know! I might be able to help with the coding, but right now I don't have much time.
I would be very interested in something like that, so if you get into it please let me know! I might be able to help with the coding, but right now I don't have much time.
#6
Posté 17 décembre 2009 - 07:20
Well, the AI must know when an action is finished in order to add another (as you can only queue one action at a time). So it must be possible to do the same but just pause instead of adding another.
#7
Posté 17 décembre 2009 - 08:07
Depends, if you look at NWN some parts were native code that could not be changed. I don't know how much of this game that runs in overridable scripts and how much (if any) that is compiled and fixed. In addition it must be a relatively minor change or it is not worth the maintenance when new patches are released - so far fairly often.
#8
Posté 17 décembre 2009 - 08:08
It's done entirely by 2das and scripting.
#9
Posté 17 décembre 2009 - 08:39
Compared to NWN, DA scripting seems a lot more flexible; clearly, BioWare learnt a lot from how/what the community did/tried.
Looking through the code is certainly instructive & entertaining. "Generate SkyNet Position Tracking Event" is my favourite so far...
I think Ive found where to start. In player_core.nss theres a bit:
[dascript]
// -----------------------------------------------------------------
// Legacy Heartbeat event. Left for the consumption of modders.
// Be careful with it, it's not nice to run on a lot of creatures...
// -----------------------------------------------------------------
case EVENT_TYPE_HEARTBEAT:
{
bEventHandled = TRUE;
break;
}
[/dascript]
So I guess a script can be assinged (SetEventScript function?) to the player that can detect this event and respond accordingly? I guess ToggleGamePause is the other function to use.
Looking through the code is certainly instructive & entertaining. "Generate SkyNet Position Tracking Event" is my favourite so far...
I think Ive found where to start. In player_core.nss theres a bit:
[dascript]
// -----------------------------------------------------------------
// Legacy Heartbeat event. Left for the consumption of modders.
// Be careful with it, it's not nice to run on a lot of creatures...
// -----------------------------------------------------------------
case EVENT_TYPE_HEARTBEAT:
{
bEventHandled = TRUE;
break;
}
[/dascript]
So I guess a script can be assinged (SetEventScript function?) to the player that can detect this event and respond accordingly? I guess ToggleGamePause is the other function to use.
#10
Posté 17 décembre 2009 - 09:15
Primogenitor wrote...
So I guess a script can be assinged (SetEventScript function?) to the player that can detect this event and respond accordingly?
Just make sure to use EnablevEvent with it. From the description:
Description: Enables or disables the specified event for the target object. It should be noted that this function can be used on player characters to enable events that by default do not fire for players. By default, events fire all the time for NPC's and not at all for PC's.
Modifié par Challseus, 17 décembre 2009 - 09:25 .
#11
Posté 18 décembre 2009 - 01:41
You'd probably not want to use the heartbeat, maybe command complete event instead?
Modifié par fluffyamoeba, 18 décembre 2009 - 01:42 .
#12
Posté 18 décembre 2009 - 02:00
*kisses flufflyamoeba & BioWare*
Perfect! That should do nicely.
So it would be in the module load script to assign an "command complete event" to the player, and in that assigned event script pause the game when executed.
Perfect! That should do nicely.
So it would be in the module load script to assign an "command complete event" to the player, and in that assigned event script pause the game when executed.





Retour en haut







