So I made the tutorial module pretty much directly following what is in the wiki, and I have the module working where I can go and get the quest and go into the room and kill the enemies. The quest updates and knows that it is completed and time to turn in, but when I try to click the door to leave, it says I am still in combat no matter what I do.
What am I missing here?
Stuck in Combat?
Débuté par
hydra1448
, nov. 09 2009 12:33
#1
Posté 09 novembre 2009 - 12:33
#2
Posté 09 novembre 2009 - 01:16
I'm having the same problem. Anyone know what's going on with this?
#3
Posté 09 novembre 2009 - 01:58
Ok. Does anyone know of a script function or something that would force combat to end?
#4
Posté 09 novembre 2009 - 04:23
Anyone?
#5
Posté 09 novembre 2009 - 02:38
Bump
#6
Posté 09 novembre 2009 - 02:49
Lol, same problem here. Never used an editor before and I figured I'd just edit this file and see if it works but I have the same problem, once you've killed everyone in the inn you cannot leave combat and therefore cannot leave the inn. There must be some script for ending combat, perhaps forcing a cutscene?
#7
Posté 09 novembre 2009 - 09:31
How does no one have a fix/idea for this?
#8
Posté 09 novembre 2009 - 10:17
OK... I found the solution while digging through some of the core scripts.
I did find the function to properly end combat for all party members, and it should probbaly be used in a player heartbeat type of setup that moniters if any monsters are present, but it also works after the monsters have been destroyed in the hut. I placed it after the PLOT flag was set, but it probably really should be used in a more global "player heartbeat" type of script. I just have to figure out how to apply such a script to the PC.
You can use the delay event function to fire the CHANGE_GM event and stop combat for all party members. It looks like this:
DelayEvent(1.0f, GetModule(), Event(EVENT_TYPE_DELAYED_GM_CHANGE));
I spliced it into my code this:
case EVENT_TYPE_TEAM_DESTROYED:
{
if (GetEventInteger(ev,0) == 200)
{
WR_SetPlotFlag(PLT_CLEAR_HUT, HUT_MONSTERS_SLAIN, TRUE);
DelayEvent(1.0f, GetModule(), Event(EVENT_TYPE_DELAYED_GM_CHANGE));
}
break;
}
I did find the function to properly end combat for all party members, and it should probbaly be used in a player heartbeat type of setup that moniters if any monsters are present, but it also works after the monsters have been destroyed in the hut. I placed it after the PLOT flag was set, but it probably really should be used in a more global "player heartbeat" type of script. I just have to figure out how to apply such a script to the PC.
You can use the delay event function to fire the CHANGE_GM event and stop combat for all party members. It looks like this:
DelayEvent(1.0f, GetModule(), Event(EVENT_TYPE_DELAYED_GM_CHANGE));
I spliced it into my code this:
case EVENT_TYPE_TEAM_DESTROYED:
{
if (GetEventInteger(ev,0) == 200)
{
WR_SetPlotFlag(PLT_CLEAR_HUT, HUT_MONSTERS_SLAIN, TRUE);
DelayEvent(1.0f, GetModule(), Event(EVENT_TYPE_DELAYED_GM_CHANGE));
}
break;
}
#9
Posté 09 novembre 2009 - 10:24
I found a way to force the player's party out of combat. I found it in the player_core script which means the scripting engine doesn't apply that script by default on the player character, I assume. It should be used in a "heart beat" type of setup and triggered when no enemies are percieved by the player, but I'm not sure how to do that yet.
I think it's changing the "game mode" from combat to "explore", but I'm not 100% sure. I added this to my script after setting the plot flag for MOSTERS_SLAIN:
DelayEvent(1.0f, GetModule(), Event(EVENT_TYPE_DELAYED_GM_CHANGE));
This is shoddy scripting, I know, as it should be a part of the player's "heartbeat" script to fire when no enemies are percieved.
I don't suppose anyone knows how to or where to apply player_core? I know you apply scripts on the module and area levels and you can even add scripts to items, but how do you assign a script to the player character to achieve this "heartbeat" script?
*Edit* Weird! I tried to post the other post ealier today and it didnt go through. It looks like it double posted as I submittted this second post. LOL. Sorry!
I think it's changing the "game mode" from combat to "explore", but I'm not 100% sure. I added this to my script after setting the plot flag for MOSTERS_SLAIN:
DelayEvent(1.0f, GetModule(), Event(EVENT_TYPE_DELAYED_GM_CHANGE));
This is shoddy scripting, I know, as it should be a part of the player's "heartbeat" script to fire when no enemies are percieved.
I don't suppose anyone knows how to or where to apply player_core? I know you apply scripts on the module and area levels and you can even add scripts to items, but how do you assign a script to the player character to achieve this "heartbeat" script?
*Edit* Weird! I tried to post the other post ealier today and it didnt go through. It looks like it double posted as I submittted this second post. LOL. Sorry!
Modifié par Reace10, 09 novembre 2009 - 10:26 .
#10
Posté 10 novembre 2009 - 12:09
Edit: Nix that.
First I'll assume your module script has a line like
Again, just theoretical until I actually try this out in the toolset, but what if you do this in your module's main script (or delayed until the PC has loaded if necessary - I don't know right now if GetHero() could return an invalid object). Maybe you'll need to hook up some more things, though.
If you're entering combat mode, it's weird that you can't disengage.
First I'll assume your module script has a line like
if (!nEventHandled) HandleEvent(ev, RESOURCE_SCRIPT_MODULE_CORE)at the end.
Again, just theoretical until I actually try this out in the toolset, but what if you do this in your module's main script (or delayed until the PC has loaded if necessary - I don't know right now if GetHero() could return an invalid object). Maybe you'll need to hook up some more things, though.
If you're entering combat mode, it's weird that you can't disengage.
#include "global_objects_h" // might already be included from elsewhere object oHero = GetHero(); EnablevEvent(oHero, TRUE, EVENT_TYPE_PERCEPTION_APPEAR); // necessary? EnablevEvent(oHero, TRUE, EVENT_TYPE_PERCEPTION_DISAPPEAR); SetEventScript(oHero , RESOURCE_SCRIPT_PLAYER_CORE);
Modifié par FollowTheGourd, 10 novembre 2009 - 12:56 .
#11
Posté 10 novembre 2009 - 01:38
Actually, if you run the demo module that comes with the toolset, you exit combat mode just fine after killing the bandits in the inn. It doesn't look like it's doing anything fancy in its main script.
Perhaps the necessary events and eventscript are hooked up for the PC when using CharGen as the demo script does (PreloadCharGen/StartCharGen). I'd have to assume they'd still be there for the PC when resuming from a saved game (or importing a character like they were saved in the .bic in NWN2).
I quickly tried it without, but I had no equipment and basically no health... so I didn't get far with that. I'll have to try again later after I set that up so it can pan out better.
Perhaps the necessary events and eventscript are hooked up for the PC when using CharGen as the demo script does (PreloadCharGen/StartCharGen). I'd have to assume they'd still be there for the PC when resuming from a saved game (or importing a character like they were saved in the .bic in NWN2).
I quickly tried it without, but I had no equipment and basically no health... so I didn't get far with that. I'll have to try again later after I set that up so it can pan out better.
Modifié par FollowTheGourd, 10 novembre 2009 - 01:44 .
#12
Posté 10 novembre 2009 - 05:00
well for me it doesnt exit combat mode in the demo module, and i havent altered it in any way.
#13
Posté 11 novembre 2009 - 12:46
I haven't played the "Demo" module that came with the tool set. I'm strictly referring to following the directions and steps from the Wiki's tutorial. I have referenced the Demo module trying to find how to "assign" a script to the player character like you can other objects in the game engine to create a "heartbeat" polling type of scripts to accomplish things such as ending combat when no enemies are perceived, but haven't had any success. Anyone know?
#14
Posté 11 novembre 2009 - 01:07
Edit: exported the whole shebang, and now I can verify you don't leave combat mode.hunharibo wrote...
well for me it doesnt exit combat mode in the demo module, and i havent altered it in any way.
< Deleted the rest >
Modifié par FollowTheGourd, 11 novembre 2009 - 02:45 .
#15
Posté 11 novembre 2009 - 02:47
OK, problem solved. When you do a full export, the game dumps harmful junk into your core override folder. Huzzah.
QUICK FIX: After you export from the toolset, empty, delete, or change the name of the folder My Documents/BioWare/Dragon Age/packages/core/override.
You shouldn't need any of the stuff it exported under there - at least for the demo module, and in fact it *IS* causing you to not be able to exit combat mode. The conversation was a red herring actually. I thought it odd that CharGen started you out in your undies...
What's causing the problems in the core override? Don't know, don't care. Well, I do but that's something for later. Fun times ahead if you ever want to modify core resources, which I'm guessing you shouldn't, but still.
QUICK FIX: After you export from the toolset, empty, delete, or change the name of the folder My Documents/BioWare/Dragon Age/packages/core/override.
You shouldn't need any of the stuff it exported under there - at least for the demo module, and in fact it *IS* causing you to not be able to exit combat mode. The conversation was a red herring actually. I thought it odd that CharGen started you out in your undies...
What's causing the problems in the core override? Don't know, don't care. Well, I do but that's something for later. Fun times ahead if you ever want to modify core resources, which I'm guessing you shouldn't, but still.
Modifié par FollowTheGourd, 11 novembre 2009 - 03:00 .
#16
Posté 02 décembre 2009 - 12:31
So basically those files should not have been there to begin with. It would appear that therer is some future intentions for the Full Export, for now this appears to be the only way to get it all working, nice work and very much appreciated FollowTheGourd





Retour en haut






